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








Share this post

Link to post
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

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now