Support multimaterials on one mesh #44

Merged
Bogdan Nagirniak merged 11 commits from BLEN-417 into hydra-render 2023-05-24 07:07:39 +02:00

Purpose

Hydra doesn't support multimaterials assigned to one mesh, therefore we have to split mesh to submeshes with one material.

Technical steps

  1. Changed structure of MeshData to support submeshes for one material:
    • added MeshData::SubMesh
    • moved mesh export to write_submeshes()
    • implemented more correct material assignment.
  2. Adjusted InstancerData due to submeshes in MeshData.
  3. Adjusted BlenderSceneDelegate.
### Purpose Hydra doesn't support multimaterials assigned to one mesh, therefore we have to split mesh to submeshes with one material. ### Technical steps 1. Changed structure of `MeshData` to support submeshes for one material: - added `MeshData::SubMesh` - moved mesh export to `write_submeshes()` - implemented more correct material assignment. 2. Adjusted `InstancerData` due to submeshes in `MeshData`. 3. Adjusted `BlenderSceneDelegate`.
Bogdan Nagirniak added 10 commits 2023-05-20 21:19:49 +02:00
Bogdan Nagirniak requested review from Brian Savery (AMD) 2023-05-20 21:20:24 +02:00
Bogdan Nagirniak requested review from Georgiy Markelov 2023-05-20 21:20:24 +02:00
Bogdan Nagirniak requested review from Vasyl Pidhirskyi 2023-05-20 21:20:24 +02:00
Brian Savery (AMD) was assigned by Bogdan Nagirniak 2023-05-20 21:20:31 +02:00
Georgiy Markelov was assigned by Bogdan Nagirniak 2023-05-20 21:20:31 +02:00
Bogdan Nagirniak self-assigned this 2023-05-20 21:20:31 +02:00
Vasyl Pidhirskyi was assigned by Bogdan Nagirniak 2023-05-20 21:20:32 +02:00
Georgiy Markelov approved these changes 2023-05-22 14:54:11 +02:00
Georgiy Markelov left a comment
Collaborator

Works fine. Some comments in code.

Works fine. Some comments in code.
@ -241,3 +245,3 @@
ObjectData *BlenderSceneDelegate::object_data(pxr::SdfPath const &id) const
{
auto it = objects_.find(id);
pxr::SdfPath p_id = (id.GetName().find("SM_", 0) == 0) ? id.GetParentPath() : id;
Collaborator

id.GetName().find("SM_")

`id.GetName().find("SM_")`
@ -41,3 +41,3 @@
write_material();
write_transform();
write_materials();
Collaborator

The order is important here?

The order is important here?
Author
Owner

No

No
Vasyl Pidhirskyi approved these changes 2023-05-22 16:02:29 +02:00
Vasyl Pidhirskyi left a comment
Collaborator

Works well.

Works well.
Bogdan Nagirniak added 1 commit 2023-05-22 20:44:29 +02:00
Brian Savery (AMD) approved these changes 2023-05-24 01:54:17 +02:00
Bogdan Nagirniak merged commit 3f7774c002 into hydra-render 2023-05-24 07:07:39 +02:00
Sign in to join this conversation.
No Label
No Milestone
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: BogdanNagirniak/blender#44
No description provided.