@@Archangel35757 I think I've found the code for working out normals. So any idea how to stuff your snippet into this?
Point3 un_n = allNorms[j];
Point3 & n = _tm.PointTransform( un_n );
Point3 _elv_t = n; _elv_t.y = 0;
Point3 _rot_t = n; _rot_t.z = 0;
Point3 _elv_n = _elv_t.Normalize();
Point3 _rot_n = _rot_t.Normalize();
float _elv = DotProd( z_axis, _elv_n );
float _rot = DotProd( x_axis, _rot_n );
_elevation = (unsigned char)( acos(_elv) / (2*PI) * 255 );
if( n.y >= 0 )
_rotation = (unsigned char)( acos(_rot) / (2*PI) * 255 );
else
_rotation = (unsigned char)( (1.0f - (acos(_rot)/(2*PI))) * 255 );
putc( _elevation, file ); // normal elevation angle: 0 up, 63 sideways and 80 down.
putc( _rotation, file ); // normal rotation: 0 straight along X, 40 straight along Y, 7f opposite X, c0 opposite Y