SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.


SM Forums / Maya Questions / Dynamics & Special Effects / EXPRESSIONS FOR ALL! (knowledge tidbits)

Dynamics & Special Effects Maya Particles, nDynamics, Fluids, Rigid Bodies & General VFX

Join the conversation. Reply to post
Page 3 of 5 1 2 3 4 5
 
Thread Tools
23-01-2004, 06:05 PM   #31
mind_raper
Registered User
 
Join Date: Nov 2002
Location: Pakistan
Posts: 57
Creating runway lighiting effects
Well its time for a cool Particle function guys...!


A linstep function is used in conjunction with a ramp to control the rgbPP attribute of the particles color. The particles appear to "turn on" sequentially from front to back. An offset is added to the particle's age to create this effect.






creation expression:

$pos=particleShape1.position;

particleShape1.lightOffset= ($pos.z+20);


--------------------


Runtime expression:


$myAge=particleShape1.age-(particleShape1.lightOffset*.25);

particleShape1.rgbVPP=linstep (2,3,$myAge);


enjoying...!
__________________
Learn the Rules|Then|
Burn the Rules Book
  Reply with quote
27-01-2004, 07:12 AM   #32
tathu
Registered User
 
Join Date: Jan 2004
Posts: 6
Quote:
Originally posted by ragecgi
Hasn't really stopped, just slowed down a bit because folks are a little busy.
It is a "sticky" thread so that way it is always at the top for reference

Feel free to post any questions, and we will see if we can help
I don't know how to create footprints on the ground.

If you have an expression for it ...

I love the thread.

tathu
  Reply with quote
27-01-2004, 05:12 PM   #33
ragecgi
Registered User
 
ragecgi's Avatar
 
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
I personaly would use blendshapes for that, but in combination with that, you might also wanna try doing it with SetDriven Keys as well maybe.

I think Mike Mckinley or even Danny Ngan know of a way to do this, so they might be better people to ask

Thanks! Good luck!
__________________
Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
  Reply with quote
28-01-2004, 06:23 AM   #34
tathu
Registered User
 
Join Date: Jan 2004
Posts: 6
Thanks for your response so fast, and sorry if I do harass the thread.

Last edited by tathu; 28-01-2004 at 06:28 AM.
  Reply with quote
28-01-2004, 03:38 PM   #35
ragecgi
Registered User
 
ragecgi's Avatar
 
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
No prob!
__________________
Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
  Reply with quote
29-01-2004, 08:20 AM   #36
mind_raper
Registered User
 
Join Date: Nov 2002
Location: Pakistan
Posts: 57
well if u still want to use expression then u can ......program ur geometry e.g

like:

if (your foot touches ground )
the ground should effect;

else if (if its leaving the surface)
the ground should effect;



i think u'll not be able to ...produce realistic effects with only expressions
like Rage said blendshape could help....and i think that there will be an attribute that can be keyable and can be controlled through expressions...so...give a try...u know...expression makes your scene clean from raw data that take up extra..resourse cause they excute when conditions are met......

well will be putting....expression for same type of effect soon...which produces swells in softbodies....it will be helpfull to produce perfect result...for ur scene


enjoy ....
__________________
Learn the Rules|Then|
Burn the Rules Book
  Reply with quote
02-02-2004, 07:43 PM   #37
mind_raper
Registered User
 
Join Date: Nov 2002
Location: Pakistan
Posts: 57
A noise function is used to control the Y position of a string of particles. Arithmetic operators are used to control the amplitude, frequency and offset of the function.




1. Create an emitter with as desired parameters......

2. Create Custom Attributes as follows

a. tornodoRadius
b. tornodoTwist
c. tornodoRadiusMult


now let code:

creation Expression

particleShape1.tornadoRadius=rand (.75,1.25);

particleShape1.toranadoTwist=rand (1,3);

particleShape1.position=<<1000,0,0>>;

****

Runtime Expression

vector $pos=particleShape1.position;

float $radius=particleShape1.tornadoRadius*particleShape 1.tornadoRadiusMult;
float $speed=time*particleShape1.toranadoTwist;
float $noise=noise((time*.3)+(particleShape1.particleId* .01));


particleShape1.position=<<($radius*(sin($speed+par ticleShape1.particleId)))+$noise
,$pos.y+.1,


($radius*(cos($speed+particleShape1.particleId)))+ $noise>>;

****

and third create a ramp on tornodoRadiusMult custom attribute this ramp will be used to control its hollowness from top or bottom.....

adding source file.........check it out...!

enjoying.......!


Attached Files
File Type: rar tornodo.rar (5.3 KB, 152 views)
__________________
Learn the Rules|Then|
Burn the Rules Book
  Reply with quote
10-02-2004, 03:06 PM   #38
dirack
Registered User
 
dirack's Avatar
 
Join Date: Oct 2003
Location: Cage #42 of the Asylum
Posts: 396
hey guys, I've decided to join in the fun as well .

Let's see, for a spotlight, you attach the color to a water map, edit it as you like and then for the expression (for your new water1 texture):

water1.waveTime = time*0.2 and
water1.waveVelocity = (cos(time)+1)/2

If you put a nice fog to it, and color the water map right, you could have a cool spotlight for underwater (works very well with www.thegnomonworkshop.com 's fog light,) or the illusion of the sunlight going trough the leaves of trees when you move under them.

water1.waveTime = time*0.2 makes sure the wave texture 'moves' to the left ( because it's endless ), and
water1.waveVelocity = (cos(time)+1)/2 makes sure the number stays between the 0 and 1, so that when spotlighted, it increases and decreases, just as if waves take away some sunlight . I hope I helped! :bgreen:
  Reply with quote
10-02-2004, 03:27 PM   #39
mind_raper
Registered User
 
Join Date: Nov 2002
Location: Pakistan
Posts: 57
hey thats....good
this means we all are learning.....more n more..
__________________
Learn the Rules|Then|
Burn the Rules Book
  Reply with quote
10-02-2004, 03:41 PM   #40
dirack
Registered User
 
dirack's Avatar
 
Join Date: Oct 2003
Location: Cage #42 of the Asylum
Posts: 396
Speak for yourself... the more expressions I seem to learn, the more I forget about the rest of the world :p :bgreen: It's just like , you learn to drink more and you forget more about the rest while doing that
  Reply with quote
10-02-2004, 06:59 PM   #41
mind_raper
Registered User
 
Join Date: Nov 2002
Location: Pakistan
Posts: 57
thats kool
__________________
Learn the Rules|Then|
Burn the Rules Book
  Reply with quote
14-02-2004, 03:23 AM   #42
tathu
Registered User
 
Join Date: Jan 2004
Posts: 6
Hi mind-raper!

I have just test your tornado expressions and your tornado scene.
Both of them are cool!

Thanks for your two lessons in one post.
  Reply with quote
03-03-2004, 07:11 PM   #43
mind_raper
Registered User
 
Join Date: Nov 2002
Location: Pakistan
Posts: 57
found a usefull bit of information on Highend while i was looking for my flower prb hope it help....

Q: I have a fast moving object going past some paintFX trees, and I want the effect of wind created by it's passage to cause realistic swaying and wind blowing the branches around.
A: If you want to simply push the trees out of the way of the fast moving object, then create a small curve, attach it to your strokes(set control curves), and make the curveAttract negative with a suitable curveMaxDist on your brushes. Group the control curve with your moving object. For a turbulent wake I would generally animate the turbulence intensity on your brushes, staggering this animation based on brush location.

Rather than using control curves, the function \scripts\paintEffects\paintCollideFunc.mel could also be modified to work.

To make paint effects collide with the camera do the following: Copy this function to your local scripts directory before modifying it. You may wish to rename both the filename and the function inside. Instead of using the distance to the origin that it currently computes modify it to use the following distance:

float $c[3] = `getAttr persp.translate`;
float $dist = $sX * $c[0] + $sY * $c[1] + $sZ * $c[2];
if( $dist > 0 )
{
$dist = sqrt( $dist );
}


This is the distance from the camera to the current segment point( providing that you have not transformed the camera as a grouped node).

You need to add this modified paintCollideFunc to the runtimeFunc on all the brushes you wish to collide with(simply put the function in your scripts directory and enter the function name in the runtimeFunc field on the brush). Note that the wireframe redraw of paint effects is substantially slower when using this function.
__________________
Learn the Rules|Then|
Burn the Rules Book
  Reply with quote
17-03-2004, 05:46 AM   #44
deepakrock627
Registered User
 
Join Date: Jan 2003
Location: saudi arabia(Indian)
Posts: 4
particleShape1.rgbPP = rand(<<.3,5,7>>,<<.5,7,1>> );
tahnks mind_raper!
  Reply with quote
17-03-2004, 07:14 PM   #45
mind_raper
Registered User
 
Join Date: Nov 2002
Location: Pakistan
Posts: 57
no problemo U r Welcome !
__________________
Learn the Rules|Then|
Burn the Rules Book
  Reply with quote
Reply
Page 3 of 5 1 2 3 4 5

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
exporting / importing expressions djb123 Maya Technical Issues 2 10-04-2012 11:52 PM
How are expressions processed? Vesuvian Maya Basics & Newbie Lounge 1 15-02-2010 02:16 PM
facial expressions grunze Maya Basics & Newbie Lounge 1 28-10-2003 07:39 PM
facial phenmones and expressions strytus Animation 4 19-10-2003 05:22 PM
Help with expressions for polyplanes Darkware Programming 10 16-01-2003 12:24 AM