How could we made lightmap in maya

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
User avatar
maxxoros
Greenskin
Posts: 130
Joined: Tue Feb 22, 2005 7:18 pm

How could we made lightmap in maya

Post by maxxoros »

I have test but maya only allow me render to texture :( (using maya default)...So, anyone tell me how to generate lightmap texture in maya so we can use in ogre
User avatar
Falk
Kobold
Posts: 25
Joined: Fri Aug 05, 2005 9:55 pm
Location: Berlin, Germany
Contact:

Post by Falk »

What do you mean with "but maya only allow me render to texture" ? Where else do you want to store your lightmap ?

You can use a second uv-set to get your rendered lightmap into ogre. Or you use that lightmap to blend it onto your diffuse texture in photoshop ...
User avatar
maxxoros
Greenskin
Posts: 130
Joined: Tue Feb 22, 2005 7:18 pm

Post by maxxoros »

I know the concept of lightmap...but I can not find step by step way to create it :(...Could you explain more how to create lightmap for using in Ogre with maya
Tyn
Gremlin
Posts: 195
Joined: Mon Jul 19, 2004 11:40 pm
Location: England
Contact:

Post by Tyn »

I found this:

http://www.radonlabs.de/ToolkitDocs_HTM ... Howto.html

It seems to be a toolkit for using Maya with the Nebula2 engine. Prehaps you could use some of the tools in it and then export into Ogre?
"A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams

http://www.spacecolonization.net
2080: Space Colonization
User avatar
Falk
Kobold
Posts: 25
Joined: Fri Aug 05, 2005 9:55 pm
Location: Berlin, Germany
Contact:

Post by Falk »

Lightmap with Mental Ray:

Set a middle tone grey as your environment color of your camera and a brighter grey for your object ...

Press "F5" and select your object. Then go to "Lighting/Shading" > "Assign New Bake Set" > "Texture Bake Set". Now you can adjust the settings as you want ...
With your object still selected go to "Lighting/Shading" > "Batch Bake (mental ray)" (optionbox). For "Color Mode" I normaly choose "Incoming Illumination Only" ...
Then click "Convert and Close" ...

Don't forget a lightsetup (or "Enable Default Light") and the "Render Global Settings" (global illumination, final gather, sampling quality ...) before rendering the lightmap.

Rendering a lightmap with mental ray takes time! :P

Lightmap with Maya Software:

Open the Hypershade, select your object and shift-select the material on what you want your lightmap to be baked on. Under "Edit" (in the Hypershade) and click on the optionbox of "Convert to File Texture (Maya Software)". Make your settings and click "Convert and Close" ...

In both cases make testrenderings first ...


If you have a different uv layout for your lightmap than for your diffuse map just work with two maya files.
One file with your object and two uv sets (first for diffuse, second for lightmap). Use this file to export your mesh.
Then copy the uv coordinates from the second uv set to the first and delete it (2nd). Save that as a new Maya file. Use this file to render your lightmap (somehow Maya didnt manage to bake the lightmap onto the second uv set)

To define what texture has to be on your sets in Ogre you have to write something like that in your material file ...

Code: Select all

material model_01
{
	technique
	{
		pass
		{		
			texture_unit
			{
				texture model_01_diff.jpg
				tex_coord_set 0
			}

		}
		pass
		{
			scene_blend modulate
		
			texture_unit
			{
				texture model_01_light.jpg
				tex_coord_set 1
			}

		}
	}
}
Hopefully I made no mistake :P ...
User avatar
maxxoros
Greenskin
Posts: 130
Joined: Tue Feb 22, 2005 7:18 pm

Post by maxxoros »

@Falk: Great, Thanks a lot
It seem the maya user in Ogre community develop recently...I have met many and a lot of Ogre-Maya stuff is discussing now :)
---
8) So fun
poneill
Gnoblar
Posts: 1
Joined: Wed Aug 10, 2005 4:50 am

Post by poneill »

If you happen to have access to a Silver Memebership on the Alias community site, there is a very good video lesson on Maya model topology, lighting, UV layout, generating light maps, and color per vertex by Rob Ormond. The emphasis is on use for games.

The video set titled "Maya Techniques | Polygon Lighting, Texturing, and Shading" can be found in the "New For Silver" area of the Alias Community site.
Post Reply