Ambient Occlusion Demo

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Ambient Occlusion Demo

Post by dlangdev »

Here is another demo showing Ambient Occlusion.

Here's how to do it:

1) Fire up Blender and set up the model.

2) Create a texture under the texture tab. If you skip this one, no render to texture will happen, make sure you do this correctly.

3) Put the seams to the model.

4) Unwrap the model.

5) Go to Bake tab and select Ambient Occlusion.

6) Hit Bake button.

7) Wait...

8. Wait...

9) Wait...

10) Save texture to jpg file.

11) Fire up IrrEdit and load the mesh model

12) First texture, load the ambient occlusion texture.

13) Second texture, load any colormap.

14) Set material type to lightmap.

15) Hit ctrl-F9 to view model.

16) Enjoy your ambient occlusion model.


no blur:

Image

with blurring:

Image

Image
Image
Yoran
Site Admin
Posts: 96
Joined: Fri Oct 07, 2005 8:55 am
Location: The Netherlands
Contact:

Post by Yoran »

Looks very nice
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

thanks.

the next step is figure out a way of blending the colormap, ambient map, and the normal map using fixed functionality first. That's the first test. The second test is setting up the shader so these three can be blended.

if anyone has done this before please let me know as i'd like to study and learn from it.

shown below is the normal map output from zbrush.

Image

Image
Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

after looking around the code, it looks like the only way to blend them using fixed functionality is use the parallax map material attribute, but i have to blend the colormap and ambientmap externally, then bring it in as one file.

for shaders, i will have to setup four textures (just in case i need one more) and modulate them inside the pixel shader.

please confirm if they make sense.

thanks a lot.
Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

here's the update.

the ambientmap and colormap were blended using multiply in photoshop, before loading it to irredit. what is shown below is simpy the model with colormap+ambientmap rolled into one map.

i'm trying to speed up asset creation at one model per day. so far, i can only produce a simple low-poly model per three days.

Image
Image
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

What's the difference between this ambient occlusion and lightmaps? it looks the same to me...
Image Image Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

lightmaps have light source, while ambient occlusion is done using disks.

see chapter 14 of gpu gems 2. free copy here http://developer.nvidia.com/object/gpu_gems_2_home.html
Image
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

it isn't seamless?
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

yep, it's not seamless, true. i'm still studying where to place the seams, how they get modded in uv space and finally stitched to final form. that's another skillset i will probably have to learn as i go forward with this garage project.
Image
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Real time ambient occlusion:
Image

:D
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

man, that is cool, wish i could use the code for testing my model/scene. it would really help my research study.

by the way, i might spend some time playing around panda3d as they have some features i need to study on. for example, environment cube mapping and other nifty features. also, they seem to have some nice thingy for ambient occlusion as well. anyway, i'm still learning and doing at the same time.
Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

it looks like it is possible to port the chapter 14 code over. but that would require time for me, which i don't want to do right now. maybe later as i'm trying to set up a test scene for the server code.

ref: http://http.download.nvidia.com/develop ... Index.html
Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

progress: one model added to asset.

Image

Image
Image
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Notice that the lightmap is incorrect when you rotate the model? The lighting appears the same for all the tombstones (or whatever they are), regardless of their rotation.
Image Image Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

no lightmaps are applied here as i'm still building up the asset.

perhaps when i get enough props, i will set it up in giles[s].

for now, it's mostly going to be ambient occlusion and colormap.

when it's done, i'm hoping it would like this one.

Image
Image
Post Reply