2.29: radiosity render!

General discussion about the development of the open source Blender

Moderators: jesterKing, stiv

ton
Site Admin
Posts: 350
Joined: Wed Oct 16, 2002 12:13 am
Contact:

2.29: radiosity render!

Post by ton » Sun Aug 31, 2003 10:44 pm

Something I wanted to do a long time, finally got some time for it.
It just has been committed to the bf-blender tree.

This is what the new code does:

Using the core routines of the Radiosity tool, each renderface with 'emit material' and each renderface with 'radio material flag' set will be used to itterate to a global illumination solution. Per face with high energy (emit) little images are rendered (hemicubes) which makes up lookup tables to 'shoot' its energy to other faces.
In the end this energy - color - then is directly added to the pixel colors while rendering, Gouraud shaded.
Since it's done with renderfaces, it works for all primitives in Blender.

What is doesn't do yet:
- take into account textured color of faces. Currently it uses the material RGB color for filtering distributed energy.
- do some smart pre-subdividing. I don't know yet if this is useful... Right now it means that you'll have to balance the models yourself, to deliver small faces where you want a high accuracy for shadowing.
- unified render (is at my todo list)

Rendering without lamps:
http://www.blender.org/bf/raptor.jpg

This is obviously the advantage; animated radiosity:
http://www.blender.org/bf/0001_0031.avi
http://www.blender.org/bf/0001_0040.avi
The specular is done by adding Lamps with "no diffuse" option set.

http://www.blender.org/bf/monkey.jpg
Note the subtle color bleeding in the head. Its a nice toy!

http://www.blender.org/bf/0001_0100.avi
Check the chin. This is a clear problem with a model moving close through the hemicubes.

Testfiles:
http://www.blender.org/bf/room.blend
http://www.blender.org/bf/Raptor_radio1.blend

User notes:
- per Material you want to have included in radiosity render: set the 'radio' flag. For newly added Materials it is ON by default now.
- the Ambient slider in Material controls the amount of radiosity color.
- for enabling radiosity rendering, set the F10 "Radio" button.
- the Radiosity buttons now only show the relevant radiosity rendering options. Pressing "collect meshes" will show all buttons again.
- for meshes, the faces who use Radio material always call the 'autosmooth' routine, this to make sure sharp angles (like corners in a room) do not have shared vertices. For some smooth models (like the raptor example) you might increase the standard smoothing angle from 30 to 45 degree.
- While itterating the steps are printed in the console. I'd like to see a better system for it in Blender itself...
- At the end, the amount of 'unshot energy' is printed in the console, this can be used to set a minimum for the Convergence button.

Technical notes:
- I had to expand the renderface and rendervertices for it... shame on me! Faces have one pointer extra, render vertices four floats...
- The size of the hemicubes is now based at the boundbox of the entire scene (0.002 of it). This should be more reliable... to be done
- I fixed a bug in radiosity render, where sometimes backfaces where lit
- the link order for Blender has changed, the libradiosity.a has to be moved after the librender.a (obviously for a new dependency!). Check blender/source/Makefile
- there's a new file: blender/source/radiosity/intern/source/radrender.c

In general:
I'd like everyone to play a bit with this system. It's not easy to get good results with it. A simple "hit and go" isn't there... maybe some good suggestions?

-Ton-
Last edited by ton on Sun Aug 31, 2003 11:07 pm, edited 1 time in total.

harkyman
Posts: 98
Joined: Fri Oct 18, 2002 2:47 pm
Location: Pennsylvania, USA
Contact:

Post by harkyman » Sun Aug 31, 2003 11:01 pm

Oh my good Lord.

ton
Site Admin
Posts: 350
Joined: Wed Oct 16, 2002 12:13 am
Contact:

Post by ton » Sun Aug 31, 2003 11:23 pm

Oh, of course we need a binary:

OSX:
http://www.blender.org/bf/blender.app.zip

It's not an official release! I guess others will post some test binaries for other platforms.

Money_YaY!
Posts: 442
Joined: Wed Oct 23, 2002 2:47 pm

Post by Money_YaY! » Mon Sep 01, 2003 2:07 am

ton wrote:Oh, of course we need a binary:

OSX:
http://www.blender.org/bf/blender.app.zip

It's not an official release! I guess others will post some test binaries for other platforms.
AAAAAA !!!! your after my own heart... An OSX build as the very first, YaY ! I actually do not have to do building code..
^v^ testing .... weeeee
Now just put the new Loop select into blender, red face select, shaded face select mode. And a way to get Face select into edit mode with out haveing to press tab and F so much...and you can start to get people out of haveing to need wings every minute for modeling... ^o^

engalicorn
Posts: 25
Joined: Sun Oct 13, 2002 7:37 pm
Location: Edmonton, Alberta, Canada

Post by engalicorn » Mon Sep 01, 2003 2:47 am

very cool!!!

now all i have to do is figure out how to do still radiosty and im on my way


money_YaY.... only 52 more posts and youll surpass ton on # of posts to the new blender community

Money_YaY!
Posts: 442
Joined: Wed Oct 23, 2002 2:47 pm

Post by Money_YaY! » Mon Sep 01, 2003 3:19 am

engalicorn wrote:
money_YaY.... only 52 more posts and youll surpass ton on # of posts to the new blender community
oh boy, :D I better shut up for a bit .... But I have images first test bits..


Ok the first is just toying with the mesh to see how grooves work..

http://aprilcolo.com/oh/tank/raptor.jpg

this one was a lantern shadow test. ( I found out latter that it needs more mesh to make it do a proper shadow..

http://aprilcolo.com/oh/tank/tonlight.jpg
test two
http://aprilcolo.com/oh/tank/tonlight2.jpg

particule test. They sort of work.. not well...

http://aprilcolo.com/oh/tank/tonlight3.jpg

and here is a spot light test. It workks ! a cone was place over the light mesh. "lampshade"

http://aprilcolo.com/oh/tank/tonspot.jpg
and now it is in his eyes and mouth
http://aprilcolo.com/oh/tank/tonspot2.jpg

What is wrong....

Cel shadeing is not working...for the radio

Particules.

And how do you remove the little light bugger from the render. I tried a invs face all but no go..

YaY Fun ^v^

sten
Posts: 177
Joined: Sun Oct 13, 2002 7:47 pm

Post by sten » Mon Sep 01, 2003 8:03 am

this is awsome!

great ton! :D

now, how to compile in cygwin for win32? is this possible to fix as no coder? how? (meaning, before compile of course)

no external renders needed anymore? :D

wavk
Posts: 126
Joined: Wed Oct 16, 2002 9:58 am
Location: The Netherlands
Contact:

Post by wavk » Mon Sep 01, 2003 10:55 am

WhoaRGH! A bit late, but VERY welcome! Great work ton! :D

ton
Site Admin
Posts: 350
Joined: Wed Oct 16, 2002 12:13 am
Contact:

Post by ton » Mon Sep 01, 2003 11:42 am

In fact this system is another 'diffuse shader'. I think I can hack it to make toon shading work for it...
OTH, I can also move the "radio" option to the shaders menu, isn't that a more appropriate menu location?

xand
Posts: 33
Joined: Wed Oct 16, 2002 9:46 am

Post by xand » Mon Sep 01, 2003 3:22 pm

i did a built under win32 (40 minutes, clean build) and it works great, very fast.
there's just an error about the tooltip which is the one from 'No mist' button.

+++

Etna
Posts: 0
Joined: Sat Mar 29, 2003 1:18 pm

Post by Etna » Mon Sep 01, 2003 4:54 pm

OTH, I can also move the "radio" option to the shaders menu, isn't that a more appropriate menu location?

Exactly M(a)ster Ton.
Great exemple anyway, i like the third video.

sten
Posts: 177
Joined: Sun Oct 13, 2002 7:47 pm

Post by sten » Mon Sep 01, 2003 5:20 pm

ton wrote:In fact this system is another 'diffuse shader'. I think I can hack it to make toon shading work for it...
OTH, I can also move the "radio" option to the shaders menu, isn't that a more appropriate menu location?
yes , would be neat :D

btw, how do I myself now change the source to able to try this new feature?

kaktuswasser
Posts: 50
Joined: Wed Oct 16, 2002 4:19 am

Post by kaktuswasser » Mon Sep 01, 2003 5:59 pm

holy friggen SH*T! :shock: :shock: :shock:

thats aawwwwesssoommmee!

ton
Site Admin
Posts: 350
Joined: Wed Oct 16, 2002 12:13 am
Contact:

Post by ton » Mon Sep 01, 2003 6:24 pm

ztonzy wrote: btw, how do I myself now change the source to able to try this new feature?
Is this a question how cvs works?
Just make a checkout or update.

sten
Posts: 177
Joined: Sun Oct 13, 2002 7:47 pm

Post by sten » Mon Sep 01, 2003 6:41 pm

Sorry, just got help on #blendersauce , they said bf-blender, stupid me /me slaps his forehead... :P and they helped me how to do CVS on bf-blender, seems compiling just fine now :D


old questions:
--------------------------------------------------------------------------------------
ton wrote:
ztonzy wrote: btw, how do I myself now change the source to able to try this new feature?
Is this a question how cvs works?
Just make a checkout or update.
I know how to compile with Cygwin, but I thought I had to poke in the code myself... :roll:

Is this a CVS update for BF-Blender, not Tuhopuu2? ...or am I totally wrong?

Post Reply