|
Post by eq on May 16, 2013 19:06:07 GMT 1
Hi all, I've been trying to improve my rocket trail fx and decided there was a limit to what can be done without using a shader. I threw something together quickly to get an idea, and then stumbled upon a problem back in the scripting department. I obviously need the shader to be displayed fixed, not camera aligned, so the plan was to make maybe 2 or 4 "quad" shaders as part of the rocket projectile. However quad is perpendicular to "dir", and I needed it parallel to "dir". I have 2 alternative but equally frustrating problems: shader RLtrailEQ rotate 90 size 8 interval 0.001{ normalize velocity v0 perpendicular v0 dir inverse dir scale velocity parentvelocity 1 emitter 0.001{ quad } }
For some odd reason the shader is aligned to the map's axis (I think)...Not to velocity! shader RLtrailEQ rotate 90 size 8 interval 0.001{ perpendicular dir dir scale velocity parentvelocity 1 emitter 0.001{ quad } }
I guess the script is run for both values of "dir", before and after being made perpendicular. The only other solution is to delve into "rotatearound" which seems overcomplicated. I've been using "rotate" but it only works in one axis, I have no idea how to rotate in a different axis. Any suggestions MUCH appreciated!
|
|
|
Post by eq on May 16, 2013 21:19:23 GMT 1
Problem solved. ////////////////////////////////////////////////////////////////earth_quake flame trail, just behind rocket (requires RLtrailEQ.shader) shader RLtrailEQ width 12 interval 0.001{ normalize velocity v0 inverse v0 addscale origin v0 origin 0.5 inverse dir emitter 0.001{ size 30 spark } } Now time to draw a shader that doesn't look entirely like a child drew it with some crayola pens....
|
|
|
Post by eq on May 17, 2013 21:42:34 GMT 1
Hmm new issues. Because I've drawn it as a spark (I think) it does not display as an animation, or perhaps I've made the shader wrong. Also, is there a way to reposition the origin that isn't affected when the demo starts getting choppy (e.g. lots of players), I saw mention of the token "once" but have no idea how to use it, what I want to do is: once { normalize velocity v0 inverse v0 addscale origin v0 origin 0.4 }
But wolfcam doesn't seem to support it, I suspect I'm using it wrong
|
|