Esri / i3s-spec

This repository hosts the specification for Scene Layers which are containers for arbitrarily large amounts of geographic data. The delivery and persistence model for Scene Layers, referred to as Indexed 3d Scene Layer (I3S) and Scene Layer Package (SLPK) respectively, are specified.
Other
315 stars 84 forks source link

uvCoord error while convert slpk to .obj #146

Closed alunAlunnnnn closed 2 years ago

alunAlunnnnn commented 2 years ago

Hi, I am trying to convert a slpk( i3s 1.7 ) file to .obj file. The geometries seems correct, but the texture mapping totally wrong, so are there some different between slpk and obj file in uv coordinate ? and how can i convert it correct?

What I do like this:

  1. Read All leaf nodes in slpk with it's own schema.
  2. Write v, vt, vn and f into obj file
  3. Copy jpg texture in each node, and create mtl file.

I have already do this with 3D Object slpk( with uvRegion ) and Integrated Mesh slpk( without uvRegion ).

Besides, I have tried calculate new uv in 3D Object slpk, like

(uv0[0] (region[2] - region[0]) + region[0]) / 65536, (uv0[1] (region[3] - region[1]) + region[1]) / 65536])

  1. The result of 3D Object slpk like this image

It should be like this image

  1. The result of Integrated Mesh slpk like this image

It showld be like this image