Notifications
Clear all

[Closed] [matrix-n00b] Y-up -> Z-up & pointcache

 rdg

I know it it’s written somewhere in the forum, as the conversion of z-up and y-up matrix stuff is often used in game engine export.
but I cannot find the right keywords to track it down …

I am reading numbered wavefront obj files as textfiles, extract the vertex data and combine them as pc2 – pointchache file. Nothing tricky as the pointcache plugin shipps with a pointcachewriter.ms

I import the first obj into max apply and the pointcache: the object rotates as it is written form a application that uses y-up.

(I found the thread about the y-up conspiracy.)

If I switch the z and y coordinates of a point prior writing, the objects stays in orientation, but its normals are flipped. What a surpise!

Should I:

a: write x,y,z and rotate the model 90° in max
b: write x,z,y and add a ‘flip normals’ before the pointcache
c: write x,zy, and contstruct a custom object imported that imports the object with flipped normals and correct orientation?

or is there d: a way to multiply the points with inversed-what-ever and everything is fine?

(I tried to multiply each point with the transform of a box() – but that was no good)

As psychoSilence always says:
P01n7c4ch3 r00l3Z 7H3 W0rld!

The background is obvious:
Using this script we can ‘import’ characters/animations from applications without fbx support. I didn’t find something like this at scriptspot – if it already exists … it was a nice practice.

There are other stumbling blocks:
Like how to detect a numbered/padded file-squequence?
The regex is calling, goodbye backward compatibility?

Thank you.

Georg