Blitz3d pipeline formulae

Tweet
(Posted 2 months ago)

I've been using the b3d pipeline for max to export my b3d files. Max is a left-handed coordinate system, blitz is right. It all works fine, but-

Does anyone have the source or know the formula it used to convert the rotation matrices with? I can't seem to wrap my brain around it.

Just switching the y and z axis rotation isn't quite right.
I was looking to write a maxscript shortcut for complicated purposes.
Any well described source or math would be welcome at this point.

(Posted 2 months ago)

Don't panic. It's just the CORRECT procedure I'm seeking.

So, what? Invert matrix, multiply by 90 degree x matrix, how would you do it in blitz3d?

I noticed there's a matrix library- I think I get the gist of.
So, yeah, just the quick and easy version. I'm sure a few people have done it a few times.

Someone must know the exact method I hope.

(Posted 2 months ago)

Does anyone have the source or know the formula it used to convert the rotation matrices with? I can't seem to wrap my brain around it.

I'm not really sure exactly what you are looking for Muddy, but you can try searching the archives and topics for something related.

Max is a left-handed coordinate system, blitz is right.

DirectX is left handed, so that goes with Blitz3D (DX7). https://docs.microsoft.com/en-us/windows/win32/direct3d9/coordinate-systems

"Direct3D uses a left-handed coordinate system. If you are porting an application that is based on a right-handed coordinate system, you must make two changes to the data passed to Direct3D."

(Posted 2 months ago)

Well then it must be the other way around, because in max z is UP.
Coordinate directions are:
Left <-X 0 X+> Right
Up <+Z 0 Z-> Down
Away <+Y 0 Y-> Towards Can

So someone said:
Mi=Matrix3 1 --(identity matrix)
Mi.row3=[0,0,-1]
Mo=\$maxobj.transform
M2=Mi x Mo x Mi --(Couldn't type asterisk)
M2.rotationpart --contains the
corrected object rotation.
But it didn't work quite right.
Still wrong.

(Posted 2 months ago)

Perhaps you can try exporting it as fbx from max and then import it to blender and then export it as b3d. You can find the b3d importer addon in the toolbox section.

(Posted 1 month ago)

Yeah, I've tried other exporters and they're fine too, it's not that. I really enjoy the pipeline output. It's perfect. Whatever happened to Pudding- too bad (?!).

I'm just hoping to understand a bit better the math it used to create an even more personal and direct route to output my skin's ROTATIONAL data to my b3d programs without invoking the exporter over and over again.
(I don't mind this)

I find it unfathomable that someone hasn't successfully done so from max or blitz. Either end.

I realize most people would rather AVOID it, but surely someone has an old function or library that actually WORKED. If they'd be kind enough to post it. I could get this task done.

I think (I'm sure as Pudding must've) that folks would benefit from such a posting, and I have had the pleasure of contributing to the codearc myself, and would be happy to do so again if I were ever to find the answer to this puzzle myself.

Perhaps just a SMALL collaboration could do it?

Sorry I blathered on...

(Posted 1 month ago)

https://www.syntaxbomb.com/blitz2d-blitzplus-blitz3d/b3d-tool/

See markcwm's reply dated « Reply #5 on: February 28, 2022, 1731 »

Apologies if not what you're after!

(Posted 1 month ago)

That's a large (useful) software package.
But I don't know how much -licenceable- source might relate to converting 3d rotation values from one coordinate system such as max to blitz (DirectX7) coordinate system.
So, no. I don't think so.
Simpler, purer, more raw.
More math. (But not too much)
Not texture coordinates.

(Posted 1 month ago)

This, at first SEEMED to work in 3ds Maxscript to allow for proper export to b3d:

--A child object's UNROTATED data:
tm=\$b2.transform x inverse \$b2.parent.transform
tm.pos
tm.rotation as eulerangles
--A child object's WORLD data:
\$b2.transform.rotationpart as eulerangles
\$b2.transform.pos

--Key bit for output TO B3D/DirectX:
--(btw, each row is called a vector)
mi=(Matrix3 [1,0,0] [0,,0,1] [0,1,0] [0,0,0]) --note X=[X], Y=[Z], Z=[Y]. Put -1 if the coordinates is negated
mo=mi x tm x inverse mi
mo.pos
mo.rotationpart as eulerangles

Still wrong...