Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Marcomeeuwse

procedural uv-ing

Hey Odforce,

I hope you can help me. I want to UV and Texture several different shaped objects. I have several box like shapes that will become buildings later. I have in this houdini file an attemps to solve this issue. I have trouble getting something like the result made in maya, like in the picture. I would like to have this result for all of my shapes so I can apply a repeatable texture. The buildings are everywhere in world space but I dont have the translations or rotations of the buildings. So for it to work, it should not matter where the building is. I tried to get the same result as in Maya, for the UV, when the building is on worlds orgin. I tried to get select a procedural seam and use UVpelt. but it gives me the rotated result. As shown in the second picture.

Can someone help me out?

 

result 2.png

result.png

Edited by Marcomeeuwse

Share this post


Link to post
Share on other sites

I would use UV Flatten node with Seam Group edge hard-coded if the seam edges are same across all generated meshes. UV Flatten will axis-align island. You may try to apply it before PolyBevel, since it properly handles UVs.

axis_aligned_uvs.hipnc

Share this post


Link to post
Share on other sites

Thanks, didn't thought about using that poly bevel later. That saved most of it :)

That seam group gave a me an idea. It is not possible for the object to hard-code/select a primitive, edge or point, as they are not always on the same position for all the other objects. So the selection of the seam needs to be procedural. I selected the top points of the object and placed a long box on one of the points, which will be the selection for the group node by bounding box. I did the same for the edge selection of the bevel. Im not sure if it could done any better, but it works. And the UV Flatten node works like a charm that way. Thanks!

But i'm left with only one problem. Since Houdini 16, the group node is split up and the fuction @p.y==$YMAX does not work anymore, vex is now needed and i tired this: @P.y >= getbbox_max(0)[0];
That only works on the current position of the object, when I translate it on x y or z, the selection is changed. I think i don't fully understand the vex thingy. I only want to select the top points of the object

Cheers

axis_aligned_uvs-2.hipnc

Share this post


Link to post
Share on other sites

getbbox_max(0) returns a 3-float vector. You are accessing it's very first component, which is same as using $XMAX in the old Group node. You should use "getbbox_max(0).y" or "getbbox_max(0)[1]" (same thing).

Share this post


Link to post
Share on other sites

Ah i see. Then that [0] makes sense, [0] is x, [1] is y, [2] is z. So if (0) stands for a 3-float vector, what are the other possibilities? is (1) a 3-integer vector?

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