normals / drawing order

Hello,

I’m creating a small DAE loader that takes everything from the geometry element (positions, normals, mapchannel, tristrip p elems, textcoords) and draw them using triangle_strips in OpenGL ES.

As the following screenshots clearly show, I can load and draw the geometry but there’s something wrong:

I tried the following to solve it:

  • flip normals in 3D Studio Max before exporting (seems to have no effect)
  • enable culling with backface or frontface
  • change the drawing order to CW
  • condition the DAE with the Axis converter (Y_UP) in the Refinery.

I was suprised the first solution wasn’t the real issue because there’s clearly consistency in the problem. I have experience with 3DSM since version 2.x and it sure seemed to be the same old issue with normals.

The only thing I can think of is drawing the tristrips is reverse order - is that neccesary? Changing the drawing order to CW (clockwise) causes individual strips to be drawn in CW, do I need to enumerate through the collection of tripstrips in reverse order too? Or is this something I can solve by using the Refinery after all?

TIA.

Hi Tia,

This looks like a Up-axis problem.
If you can specify which tool you use to create this model and which exporter you use to create this collada document, we can confirm if this is cause by the Up-axis problem.

3ds Max uses the left-handed Z-up axis system.
maya and opengl es use right-handed Y-up axis system.
Collada uses the right-handed Y-up axis system by default, just like maya and opengl es.

We should verify if that’s the real problem.
You can try rotating your camera in your modeler to Y-up and see if it is a mirror image to what you see in OpenGL es screen.

If that’s the problem, the axis converter in Refinery should help.

Thanks,
Herbert

I already tried the Y_up axis converter in the refinery, no success. I use 3D Studio Max to create and export my models. Are you saying this requires an additional conversion for the Z-up axis?

I also tried different drawing orders, enumerating backwards, etc. in combination with the solutions mentioned in my post above. With 5 or 6 different options to combine, and the different flows in the refinery I’m ending up with too many possible combinations to just try things out.

I.o.w. I’m lost. I’ve been trying to create this loader as part of a game I’m working on. This is obviously turning out to be a bad approach, as the opengl ‘scene’ has all sorts of blending, lighting and perspective stuff going on.

So I’m going to start over with a clean app that contains just the loading and a very simple opengl setup.

Thanks,
Johan

TIA = Thanks in advance :wink: