Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Dynamics & Special Effects (https://simplymaya.com/forum/forumdisplay.php?f=33)
-   -   Matrix Bullet Effect (https://simplymaya.com/forum/showthread.php?t=2609)

ragecgi 19-12-2002 04:42 PM

I'll take a look see tonight after I see Lord of the Rings with my girl:)

Could you post the expressions for us, and maybe a description of what they do, and why you chose to use them?

Thanks!!!

Speedy 19-12-2002 04:42 PM

Is anybody good at expressions and Particles? I can give this to you to see if you can fix it up at all, but if you do fix it up, Can I have a copy of it to? Thanks,
Brian

Speedy 19-12-2002 04:44 PM

all the expresions do is control the scalePP by using a simple SIN Function nothing Fancy. Don't have the scene available right now (I am at work) so I Will post it sometime around Lunch time,
Thanks,
Brian

ragecgi 19-12-2002 04:51 PM

Sorry for the double post. I'm on a mac, and it's driving me INSANE!!!

(dam macs!!! Just do what I ask!! Is that so wrong??? hehe....)

anyway..

Sure, if I can grab your file. I'll post a copy of any changes for ya:)

ragecgi 19-12-2002 04:52 PM

I doubt I'll change anything, I'm just curious is all:)

Speedy 19-12-2002 04:54 PM

Sweet. I will post it in a bit (if I can find the file at work), sometime around lunch time, if not it will have to wait until tonight. THanks,
Brian

brian_ellebracht 20-12-2002 01:20 PM

1 Attachment(s)
Hey, Well here is my Particle emitter, particle trail w/expression, and a test bullet. If you get it to work any better or make any changes please let me know I would love to have a copy of it. THanks,
Brian

DukerX 20-12-2002 01:50 PM

Fading out
 
Anyone got a solution for the bullet-trail not fading away?

In the original (The Matrix), the bullet trails fade away, and seems to dissipate (is that the right word??) into thin air... Just vanishing, wich of course is natural (???), because the shockwave would loose it's energy.

Still I can imagine just one way to acheive this (in just one render pass) and that would be setting the refraction and reflection index on a PerParticle basic.
The only way I can see that happen, is having... like 73 different materials, and make a script that changes the material on just a single particle, like you have "Matrix-Shader001" to "MatrixShade073" set up with decreasing/increasing refraction and reflection index and make a script or something that uses the agePP to change the particle material/shader.
-Code-sample that would work in VisualBawsic:
[Particle(index).material=MatrixShader & particle(index).age]
If the .age attribute is 16, this would make the particle(X) receive the shader/material "MatrixShader016", wich have a lower refraction and reflection index than "MatrixShader015".

I don't know too much about MEL and such but it would work in Visual Basic ;)


Another method would be rendering just the bullet-trails, in one pass, then make a copy of the particles, and aply a gradient map (rgbPP), and hardware-render them, as the second pass, and then, rendering the scene, and composite them toghrether using the hardware-rendered gradient (rgbPP) as the alpha-channel for mixing the bullet-trail and the "beauty-pass" togheter.
This would make the bullet-trail fade away, but not as nice as adjusting the refraction index individually (based on agePP) on each particle.


Any coments on the previously mentioned methodes, or MEL scripts that could work in the same fashion as my VB-thingy would be aprechiated
-DX-

brian_ellebracht 20-12-2002 02:54 PM

would you be able to just ad a mask in after effects, (with a feather) to make it look like it fades away? But, that would require more than one pass, an edditional pass for each bullet trail.

DukerX 20-12-2002 03:38 PM

Brian:
You're right. It has to be more than one pass, but there's no need for a pass for each bullet.
Duplicationg the particles, and switching to hardware-rendered particles, and then add a grayscale ramp to the rgbPP would make a perfect 2.nd transparency mask for compositting it. This mask should be used in adittion to the Alpha-channel in the bullet-trail pass (all the other geometry is switched off, only enabled in refraction and reflection, so you get a black scene render with only the bullet-trail visible, but the refraction and reflection of the scene should still be visible in the bullet-trail.

brian_ellebracht 20-12-2002 04:13 PM

I understand what you are saying. But.... Why couldn't you make a mask in Aftereffects (or shake, Make it have a large Feather, and then add it to the frames (rgb) that you export from Maya, So, that should mask everything, including the reflections/refractions? Not sure, sorry I am a little confused...

Trimeister 10-02-2003 12:04 AM

Thanks Ragecgi for the shader. It works great.

ragecgi 12-06-2003 10:03 PM

Re: Fading out
 
Quote:

Originally posted by DukerX
Anyone got a solution for the bullet-trail not fading away?

In the original (The Matrix), the bullet trails fade away, and seems to dissipate (is that the right word??) into thin air... because the shockwave would loose it's energy.

.....Any coments on the previously mentioned methodes, or MEL scripts that could work in the same fashion as my VB-thingy would be aprechiated
-DX-

MAN, this was a long time ago, and I'm sorry I didn't see this untill now....

A few ways to make the particles fade/dissipate would be:

1. You could "bake" your trail(s) particle animation,
render out your "beauty/color pass",
then go back and apply a rgbPP attribute to them by:
clicking the bigger "color" tab in the particle objects' attribute editor and choosing "per particle".
In the newly created rgbPP slot, right-click and create a ramp for the particle color.
By default, the ramp cycles through the colors depending on particle age.
So if you make your ramp go from white to grey to black, what will happen, is that you will see your particles start white when they are born, then go to black as they die.

So the reason this is cool, is that this sequence can act as your ALPHA for your beauty/color pass! :)

So now you can just tweak the ramp so the particles fade QUICKLY to black at the end of it's lifespan,
thus creating an ALPHA that when combined with your color sequence,
will make them look as if they "dissipate and/or fade" out at the last minute:)


2. Another, less dynamicly controllable way would be to create an animated alpha map for your TRAIL shader, keyed to fade at the appropriate time:)

jikalx 19-07-2003 03:35 AM

I'm not familiar with maya expressions. Can anybody tell me the sin expression to generate different sized disks from the emitter? Thanks.

ragecgi 19-07-2003 07:49 AM

Try this in a creation expression:

NOTE: you MUST add a radiusPP attribute to your particleShape, and apply this expression to that for this to work as you intend:)

The BOLD one is the one to use first, as it is what you asked for.
The rest are variants to try for fun:)

particleShape1.radiusPP = rand(.5,1)

OR

particleShape1.radiusPP = sin(time)

OR

particleShape1.radiusPP = sin(age)

Check out the "EXPRESSIONS" sticky thread in this area as well for more expressions to have fun with, and learn from:)


All times are GMT. The time now is 06:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018