Skip to content

Conversation

waliahimanshu
Copy link
Contributor

@waliahimanshu waliahimanshu commented Jan 30, 2024

Why?

The model viewer sample appears to be broken and mostly crashes with this stacktrace.

error with vers 2.0.0

6:41.120 12387-12387 libc                    io.....sceneview.sample.modelviewer  A  Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x34 in tid 12387 (ple.modelviewer), pid 12387 (ple.modelviewer)
2024-01-29 12:46:41.385 12460-12460 DEBUG                   pid-12460                            A  Cmdline: io.github.sceneview.sample.modelviewer
2024-01-29 12:46:41.385 12460-12460 DEBUG                   pid-12460                            A  pid: 12387, tid: 12387, name: ple.modelviewer  >>> io.github.sceneview.sample.modelviewer <<<
2024-01-29 12:46:41.385 12460-12460 DEBUG                   pid-12460                            A        #00 pc 00000000001005f8  /data/app/~~37GEldN1njsu6VQ93PZrSw==/io.github.sceneview.sample.modelviewer-sbf7i26kKGjPQROYNCyKdg==/base.apk![libfilament-jni.so](http://libfilament-jni.so/) (offset 0x129b000) (BuildId: 150857324dff6bb527284e2c4c59163363c52f89)

What

I am trying to migrate the sample from 2.0.0 to 2.0.2. I managed to use the newer api, however I am not getting desired results.

Issues

  1. It seems I am missing something about model or camera positions. Please see the comment below to how the model is appearing. Update model viewer sample to use version 2.0.2 #405 (comment)
  2. The indirect light environment is not showing in the 3d scene background
    able to make it work with :
 sceneView.environmentLoader.loadHDREnvironment(hdrFile).apply {
                sceneView.indirectLight = this?.indirectLight
                sceneView.skybox = this?.skybox
            }

transform(
position = Position(z = -4.0f),
rotation = Rotation(x = 15.0f)
)
Copy link
Contributor Author

@waliahimanshu waliahimanshu Jan 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the expected result. When I use damaged_helmet here, it renders correctly, however the MaterialSuite does not?

MaterialSuite damaged_helmet
1 helmet
MaterialSuite with env damaged_helmet with env
https://github.com/SceneView/sceneview-android/assets/7093480/b4989f98-679e-460c-a0f6-b53ec1d35b93 https://github.com/SceneView/sceneview-android/assets/7093480/94a0a0cd-8436-46b3-af33-6d6f18badd0c

@waliahimanshu waliahimanshu marked this pull request as ready for review January 31, 2024 14:34
modelInstance = modelInstance,
scaleToUnits = 2.0f,
)
modelNode.scale = Scale(0.05f)
Copy link
Contributor Author

@waliahimanshu waliahimanshu Feb 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

model is too big - without scaling its not visible scalling down!

Copy link
Contributor

@ThomasGorisse ThomasGorisse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job @waliahimanshu.
Sorry, I forgot.I had to remove the default environment indirect light and skybox because it was loading an environment by default even when you want to be in an unlited mode.

Feel free to move the camera backward z = 2.0f so the model appears smaller.

@ThomasGorisse
Copy link
Contributor

Sorry, I just saw that the camera node is already at z = 4.0f so maybe move to scaleToUnit = 1.0f

@waliahimanshu
Copy link
Contributor Author

waliahimanshu commented Feb 2, 2024

@ThomasGorisse thanks for your reply, sorry I was not very clear.

In the previous version, we could view the whole model (wooden, silver and metallic textures ) similar to this and autoplay its animation!
image

After the update I could only last metallic part of it, please see the video for how its appearing?
Is it worth continue using this model?
I am not sure whats causing this model too appear only partly.

materila_suit.mp4

@ThomasGorisse ThomasGorisse merged commit 575d95c into SceneView:main Mar 26, 2024
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

Successfully merging this pull request may close these issues.

2 participants