Jump to content

procedural uv-ing

Recommended Posts

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


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.


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



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

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