Skip to main content
Question

Normalize transformation matrix and vertices after offsetter


Forum|alt.badge.img+1

Hi,

I'm trying to convert 3D faces / meshes from DWG to Collada meshes to be used in 3D Studio Max. Moving data closer to origo with offsetter and 3D affiner both seem to work, but not quite. In collada all vertices reside in original coordinate system space (EPSG:3878) and only transformation matrix is being moved. Perfect situation would be that transformation matrices would be normalized to 0...1 space and each vertice would be near origo (few thousand units distance).

 

Transformation matrices look like this in inspector;

 

| 1 0 0 -24000000 |

| 0 1 0 -6800000 |

| 0 0 1 0 |

| 0 0 0 1 |

 

and in collada;

<node>

<matrix>1 0 0 -24000000 0 1 0 -6800000 0 0 1 0 0.0 0.0 0.0 1.0</matrix>

 

I'd guess normalizing transformation matrix to 0...1 range would solve this issue. Which translator is able to do that in FME?

 

"Move to local coordinate system" in writer is not suitable in my use case.

7 replies

Forum|alt.badge.img+1
  • Author
  • March 13, 2019

Just noticed that each vertex has correct data I'd like to export as "transformed coordinate" in inspector;

How to export transformed coordinates only, with transformation matrices normalized?


sigtill
Supporter
Forum|alt.badge.img+24
  • Supporter
  • May 7, 2019

I have the same issue, the software reading my data "demands" a Transofmration matrix of 1,0,0,0 - 0,1,0,0 - 0,0,1,0 - 0,0,0,1. I have tried 3DAffiner, LocalCoordinateSystemsetter, According to the description the: GeometryInstantiator - https://www.safe.com/transformers/geometry-instantiator/  - might work.

 

Replaces a geometry definition with independent geometry instances that are copies of the original geometry definition. The affine transformation that defined the position of each instance in the geometry definition, including position, scale, and rotation, is applied to each instance.

 

However it does not sem to work on IFMEMesh and the Vertex pools. I`m afraid I have to deaggregate everything - move the data and then create the Mesh again - which will take a long time to do on a large terrain model. Any good suggestions to try? @daveatsafe might be able to help? As it is also related to https://knowledge.safe.com/answers/90091/view.html - 

 

0684Q00000ArJyqQAF.png

 

 


daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • May 7, 2019

Hi @sigtill and @kino,

One way is to reproject the mesh:

- CoordinateSystemExtractor to get the current coordinate system in _coordsys attribute

- CsmapReprojector to reproject to local _AZMEA_ coordinate system. Set Vertical Handling to 'Heights are relative to the ellipsoid(s) or geocentric'

- CsmapReprojector to reproject back to coordinate system in attribute _coordsys. Same Vertical Handling.

 

This process works strictly on the Mesh vertices, and is quite fast.


Forum|alt.badge.img+1
  • Author
  • February 5, 2020
daveatsafe wrote:

Hi @sigtill and @kino,

One way is to reproject the mesh:

- CoordinateSystemExtractor to get the current coordinate system in _coordsys attribute

- CsmapReprojector to reproject to local _AZMEA_ coordinate system. Set Vertical Handling to 'Heights are relative to the ellipsoid(s) or geocentric'

- CsmapReprojector to reproject back to coordinate system in attribute _coordsys. Same Vertical Handling.

 

This process works strictly on the Mesh vertices, and is quite fast.

After offsetting the data, it's in local XY-M coordinates. Then trying to use CsmapReprojector a transformation should be chosen. Tried with auto or none, either won't work. Any idea how to proceed with this method?


Forum|alt.badge.img+1
  • Author
  • February 5, 2020
sigtill wrote:

I have the same issue, the software reading my data "demands" a Transofmration matrix of 1,0,0,0 - 0,1,0,0 - 0,0,1,0 - 0,0,0,1. I have tried 3DAffiner, LocalCoordinateSystemsetter, According to the description the: GeometryInstantiator - https://www.safe.com/transformers/geometry-instantiator/  - might work.

 

Replaces a geometry definition with independent geometry instances that are copies of the original geometry definition. The affine transformation that defined the position of each instance in the geometry definition, including position, scale, and rotation, is applied to each instance.

 

However it does not sem to work on IFMEMesh and the Vertex pools. I`m afraid I have to deaggregate everything - move the data and then create the Mesh again - which will take a long time to do on a large terrain model. Any good suggestions to try? @daveatsafe might be able to help? As it is also related to https://knowledge.safe.com/answers/90091/view.html - 

 

0684Q00000ArJyqQAF.png

 

 

@sigtill did you ever get a working solution to this ?


sigtill
Supporter
Forum|alt.badge.img+24
  • Supporter
  • February 5, 2020
kino wrote:

@sigtill did you ever get a working solution to this ?

No-Yes... Not sure :). Do you have a small sample dataset with a few features to test?


Forum|alt.badge.img+1
  • Author
  • February 5, 2020
sigtill wrote:

No-Yes... Not sure :). Do you have a small sample dataset with a few features to test?

Not currently, but if you have any method in normalizing transformation matrix, it would do.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings