Cinema4D and .obj weirdness

Member
Posts: 31
Joined: 2004.09
Post: #1
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.
Quote this message in a reply
Member
Posts: 204
Joined: 2002.09
Post: #2
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 Smile ) 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
Quote this message in a reply
Member
Posts: 440
Joined: 2002.09
Post: #3
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...
Quote this message in a reply
DoG
Moderator
Posts: 869
Joined: 2003.01
Post: #4
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.
Quote this message in a reply
jay_traveller
Unregistered
 
Post: #5
using version 8.1 here and it exports fine now =)7
Quote this message in a reply
Member
Posts: 110
Joined: 2002.07
Post: #6
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:
Quote this message in a reply
Post Reply