Jump to content
AntoineSfx

UV mapping on a sweep

Recommended Posts

I'm trying to set the UV correctly on this brick arch:

On top it's a bent box, but I'd like to do it with a rectangle + sweep

I got u from curveu from the resample node, and  v from the fact that points are in such an order that the bottom ones are easily found with a formula

@uv[1]=(@ptnum%4)/2;

Then a uvtransform downstream to tweak things in uv space.

But.. this adds coupling between two nodes (# sides of the polygon <-> formula) , and obviously it's fragile.

What's a better way to have u along the curve, and v normally to the curve (and maybe then in the z /  depth direction too) ?

This after the cross section
 

@curvev=(float)@ptnum/@numpt;

 

copied later with

@uv[1]=@curvev;

also works, and requires to have a third node where I have something to setup on uv..

 

houdini.thumb.png.d171d634c509501cd463e97449ce3957.png

 

 

arch.hipnc

pentabrick.png

Share this post


Link to post
Share on other sites

Second method seems fine for me. Any problem with it? Swap u and v (cross section holds u and backbone holds v). Compute automatic scale using "arclen("../resample1/", 0, 0, 1)" expression. "measuredperimeter" intrinsic can give same value without need to add an extra UV Transform.

skin_uv.hipnc

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

×