Message 1 of 14
Exporting to Babylon JS

Not applicable
09-23-2019
04:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm trying to develop a custom exporter to babylonjs by I have a problem with the control points.
If I have a cube, the control points are 8 ( vertices ) and babylonjs requires that I assign a normal for each control point ( same also for the UVs )
Obviously the normals are not enough. In babylonjs a cube is represented with 24 control points and 24 normals. Each control point have a unique normal.
I found the call 'EmulateNormalsByPolygonVertex' that generates 36 control points/ normals and the geometry looks ok, but it is a waste of resources.
How can I generate 24 control points/normals ?