Building uv's for a bifrost mesh

Building uv's for a bifrost mesh

blaabjergb
Contributor Contributor
1,426 Views
3 Replies
Message 1 of 4

Building uv's for a bifrost mesh

blaabjergb
Contributor
Contributor

Hi guys, I am trying to do unitize on an input mesh and then doing a layout with each face uv’s next to each other in a neat line/grid, but I am stuck with what kind of data I need to input into the set geo property.

I attatched the file for reference.

 

I am constructing a mesh based on an input, but I need to rebuild the uv’s.
I can pass through the original geo uv’s but that’s not what I want.

 

I have the faces of the mesh split up so no face shares the same uv’s, but I absolutely can’t figure out how to build an array that the set geo property will take, and the set_mesh_uv’s would only work if I knew the order of uv’s, but I am kind of working in the blind with this.

 

Bjorn

 

0 Likes
1,427 Views
3 Replies
Replies (3)
Message 2 of 4

jonah.friedman
Community Manager
Community Manager

Hi Bjorn,

 

Here's something that might help you, from the set_mesh_UVs docs.

 

indices

The per-face-vertex indices that map a face vertex to an element in the given coordinates array. If empty, the coordinates are treated as per-vertex values, and the mesh's face_vertex array is used to index into the coordinates array.


In order words, you can provide per-point UVs if you don't supply any indices and it'll create the indices for you. 

If you want to create UVs per face-vertex, it's also simple. You only need indices that count up to the number of face vertices. 

 

For example, a cube has 6 faces, 8 points, and 24 face vertices (6 quads with 4 points each). To set per-point UVs, you can just supply an array of 8 uvs and no indices. For face vertices you can supply an array of 24 uvs + "identity" indices [0,1,2,3...22,23] (which you can create simply with "get array indices"). 

 

Jonah Friedman
Bifrost Product Manager
0 Likes
Message 3 of 4

Polytikal1
Advocate
Advocate

How do you pull the UVs from an alembic cached mesh (cached on maya, not bifrost)? I can't seem to make it work on bifrost graph editor...

0 Likes
Message 4 of 4

morten.bojsen-hansen
Autodesk
Autodesk

Please don't resurrect old threads with unrelated questions. It's better to create a new question.