Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / Autodesk Maya through 8.x / Maya and Mathematics?
  RSS 2.0 ATOM  
2 pages: 1.2 last

Maya and Mathematics?
Rate this thread
 
9682
 
Permlink of this thread  
avatar
  • BjoernK
  • Posted: 11 March 2008 03:21 PM
  • Total Posts: 9
  • Joined: 08 March 2008 03:01 PM

This is my first post, so hello to everybody. I am a student of mathematics, in particular of differential geometry. Now I am writing my master thesis and my professor suggested to use Maya to make some nice animations. The usual way would probably be to use Mathematica or a similar program but he stretched that the emphasis should be on the animation looking nice. I have all the freedom I could wish for.
I have been animating some surfaces and other objects using OpenGL (and C++) but I am a complete beginner of Maya. I did a little tutorial (probably spend around 20 hours) so I have some basic knowledge of the interface and on how Maya works.  The main question I have is the following:
Is there a way to create surfaces (in the mathematical sense) like for instance the helecoid (http://en.wikipedia.org/wiki/Helicoid)
Preferably it should go something like this:  A plane should be created with say 50*50 knots. Then for each kont there should be a (3D)value assigned via
f(1,a,b)=x
f(2,a,b)=y
f(3,a,b)=z
(In the case of the helecoid it would be:
f(1,a,b)=sinh(a)sin(b)
f(2,a,b)=-sinh(a)cos(b)
f(3,a,b)=b )
Then the knots should be connected by lines/splines. The aim might be to transform the surface into another surface. (And to make it a lot nicer looking than the picture in the Wikipedia-link)
Thanks in advance



Replies: 0
avatar
  • Fianna
  • Posted: 11 March 2008 04:27 PM

Hey BjoernK, my brain kind of blocked when i started reading those mathematical notations (highschool mathclass flashback) but ...here is an image of the helicoid - is that what you want to make in Maya? I can help you out with that…

-f



no way!

Attachment Attachment
Replies: 0
avatar
  • BjoernK
  • Posted: 12 March 2008 04:44 PM

Thanks for looking into it Fianna. That is exactly want to make. So I would be very greatful, if you could post a quick how-to-do guide.
A future project (building up on this one) would be making a transformation (math: homothopy) from the helcoid to another object for instance the catenoid. (A moving gif showing this can be found here:  kate1.gif ) Do you think this can be also done via Maya?
Regards,
BjoernK



Replies: 0
avatar
  • tkaap
  • Posted: 12 March 2008 06:41 PM

This can definitely be done in Maya, it just depends how much work you want to put into it.  I used to use Maya for rendering my research papers, too, and you can easily lose yourself trying to make the math perfect when it’s definitely good enough.  If you’re coming from a math background, be sure to remember that computer graphics work on the “eye norm”—if it looks right, it is right.  You only have to get things accurate to the resolution you’re rendering on; anything more is wasting time.

You can easily make these shapes through normal modeling tools and deformers.  From fianna’s image it looks like that’s a vertical plane with a twist deformer attached (see Animation-> Create Deformers -> Nonlinear -> Twist).  The catenoid can be made by starting with a polygon torus and deleting the outermost faces.  The shapes are simple.  Moving between them gets harder.

If you’re planning on having a -lot- of shapes, and want to blend between any homeomorphic pairs of them, then using something like blendshapes might be your best bet.  This can linearly blend between shapes as long as the vertex indices match.  Your set of tutorials should have a blend shape example.  The trick is to get the indices on your shape to align, since twisting a plane and deleting faces from a torus are unlikely to do so.

I would lean towards writing a MEL script to implement the surface function.  I would then use another script to iterate over an initial polygon plane shape and move the vertices to the location of the output from the surface function.  This way you have a nice procedural way to generate your shapes where you know the vertex indices will line up.  It’s also flexible, since you can drop in a new surface function and then that new shape is immediately producible. 

Once you have that kind of shape, with corresponding vertex indices, creating blendshapes to move between them or blend them should be straightforward.  While that won’t guarantee the best animation between the shapes, it will get you started.

-Tony



Replies: 0
avatar
  • Fianna
  • Posted: 13 March 2008 10:45 AM

yep, twist and squash deformer with some attribute edits (just gotta tweak them around a bit BjoernK).
Thanks Tony, that was way more elegantly explained than I could have put together :-)

-f



no way!

Replies: 0
avatar
  • BjoernK
  • Posted: 13 March 2008 04:11 PM

Thanks for the reply tkaap. I was already thinking about how much mathematical exactness I was willing to sacrifice in order to make the graphics look nice or easy to make. So I will play around with the deformers, blenders and the MEL and message back, once I have something nice working.



Replies: 0
avatar
  • tkaap
  • Posted: 13 March 2008 08:40 PM

Sometimes you get an idea in your head and can’t stop thinking about it until it’s finished.  I started building a simple example to show you what I meant in my long-winded explanation, and what I ended up with started to look pretty good.  I posted more here (http://kaap.us/artwork.php), along with my transitional animation between the helicoid and the catenoid.

-Tony



Attachment Attachment
Replies: 0
avatar
  • paulalso
  • Posted: 13 March 2008 09:40 PM

yeah, that is really cool........I just started multi-variable calculus and reading curvilinear coordinates and tensors now......so, what a small world?  I never really thought of the maya nurbs plane as a stand in for a two-dimensional coordinate system to experiment with.  So a simple uv plane with a twist gives you a helical transformation on the half plane.....which, would in theory, be a Jacobian matrix to figure the differential???  Or do I have to go back and re-read a few chapters? ;-)

And might I mention maya’s python, which is a higher programming language and allows complex numbers.  It also has a mathematic package you can get from NumPy dot org. if you get into analysis, and scipy for a lot of everything else.....

melscript:
I added some simple affine transformations to the twist handle’s space.  Not as neat as Tony’s, but it is amazing the surfaces don’t degenerate and that you still have a continiously differentiable surface.

nurbsPlane -p 0 0 0 -ax 0 0 1 -w 10 -lr 1 -d 3 -u 25 -v 50 -ch 1;
nonLinear -type twist -lowBound --highBound 1 -startAngle 0 -endAngle 360;
playbackOptions -min 1 -max 48 ;
setKeyframe -at rz -t 1 -v 0 twist1Handle;
setKeyframe -at rz -t 24 -v 180 twist1Handle;
setKeyframe -at sy -t 25 -v 5 twist1Handle;
setKeyframe -at sy -t 35 -v 1.25 twist1Handle;
setKeyframe -at sy -t 47 -v 25 twist1Handle;


Replies: 0
avatar
  • BjoernK
  • Posted: 14 March 2008 05:31 AM

Wow, this looks pretty nice. I was a little hesitant to post the version I wrote in C++ (OpenGL - using the base-code from NeHe.gamedev.net) but I decided to do so anyways, the file I attatched is a packed .exe, so please open at your own risk, (on WinXP everything runs fine here ). The camera will circle around the x-axis, so be a little patient.



Attachment Attachment
Replies: 0
avatar
  • paulalso
  • Posted: 14 March 2008 12:21 PM

very cool.......



Replies: 0
avatar
  • tkaap
  • Posted: 14 March 2008 03:02 PM

I’ll second that—very cool.

Never be hesitant to post your work.  People all do different tasks:  modeling, rigging, scene planning, animating, lighting, rendering, etc.  Just because the rendering folks’ stuff always looks the best doesn’t mean that anyone else’s work is inferior.

You’re working on modeling and animating—you’ll get to rendering later.  I think that’s where Maya’s strength will help you most for this project.  The only real difference between your animation and mine is the shader (I built my surfaces with notes from the Mathematica web site, not from Maya deformers).  If you can do the math to build any surfaces and transitions you want, getting Maya to render them is a piece of cake.

-Tony



Replies: 0
2 pages: 1.2 last