3d studio max scripts

Started by
4 comments, last by kitkit 16 years, 4 months ago
Anyone know of a good tutorial have to do with exporting a model to your own custom format? Or anything basic for that matter. I'm having a hard time finding this.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
Advertisement
I would personally not use max script. When I had to write a Max exporter a couple of years ago, I used the ASE export plugin as a basis. The source code is included in the Max SDK.

Another option is to use the output of the ASE exporter (which is plain, easy to parse, ASCII) and use that as an intermediate format.
That's a good suggestion. I'll see if I can get all the info I need. Because I also need to move around objects and get their rotation/position/scale
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
It doesn't look like ase supports bones (skeletal animation)
It exported the bones as geometry.
Isn't there some solution for exporting and importing skeletal animation for 3D studio max?
I know that the directX format supports bones but again there is the problem of having a toolchain.

toolchain = design in 3ds --> export --> open it in my code and verify if it is good
--> import back into 3ds --> export --> run it in my engine with a vertex/fragment shader.

I'm using OpenGL and GLSL.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
I found the best reference for exporting skeletal animation to be the DirectX exporter plugin. It's part of the DirectX SDK (or at least it used to be, if not try googling '.x exporter') and includes full source. It also exports to text files so it probably wouldn't be too difficult to get the exported files running in your OpenGL system. Once that's sorted you can start to look at the source code for the exporter (it's pretty scary to begin with) and modify it to suit your needs.
But this exporter doesn't exports animation. You try to do it ?
----------------------

kit

This topic is closed to new replies.

Advertisement