Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixing wexbim-files with different model-units #349

Open
jomijomi opened this issue May 31, 2021 · 2 comments
Open

Mixing wexbim-files with different model-units #349

jomijomi opened this issue May 31, 2021 · 2 comments
Assignees

Comments

@jomijomi
Copy link

Looking through the shader code I see that you have the uMeter uniform. However, you don’t really use that in the shader. Instead, it appears that you take the model units into account when you create/update the modelview matrix. Now, if you load multiple sub-models (placed nearby each other) this obviously works well if they all have the same model-units. However, when you have two sub-models with different model-units (meters and mm, for instance, but still placed nearby each other), you then get one very big and one very small model in view (see first image). Is this behavior intentionally, i.e. you should always have same model-units on sub-models?

By taking the uMeter uniform into account in the shader it’s easy to fix this (see second image). But then the camera manipulator needs to be updated as well… (and probably other stuff as well). Any comments on this?

No_fix_in_shader

With_fix_in_shader

/Mikael

@tg-pool
Copy link

tg-pool commented Jun 17, 2022

We are still meeting also this issue. Is here something about to be done? Or is there a way to adjust units before overlaying?

@martin1cerny
Copy link
Member

There are two things which can be done. You can either scale the model when creating the wexbim file, or you can make changes in the viewer to transform all the points on the fly given the scale. Both of these require some changes. I'd suggest that changing the export to wexbim would be the easier option. Your contribution to enable this functionality would be very welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants