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

ModelExperimental Sandcastle Testing #10379

Closed
ptrgags opened this issue May 13, 2022 · 2 comments · Fixed by #10644
Closed

ModelExperimental Sandcastle Testing #10379

ptrgags opened this issue May 13, 2022 · 2 comments · Fixed by #10644

Comments

@ptrgags
Copy link
Contributor

ptrgags commented May 13, 2022

ModelExperimental Sandcastles

As part of #10346, I did a sweep through the old 3D Tiles and Model Sandcastles to see what happens when I set enableModelExperimental = true or use ModelExperimental.fromGltf instead of Model.fromGltf.

EDITED: 07/08/2022

3D Tiles Sandcastles

Working Sandcastles:

  • 3D Tiles Adjust Height
  • 3D Tiles Batch Table Hierarchy
  • 3D Tiles Compare
  • 3D Tiles Feature Picking
  • 3D Tiles Feature Styling
  • 3D Tiles Formats
  • 3D Tiles Inspector
  • 3D Tiles Interior
  • 3D Tiles Photogrammetry
  • 3D Tiles Point Cloud Classification
  • 3D Tiles Point Cloud Shading
  • 3D Tiles Point Cloud
  • 3D Tiles Terrain Classification
  • Clamp to 3D Tiles
  • Sample Height from 3D Tiles
  • Development/3D Tiles Split

Broken Sandcastles:

Other 3D Tiles Sandcastles

These Sandcastles were found by searching "Cesium3DTileset" and "osmBuildings"
in the Sandcastle searchbar

Working Sandcastles:

  • Classification Types
  • Classification
  • Cesium OSM Buildings
  • Clouds
  • FXAA
  • Fog Post Process
  • Scene Rendering Performance
  • Terrain Clipping Planes
  • development/3D Tiles Performance Testing
  • development/Many Clipping Planes
  • development/Pick From Ray
  • development/Picking
  • development/Shadows
  • CZML 3D Tiles

Broken Sandcastles:

Model Sandcastles

For these ones, I replaced Model.fromGltf with ModelExperimental.fromGltf

Working Sandcastles:

  • Manually Controlled Animation
  • development/Display Conditions
  • development/Multiple Shadows

Broken Sandcastles:

  • HeadingPitchRoll
    • Plane is frozen in place.
    • The camera doesn't zoom to the model correctly
  • Image-Based Lighting
    • Doesn't seem to load the environment map. The sandcastle might need more
      adjustment to the new IBL API
    • The camera doesn't zoom in correctly
  • LocalToFixedFrame
    • The camera zooming is incorrect
  • development/3D Models Articulations
    • 404 on asset from assets.agi.com
  • development/3D Models Instancing
    • ModelInstanceCollection... how will that work with ModelExperimental?
  • development/3D Models Node Explorer
    • nodesByName is undefined
  • development/3D Models
    • Again, the camera zooming doesn't work properly
@ptrgags
Copy link
Contributor Author

ptrgags commented May 16, 2022

Today I looked into why the glTF 1.0 BIM model crashes in ModelExperimental.

There's one shader that declares the normals as attribute vec2 a_n; and does the oct decoding in the technique's vertex shader.

Trying to allow a special case for this in ModelExperimental will add considerable complexity, so I wouldn't recommend we do that. Better to update the asset to use glTF 2.0

Some thoughts about how to update the model:

  • Probably the easiest thing would be to decode the oct-encoded normals an just use the standard NORMAL attribute.
  • The techniques would have to be converted to regular glTF materials.
  • If the shaders in the techniques are still desired, they could be manually converted to a CustomShader. Though you'd need a _FEATURE_ID attribute to determine which shader to apply.

Unfortunately this upgrade process would have to be done on a case-by-case basis since glTF techniques are very open-ended (depends highly on the GLSL shader used)

@j9liu
Copy link
Contributor

j9liu commented May 17, 2022

Came up in #10388: Model keeps its boundingSphere in local space, whereas ModelExperimental returns the bounding sphere in world space (i.e. with modelMatrix applied). The ModelExperimental method is better and more consistent with Cesium3DTileset, we just need to update the Model Sandcastles with this in mind and document it CHANGES.md

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

Successfully merging a pull request may close this issue.

2 participants