Azure / azure-remote-rendering

SDK and samples for Azure Remote Rendering
MIT License
106 stars 38 forks source link

[Conversion Problem] Joined meshes can not be moved #88

Closed MaStoljar closed 1 year ago

MaStoljar commented 1 year ago

After combining multiple meshes into one mesh with the blender join functionality, the possibility of using the "move part" functionality breaks.

How to reproduce: Attached are three files: allCombined.glb, consoleFront_floor_combined.glb and Parts.blend

After converting the two glb files into arrAsset, the allCombined.glb can not be moved after being loaded into the scene with the move tool, while the consoleFront_floor_combined.glb is working fine.

To recreate the glb files, the attached blender file can be used. It contains three separate meshes (console_mid, console_front, and floor). If you select all, hit Ctrl+J in blender, export it as glb (same as allCombined.glb), and run the conversion with default settings, the move behavior did not work for me. Meshes.zip

WikkidEdd commented 1 year ago

This is expected behaviour. You can only move individual meshes in the hierarchy. As you've described (and as seen in allCombined.glb) you've merged it into a single mesh, so the individual parts can no longer be selected.

In the consoleFront_floor_combined.glb file you've merged console front and floor and left the console mid as it's own object. In this case you'll be able to move console front and the floor as one part and the console mid as another part.

You see the exact same behaviour in Blender, after you've pressed Ctrl+J with all the parts selected you have a single mesh in the hierarchy and the individual parts are no longer selectable or moveable on their own. This is common behaviour across all model viewers, game engines etc.

What are you trying to achieve by merging them into a single mesh?

MaStoljar commented 1 year ago

But even the allCombined.glb should be moveable with the "move all" functionality, which is impossible.

I have a bigger model and want to combine semantic connected parts into one, so I can move them all together and reduce the amount of interactable parts. In the final setup, I would have five parts consisting of multiple meshes combined via blender. For some parts, this is already working, but for some parts, it brakes the interaction.

The files I sent were just the smallest possible example I could extract.

WikkidEdd commented 1 year ago

Ah I see. I thought were you saying you were combining all the parts and still expecting to be able to move individual parts.

Your use case makes sense.

Is your observation that as soon as it turns into a single mesh that the move functionality breaks or do you find that within a bigger model some combined parts can work and some don't?

MaStoljar commented 1 year ago

The move functionality works for some combined meshes and some not. The strange part is that the move function works fine for some huge combined meshes, but for some dedicated meshes, it breaks after combining them. So in my example, I can not combine console_front and console_mid, but each mesh of them with the floor.

stefanhessel commented 1 year ago

Hi, thanks for reaching out! We tried to reproduce the behavior you describe but so far were not able to. Can you please provide some more detail? We'd be especially interested in

Thank you!

MaStoljar commented 1 year ago

I use the default settings. As shown below image image

The steps to reproduce are the following:

https://user-images.githubusercontent.com/100917068/203412343-0ded20ba-faf9-45dd-99dd-9eb4eb3a84af.mp4

WikkidEdd commented 1 year ago

I can confirm we can reproduce this in our app. We just came across a model being used which exhibits similar problems where certain parts of the model don't return a raycast hit (aka no selectable)

We just tried @MaStoljar's allCombined.glb model and we see the exact same behaviour, but the whole model is not collidable.

FlorianBorn71 commented 1 year ago

Thank you @MaStoljar and @WikkidEdd for all the data and additional insights! In the meanwhile we were able to reproduce the problem that was reported initially, i.e. raycasts do not work for certain meshes. We are working on it. @MaStoljar, would it be sufficient if the fix in the service is available next week, or is there some urgency?

MaStoljar commented 1 year ago

Next week would be fine @FlorianBorn71. Thank you for the quick response

FlorianBorn71 commented 1 year ago

Hi @MaStoljar , hi @WikkidEdd! A server-side fix has been deployed, so raycasting should work as expected now. No need to re-export the model(s). Sorry for the inconvenience and thanks for the great repro case!

Florian

WikkidEdd commented 1 year ago

I can confirm this has fixed our issue. Thanks 👍

MaStoljar commented 1 year ago

Hi @FlorianBorn71, I confirm that it fixed the stated issue. Thank you !