Jump to content

UV map saturn rings in Mantra

Recommended Posts

Hi houdinist !

I am trying to apply saturn ring texture in mantra but I failed to reproduce the texture mapping in attachement (done in blender),

someone could help ? I tried to rotate UV by an angle of 90° over each face, but I don't know how to achieve this

hip file in attachment with saturn ring texture








Link to comment
Share on other sites

You can turn a wide grid into a ring using sine and cosine on the bounding box of the grid. That way you can also create UVs on the fly.


float radius_inner = chf('inner_radius');
float radius_outer = chf('outer_radius');

vector bbox = relbbox(0, v@P);
vector bbpi = fit01(bbox, -M_PI, M_PI);

vector uv = set(bbox.z, bbox.x, 0.0);
v@uv = uv;

vector pos = set( cos(bbpi.x), 0.0, sin(bbpi.x) );
pos *= fit01(bbox.z, radius_outer, radius_inner);
v@P = pos;



  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...