Okay, so I'm texturing an object with the intention of importing it into Unreal. Right now, I have only completed the diffuse map in Photoshop, and applied it to the object in Max. Would I be correct in applying the AO map within the diffuse color map? Is it ever applied elsewhere? I don't have any issues with the concept of AO, or the settings involved, just the baking part, I guess. AO gets baked into the diffuse, right?
Whenever I see an impressive object in someone's portfolio, for instance, the three maps usually supplied or pictured are diffuse, specular and normal - hence my assumption that AO gets baked into the diffuse. Am I right, or do I need to sit in the corner and think about what I've done?
Apologies for any noob-related hilarity that this question may provoke.
Replies
If your object had a lot of stacked UVs and needed a different UV layout to get a nice AO onto it, you would need to keep it as a separate texture (or stick it in a alpha channel) and blend it onto your diffuse, etc... in Unreal using the material editor.
[ame]http://www.youtube.com/watch?v=iTCq-bE9urE[/ame]
BTW. There was just a similar thread like this just a week ago or so. DS.
Thanks again.
But in that case you are using the AO pass as a mask for something else you are trying to achieve, such as dirt in cavities, etc. But yeah, I agree. Using the AO as a mask for dirt/dust/whatever in your diffuse is helpful.
The original intention of the ambient occlusion was to occlude ambient. In other words, define where ambient lighting should hit and where not to hit.
Realtime AO is still very expensive to compute for graphics cards, and a good prerendered/fixed AO map is very soft like to don't appreciate any noise.
+1
Also, prebaking is fine for objects that don't move, but you want to be careful on dynamic/deforming objects
Then multiplying the AO into the diffuse won't amplify the dark effect that much. In that case you ought to benefit more from multiplying a separate AO map into the ambient lighting as it will kill the ambient lighting on certain areas and thereby keeping the final result dark?
Pre baking it into color would produce black areas on the texture, which would later be hit by the ambient lighting and produce a semi-grey look?
Diffuse Texture * Diffuse Lighting + Ambient Lighting * Ambient Occlusion, just using one channel as an example
0.1 * 0.0 + 0.3 * 0.0 = 0.0 (pitch black)
(Diffuse Texture * Ambient Occlusion) * Diffuse Lighting + Ambient Lighting, just using one channel as an example
(0.1 * 0.0) * 0.0 + 0.3 = 0.3 (semi grey)
Might be totally off here, this is quite new to me
No because the AO would derive from your diffuse map, adding a global ambient light just brightens it all up, doesn't affect contrast.
Now I'm just confused. Are you agreeing with me kaburan? Is my light equation above correct?
If it is correct then my Maya viewport differs from this theory. Having a Lambert with a pitch black color and adding ambient color value doesn't change anything in my viewport. Maybe the ambient color isn't the same as a ambient light in a game engine?
In Unreal adding in a ambient light will brighten everything which as you say kills all the pure blacks. Yes by pre-multiplying an AO map over a diffuse map or whatever in Photoshop will not allow you to use the AO map as a ambient light occlusion map.
From my limited material editor knowledge there isn't a way to link the AO map to occlude an ambient light in the map. Though maybe by using a cube map for ambient light + some lerps + an if node..., or maybe a inverted light vector node... sigh so many things to experiment with and not enough time, lol.
In the Why so Blue thread on page 3 there is some talk about how Valve has implemented something similar to what you are saying we should be trying to do.
For right now I think at least as far as Unreal is concerned I'm guessing using an AO map as it really should be used would be somewhat expensive for performance, though I'm not an expert on the subject and could be totally wrong about it. :poly136: If someone knows a way I'd love to see an AO map implemented "properly" in Unreal.
Well I have a talented programmer co-worker who is prototyping 3D-features and he demonstrated how the AO "should be used" for me. And I gotta say it does look sweet. But I think as you pointed out it does take a performance hit, but we're on pretty pimp hardware. Not sure how big of a performance hit though.
Edit.
Thanks for that link btw. MoP is talking about the exact same thing I'm trying to say. He even has more nice examples than me T_T