Particle Emitter Parenting Question

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  11 November 2012
Particle Emitter Parenting Question

Hi all,

I've run into a problem while playing with particles. What I'm doing is creating an animation where spaceships shoot lasers at each other... anyway, for the laser fire, I've created a directional particle emitter that I've parented to the ship's control so that it follows - this works fine.

The problem is the rotation of the particles does not follow. What happens is that the emitter follows in place, but the particles are always emitting in the same direction. Does that make sense? For example, my ship will be shooting in the right direction, but when I rotate it, while the particles are still emitting from the right place, the direction of the particles don't change.

The only way I can find is to key the "Direction" attributes in the particle emitter's attributes, which is really inaccurate and frankly pretty damn hard to get right. Is there any way I can tie the rotation of my ship to the direction my particles emit in? Thanks for any help!
 
  11 November 2012
use volume or object emitter instead
__________________
Nothing last forever
 
  11 November 2012
You could use an expression to make the the emitter always aim at the object.

float $targetPos[] = `xform -q -ws -rp pSphere1`;

float $emitterPos[] = `xform -q -ws -rp particles_emitter1`;

particles_emitter1.directionX = $targetPos[0] - $emitterPos[0];
particles_emitter1.directionY = $targetPos[1] - $emitterPos[1];
particles_emitter1.directionZ = $targetPos[2] - $emitterPos[2];
__________________
Demo Reel 2012-13!
 
  11 November 2012
Yeah a direction emitter emits in world space direction I think and wont inherit rotations. A volume emitter with 'along axis' set to 1 should work.
__________________
www.danielelliott.co.uk
 
  11 November 2012
Originally Posted by newguy4life: You could use an expression to make the the emitter always aim at the object.

float $targetPos[] = `xform -q -ws -rp pSphere1`;

float $emitterPos[] = `xform -q -ws -rp particles_emitter1`;

particles_emitter1.directionX = $targetPos[0] - $emitterPos[0];
particles_emitter1.directionY = $targetPos[1] - $emitterPos[1];
particles_emitter1.directionZ = $targetPos[2] - $emitterPos[2];


Quote: Yeah a direction emitter emits in world space direction I think and wont inherit rotations. A volume emitter with 'along axis' set to 1 should work.


Thanks both of you - will try both solutions and see which works best for me. Thanks again!
 
  11 November 2012
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 07:11 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.