Not possible to export "Empty Hair" curve as FBX #105260

Open
opened 2024-04-01 09:11:38 +02:00 by YimingWu · 2 comments
Member

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2070 SUPER/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 551.86

Blender Version
Broken: version: 4.1.0, branch: blender-v4.1-release, commit date: 2024-03-25 20:42, hash: 40a5e739e270
Worked: (newest version of Blender that worked as expected)

Short description of error
[Not possible to export "empty hair" geo node setup, it consist of the curves being extruded on x to make a plane and mapping the "hair card" on it]

Exact steps for others to reproduce the error

  • Add "Empty Hair" Curve
  • In Geo node setup -> Extrude "x" (creates plane)
  • Map PNG on card
  • Realize instances
  • Export FBX (doesn't work)

Test File

System Information Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2070 SUPER/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 551.86 Blender Version Broken: version: 4.1.0, branch: blender-v4.1-release, commit date: 2024-03-25 20:42, hash: 40a5e739e270 Worked: (newest version of Blender that worked as expected) Short description of error [Not possible to export "empty hair" geo node setup, it consist of the curves being extruded on x to make a plane and mapping the "hair card" on it] Exact steps for others to reproduce the error - Add "Empty Hair" Curve - In Geo node setup -> Extrude "x" (creates plane) - Map PNG on card - Realize instances - Export FBX (doesn't work) [Test File](https://projects.blender.org/attachments/6e3a7449-d7be-4fed-8521-c008da7d7e08)
YimingWu added the
Status
Confirmed
Priority
Normal
Type
Report
labels 2024-04-01 09:11:39 +02:00
Thomas Barlow was assigned by YimingWu 2024-04-01 09:11:39 +02:00
YimingWu added this to the Import/Export project 2024-04-01 09:11:40 +02:00
Author
Member

Was originally reported by @kristians.dzenis on blender/blender#120102 , thought this should still be fixed. I think the main problem with this is that these exporters doesn't support CURVES object type yet, and I tried to add it back, but new_from_object doesn't like that either. So might worth taking a look further.

Was originally reported by @kristians.dzenis on https://projects.blender.org/blender/blender/issues/120102 , thought this should still be fixed. I think the main problem with this is that these exporters doesn't support `CURVES` object type yet, and I tried to add it back, but `new_from_object` doesn't like that either. So might worth taking a look further.
Member

The reported issue doesn't seem to be related to instances or Realize Instances at all, but rather is a general issue with exporting any CURVES objects which have been converted to mesh data, e.g. through Curve to Mesh.

This seems like it could be a bug that bpy.data.meshes.new_from_object() is unable to find the mesh data of the evaluated CURVES object, because new_from_object usually ends up with the same result as bpy.ops.object.convert(target='MESH') (Object>Convert>Mesh) when using preserve_all_data_layers=True and depsgraph=bpy.context.evaluated_depsgraph_get(). bpy.ops.object.convert(target='MESH') is able to find and convert the mesh data to a new Mesh object, but new_from_object is not.

I did find that the mesh data of CURVES objects can be accessed through the depsgraph's instances (bpy.context.evaluated_depsgraph_get().object_instances), which can similarly be used to access the mesh data of a legacy CURVE object which has a Bevel, but I don't think this should be the necessary way to get the mesh data of evaluated CURVES objects when other Object types work with new_from_object.

The attached Blend has a simplified version of the .blend in the original report and has a script that does the conversion to mesh through the depsgraph's instances, and compares it to bpy.ops.object.convert(target='MESH').

image

The reported issue doesn't seem to be related to instances or `Realize Instances` at all, but rather is a general issue with exporting any `CURVES` objects which have been converted to mesh data, e.g. through `Curve to Mesh`. This seems like it could be a bug that `bpy.data.meshes.new_from_object()` is unable to find the mesh data of the evaluated `CURVES` object, because `new_from_object` usually ends up with the same result as `bpy.ops.object.convert(target='MESH')` (`Object`>`Convert`>`Mesh`) when using `preserve_all_data_layers=True` and `depsgraph=bpy.context.evaluated_depsgraph_get()`. `bpy.ops.object.convert(target='MESH')` is able to find and convert the mesh data to a new Mesh object, but `new_from_object` is not. I did find that the mesh data of `CURVES` objects can be accessed through the depsgraph's instances (`bpy.context.evaluated_depsgraph_get().object_instances`), which can similarly be used to access the mesh data of a legacy `CURVE` object which has a Bevel, but I don't think this should be the necessary way to get the mesh data of evaluated `CURVES` objects when other Object types work with `new_from_object`. The attached Blend has a simplified version of the .blend in the original report and has a script that does the conversion to mesh through the depsgraph's instances, and compares it to `bpy.ops.object.convert(target='MESH')`. ![image](/attachments/ec2efd8c-75a0-4eb2-ac0f-c665044d9ae1)
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 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: blender/blender-addons#105260
No description provided.