Render-To-Texture_3DSMAX

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
User avatar
RyanN
Halfling
Posts: 82
Joined: Thu Aug 19, 2004 6:41 am
Location: Victoria, Australia
Contact:

Render-To-Texture_3DSMAX

Post 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?
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post 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
			}
		}
	}
}
User avatar
RyanN
Halfling
Posts: 82
Joined: Thu Aug 19, 2004 6:41 am
Location: Victoria, Australia
Contact:

Post 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!
User avatar
RyanN
Halfling
Posts: 82
Joined: Thu Aug 19, 2004 6:41 am
Location: Victoria, Australia
Contact:

Post by RyanN »

Yes, it works! i didn't click on 'export all mapping channels' option in the ogre scene exporter.
Post Reply