Global illumination solver


https://forum.reallusion.com/Topic48847.aspx
Print Topic | Close Window

By Dreamcube017 - 14 Years Ago
How about a global illumination solver.

This would be really useful... yes it would take some time for it to solve the GI for a complex scene, BUT you would have GI in the scene.

Now keep in mind that this means everytime you move an object or a light or... well ... anything effected by light including the lights themselves... or the texture of an object even, the GI would have to be recalculated... so there WOULD be KIND of a render time, but for the most part this would be ok.

You'd really only build the GI when you are done setting everything up.

Now the other thing is what about objects that will be moving like characters and props... Well the dynamic lights with shadows will have to take care of those so the characters and some things might not be lit with exact GI, but tricks could be done to make them blend in correctly.

Now there was an engine (made by the creators of Sonic the Hedgehog) that made a GI setup that somehow worked in realtime so all the moving objects were lit correctly as well.

Here's some info on that.
http://www.sonicstadium.org/news/see-how-the-hedgehog-engine-works

But a simple GI solver would do just as well for now.

Any comments?
By GOETZIWOOD STUDIOS - 14 Years Ago
Hi,

A real time GI solver ( faked anyway, because you can't do physically accurate GI in realtime.. yet ) is the 'Graal' of any realtime engine these days.

In order to have a realtime GI solver you first have to implement a linear workflow or else you get awefull wrong results.

Then, most realtime GI solvers use local IBL lighting ( a 2d or 3d grid of cubic or spherical or spherical-harmonic light maps ) where the IBL lights are precomputed but updated in realtime according to local changes ( a character passing by, a light change, a shadow crossing, etc.. ). This makes the process fast because usualy little changes occur at a time at one place.

This is why I've mentioned linear workflow and local IBL lighting in another thread. Having local IBL lighting decoupled from an automatic GI illumination solver would be interresting though, so we could decide local lighting manualy if we want to.

I'm not sure what you mean by "a simple GI solver", but there is the SSAO ( Screen Space Ambient Occlusion ) way, with a variant that can fake GI, but it's far from beeing accurate and is very biased.

From my point of view, the most important factor for nice GI like rendering is the ambient occlusion one. With it and any IBL ( even with IBL that has nothing to do with the current lighting set ) you can start to have very nice results.

In fact, you can start to have some decent results already with pre-baked ambient occlusion maps in the 'Blend' channel ( with multiply ). It require some work, but the results worth the effort. I intent to show some exemples of this approach soon. It works for all static geometries ( sets, some props, etc.. ).

I'm working on another idea to simulate multiple local IBL lighting with multi-passes rendering ( you render several times the same take with different light sets and settings, then you composite those passes together ). This way you also get ride of the 4 lights ( spot or omni ) limit. I'll show some results as well soon.

I'm confident it's possible to have some very nice results, granted using some elbow grease, results yet unseen still using the current iClone renderer.

Crossing fingers..
By stuckon3d - 14 Years Ago
Hi grabiller

Regarding the ambient occlusion and putting it on the blend map, that idea has been done already, futher more I even baked the gi solution to the diffuse map. Just look at the link in my signature: "the power of iclone and stuckon3d content". As far as local IBL I mentioned a while back to rellusion if they could make the lights be assign to selected objects only. So the engine illuminates only what you want with that particular light. That been said, with the proper know how of how light behaves gi situations can be recreated in iclone, here is an example:



Cheers,

Stuckon3d
By Dreamcube017 - 14 Years Ago
OH so that's what you meant by local IBL. Yeah that would be god.

Hey StuckOn, how did you get the light maps baked in in the first place?

Is there a tutorial on getting the light map in the blend channel?
By stuckon3d - 14 Years Ago
Dreamcube017 (4/26/2010)
OH so that's what you meant by local IBL. Yeah that would be god.

Hey StuckOn, how did you get the light maps baked in in the first place?

Is there a tutorial on getting the light map in the blend channel?


Hi Dreamcube,
the gi was baked in MODO as well as the ambient occlusion map pass, and then I added them inside iclone. The baked lighting with color bleed to the diffuse channel and then the occlusion map to the Blend map channel. BTW, In my texturing class i cover what software(very inexpensive) to use to create simulated ambient occlusion to your models via blend maps. Wink

Cheers,

Cris
By GOETZIWOOD STUDIOS - 14 Years Ago
Very nice indeed Cris.

Here is a test clearly showing the benefits of having ambient occlusion maps :



On the left with the aoc maps, on the right with all the 'Strength' factor of the 'Blend' channel setted to 0.

There is a catch though, it's not per say 'ambient occlusion' because by putting the map in the blend channel, it affects the diffuse too, wich is not the purpose of aoc. This is more an aoc effect combined with a 'dirt map' effect.

But, clearly, better this way than nothing Wink
By stuckon3d - 14 Years Ago
that is a good example Guy, one thing i found is if you increase the contrast of the blend map, you end up with less areas of the diffuse map being affected by the AO map and it looks more accurate at the same time, because usually the darker lines are the ones where two pieces of geometry are overlapping or touching. And that is what AO does on a real render.

Cheers,

Stuckon3d

By Dreamcube017 - 14 Years Ago
Hmm... darn I think you guys are getting ahead of me.

*sigh* I guess I better find a tutorial.

Hey Stuckon3D, you said you have a class talking about how to do this?

I have something to bake light maps.. but it's not for specifically baking AO... and do we have to set up the lights in another program to get the AO to work right?

Hmm... how much is that class and when is it happening?
By GOETZIWOOD STUDIOS - 14 Years Ago
stuckon3d (4/26/2010)
that is a good example Guy, one thing i found is if you increase the contrast of the blend map, you end up with less areas of the diffuse map being affected by the AO map and it looks more accurate at the same time, because usually the darker lines are the ones where two pieces of geometry are overlapping or touching. And that is what AO does on a real render.


Indeed when it comes to find a good compromise when the diffuse map is affected, albeit at this point I believe it's a question of taste.

I've noticed in my work that people are more sensitive to the heavy aoc factor ( giving the sense of details, of surfaces contacts and also contact shadows ) than the error of having the aoc affecting the diffuse.

Anyway, this can be a good feature addition for the next iClone version :

- to have 2x Blend Channels, one for the ambient only, one for the diffuse only.

- each having a 'Strength' factor as well as a 'Gamma' factor.

Having one blend channel for the ambient only would allow us to release content with ambient occlusion maps wich would behave correctly under various lighting condition ( I would love to have an option to have IBL affected or not, for those who use the IBL as ambient lighting only ).

Having one blend channel for the diffuse only would allow us to release content with 'dirt maps' effects, so the user would be able to choose between a clean version or a dirty version of the same prop by just changing the 'Strength' factor.

The 'Gamma' factor would allow the user to play with the contrast of both effects.

That would be really nice !

Next thing to deal with.. multiple IBL lighting ( ambient for me ) Wink

Cheers,
Guy.
By Dreamcube017 - 14 Years Ago
Hey now that's a good idea.

Multiple blend channels! And what would make it even better is that you could set the blend channels to be different types. Like you could have multiple bump channels or multiple Deffuse or something.

I think that would be great.

Sadly, you guys are still getting ahead of me and I really would love to use AO and GI.
By GOETZIWOOD STUDIOS - 14 Years Ago
Dreamcube017 (4/26/2010)
../..I have something to bake light maps.. but it's not for specifically baking AO... and do we have to set up the lights in another program to get the AO to work right?../..


Ambient occlusion is different from light mapping.

In fact, ambient occlusion has nothing to do with lighting, even if that sounds strange. As the name imply, it's just a 'factor' of how a point on a surface is 'occluded' by nearby objects/surfaces.

You need a specific feature to achive that, either raytracing, or the old technique ( but wich is very cumbersome ) called the lights dome where you combine hundred of shadow maps from hundred of lights on this dome ( not something you want to do every day if you don't have the proper tools.. ).

There is also a catch with ambient occlusion maps : You *must* have unique UVs. This means that two polygons *cannot* overlap in your uv map. I often see props or other object mapped with overlapped uvs for practical reason ( so you can use bigger portion of your image ), but this doesn't work for AOC.

So if you want to add ambient occlusion map to an item wich is already mapped but has overlapped uvs, then you must create a second set of uvs, unique uvs, then bake not only the AOC, but also the other maps, diffuse, bump, etc.. to these unique uvs, hence having new texture maps.

It requires some work, but it's feasable Smile

Cheers,
Guy.
By GOETZIWOOD STUDIOS - 14 Years Ago
grabiller (4/26/2010)
../.. In fact, ambient occlusion has nothing to do with lighting, even if that sounds strange../..


Just to be clear before I get burned alive on a public place, I mean by that that you don't need any lighting to create an ambient occlusion map Hehe

By Dreamcube017 - 14 Years Ago
Hm it seems doable... but I'd need a tutorial on exactly how to do it.

Screw two separate UVs, I'm about to just make one UV map with non overlapping polies and call it a day.

But that other thing with the light map in the blend or something is still confusing... or was that the ambiant Occlusion?

Do you still need correct UVs with SSAO?
By stuckon3d - 14 Years Ago
@grabiller

I already requested multiple blend maps, i also heard a little birdie mention that Screen based AO might be on the way Wink
I also requested being able to load materials without affecting the blend channels. so that you can change a new brick material with an old brick material without affecting the already establish AO/baked lighting on the blend maps. Smile

@dreamcube

Lightmaps could be put on the blend maps but then you would have to choose between AO or lightmaps. But as mentioned by Guy , you can not have overlapping UVs.

Just to be clear lightmapping is a way to embed lighting information on the texture so that you can simulate more lights that it is possible in iclone or other realtime engines. They can also carry color information.

Ambient occlusion is a technique to recreated the shadowing two objects create when they are next to eachother. Thus give it more shape and detail.

By GOETZIWOOD STUDIOS - 14 Years Ago
stuckon3d (4/26/2010)
../.. I already requested multiple blend maps, i also heard a little birdie mention that Screen based AO might be on the way Wink../..


Oh, that's interresting. I hope they thought about offering an option, per item, to activate SSAO or not. Because if we are using an item wich already has AOC maps, the result of both effects combined may be bad. Granted AOC maps on an item will always be more accurate, precise and esthetic than SSAO.

Nonetheless, if they go toward SSAO, this means they are adding buffers that are needed for deferred shading as well, so I guess we are not far from having deferred shading too. Cool.


stuckon3d (4/26/2010)
../.. I also requested being able to load materials without affecting the blend channels. so that you can change a new brick material with an old brick material without affecting the already establish AO/baked lighting on the blend maps. Smile../..


Yes, nice idea.

Cheers,
Guy.
By GOETZIWOOD STUDIOS - 14 Years Ago
Dreamcube017 (4/26/2010)
Hm it seems doable... but I'd need a tutorial on exactly how to do it../..


At this point it depends on the software you use. I'm not sure showing how to do it in one will really help for another one.


Dreamcube017 (4/26/2010)
../..Do you still need correct UVs with SSAO?


Nope, you don't need any UV at all for SSAO to work. It's a 2d screen effect wich require some datas such as normals and depth ( to recompute 3d positions from 2d space ) but those are computed/gathered by the engine so from a user point of view you have nothing special to do on the rendered items to make this work.

Cheers,
Guy.
By stuckon3d - 14 Years Ago
@ dreamcube,

Just so you don't get confused, what Guy is talking about is SSAO (screen space ambient occlusion), which is a cool trick done by the videocards to simulate ambient occlusion and it works the way he mentioned it above, what I was talking about was an Ambient occlusion map, which is an actual texture applied per object and that does require uv on the models and can not have overlaping uv or thing will look weird.

Hope this clarifies both types,

Stuckon3d
By Dreamcube017 - 14 Years Ago
Oh ok I get it... but it'd still be nice to figure out a way to bake them in. ...

Hmm... I don't have 3DS or Maya and even if I did, I'd probably have to learn how to use the program before I could do it.
By GOETZIWOOD STUDIOS - 14 Years Ago
Dreamcube017 (4/28/2010)
Oh ok I get it... but it'd still be nice to figure out a way to bake them in. ...


This is a very software dependent operation. Which 3d software are you using, aside iClone ?


Cheers,
Guy.
By stuckon3d - 14 Years Ago
@dreamcube

have you tried using blender? that does have ambient occlusion mapping and creation capabilities. The GUI is not the best but it has all the functions you are looking for. Plus is free.
By Dreamcube017 - 14 Years Ago
Well if I can find a tutorial on it, that'd be great.
By stuckon3d - 14 Years Ago
hi dreamcube,
this would be a good start for you. And you can find other cool stuff at the blender home page.


http://blenderunderground.com/2007/07/18/blender-basics-part-1-video-tutorial-completed/

http://www.blender.org/features-gallery/feature-videos/?video=bake_to_uv

Cheers,

Stuckon3d
By Dreamcube017 - 14 Years Ago
Ah thanks... hmmm... this is for an older version though. I think they've moved some of the panels around.

But thanks all the same. Does this talk about baking light maps or AO maps too?

I kind of know how to use the basic features.
By Peter (RL) - 14 Years Ago
Very nice and informative discussion. As always the development team will review your suggestions and try to implement these features in future versions of iClone. Thanks everyone for the feedback.
By Paumanok West - 14 Years Ago
To be honest, this discussion has gone somewhat over my head. Hehe Yet another reason to follow the rest of you into StuckOn3D's classes.

However, I think everyone will be interested in this link I got from Maxxon via Twitter:

Smart IBL
By DesertWalker - 14 Years Ago
Thanks for the Smart IBL link.

My experience is that if one wants to produce still images from iClone 4, HDR and IBL can enhance the lighting. But so far I have not been able to use them in animations. It is very difficult to control once things (avatar, camera, etc) gets moving. Maybe the next iClone version can have an improvement?

By stuckon3d - 14 Years Ago
DesertWalker (5/3/2010)
Thanks for the Smart IBL link.

My experience is that if one wants to produce still images fromiClone 4, HDR and IBLcanenhance the lighting. But so far I have not been able to use them in animations. It is very difficult to control once things (avatar, camera, etc) gets moving. Maybe the next iClone version can have an improvement?


I agree here, animating with IBL and hdri is hard, the problem comes from the exposure setting, on real video cameras this gets auto balanced for you , in iclone you have to balance it yourself/keyframe it. I think the biggest problem people run into when using IBL and HDR is that they use IBL as their main source of light. A way to make it more manageable if you use IBL as a source of light that mimics indirect lighting and the effect should be on very soft. Also, materials with high specular and/or diffuse factors will brake the balance of the image(make it blown out) so you might have to animate the textures overtime. Hopefully RL will give us an autobalance feature with the option of manual override. Wink

Hope this helps,

Stuckon3d
By Dreamcube017 - 14 Years Ago
True, I've not played with this too much, but IBL does work unless you have too high of shine on things...? Maybe I don't know what I'm talking about but I know an ambiane feature that you can animate with would be great.

Thanks for the link West. I'll see what I can do with them.
By unit102 - 13 Years Ago
hi,

I was searching for topics that suggest the addition of Golbal illumination to iclone,
but from what I see here the discussion went away a little bit,

AO is a great addition, now for the next big thing, the addition of global illumination to iclone.

I can't right now produce any high-end quality animations for TV broadcasting or commercials because local companies are using global illumination most of the time and the work I believe can be done with iclone, we simply need the upgrade for it.

iclone has great tools from what I see and tried, but I can't use it for production yet, I render my work using 3ds max mental ray global illumination & scanline sometimes because I need to produce that smooth shading and soft shadows - I believe I can take it further to an editing suite like Adobe after effects to achieve this.. but global illumination is something else.

iclone will be very competitive and attractive just by looking at the screenshots produced with global illumination. its the future whether you try to avoid having it now or later, you will eventually going to need it ! and with multi-threaded processing and pure hardware processing (utilizing ATI & Nvidia processing cores) it will be amazing.

I feel if it will ever going to be added its going to be in some different iclone version, because its a big step. If screenshots is what matters the most to attract more people to iclone, then you can't go wrong with global illumination! post as much as you want with an eye-candy quality that hardly needs further editing to please the audience !