Hi everyone!
I'am a newbie in Houdini and a i have big problem with my hda inside Unity.
So my question is how to avoid split verteces and keep my uv's in the right place?
For example i proceduraly generated a trunk model that has some kind of lengh and division count in widgh and i can tweak it inside unity. I make uv for the tiling texture (vertex attributes), uv in second channel for the lightmap bake which carefull packed into one udim (also vertex attr) also i have a vertex color gradient for animate by shaders and so on. Upd store all data in points.
If i export that hda as fbx from houdini and open in 3ds max for example i'll see a good geo and perfect uv's with curent seams, but if i drop it to the unity it'll brake all vertices and my split count grow up… 70 verex VS 324 for example for the trunk with 6 by 10 divisions… it's realy a huge problem for mobile games and i need the solution to avoid splitting.
Dive into Houdini Engine for Unity documentation i can find this “Note that, by default, meshes will be generated using split vertices (i.e. each triangle will have unique vertices). This can be changed to using Points (shared vertices) by enabling Generate Mesh Using Points checkbox in the ASSET OPTIONS section.” - so i try… but in this case it's realy weld vertices but loose all uv's.
I can't find any tutorials or any documentations or topics about that issue.
Can anyone answer how its works?
Splitting vertices inside Unity
3160 14 2- cgrum
- Member
- 13 posts
- Joined: Aug. 2019
- Offline
- cgrum
- Member
- 13 posts
- Joined: Aug. 2019
- Offline
- seelan
- Member
- 571 posts
- Joined: May 2017
- Offline
- squaredanced
- Member
- 12 posts
- Joined: Aug. 2017
- Offline
- seelan
- Member
- 571 posts
- Joined: May 2017
- Offline
- cgrum
- Member
- 13 posts
- Joined: Aug. 2019
- Offline
seelanI have no data in vertex. All data stored in points.
The Generate Mesh Using Points requires attributes to be point-owned, and will ignore vertex-owned attributes. Are you seeing point-owned UVs being ignored? If someone can attach an HDA I can test it out.
Edited by cgrum - Sept. 9, 2019 15:35:55
- seelan
- Member
- 571 posts
- Joined: May 2017
- Offline
- cgrum
- Member
- 13 posts
- Joined: Aug. 2019
- Offline
- squaredanced
- Member
- 12 posts
- Joined: Aug. 2017
- Offline
- squaredanced
- Member
- 12 posts
- Joined: Aug. 2017
- Offline
- seelan
- Member
- 571 posts
- Joined: May 2017
- Offline
- seelan
- Member
- 571 posts
- Joined: May 2017
- Offline
I committed a fix which will be available in tomorrow's 17.5 daily build.
If you want to give it a try today, you can change the following line 1853 in HEU_GenerateGeoCache.cs from:
to:
Let me know if you tried it and it fixed the issued.
If you want to give it a try today, you can change the following line 1853 in HEU_GenerateGeoCache.cs from:
if (geoCache._uvsAttrInfo[u].exists && geoCache._uvsAttrInfo[u].owner == HAPI_AttributeOwner.HAPI_ATTROWNER_POINT && positionIndex < geoCache._uvsAttr.Length)
to:
if (geoCache._uvsAttrInfo[u].exists && geoCache._uvsAttrInfo[u].owner == HAPI_AttributeOwner.HAPI_ATTROWNER_POINT)
Let me know if you tried it and it fixed the issued.
- squaredanced
- Member
- 12 posts
- Joined: Aug. 2017
- Offline
seelan
I committed a fix which will be available in tomorrow's 17.5 daily build.
If you want to give it a try today, you can change the following line 1853 in HEU_GenerateGeoCache.cs from:if (geoCache._uvsAttrInfo[u].exists && geoCache._uvsAttrInfo[u].owner == HAPI_AttributeOwner.HAPI_ATTROWNER_POINT && positionIndex < geoCache._uvsAttr.Length)
to:if (geoCache._uvsAttrInfo[u].exists && geoCache._uvsAttrInfo[u].owner == HAPI_AttributeOwner.HAPI_ATTROWNER_POINT)
Let me know if you tried it and it fixed the issued.
Thank you! I have replaced the code and it works. For now I tested it with only uv on points but it works as expected. If something will go wrong with other attributes I'll let you now. Thank you for your fast responses and for fixing the issue. Cheers!
- squaredanced
- Member
- 12 posts
- Joined: Aug. 2017
- Offline
- seelan
- Member
- 571 posts
- Joined: May 2017
- Offline
-
- Quick Links