Batched 3D Model format issues

hi Benjamin

my orientation is also strange.

i think i recall reading about some transformation in axis that occurs.

it should be easy to trace the cause now i have something displaying.

regards

lucio

hi Benjamin

the orientation seems to rotated around the x axis 45 degrees.

which is strange.

not sure what i missed.

Hi Lucio,

rotating it around the x-axis 45 degrees didn’t fix the problem for me. I think it depends on where the model is on the planet, though I didn’t try it out.

I removed the rotation for making the Y axis the Up-Axis (90 deg rotation because of what Manuel already mentioned). Then my model was kind of 45 deg wrong.

I rotated the model -45 deg on x with this matrix in the node:

“matrix”:[1.0,0.0,0.0,0.0,0.0,0.7071067811865476,0.7071067811865476,0.0,0.0,-0.7071067811865476,0.7071067811865476,0.0,0.0,0.0,0.0,1.0]

``

But the models orientation is still a bit off.

Hi Lucio,
Hi Benjamin,

glad you made some progress :slight_smile:

as previously mentioned, the model should be specified
in global ECEF cartesian coordinates. In a fixed frame like ECEF, the
up / north / east vectors depend on your position on earths' surface.

See Source/Core/Transforms.js to see how to transform from a local frame (e.g. ENU) to fixed frame.

Manuel

hi manuel

just to clarify

  1. i have a model in defined in user defined coordinate system.

  2. the model is edited as needed in the modelling software

  3. the model is exported to gltf

  4. each model will have each mesh vertex transformed to ECEF

  5. upload the tileset

is that the expected process?

thanks

-lucio

Hi Lucio,

1. i have a model in defined in user defined coordinate system.
2. the model is edited as needed in the modelling software
3. the model is exported to gltf

4. each model will have each mesh vertex transformed to ECEF

I don't have experience with the collada2gltf converter,
but I think it does not implement a transform to ECEF. You will have to
take care of the transformation to ECEF in your modelling software or
in a custom converter.

Manuel

Converting the vertices to ECEF works, but you should still use the CesiumRTC extension, or every vertex of your model will jitter extremely.