Cinema4D and .obj weirdness
Hi all,
I've been a C4D user for some time now, and have just started looking at its exporting abilities.
Specifically, .obj files for use in a game. Now, using Karl Berg's Model Loader sample code (loads .obj files into a simple OpenGL setup), I find that C4D is munging up the model when exporting it.
The sample code loads and draws an .obj file as advertised, with all the normals correct. However, if I load the .obj file into C4D (7), then immediately export it (without changing it) to .obj format, the next time I run the code, I can see through to the backfaces of the model. So it looks like all the normals have been spazzed in the exporting.
Anyone know of a way to fix/stop this behaviour?
thanks.
I've been a C4D user for some time now, and have just started looking at its exporting abilities.
Specifically, .obj files for use in a game. Now, using Karl Berg's Model Loader sample code (loads .obj files into a simple OpenGL setup), I find that C4D is munging up the model when exporting it.
The sample code loads and draws an .obj file as advertised, with all the normals correct. However, if I load the .obj file into C4D (7), then immediately export it (without changing it) to .obj format, the next time I run the code, I can see through to the backfaces of the model. So it looks like all the normals have been spazzed in the exporting.
Anyone know of a way to fix/stop this behaviour?
thanks.
Quote:Originally posted by mars
Anyone know of a way to fix/stop this behaviour?
For some strange and unknown reason (at least to me
) C4D exports its normals backwards. You can either reverse the normals yourself in C4D (Structure >> Reverse Normals), or change your loading code to multiple each of the normal vectors by -1.0 when loading. There may be a preference to change its default behavior... if you find it let me know!Cheers,
Rocco
Virus Out
Big Bang Board Games
Adventures on Pirate Isle
Solace - Strategy, War, and Glory!
The Belt
C4D mangles many a format - in addition to reversing the normals, you may also need to invert the V (or was it U?) texture coords if you're using UV mapped textures. I ran into that problem myself a while back...
For some reason, C4D uses a left handed coordinate system instead of the usual right handed one. This typically means that either your models gets mirrored in the XY plane or the normals seem reversed due to the opposite winding, though C4D *should* correct the polygon winding order because this is expected.
i discovered that Cinema4D export .obj file with inverted normals
for resolving this im exporte my c4d file , open the .obj file and exporte again.. :sorry:
for resolving this im exporte my c4d file , open the .obj file and exporte again.. :sorry:

