Texture Maps Maya and Unity

smallarrows.GIF

Turn off Color Management
Select Windows->Settings/Preferences->Preferences
Select Color Management
Uncheck Enable Color Management
Select Save



Fix the Hypershade Window
hypershade  Windows->Rendering Editors->Hypershade

Close Material Viewer and Property Editor in the Hypershade window
The Property Viewer does not show you all the options listed in the Attribute Editor.

From this:
hypershade_before

To this:
hypershade_after



Color Maps
mcm1.jpg
Arnold, Maya Software Renderer, Mental Ray and Unity
Color mapping is like gift wrapping.  Color maps apply an image to the surface of an object

hypershade Windows->Rendering Editors->Hypershade
Under the Create section, click on Lambert to create a new shader ball.

Select a model.

Use the right mouse key over one of the shader balls to bring up the marking menu, select Assign Material to Selection.

Double click the Lambert shader ball you just assigned.

(You should be in the Lambert tab of the attribute editor on the right.)
Click the Map Button across from Color map_button.jpg
     Select the File icon texture_file_icon_create_render
          Change Filter Type to Off (less blurry)
          Choose an image texture_folder_icon
                It is best to keep your images in the scenes
directory for Maya.
                And keep a copy of your image in the Assets directory for Unity.
Hit 6 to view the texture shaded on the model.



Reflected Color Maps
mcm4.jpg
Maya Blinn or Phong shader, Maya Software Renderer and Mental Ray

A reflected color map makes an object appear shiny by reflecting a picture on to its surface. Any picture whether it is painted or rendered can be used as a reflection map. The software takes this image and wraps it around an imaginary sphere, (by default), distortion takes place around the poles of the sphere.

Raytrace will not calculate objects reflecting in each other if the object is using a reflection map. Reflection map can save a lot of rendering time if you are raytracing.

The reflection depends on the position of the object and the FOV (angle of view, or zoom). Round objects catch more reflection than flat objects, especially in computer graphics. Contrast is important to achieve a shiny surface, the darker the surface color the more reflective it will appear. The amount of reflectivity is variable, it is determined by how high the reflectivity is set in combination with the specular highlight value. (The specular value also determines how bright the highlight will appear.)

hypershade Windows->Rendering Editors->Hypershade
Click on Phong or Blinn to create a new shader ball.
Double click a shader ball.
Click the Map Button map_button.jpg across from Reflected Color
     Click Env Chrome
Change colors and widths in the chrome procedure.
This procedure is an environment with a grid floor and a sky with rectangle light fixtures.

Reflected Color does not work with Arnold or Unity.



Bump Maps
mcm2.jpg
Bump mapping is similar to color mapping in approach.  It differs in that it uses black and white data from a color image, these luminance values used to simulate bumps on an object surface.  Bright areas of the picture will appear to raise while dark areas will sink in. The object surface is not actually distorted, it only appears so.



Bump Maps, Maya Software Renderer and Mental Ray
Assign and double click a Maya shader ball.
Click the Map Button
across from Bump Mapping map_button.jpg
     Select the File icon texture_file_icon_create_render
New tabs called bump2D and file will appear in the Attribute Editor.
Go to file tab in the Attribute Editor.
To the right of the Image Name click the
folder icon. texture_folder_icon
Choose an image. White areas appear to bump out, black stays the same.

Under the bump2D
tab, You can change the apparent height of the bump with the Bump Depth slider, negative or positive numbers work.

Later, if it is missing, you can always find bump2D tab by clicking the connection arrows.
     Double click your shader
     Connect over to the Bump Mapping  connection_arrow2
     Click the lower connection arrow to bring up the bump2d height tab
ConnectionArrow



Bump Maps, Arnold
You must use an Arnold shader or Lambert with the Arnold renderer.
hypershade Hypershade
Create an
aiStandardSurface shader

In the Attribute Editor
under Geometry

Click the Map Button across from Bump Mapping map_button.jpg
     Select the File icon texture_file_icon_create_render
     (The other procedures do not work with Arnold for any shader material bump.)
Go to file tab in the Attribute Editor.
Click the folder icon to select an image.

Switch to the
bump2D tab to change the Bump Depth (see above)



Transparency Maps
Transparency mapping uses black and white data from a color image or the alpha channel. Luminance values are used to define transparency on the object surface. Dark areas of the picture are transparent while white areas are opaque.
mcm3.jpg
Maya Grid procedure
Maya Shader, Arnold, Maya Software Renderer, Mental Ray

Double click a Maya shader ball.
Click the Map Button map_button.jpg across from Transparency.
     Click Grid
For Arnold to work with a Maya Shader transparency map you must use Lambert. And, turn off Opaque under the Arnold drop down in the Attribute Editor for the object



Photoshop Color + Transparency Maps
Maya Shader, Maya Software Renderer Mental Ray and Unity
Create an image with 1 alpha channel, the alpha channel will automatically create a transparency map when you apply the image as a color map.
In Photoshop:
Make a 256x256 image with an Alpha channel.
     Select the Channels window
          Select New Channel... from the windows menu
          Select the Alpha1 channel
          Paint the transparent sections black, opaque white.

Save the file into your Unity Assets
folder as a tiff and or you Maya scenes folder too.

Double click a Maya shader ball.
Click the Map Button across from Color map_button.jpg
     Select the File icon texture_file_icon_create_render
     Change Filter Type to Off (less blurry)
     Select your tif file that has an alpha channel
     A transparency map will be automatically generated along with the color map.

color_plus_alpha



Arnold Photoshop Color + Transparency Maps
Maya Shader, Arnold Renderer, Inverted Alpha

This is a procedure for Lambert shaders + Arnold.
Make 2 maps, one for color the other for transparency, it should be negative. (This can work in Unity if you make the transparency image inverted positive.)
Double click a Maya shader ball.
Click the Map Button across from Transparency map_button.jpg
     Select the File icon texture_file_icon_create_render
     Change Filter Type to Off (less blurry)
     Select your black and white tif file

Assign a color map if you like.

Select the model, go to the Attribute Editor
     Turn off Opaque under the Arnold drop down
arnold_transparancy_maya

Arnold Shader, Arnold Renderer
Use the Arnold aiStandardSurface shader

Select the model
Turn off Opaque under the Arnold drop-down in the Attribute Editor

Under Specular
, set IOR (Index of Refraction) to 1
Under Geometry, click the Map Button map_button.jpg across from Opacity.
The white will render out as opaque and black as transparent.
You can invert the map for Maya by selecting Invert under Effects for the File map.
arnold_transparancy_arnoldshader




Delete a Shader
hypershade
 Windows->Rendering Editors->Hypershade
In the hypershade window, select the Lambert shader ball.
Choose Edit->Delete in the hypershade menu. This will not delete any textures associated with it.



Remove Texture from Material
hypershade Windows->Rendering Editors->Hypershade
Double click a shader ball.
With the right mouse button, click on the attribute next to the item mapped, such as Color.
Choose Break Connection



Delete a Texture

Switch to the texture tab
Select the texture you would like to delete
Choose Edit->Delete in the hypershade menu.



Generate a Map with Render
Create a model, render it to a picture file and use it as a map.

Under the Persp Window menu:
Select View->Camera Settings->Resolution Gate.


Open Windows->Rendering Editors->Render Settings... render_settings_button
Under Common tab,
Under File Output, Set Image format to Tiff
Under Image Size, Input  256 x 256  width x height

In the Rendering Module:
Use Render->Batch Render



Convert a procedural map in Maya to work in Unity.
In Maya:
Apply a procedural texture to the color such as checker.
Click the Map Button map_button.jpg across from Color, select checker
Select your model, use shift to choose your shader too
In the
Hypershade, select Edit->Convert File to texture->option
     Change the resolution if you prefer, better to keep it low for Unity.
     Choose File Format:  Tiff (tif)
     Convert and Close
This created a new color map in your sourceimages directory of your Maya project.
Move the file to your
Unity Assets directory, reassign the new location in Maya.
Save your
Maya scene file into your Unity Assets folder.



UV Mapping NURBS Example

UVmap.jpg

Shape with the 256 x 256 color map
Shape created from skinned cross-sections.



What are 24 bit, 32 bit and 16 million colors?

Red          8 bits per pixel = 256 shades of red
Green      8 bits per pixel = 256 shades of green
Blue         8 bits per pixel = 256 shades of blue

Alpha       8 bits per pixel = 256 shades of transparency for compositing

8 bits per channel x 3 channels RGB = 24 bit total per pixel.
8 bits per channel x 4 channels RGBA = 32 bit total per pixel.

256 x 256 x 256 = 16,777,216 colors available per pixel