fixxorion Posted June 20, 2003 Share Posted June 20, 2003 Hi all, In my continued quest to master particles, I have run up against some more problems. I'm trying to create some more complicated particle effects, but I need to make some more complex expressions. I managed to create some actual expression functions (after much help from forums), but I can't figure out how to actually change parameter values from within the function. As a test, I'm trying to create a group of particles that move up, and then after reaching a certain height, start moving down, and cycle back and forth like that. I'm trying to accomplish this with actual function expressions, but I can't quite figure it out...I feel so close, but I can't get it. I've attached what I have so far...if someone helps me find a way to do this, I'd be eternally grateful! Thanks, fixxorion Quote Link to comment Share on other sites More sharing options...
fixxorion Posted June 20, 2003 Author Share Posted June 20, 2003 Here's the actual file... expressionTest.hipnc Quote Link to comment Share on other sites More sharing options...
anakin78z Posted June 20, 2003 Share Posted June 20, 2003 Hey, Rather than trying to controll the behavior with a single expressin in a position pop, try using the pops that are already available to you. You could do what you wanted in your test with a velocity pop. Also check out the group pop, and definetly look into what the little 'preserve group' check does. Also look into the event pop. If you really want to go into scripting for ultimate controll, check out vops rather than expressions. Vops will give you an incredible amount of controll. But to learn particles, I'd say play around with the default tools first. Know that it'll always look more natural to affect acceleration, rather than forcing velocity. Know your gravity and your drag. Cheers, Jens Quote Link to comment Share on other sites More sharing options...
fixxorion Posted June 20, 2003 Author Share Posted June 20, 2003 Hi, Thanks for the info...much appreciated. I do know the regular tools and how I would use them to create the effect that I said, but I just want to create that same effect using some sort of script. I've tried both VOPs and a regular expression to do it, but with both methods, I don't know how to actually access the custom attributes that I created in POPs...it seems like a fairly necessary thing to be able to do.... Thanks, fixxorion Quote Link to comment Share on other sites More sharing options...
anakin78z Posted June 20, 2003 Share Posted June 20, 2003 well, with vops it's the same thing as with the shaders. You can pass in any attribute by having a parameter of the same name. So if you have an attribute called direction, you can create a parameter called direction, and the values will be passed in. In expressions, you can use the poppoint() expression Quote Link to comment Share on other sites More sharing options...
fixxorion Posted June 21, 2003 Author Share Posted June 21, 2003 Hi anakin78z, I see...what If I wanted to change that attribute? I used the Add Attribute within my VEX POP...that seemed to work. However, I'm afraid I might be doing it wrong. Let me give an example of what I would want to do with this. Say I have a group of particles being generated. I want to add a custom attribute called "Weight" to each of the particles, and as time goes by, each particle's "Weight" attribute will increase. Then, as soon as the "Weight" attribute passes a value, say 5, the velocity of that particle in Y starts to increase. How would you go about create a scenario like that? Thanks so much for all the help anakin78z...you're saving my life! fixxorion Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.