Jump to content
Alexandre

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

thanks

Alex

 

823d5df45424e974e4548beb4138efaf6d2357602.jpg

823d5df45424e974e4548beb4138efaf6d235760.jpg

8k_saturn_ring_alpha.png

ring.hipnc

Share this post


Link to post
Share on other sites

using the facet node I managed to split polygon,

now I messing with UVs nodes

Capture.thumb.JPG.6ec1df908b78e207b6605c18a229af02.JPG

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.

image.png.4690f83dbd43f6b4508065597fabeae5.png

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;

 

saturn_rings.hipnc

  • 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

×