Multiple Materials on a Mesh for realistic shadows

Software: Away3D 4.x

miha, Newbie
Posted: 31 May 2012 01:34 PM   Total Posts: 2

For example, when creating a walls in a room or an outdoor environment I would like to have realistic shadows and lights.

The way is to assign albedo [likely repeating] material to faces and also another material on the top, which represents shadows and lights (created offline with radiosity or similar for realism—with color bleeding, soft shadows, skymap etc). Of course I could just bake everything into one texture but that also means much much bigger files and decreased performance.

What is the best way to do that in Away3D 4?

I thought of exporting objects with two different UVs (one for albedo and one for environment), but how to assign different materials to one mesh?

One similar functionality is in TerrainDiffuseMethod, but I don’t think you can have different UVs, and textures must be the same size. But the environment map could be much smaller.

   

Richard Olsson, Administrator
Posted: 16 June 2012 01:26 PM   Total Posts: 1192   [ # 1 ]

There is a secondary UV buffer that you can use for this, and a set of light-mapping shading methods (LightMapMethod and LightMapDiffuseMethod) that you can use to blend two textures together using separate UV buffers.

However, there is currently no file format supported in Away3D that lets you export two UV streams per mesh, so you will need to export two versions of each mesh and “merge” the buffers into a single Geometry on the loading end, or manually create some sort of bespoke exporter for it from your editor.

Multiple UV streams is theoretically supported in AWD2, but no AWD exporters support it as of yet. I will try to implement this in 3ds Max and Maya soon, but likely not before August.

   

Shegl, Sr. Member
Posted: 16 June 2012 03:39 PM   Total Posts: 134   [ # 2 ]

Richard.. so. PlaneGeometry and Elevation have two UV streams ?

   

Richard Olsson, Administrator
Posted: 16 June 2012 03:43 PM   Total Posts: 1192   [ # 3 ]

All geometry in Away3D are instances of SubGeometry (wrapped in Geometry instances) and SubGeometry can contain a secondary UV stream, yes. However, PlaneGeometry and Elevation.geometry don’t have anything assigned to this by default. If you want to be able to use a secondary UV mapping I take it you will want to create that UV mapping yourself in a modeling package (or procedurally by scaling the regular UVs down and laying them out in a nice fashion in an atlas.)

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X