PDA

View Full Version : Personal project, GPU renderer


Marsel Khadiyev
11-28-2005, 03:13 AM
Hi there,

I was contemplating for a while whether to post this or not (cause it probably won't appeal to general artistic folk), but decided to do it for the fun of it.

As a small side project in spare minutes I have now and then, I have decided to look into the whole GPGPU (http://www.gpgpu.org/) movement and practice some parallel programming on the GPU myself. I also wanted to try an idea I had for a while of writing a generalized renderer, which approaches rendering from a macro stand-point rather than traditional micro stand-point.

That is it doesn't actually trace rays individually, but instead it traces volumes through space which would traditionally be occupied by traveling photons. This is also a perfect algorithm for parallel programming, and with enough memory (a LOT of memory) this whole algorithm can be completed in one continuous execution.

Anyway, enough with the blabber. I doubt many of you will find this interesting or useful, however I post this for the fact that this renderer runs 99% on your video card. This also means that during rendering your video processes will be heavily occupied (making them seem very slow).

This algorithm requires the latest vertex and fragment profiles (VP40 and FP40), as well as support for multiple render buffers, unclamped floating point textures, and at least 256 MB of video memory.

I have only tested it on nVidia GeForce 7800 GTX, but it should also run on 6600 GT... sorry, not sure about ATI cards, but anything older than beginning of this year will probably not support required extensions.


Usage is simple: choose the renderer, number of bounces, bounce sample dimension and render. There is a GTR material which allows you to specify scattering and luminosity/irradiance. Sorry no textures, or any other renderer features are included.

The more bounces you have, the more information is captured, however rendering time grows exponentially (unfortunately).

Here is a screen with 2 bounces ( 5 seconds ):

http://www.ephere.com/misc/GTR/gtr2_2bounce.jpg

and same scene with 3 bounces (45 seconds):

http://www.ephere.com/misc/GTR/gtr2_3bounce.jpg

Notice that with 3 bounces things like caustics and reflections appear.

With this rendering method, pretty much everything can be rendered photorealistically given you have enough time and memory. Unfortunately with today's videocards this isn't possible, that is why I've discontinued the project.

Here are more renders:

http://www.ephere.com/misc/GTR/gtr3.jpghttp://www.ephere.com/misc/GTR/gtr3b.jpg
http://www.ephere.com/misc/GTR/gtr4.jpg
http://www.ephere.com/misc/GTR/gtr5.jpg

Download: http://www.ephere.com/misc/GTR/GTR_Max8.zip

P.S. If it renders, but then says that file can't be read, restart max and try again (something to do with CG compiler)

Marsel

neversong
11-28-2005, 03:22 AM
it is still an interesting topic though this isn't working on my precious ATI 800. :P

I really wonder where the technology will go, but I do see your idea here, and like it.

keep up.



cheers,

Hwasup Song

Rockin
11-28-2005, 07:52 AM
Hey, very cool project!

I have some questions though:
- what's the polygon limit (for a 7800)?
- does antialiasing work if I set it from my NVpannel?
- does it work for max 7?

I bet these renders would look muuuuch better with normal, specular and maybe parallax mapping ;)

Arnage
11-28-2005, 11:35 AM
- does it work for max 7?

DLL <C:\3dsmax7\plugins\GTRMax.dlr> failed to initialize.
Error code: 127 - The specified procedure could not be found.


I guess not...

Well, max 8 is on the way so i'll be able to play with it soon enough.

erilaz
11-28-2005, 12:42 PM
Heh this looks great! I love this kind of thing. i'll test tomorrow! :D

Marsel Khadiyev
11-28-2005, 01:52 PM
DLL <C:\3dsmax7\plugins\GTRMax.dlr> failed to initialize.

Actually you probably need cg.dll and cggl.dll for it to run. You can download these directly (from google) or I would recommend just installing the whol CG toolkit (its quick and easy) from http://developer.nvidia.com/object/cg_toolkit.html

- what's the polygon limit (for a 7800)?
- does antialiasing work if I set it from my NVpannel?
- does it work for max 7?

There really is no polygon limit however note that if you have too many, it might start swapping them onto HDD and thus cause major slowdowns (beating the purpose of using fast DDR3). Same goes for textures, size of which is ultimately determined by your image size, number of samples, and sample dimensions.

Sorry, no AA. This is one of the many optimizations I could've put in but ran out of time.

Also note that Max lights will not work with it. Actually it doesn't recognize point lights as being lights. Instead if you want a light, create a surface and set luminosity to above 0. GTR works MUCH better with area and global (environment) light than with small point lights.

Marsel

CGTalk Moderation
11-28-2005, 01:52 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.