Community
Maya Shading, Lighting and Rendering
Welcome to Autodeskā€™s Maya Forums. Share your knowledge, ask questions, and explore popular Maya materials topics.
cancel
Showing results forĀ 
ShowĀ Ā onlyĀ  | Search instead forĀ 
Did you mean:Ā 

Getting U and V coordinates in Xgen Core

1 REPLY 1
SOLVED
Reply
Message 1 of 2
denisVFX
208 Views, 1 Reply

Getting U and V coordinates in Xgen Core

Hello. I try to create feathers system with Xgen in Maya. I encountered a problem derivering U and V coordinate of surface on which xgen primitives are generated. By default UV coordinates are uv positions of each hair strand (U along hair and V across hair primitive).

I tried to create a custom  shader parameter in Xgen description with value $dPdu and $dPdv. But it works strange. And it works totally incorrect when I try use V coordinate (along strand) and my custom user data as UV coordinates of texture file.

I wonder that there is no easy way to get this coordinates.

Baking color data from texture is not sutable in my case, because I need to apply taxture along strands and some U or V coordinate of source geometry...  What could be a right solution ?

 

Labels (1)
1 REPLY 1
Message 2 of 2
denisVFX
in reply to: denisVFX

Ok. I found one solution. But I'm not sure if it's the best one.

In Xgen I added custom two custom shader parameters. $v (represents v component of each face) and $faceId 

And created shader network which with simple math operations calculates linear ramp from v and face id.

For multiple feathers $faceId must be modulated by 17 (It's polygon count on my source strand geometry from which I generate xgen geometry).

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report