Page 1 of 1

Render-To-Texture_3DSMAX

Posted: Sun Feb 20, 2005 11:15 pm
by RyanN
can the 'Render-To-Texture' feature in 3dsmax5 be used to generate a lightmap texture layer that can be used in Ogre?
I generated a lightmap, put it into the material file but can't get it to apply to the second UVW mapping layer. Can the automatically generated UVW mapping be used?

Posted: Sun Feb 20, 2005 11:28 pm
by sinbad
Yes; this is how the fresnel demo environment was lightmapped, whilst I had temporary access to 3DS a year back. I used the 3DSSceneExporter at the time, here's a sample material from it:

Code: Select all

material Box01_Shell_Material
{
	technique
	{
		pass
		{
			lighting off

			texture_unit
			{
				texture terr_rock6.jpg
			}
			texture_unit
			{
				texture UpperSurroundLightingMap.png
				tex_coord_set 1
			}
		}
	}
}

Posted: Mon Feb 21, 2005 12:15 am
by RyanN
one of problems i found was that 3ds uses a 'shell material' to group the baked texture and the 'multi/sub-object material' which the exporters don't read, so i combined the baked texture to multi/sub-object material which exported fine with all the textures including the light map. However i couldn't get the lightmap texture to use UVW mapping channel 2 which was the automatic generated one. My code was just like yours Sinbad but it never worked on channel 2. Does that channel get exported? I've multi-layered before but not using the automatic UVW unwrapper, do you remember how you did it Sinbad?

Thanks in advance!

Posted: Mon Feb 21, 2005 1:04 am
by RyanN
Yes, it works! i didn't click on 'export all mapping channels' option in the ogre scene exporter.