Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, The_Judge, Grant), 898 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Sapphire GPU ray-tracer #229541
09/28/08 13:55
09/28/08 13:55
Joined: Apr 2008
Posts: 235
TEXCOORD3
Foxfire Offline OP
Member
Foxfire  Offline OP
Member

Joined: Apr 2008
Posts: 235
TEXCOORD3
Hello,
I am starting development on my first GPU ray-tracer for use in almost every language and API (it runs as a vertex shader). I am interfacing the tracer for easy manipulation through lite-c!

Because this is my first tracer, I don't expect it to be the best in any way, but I'm sure it will help you create more realistic games and simulations.

As a preliminary idea, the tracer will take an array of either ENTITIES and calculate each polygon for tracing, or take an array of polygons themselves. Next the tracer will sort the polygons once per frame into a tree sorted by distance from the view. Finally, ray traces can be called from anywhere within a pixel or vertex shader and return the distance, polygon ID, and (in version 2.0) the texture color(s) of the hit target.

This contribution will be mainly for programmers proficient in hlsl and/or assembley languages and will only feature limited automatic interfaces to reduce calculations and reduce interference with the individual programmers' needs.


---
GPU ray tracing is a meathod similar to c_trace but runs exclusivley on the GPU in different pixel stages. The main difference between the two functions is the speed. On my machine (mid-high end Alienware laptop), I can trace about 60 rays for every pixel in a frame and get about 40-60 fps (depends on amount of polys regestered with tracer). This is about 77,760,000 traces on my high-res monitor per frame compared to 1,000 c_traces on my dual CPUs while maintaining 60 fps. This is about 77,760 times faster.

The ray tracer can be used from photon mapping, to radiosity, to physics and even AI.

Expect some time between now and the release, I am just starting today and even have to do a LOT of research frown

-Mike-


http://www.groundtacticsgame.com/
Alienware m17x R Custom laptop
specs:
Intel Core 2 Extreme Quad CPU Q9300
2x Nvidia 280GTX 2GB vram
6GB ddr3 memory@ 1333Mhz
512GB SSD
1200p 17' screen
runs Crysis Warhead on max settings at 1200p at 90 fps
Re: Sapphire GPU ray-tracer [Re: Foxfire] #229547
09/28/08 14:57
09/28/08 14:57
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
nice to hear. ray tracing is the way of the future. I forgot were, but I remember reading an interview (i think it was posted on here somewhere) that the owner of unreal had predicted that eventually the gpu wont even be used very much in the future as all the processes will go back to the cpu using techniques such as raytracing. I'll be interested to see how this turns out.

Re: Sapphire GPU ray-tracer [Re: lostclimate] #233028
10/25/08 23:21
10/25/08 23:21
Joined: Apr 2008
Posts: 235
TEXCOORD3
Foxfire Offline OP
Member
Foxfire  Offline OP
Member

Joined: Apr 2008
Posts: 235
TEXCOORD3
Hello,
So far my ray tracer is coming along quite well! It currentley only supports dynamic lights (cast shadows), sphere objects, and polygons (ONLY show reflection, polys do not show up IN reflections.. yet).

I have tested it with 3 dynamic lights, animated one light, 4 spheres, running at a 4 reflection-ray limit (for serial reflections). It runs at what GS says "230 fps" which I assume is basically faster than what GS can calculate as this is not a realistic speed.

--------------------------------------------------------
SO, I am actually in need of some help with the project!
--------------------------------------------------------

I have been trying to add block/box object support but I can't get the collision detection to work correctley (the simple dot quad formula only applies to spheres).

I would appreciate any help with a BBOX shader fragment code in particular.

I am also planning on adding full polygonal collision support and caustic/refraction traces as well.

PLEASE CONTACT ME and help me out! So far this is the COOLEST thing I have ever made let alone seen in GS, it would be awesome to complete this project and make a fully ray-traced game in GS!

sapphire specs:

requires:
-HLSL PS_3_0
-HLSL any VS

features:
(tbp - to be programmed, 100% - complete, ? - help appreciated)

-fully preformed on GPU 100%
-single pass 100%
-support real-time radiosity 100%
-shadows 100%
-multi-ray (serial) reflections 100%
-sphere objects 100%
-box objects tbp ?
-polygons tbp ?
-KD tree tracer architecture 100%
-caustics tbp
-unlimited dynamic lightsources 100%
-load models from .mdl on CPU tbp ?
-auto create KD tree tbp
-auto sync objects to tracer 50% (spheres only)


-Michael Auerbach-


http://www.groundtacticsgame.com/
Alienware m17x R Custom laptop
specs:
Intel Core 2 Extreme Quad CPU Q9300
2x Nvidia 280GTX 2GB vram
6GB ddr3 memory@ 1333Mhz
512GB SSD
1200p 17' screen
runs Crysis Warhead on max settings at 1200p at 90 fps
Re: Sapphire GPU ray-tracer [Re: Foxfire] #233029
10/25/08 23:25
10/25/08 23:25
Joined: Apr 2008
Posts: 235
TEXCOORD3
Foxfire Offline OP
Member
Foxfire  Offline OP
Member

Joined: Apr 2008
Posts: 235
TEXCOORD3
I forgot to mention, the ray tracer already supports textures for reflected objects!* the UV map of the object however must be a linear wrapping around the object however. reflected object textures must be loaded into the shader ahead of time so this feature is not the easiest to use. It does work correctley however! -Mike-


http://www.groundtacticsgame.com/
Alienware m17x R Custom laptop
specs:
Intel Core 2 Extreme Quad CPU Q9300
2x Nvidia 280GTX 2GB vram
6GB ddr3 memory@ 1333Mhz
512GB SSD
1200p 17' screen
runs Crysis Warhead on max settings at 1200p at 90 fps
Re: Sapphire GPU ray-tracer [Re: Foxfire] #233138
10/26/08 23:43
10/26/08 23:43
Joined: Apr 2008
Posts: 235
TEXCOORD3
Foxfire Offline OP
Member
Foxfire  Offline OP
Member

Joined: Apr 2008
Posts: 235
TEXCOORD3
updates:

I have finished box collision detection and support!

Unfortunatley it is very inefficient and require major optimizations.
I will post some screen shots later - Mike-


http://www.groundtacticsgame.com/
Alienware m17x R Custom laptop
specs:
Intel Core 2 Extreme Quad CPU Q9300
2x Nvidia 280GTX 2GB vram
6GB ddr3 memory@ 1333Mhz
512GB SSD
1200p 17' screen
runs Crysis Warhead on max settings at 1200p at 90 fps

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1