Ambient Occlusion in source!?

Got problems with your models? Struggling with textures? Get help with your custom assets.

Re: Ambient Occlusion in source!?

Postby Gary on Sun May 02, 2010 7:57 pm

What about us with ATI?
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Ambient Occlusion in source!?

Postby Jike on Sun May 02, 2010 8:22 pm

I still don't quite understand it, but I think I'm on the right track.

Ambient Occlusion mapping is done in this 3D package (example blender), then this spherestuff happens.

The darker a spot is on the UV map, the darker it is on the model. So why isn't it as simple as baking this AO map and putting it onto a model, just like one would put a normal map on it. (such as $bumpmap but instead $aomap o something)

Which are these limitations in source?

And the SSAO applies what to a model? I understand the concept behind this Z-buffer thing but is that what actually is AO? What actually is the difference between AO and SSAO?

Seriously thanks for the information so far. Especially Surfa! :D
-Jike
Image
Image
Jike
1337 p0st3r
1337 p0st3r
 
Joined: Mon Feb 08, 2010 6:58 pm

Re: Ambient Occlusion in source!?

Postby marks on Sun May 02, 2010 8:33 pm

AO is basically a greyscale map which puts dark tones in the recesses/cracks of the model, and white on the large flat open faces. Its similar to a cavity map. Its baked in a 3D package. The most common usage is to apply is as a multiply layer over the 'colour' (Diffuse) texture, to give the effect of shadows in the recesses of the model. Some engines however make you apply it in the game as a separate texture file. Some newer engines (UE3, Crysis) can calculate AO dynamically (its done in code, per-frame, automatically) which means you dont have to do an AO bake in your diffuse texture.

Sub-surface AO simulates different densities in non-opaque materials. Its most commonly used in advanced skin shaders. Ever held a torch inside your cheek or behind your hand? SSAO is used to simulate the different tones and values given there, due to the density of stuff inside your hand/cheek that the light is passing through.

http://wiki.polycount.net/Ambient_Occlusion_Map
User avatar
marks
Creative Assembly
Creative Assembly
 
Joined: Tue Aug 16, 2005 5:07 pm

Re: Ambient Occlusion in source!?

Postby Jike on Sun May 02, 2010 9:39 pm

Whats the difference between diffuse and albedo?

Maybe this should be put into Art and Design since these are mainly material questions..

I found this, but I wouldnt know how to use it: http://developer.valvesoftware.com/wiki ... tocclusion
-Jike
Image
Image
Jike
1337 p0st3r
1337 p0st3r
 
Joined: Mon Feb 08, 2010 6:58 pm

Re: Ambient Occlusion in source!?

Postby marks on Sun May 02, 2010 9:42 pm

Albedo is the diffuse with no lighting (or 100% self-illuminated aka fullbright), afaik. Might differ from engine to engine.
User avatar
marks
Creative Assembly
Creative Assembly
 
Joined: Tue Aug 16, 2005 5:07 pm

Re: Ambient Occlusion in source!?

Postby Jike on Sun May 02, 2010 11:22 pm

so diffuse is the ting ingame? whatever comes together from albedo and normal maps and lighting etc?
-Jike
Image
Image
Jike
1337 p0st3r
1337 p0st3r
 
Joined: Mon Feb 08, 2010 6:58 pm

Re: Ambient Occlusion in source!?

Postby marks on Sun May 02, 2010 11:48 pm

this might clear it up a bit:
okay no, thats fucking confusing isnt it :s

Image
User avatar
marks
Creative Assembly
Creative Assembly
 
Joined: Tue Aug 16, 2005 5:07 pm

Re: Ambient Occlusion in source!?

Postby nub on Sun May 02, 2010 11:51 pm

Yep I don't see the AO setting anywhere, lovely.
User avatar
nub
Veteran
Veteran
 
Joined: Tue Nov 15, 2005 1:11 am
Location: Charlotte, NC, US

Re: Ambient Occlusion in source!?

Postby marks on Mon May 03, 2010 12:01 am

christ, im gonna have to render out a fucking example image now arent I? :s this thread seems to be getting nowhere otherwise
User avatar
marks
Creative Assembly
Creative Assembly
 
Joined: Tue Aug 16, 2005 5:07 pm

Re: Ambient Occlusion in source!?

Postby TicTac on Mon May 03, 2010 1:52 am

Diffuse is the lighting on the object. Albedo is the texture, without lighting. The game, when it renders a frame, 'mixes' the albedo (just the colours, the 'picture' on your model) and the diffuse (the lighting) together to give you a model with highlights and shadows.

AO is ambient occlusion. The only difference between it and SSAO is that SSAO is a pixel shader (iirc), and only works on what's on your screen. Ambient Occlusion in a 3D package such as Blender, Maya, 3ds max, etc is generated by lighting the entire 3d object with very diffuse (scattered) light. This ensures that only the nooks and crannies of a model are darkened, for example the area under a character's arm or underneath a low chair.

@nub, sorry man I don't know what to tell you :/
Competent Level Designer, 3D Artist.
I don't really look like my avatar
User avatar
TicTac
Veteran
Veteran
 
Joined: Sat Aug 02, 2008 1:30 am
Location: Philadelphia

Re: Ambient Occlusion in source!?

Postby marks on Mon May 03, 2010 10:57 am

^^ what he said.

Although, the 'colour' texture which makes up the albedo term in the shader, I have always heard referred to as the "diffuse texture" by anybody and everybody. Albedo is like a shader term for it.
User avatar
marks
Creative Assembly
Creative Assembly
 
Joined: Tue Aug 16, 2005 5:07 pm

Re: Ambient Occlusion in source!?

Postby Guessmyname on Mon May 03, 2010 12:44 pm

User avatar
Guessmyname
1337 p0st3r
1337 p0st3r
 
Joined: Sun Mar 27, 2005 10:38 pm

Re: Ambient Occlusion in source!?

Postby Jike on Mon May 03, 2010 3:58 pm

Ah okay, now I get it! Diffuse isnt actually a texture, its the lighting circumstances. Thanks people.

So SSAO passively changes the game, but only actually fiddles with the screen (or whatever the graphics card sends to the monitor harhar) and AO in a 3D package is what marks said.

So, can I simulate "active" AO by baking AO in a 3D package and bringing it into source with $ambientocclusion ?

Does this work? A fellow team member says it didnt make a difference when taking it off of Alyx. On the hand hand, as the graohic from above shows, Alyx doesnt have an AO texture..
-Jike
Image
Image
Jike
1337 p0st3r
1337 p0st3r
 
Joined: Mon Feb 08, 2010 6:58 pm

Re: Ambient Occlusion in source!?

Postby nub on Wed May 05, 2010 2:34 am

By active do you mean real time and dynamic? If so, then no. Baking the AO map in to the texture is entirely static.
User avatar
nub
Veteran
Veteran
 
Joined: Tue Nov 15, 2005 1:11 am
Location: Charlotte, NC, US

Re: Ambient Occlusion in source!?

Postby Corigami on Wed May 05, 2010 2:39 am

You don't use an actual ambient occlusion map, it's something that is rendered to the diffuse manually.
User avatar
Corigami
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Tue Oct 21, 2008 9:56 pm
Location: Kansas
PreviousNext

Return to Custom Asset Help

Who is online

Users browsing this forum: No registered users