nytimes / three-loader-3dtiles

This is a Three.js loader module for handling OGC 3D Tiles, created by Cesium. It currently supports the two main formats, Batched 3D Model (b3dm) - based on glTF Point cloud.
Other
475 stars 64 forks source link

combining 3d tiles and 3d modeling #68

Open Eytanm opened 2 years ago

Eytanm commented 2 years ago

Hi Avner! I have a question relating to the library, but not directly. I hope you can help me. I'm trying to use the library to use LOD to load heavy photogrammetry, but I want to integrate 3D modeling from max or Blender. What is the best way to do that? Do I import the tileset into 3D max and model on top of that to maintain positioning? I see that the NYT team is occasionally combing photogrammetry and digital modeling Any tips would help. Thanks:)

Avnerus commented 2 years ago

Hi Eytan! Sorry for the late reply. I think aligning in a software such as max or blender would work well. Instead of importing 3D Tiles into a modeling software, are you able to export a low-poly mesh of your photogrammetry model? You could use that just for positioning and then replace it with the Tileset on the web.

Eytanm commented 2 years ago

Thanks, Avner, I think I have a problem with the rotation of the models. I use Reality Capture to export to Cesium, then 3Dtiles-loader rotates the Cesium data 90 degrees before plotting.. So I'm confused about how to correctly rotate the reference model, which I also export from RC, to bring into 3D max.... especially if the pivot point of the large tiled model is different from that of the smaller model segment... This is well beyond the library, so perhaps I've gone too far... Thanks for the support!

wboony commented 2 years ago

Hi Eytanm, you could try these steps to create a reference model:

  1. In RC, set both coordinate systems "Project" and "Output" as "Euclidean"
  2. Export Cesium tilesets (hi-poly)
  3. Simplify the entire large photogrammetry model to 10K and export as Cesium tilesets (low-poly). Export setting:
    • Initial simplification: None
    • Maximum node triangle count: 10K. The reason we set the same values (10K) as the low-poly 10K is because we don't want the model to have LODs. There's only 1 level.
  4. Load both hi-poly and low-poly tilesets and check if they're aligned.
  5. Assuming hi-poly and low-poly tilesets align on top of each other, convert the low-poly tilesets(b3dm) into glb using this 3d-tiles-validator/tools b3dmToGlb section.
  6. Import the low-poly glbs that you just converted into blender/3Ds Max
Eytanm commented 2 years ago

Thanks wboony! I'm having trouble running the b3dm to glb tool. Can I export one version as tiles directly to Cesium, and then also export a FBX file from RC of the same model, and relay on them to overlap? confused since the Cesium model is rotated by the JS to flip the y axis TNX!