"Cut" mesh on UV wrap?

   5951   5   2
User Avatar
Member
12 posts
Joined: Aug. 2013
Offline
Hi,
Is it possible in Houdini to texture a surface and then have verts/edges generated on the underlying surface mesh at UV wrap points?

Basically what I want to do is pack all my textures into atlases and that doesn't support tiling. So I need to add geometry to hold the UV coords when it wraps.

Thanks,
Brett
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
Sorry
ops:
Please explain more clear ,I can't understand your meant !

Can you give me another example ?

:cry:
https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
184 posts
Joined: June 2010
Offline
I'm guessing he means to tile a portion of a tpage over neighbouring polys, I.e. needs to split the adjoining verts? ( Fuse->Unique Points )
User Avatar
Member
12 posts
Joined: Aug. 2013
Offline
Sorry, I wasn't clear.

I want to generate a mesh based on UV coordinates. Take a square of a given size, tile a texture onto it. Now run an operation that cuts the mesh so that the texture is now face mapped instead of repeated.

Does that make sense?

Basically I need all UV coords to be in the range of 0->1. So if you tiled a texture and it had UV of 2, it would cut the mesh at 1, then reset the UVs to be 0->1 again.

Start: 0->2, after operation, 0->1 + 0->1 with a new edge at the boundary for the UVs to “stick” to it.
User Avatar
Member
184 posts
Joined: June 2010
Offline
I gotcha, you want to dice based on UV extents of 0-1.

I expect there's a few ways to achieve this… I'd do it in python, but you can probably also do do it with VOPs, in combo with a Divide or Carve SOP.

You want to compare each primitive's edge verts/points for values that cross outside the 0-1 range (i.e. 0.9 to 1.2), mark the prims with attributes containing the U/V splicing distance, then apply the divisions per primitive with a Divide or Carve (each would require a slightly different approach…Divide probably the simplest).

Once that's done, you can seperate the points with a Fuse SOP -> Unique Points.

Then you need to iterate through all the primitives again, fixing their UVs to fit in the 0-1 domain. This may be simplest (and fast) with a Point Wrangle.

You may have to do some tidying up afterwards as, depending on what you're applying this to, you may have quite a lot of excess geometry and attributes. Also, while it should work ok for flat surfaces, it may not work on non-planar surfaces (nor non-quad prims).

(Alternatively, you could just build a new set of quads based on UV bounds)
User Avatar
Member
12 posts
Joined: Aug. 2013
Offline
@AdamT

Yes, exactly! I will try to make a simple test along this line of thinking. I'm no Houdini guru so it will be a fun challenge!

Thanks for taking time to point me in the right direction :-)

Cheers,
Brett
  • Quick Links