Notifications
Clear all

[Closed] Does MaxScript have standard Math programming tools???

DON’T READ THIS POST UNLESS YOUR FAIRLY TECHY OR GOOD AT MATH.

Hi guys.
Does MaxScript have standard math tools like C?
For example, can it do double precision 16bit math, is it capable of solving differential equations numerically (assuming you know how to program the algorithms), etc.

I’m interviewing with a game company to create production & pipeline tools for them using MaxScript…which I’ve never used (have a background in physics simulation programming & LightWave).

Any help is VERY much appreciated!
Thanks. -Mike Pauza

3 Replies

For example (in pseudocode) can you do something like this:

variableA = 3.1415926178487 DOUBLE;

What about something like this (pseudocode for a simple particle system):

CreateParticle;
X = 0;
Y = 0;
Z = 0;
VX = 100;
VY = 100;
VZ = 100;
K = 0.1;
TimeStep = 0.03;
g = 9.8;

Time = 0 to 100 Step = TimeStep
{
X = X + VXTimeStep;
Y = Y + VY
TimeStep;
Z = Z + VZ*TimeStep;

  VX = VX - K*VX*TimeStep;
  VY = VY - K*VY*TimeStep - g*TimeStep;
  VZ = VZ - K*VZ*TimeStep;

  UpdateParticlePosition;

};

Is stuff like this simple for MaxScript to handle? Thanks. -Mike

1 Reply
(@bobo)
Joined: 11 months ago

Posts: 0

3ds Max itself is Single-Precision. MAXScript is single-precision, too.
If you want double-precision, you could probably write a plugin in the SDK to perform your math. operations.

As for the second example, while there is not much sense in doing this (Particle Flow will do the particle processing for you while remaining very scriptable), it would be possible.

Oh, and Max is orthodoxally Z-up, so your gravity would go to the Z axis

Single precision is a bummer, but not a huge deal.
I’m glad Max can numerical stuff though.

Yeah, the particle example is too simple to be of any real use…but I would want to write my own dynamic stuff (that’s more complicated than this) from time to time.

And yes, I know Z is supposed to be up…need more coffee.

Thank you again Bobo. I really appreciate it.
-Mike