PDA

View Full Version : Updated radiosity for Delphi.



Georgy
18-11-2005, 01:09 PM
I've updated program. Now it renders Cornell Box:
http://www.cnt.ru/users/coding/shot.jpg

source code:
http://www.cnt.ru/users/coding/glrnew.zip

Attemptions to make it realtime (without source):
http://www.cnt.ru/users/coding/rtrad.zip
http://www.cnt.ru/users/coding/rtradnew.zip

Any ideas to make it faster and look better?

Traveler
18-11-2005, 03:14 PM
Very impressive!

I'm afraid the samples provided don't look at all like the images you've posted here, I assume you're using the GFX card? (I tried it on a radeon 7000)

Could you provide some information to the how and why of this program?

I can't really help you with your question though.

Georgy
18-11-2005, 04:13 PM
Calculation time: about 15 seconds
Video card: GeForce 2 MX/MX400 CPU: 2.4Ghz
desktop colordepth: 32bpp (!!! not 16)

screenshots in PNG format without scale (1:1):

http://www.cnt.ru/users/coding/cornell-up.png

http://www.cnt.ru/users/coding/cornell-down.png


Idea:
1) Polygon[i] -> Lightmap[i]
2) Lightmap[i] -> LigtmapPixel[u,v]
3) Lightmap[i].Pixel[u,v] -> lightmap pixel world coordinates(x,y,z)
4) gluLookAt -> eye position, view direction
eye position:= lightmap pixel world coordinates
view direction:= Polygon[i].normal
6) render scene
7) glReadPixels to RadiosityPointer[a,b]
8) array RadiosityPointer[a,b] -> Color
9) Lightmap[i].Pixel[u,v]:=Lightmap[i].Pixel[u,v]+Color
10) goto 1

p.s. opengl backbuffer may corrupt during the process (do not move window, do not press alt+tab, use 32bpp mode)

Georgy
20-12-2005, 01:41 PM
new version released
"Pencil drawing radiosity".
Source code:http://www.geocities.com/tmtlib/download.html
http://www.t800.ru/rad8.jpg

savage
20-12-2005, 03:41 PM
Wow very cool indeed.

WILL
20-12-2005, 07:09 PM
Wow thats rather impressive. I love the really cool penciled effect.

Hmm... do you think that you'd want to write maybe a small article on Radiosity effects? If you feel there is enough material you can derrive this work that you've done.

MikeS
20-12-2005, 08:28 PM
That's awesome, I saw your post on GameDev as well. Coolest radiosity scene I've ever seen quite frankley.

:)