specklesystems / speckle-unreal

Unreal Engine 4/5 plugin for importing objects from Speckle v2.
https://speckle.systems/tag/unreal/
Apache License 2.0
54 stars 13 forks source link

SketchUp to Unreal does not properly handle block definitions/instances. #96

Open mtalbottasg opened 1 month ago

mtalbottasg commented 1 month ago

I posted this on the speckle forum but haven't heard a response so I'm going to put it here as an issue...

Unfortunately, something seems broken with the SketchUp to Unreal Workflow:

It appears to have two bugs:

  1. Block Instances are not loading the instance transform so every group or block is loaded at 0,0,0.
  2. Materials also seem to be not loaded if they are applied at the instance level.

I have tried in Sketchup 2023 and 2024 and I’ve also trying in Unreal 5.3 and 5.4.

I am using the SketchUp Connector 2.20.0 and the Unreal Connector 2.19.0

JR-Morgan commented 1 month ago

Since you've identified the problem with the Transforms (see forum thread)

Would you feel confident enough to submit a fix on the Unreal side, It may help speed things up a little since both @oguzhankoral and I are quite busy this week. I think a simple check for matrix OR value should be easy to add.

If not no worries, thanks for the help debugging this.

JR-Morgan commented 1 month ago

The Material issue we can treat as separate, I have a suspicion that we're not expecting this to work in Unreal. But just want to confirm with Team what support looks like in the other connectors.

JR-Morgan commented 1 month ago

Just confirmed with the team, we do not expect materials applied on components to work for the Unreal connector.

mtalbottasg commented 1 month ago

Would you feel confident enough to submit a fix on the Unreal side

Unfortunately, I just don't know enough about C++ syntax to confidently write the OR statement.

That said, I'm very comfortable in the SketchUp ruby connector. @oguzhankoral Here's an updated \speckle_connector\src\speckle_objects\other\transform.rb The only change is just renaming "value" to "matrix". I tested it with the Unreal connector and everything is working.

It's probably still a good idea to add the OR to the unreal connector for backwards compatibility by this fix for the sketchup connector should do the trick.

oguzhankoral commented 1 month ago

@mtalbottasg thanks for bringing your own fix. I am happy you made it work for yourself till we fix and test it before creating another hotfix version.