Go Back   AC3D Forums > Resources > AC3D Plugins and Other Resources
Register FAQ Members List Calendar Today's Posts

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 26th May 2010, 06:21 PM   #20
lordfly
Junior Member
Junior member
 
Join Date: May 2010
Posts: 8
Default Re: PLUGIN: Render to Texture: Light Maps, Normal Maps, AO

Quote:
Originally Posted by lisa View Post
Not so. Most games that use lightmaps use two sets of UV coordinates, one for the diffuse map and one for the lightmap. These are combined at runtime using either a multitexturing shader or multipass if all you have is a fixed function renderer. e.g. GL_ARB_multitexture if you're writing something using OpenGL or SetTextureStageState if you're using DirectX. The render-to-texture plugin will allow you to bake both together in case your engine doesn't support multi-texturing, but that's not the normal way it's done. These are normally different maps.

The first set of texture coordinates is for the diffuse map, and is as you describe: overlapping as much as possible to use texture space as efficiently as possible.

The second set of texture coordinates is specific to the lightmap. It's a unique atlas, and the lightmaps are *extremely* low-resolution. It's not uncommon to pack an entire scene onto a single 1024 lightmap, or small 32x32 or 64x64 textures for individual objects. Shadows are normally a little blurry anyway, so the maps can be pretty tiny and still look great. This keeps this method pretty efficient even though it uses more UV space.

AC3D only supports a single set of texture coordinates for a model so if you're building models for a game, you'll want to create two versions of the model file and combine them in your export utility. [Multi-coordinates is definitely on my wish list :-) ] If you're fixed function, keep them as separate models and arrange it as a second pass. e.g. Render the first model as usual, then render the second model with alpha blending and a tiny z-buffer offset to blend the shadows in.
Ah, that makes sense, yes. You'll have to forgive me, my modeling knowledge is sadly limited to "things Second Life can do". In my mind, a texture is a texture is a texture, shadows baked on or not. SL can only have a single texture applied to a surface (not even a material, just a jpg or tga); that's why I was hoping for an easy way to plop a light up in the sky and have it "bake" the shadows into the texture map. Alas, modeling is never that easy.
lordfly is offline   Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 10:21 AM.


AC3D Forum
(C) Inivis Limited 2020