I hope i put this question at the right spot because I am a bit new to Maya and MEL: I am using the sine deformer with good results (Deformation > Nonlinear Sine), but now i need it to do something slightly different. The standard deformer I believe is based upon the simple mathematical equation:
y = sin(x)
This produces the normal 'wave' line. What i need now is a wave with a sharp edge at the 'hill-part' of the sinus. I already figured it out mathemathically: y = -2*sqrt(sin(x)^2)+sin(2*x) This produces a normal sinus, but with the sharp edge at the top wich is exactly what i need. In MEL this would be:
y = (-2*sqrt(pow (sin(X), 2))+ sin(2*X))
What I now need is a script or Deformer that makes use of the second formula instead of the standard "y=sin(x)". From my (unexperienced) view i think I probably need to make a new deformer?
Is there someone who could get me started with this? That would be truly great; I am struggeling for days already with this problem, i just can't seem to find the location where to put the new formula..
read the manual for particle expressions they are there to do what you ask for. But ist a big subject and its well described in the manual.
more specificaly manual (f1) -> Dynamics and Simulation -> Dynamics -> Particles
then read about softbodies.
But yeah you cant realy make new deformers in mel, only the api, but most people would consider using teh dynamics eingene the same thing because it is!
I agree with Joojaa, what you want to do, you can probably produce it using softbodies and a dynamic expression. You can't really create a new deformer, exept using the maya api (if you know how to code in C or C++, go ahead). But MEL scripting, and the nodal architecture of Maya allows you to do almost everything you might want to, if you have some time to put in it.
So take your object, make it soft, create a dynamic expression for its particles, and write your maths formula in it.
I am trying to make it work through the "softbodies-method". However, my manual is not working right and it is still pretty hard to understand where to begin with this.
But at the same time i am also not sure if this would be the best way to deal with this, because i will have to be able to animate all of the (customised) Sine-Deformer Attributes like:
Amplitude
Wavelenght
Offset
Dropoff
To get all of these attributes in a "dynamic script" appears pretty daunting to me. Or am i wrong? Anyhow, if someone could show me the very first step concerning scripting dynamic expressions for a softbody (particles), I could try to build up from there!
QUOTE(Sandra @ 02/24/06, 03:47 PM) [snapback]229185[/snapback] To get all of these attributes in a "dynamic script" appears pretty daunting to me. Or am i wrong?
Yes, its actualy very easy all you need to do is tyoe a expression that probably looks like this.