Question

How To Set Normals On Polygon of shp?


Badge

I have a test2 shp file representing a 3D door, and then try to convert test2 to the fbx format file, but the fbx file appears translucent area. After query, it is found that the normal line needs to be set perpendicular to the surface. How do I set it?

This file contains test2.shp and fwm project files


7 replies

Userlevel 2
Badge +17

Hi @keplerleee, the Orientor has a capability to force orientation of area features to left or right hand rule, but it would not work as expected on vertical area features such as the door.

A workaround I can think of is: make the door horizontal with a 3DRotator (e.g. Angle in Degrees: 90, Rotate Along: Y Axis), modify the orientation appropriately with an Orientor, then restore the door vertical with another 3DRotator (Angle in Degrees: -90, Rotate Along: Y Axis). However, as a side-effect, it could cause unexpected orientation on some parts. If you could select only the parts that should be modified orientation by some sort of criteria, the result would be better.

Badge

Hi @ takashi , the door in the test2.shp is made up of many single polygon, in fact the door is just the Multipolygon . Please ask how to set Normals on the polygon?

Badge

Hi @keplerleee, the Orientor has a capability to force orientation of area features to left or right hand rule, but it would not work as expected on vertical area features such as the door.

A workaround I can think of is: make the door horizontal with a 3DRotator (e.g. Angle in Degrees: 90, Rotate Along: Y Axis), modify the orientation appropriately with an Orientor, then restore the door vertical with another 3DRotator (Angle in Degrees: -90, Rotate Along: Y Axis). However, as a side-effect, it could cause unexpected orientation on some parts. If you could select only the parts that should be modified orientation by some sort of criteria, the result would be better.

If you have time ,please open the fwm file in the zip,and you will see the door.

 

 

Userlevel 2
Badge +17

Hi @ takashi , the door in the test2.shp is made up of many single polygon, in fact the door is just the Multipolygon . Please ask how to set Normals on the polygon?

I think the Orientor can also be applied to a multipolygon.

 

The direction of normal will be determined by orientation of the polygon (face). FME documentation says "The orientation of a face is determined by using the following rule: If the fingers of your right hand curl along the order of the vertices, the direction that the thumb points to is the front of the face. This thumb direction also describes the surface normal of the face, a vector that points outwards perpendicular from the area. This thumb direction also describes the surface normal of the face, a vector that points outwards perpendicular from the area." -- Faces (IFMEFace)That is, if the orientation of a horizontal polygon is conforming to left-hand rule ("the fingers of your right hand curl along the order of the vertices") seeing from the top, the upper face of the face is the front side and its normal vector orients upward.

 

Badge
I think the Orientor can also be applied to a multipolygon.

 

The direction of normal will be determined by orientation of the polygon (face). FME documentation says "The orientation of a face is determined by using the following rule: If the fingers of your right hand curl along the order of the vertices, the direction that the thumb points to is the front of the face. This thumb direction also describes the surface normal of the face, a vector that points outwards perpendicular from the area. This thumb direction also describes the surface normal of the face, a vector that points outwards perpendicular from the area." -- Faces (IFMEFace)That is, if the orientation of a horizontal polygon is conforming to left-hand rule ("the fingers of your right hand curl along the order of the vertices") seeing from the top, the upper face of the face is the front side and its normal vector orients upward.

 

I am now confused why the fbx file is transparent from the inside out. It is opaque from the outside and I don't know where to go wrong.

 

 

Userlevel 2
Badge +17

Hi @ takashi , the door in the test2.shp is made up of many single polygon, in fact the door is just the Multipolygon . Please ask how to set Normals on the polygon?

This workspace demonstrates how normals would be determined based on orientations of the polygons.

 

esrishape2fbx.fmwt

 

However, it just forces all the normals orient to the same direction. To get ideal result, you will have to classify parts of the door and modify their orientations for each appropriately. It could be difficult if there was no way to classify the parts..

 

 

Badge
This workspace demonstrates how normals would be determined based on orientations of the polygons.

 

esrishape2fbx.fmwt

 

However, it just forces all the normals orient to the same direction. To get ideal result, you will have to classify parts of the door and modify their orientations for each appropriately. It could be difficult if there was no way to classify the parts..

 

 

Hi @takashi

 

 

many thanks.

 

 

I meet the same error like CityGML Generation.

 

 

I have a shp file with a thousands of polygon . The process of converting shp to fbx has revealed that the normals of some polygon are missing.

 

 

The tool of " Normals on face" is maybe usefull,but the FME may not have it?

 

 

What can I do with it?

 

 

 

 

Reply