Majik Tutorial: Audio Speaker

 From:  Michael Gibson
4561.17 In reply to 4561.15 
Hi Mike,

> I just imported a .obj file made from MoI and I got this:

That's the kind of thing that happens when a renderer tries to triangulate a complex n-gon but doesn't quite do a good enough job of it and has triangles kind of leaking to the outside of the n-gon instead of only generating triangles inside of the n-gon.

You might want to send that file to the Kerkythea as a bug report for an example of an n-gon triangulation failure.

In the meantime, to avoid that problem use the "Output: Quads & Triangles" option when exporting out from MoI rather than "Output: N-gons". That will use MoI's mechanism for triangulating the n-gon instead of relying on Kerkythea to do it.

Generating a good triangulation from complex n-gons is a fairly tricky business - some programs are not very refined in that particular area so if you encounter that you shouldn't export n-gons to them.


> Where is this report file located, or was it something it wanted
> to save but did not get a chance?

It depends whether you're running in XP or if you're running on Vista or Win7 with UAC enabled. Under XP they'll be written to the same location as moi.exe .

With UAC enabled in Vista or Win7, programs are prevented from writing to the "Program Files" folder, and in that case it will go to your %Temp% folder - go to Start > Run and put in %Temp% to go to that folder.


> What I mean by "smoothing" (SU term) is an attribute between
> two polys where they tell the renderer to either Phong blend them
> or to allow them to look "faceted".

When exporting to OBJ format MoI does export vertex normals that should be used by the renderer to handle phong shading.

SketchUp however is an exception and doesn't make use of that particular vertex normal data like other renderers - instead SketchUp always calculates its own vertex normals from the polygon data and instead relies on flags on each edge for whether it's supposed to be a smooth looking boundary or not. When you export from MoI to SKP format MoI's exporter will set those edge flags so edges on polygons from a smooth surface are both hidden and have their smooth flag set.

For going to Kerkythea I believe that it will make use of the vertex normals in the OBJ file to do the shading, so the data that MoI exports there will directly control the phong shading in that case. That tends to give the best results because the vertex normals come from the original NURBS surface, so using them to do the shading makes the polygons shade in the exact same way as the original surface.

In SketchUp the shading tends to be a little bit off since it doesn't use the original vertex normals and instead cooks up its own from the polygon data.

- Michael