Feedback

What's your question?

By: [ Editor ] Asked

Getting basis vectors for second UV set using mental ray

I have on object with multiple UV sets and I'd like to use the second UV for the direction of an anisotropic specular. I can't seem to find a way to get the derivs / bump_x_list data for a specific UV set. Is it possible?

Cheers, Szabolcs

Add comment viewed 214 times Latest activity 7 months ago

or Cancel

1 answer

  • 1

freds [ Editor ]

Hi Szabolcs,

looks like you can do this,

In your mia_materials Anisotropy tab you should have a 'Channel' attribute. This lets you point to other UV sets than the default one.

0(zero) is the default UV set, 1 is the first UV set you added yourself etc.

If you hover your mouse pointer over the 'Channel' attribute in the Attibute Editor it says, "Anisotropic base angle comes from the U direction of the chosen texture space."

Other values you can use, anisotropy_channel can also have the following "special" values:

  • -1: the base rotation follows the local object coordinate system.
  • -2: the base rotation follows the bump basis vectors
  • -3: the base rotation follows the surface derivatives
  • -4: the base rotation follows a vector placed in state>tex prior to calling mia_material

(from http://toi.bk.tudelft.nl/maya/help/docs/Maya2008/en_US/ArchGuide/arch_mtl.html)

Also have a look at these two threads for more info about MR and UV sets, http://forum.mentalimages.com/showthread.php?t=3906 http://forum.mentalimages.com/showthread.php?t=5695

cheers fred

NN comments
szabolcs
-

Hi Fred,

Thanks for your response! Its great that its handled automatically in miamaterial, but I’d like to get / the basis vectors in a custom shader. I could calculate them for myself using data provided by mitri_vectors but I would have preferred using a built-in solution.

Cheers, Szabolcs

or Cancel