PDA

View Full Version : Maya 5.0 texturing tutorial


King Mango
08-18-2004, 01:28 PM
This post is intended to help you get 2k4 (or your own custom textures) into maya so you can see how they look on your model as you UV map.

The first thing you need to do is decide what textures you're going to want to use. duh
Now most textures in UED are in the DirectX compression format .dds. You will need a special set of plugins for Photoshop wich you can grab here. (http://developer.nvidia.com/object/nv_texture_tools.html)
If you don't already have a project set for your model do it now.
Export the textures from UED to your newly set project
Open them in PS and save them as .tga or .bmp(um, you exported them from UED to the project folder right? ;))
Now you're ready to get them into Maya and on to your model
In Maya click Window>Rendering Editors>Hypershade
Now in Hypershade you will see a new window with several different panes. On the right side there will either be one single or two panes stacked on top of each other. Just above them are some strange looking buttons, one with a black bar near the top of the button, one with a black bar near the bottom of the button, and one with both black bars. The tooltips will tell you what tabs they show, but we are concerned with opening the workspace right now so that means click the middle one that shows the bottom tabs only.
Now back over above the left pane is a button labeled create textures.
Click and drag down to create materials.
Now you will see a list of new material types appear. I have no idea what they all are, but we need the lambert. Middle click and drag the lambert to the top right corner of your work area. It's a good idea to rename this material now. Right click and drag down to rename type your new name and hit enter.
Now go back over to create textures click and drag but this time choose create textures.
Look in the new set of items and find the green and blue icon called file
Middle-clix and drag over on top of the material you created previously and when you release a menu will pop up. Maya is asking you what part of that material you want to connect this texture to. Choose color
Now drag the texture off to the left a bit so you can clearly see each one and you will notice a little green arrow going from your file to the material. I don't really know the technical term for that but it indicates input and output.
I'm sure the color is significant so that's why I mention it should be green lol :D
Ok now left click on the texture you just dragged over and hit ctrl-a to open up the attribute editor. Minimize the Hypershade window and in the attribute editor you will see a field called Image Name and conveniently there is a browse folder button next to it. Open it up and if you set your project earlier then when you click browse you will be taken directly to the textures you set up earlier.
Choose one
You now have a material made from a custom texture that you can apply to your model.
I'll cover laying out and mapping UVs shortly.

jedilaw
08-18-2004, 01:41 PM
This post is intended to help you get 2k4 (or your own custom textures) into maya so you can see how they look on your model as you UV map.

The first thing you need to do is decide what textures you're going to want to use. duh
Export them from UED. Now most textures in UED are in the DirectX compression format .dds. You will need a special set of plugins for Photoshop wich you can grab here. (http://developer.nvidia.com/object/nv_texture_tools.html)
If you don't already have a project set for your model do it now.
Export the textures from UED to your newly set project
Open them in PS and save them as .tga
Now you're ready to get them into Maya and on to your model
In Maya click Window>Rendering Editors>Hypershade
Now in Hypershade you will see a new window with several different panes. On the right side there will either be one single or two panes stacked on top of each other. Just above them are some strange looking buttons, one with a black bar near the top of the button, one with a black bar near the bottom of the button, and one with both black bars. The tooltips will tell you what tabs they show, but we are concerned with opening the workspace right now so that means click the middle one that shows the bottom tabs only.
Now back over above the left pane is a button labeled create textures.
Click and drag down to create materials.
Now you will see a list of new material types appear. I have no idea what they all are, but we need the lambert. Middle click and drag the lambert to the top right corner of your work area. It's a good idea to rename this material now. Right click and drag down to rename type your new name and hit enter.
Now go back over to create textures click and drag but this time choose create textures.
Look in the new set of items and find the green and blue icon called file
Middle-clix and drag over on top of the material you created previously and when you release a menu will pop up. Maya is asking you what part of that material you want to connect this texture to. Choose color
Now drag the texture off to the left a bit so you can clearly see each one and you will notice a little green arrow going from your file to the material. I don't really know the technical term for that but it indicates input and output.
I'm sure the color is significant so that's why I mention it should be green lol :D
Ok now left click on the texture you just dragged over and hit ctrl-a to open up the attribute editor. Minimize the Hypershade window and in the attribute editor you will see a field called Image Name and conveniently there is a browse folder button next to it. Open it up and if you set your project earlier then when you click browse then you will be taken directly to the textures you set up earlier.
Choose one
You now have a material made from a custom texture that you can apply to your model.
I'll cover laying out and mapping UVs shortly.

Thanks, Mango!

Quick question: can you export materials that are made in Maya PLE to UED? In other words, use the custom features such as noise, specularity etc. to make a material from scratch using only materials from Maya, apply the custom material to your mesh, and export it to UED along with the new textures? Or does the watermarking "feature" of PLE prevent you from outputting useable materials?

King Mango
08-18-2004, 03:23 PM
You can as long as you create the same material set in UED first and give it the same name. This involves adding extra attributes to your Maya materials though. I'll get that next. Good idea.

King Mango
08-18-2004, 04:30 PM
Ok since I have never actually used Maya to create a full fledged shader material, I'm not sure exactly how this would work but I'm fairly certain that you need to create a UED material that is similar to your Maya material.
This section is dependant upon Using the 2k4 exporter plug-in for Maya.
Once you get your UED material set up open your project in Maya
If you're not already connected to UED then do it now.
Open the hypershade window only now you will need to choose the top tabs button, and then the materials tab where you will see all the materials you have applied to your object
Left click on one of the materials and again ctrl-a to bring up the attribute editor
Click Atributes>Add Attributes
You will be greeted with a pop up window
On the new tab there is a field near the top called Atrribute Name
You want to enter UNRMaterialName (this is case sensitive)
Make it a string by clicking the 'string' radio button
Click OK
You will now see UNRMaterialName as an extra attribute in the attributes editor
Now go over to UED and get the properties open of your material
In the top right there will be the location string of this material
It is very important that you use this string exactly as it appears
For example:
2k4Chargers.ChargerTextures.HealthBaseTEX
I would suggest copying it with a pen or pencil on to a piece of paper so you don't have to click back and forth between Maya and UED to get it right.
Any way this info now goes in the UNRMaterialName field of the extra attribute you just created.
This is only really useful if you are working on a model and making tweaks to it And constantly importing and deleting from a level as you add detail to your object. Once you have five materials on a mesh it can get to be a pain in the but to have to assign them each time in UED, but if you know your mesh is done, then you don't really need this info cause it will actually make more work for you if only need to import it once.

As far as I know there is unfortunately no way to get Maya created material sets to export with a model since UED relies on its own texture protocols. Probably doesn't answer your question sorry.

saka
08-28-2004, 11:01 AM
Hey King Mango,

Just read your Tutorial about texturing in maya. Great job done. I just wanted to hand you out another methode of creating a material in Maya. I always use this methode because you mainly have to use the Attribute editor.

Open Hyershade
Drag (Lambert) material to Top tabs area. Double click on the new material to open the attribute editor.
In the atribute editor Change the name from lambert2 to TileT(example, I use the T to make a difference between the texture name and the shading engine name. Otherwise maya will fill in a two behind the shading engine name). Then go to the lambert4SG tab using the icon to the right of the shadingEngine name.
Change lambert2SG to Tile. (Tile is the texture name in Ued)
When that is done, again go to the Lambert tab (now TileT) en click on the chekered button right next to color. A Create Render Node window will pop up. Click on File. The window will close. You will automaticly go to the right tab in maya. Here you've got the image name field. Pick the texture you want and the material is done.

Oh btw,
It isn't even neccesary to start with the Hypershade.
Pick a face or an object. Right click and in the pull down menu select Materials > assign new materials > Lambert.
The attribute editor will pop up and you can folow the same steps as mentioned above. This way you won't have to deal with the hypershade at all.
I only use the hypershade when creating materials I will only use in Maya.

SuperApe
08-28-2004, 04:11 PM
I'm sure I'll have plenty to say on this subject after the VCTF contest is over.
(whew!)