Polygon velocity inheritance

Become a member of the CGSociety

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

Thread Tools Display Modes
  02 February 2013
Polygon velocity inheritance

Is there any way to inherit polygon's velocity to the particles when emitting from the surface? Thx.
  02 February 2013
You can take the objects velocity and additionaly calculate the distance the point moves due to rotation of the object, however, this will only work for rotations around the object axis. If the object is controlled by Dynamics you can use the angular velocity to get the real value.
In both cases you need to do a bit of vector mathmatics to calculate the difference vector for the point and hence the velocity.
- www.bonkers.de -
The views expressed on this post are my personal opinions and do not represent the views of my employer.
  02 February 2013
So I need polygon's current and previous position to calculate local movement, also polygon may be streched and etc... Pretty complicated.
There is motion pass in Cinema and I hoped there is built-in possibility. So sad
  02 February 2013
what exactly do you want to achieve?
do you mean like subframe emission within TP?
or simple motion inheritance?
could you specify your task?

  02 February 2013
I need to emit particles from moving polygons with speed inheretance. You know if character is moving his arms and legs moves fast and they change direction of movement while body moves constantly and with smooth direction change.
So I want to emit particles from speedy polygons and inherit its speed
  02 February 2013
i would prefer python on this, something like this (just paste it into a python
tag on your polygonobject).
import c4d
from c4d import utils as u

class CacheStruct():
    def __init__(self):
        self.Points = []
cache     = CacheStruct()

def main():
    obj = op.GetObject().GetDeformCache()
    if isinstance(obj, c4d.PointObject):
        curpoints = obj.GetAllPoints()
        if len(cache.Points) > 0 :
            for i in xrange(len(curpoints)):
                pid = tp.AllocParticle()
                tp.SetPosition(pid, curpoints[i])
                tp.SetVelocity(pid, (curpoints[i] - cache.Points[i]).GetNormalized() * 100)
        cache.Points = curpoints

it is just a rough sketch, it emits particles form an point object vertices and sets
their velocity to the vertex velocity. i used vertices, because i did not want to
bloat the code with polygon handling, there is also missing a meaningful mapping
of the vertex velocity to particle data (min/max speed, min/max pcount, ...)
general idea should be clear. just cache the velocity by yourself.

Last edited by littledevil : 02 February 2013 at 11:36 AM.
  02 February 2013
How to force to update polygon selection every time? Material displaying and particles emits from an initial state, while real polygon selection is changed every frame.
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
Society of Digital Artists

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

All times are GMT. The time now is 02:43 AM.

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