A place to talk about CG particles...
login.php?sid=97074fb2731515e758707572f02a19ab profile.php?mode=register&sid=97074fb2731515e758707572f02a19ab faq.php?sid=97074fb2731515e758707572f02a19ab memberlist.php?sid=97074fb2731515e758707572f02a19ab search.php?sid=97074fb2731515e758707572f02a19ab index.php?sid=97074fb2731515e758707572f02a19ab

Orbaz Technologies Forum Index » Particle Flow Tools: Box#3 » Particle Parent
Post new topic  Reply to topic View previous topic :: View next topic 
Particle Parent
PostPosted: Mon Dec 01, 2014 3:34 pm Reply with quote
Dewey1916
Joined: 15 Jan 2014
Posts: 18




Hey Smile
I need to get data from the parent-particle of my particles. The particles I'm talking about are spawned by a "Spawn"-Operator by travel and I need to save the speed of the "parent"-particle at the time they spawned a new particle to a custom channel of my new "child"-particle.

I hope you can help me. I think it's something with amount change an the Parent-ID but I have no clue how these things work...

Thank you really much!
Dewey Very Happy
View user's profile Send private message
PostPosted: Sun Dec 07, 2014 7:34 am Reply with quote
nickolay411
Joined: 12 Jan 2009
Posts: 296
Location: LA




you can't do it with a spawn operator.

You'll have to build your own spawn by travel distance in the subop then record the spawning data to its current parent and then save out their speed to a output new.
View user's profile Send private message AIM Address
PostPosted: Mon Dec 08, 2014 2:20 pm Reply with quote
Dewey1916
Joined: 15 Jan 2014
Posts: 18




nickolay411 wrote:
you can't do it with a spawn operator.

You'll have to build your own spawn by travel distance in the subop then record the spawning data to its current parent and then save out their speed to a output new.


Ah thank you really much! I think I got an approach and worked a little bit on the project. I changed also changed my goal: Now I need the position vektor of the parent particles in the new event my "child"-particles are send to...

My current flow is attached and also my DataTest! It would be awesome if you could take a look at it!

I now need to get a new DataOp in the new Event of the SpawnedParticled, which calcualtes the distance to the "Parent"-particle Smile

I really hope you guys can help me!
Matthias



Magic.png
 Description:
My DataTest-operator!
 Filesize:  99.44 KB
 Viewed:  5292 Time(s)

Magic.png



Operators.png
 Description:
My pflow-setup!
 Filesize:  203.31 KB
 Viewed:  5292 Time(s)

Operators.png


View user's profile Send private message
PostPosted: Tue Dec 09, 2014 2:42 am Reply with quote
nickolay411
Joined: 12 Jan 2009
Posts: 296
Location: LA




Hey Matthais,

Good start. To calc the distance to the parent particle first you need to establish the spawned particles parent ID.

go to your amount change sub op check parent id and click create channel

make this a global not local.

In your new event, you will need to use a input proxy sub op. first select object, choose your pflow source because you will reference itself.

in your input proxy check use I2 as particle Id's.

Input custom , parent id channel and connect those two together. Your spanwed particles are referencing the parent id Position.

Now just subtract input standard pos with your proxy position and walah you have your distance to parent.

Cheers,
Nickolay



DistToParent.jpg
 Description:
 Filesize:  599.19 KB
 Viewed:  5278 Time(s)

DistToParent.jpg


View user's profile Send private message AIM Address
PostPosted: Tue Dec 09, 2014 2:59 am Reply with quote
nickolay411
Joined: 12 Jan 2009
Posts: 296
Location: LA




Also I wouldn't use a data test for the majority of your data flow as it does not allow you to choose how each output is calculated,

the pre, normal and post calculation options give you a ton of flexibility when building your flows also they help analyze data at the correct time/interval.

You can save your data to a global channel , then in a data test you just have a simple true or false condition.

Here's what my spawn by travel operator looks like.

I take the particles current position and I subtract it's current speed in world units. This gives me sorta working last position. Then I have a custom output that adds each frames distance traveled into one big number, if it number meets the distance number,i spawn a particle and reset the distance traveled back to zero by checking if a particle was spawned. Then it adds and adds until its over the limit, spawns, resets over and over in that cycle.



SpawnByTravel_DataOp.jpg
 Description:
 Filesize:  693.07 KB
 Viewed:  5277 Time(s)

SpawnByTravel_DataOp.jpg


View user's profile Send private message AIM Address
PostPosted: Tue Dec 09, 2014 11:30 am Reply with quote
Dewey1916
Joined: 15 Jan 2014
Posts: 18




nickolay411 wrote:
Also I wouldn't use a data test for the majority of your data flow as it does not allow you to choose how each output is calculated,

the pre, normal and post calculation options give you a ton of flexibility when building your flows also they help analyze data at the correct time/interval.

You can save your data to a global channel , then in a data test you just have a simple true or false condition.

Here's what my spawn by travel operator looks like.

I take the particles current position and I subtract it's current speed in world units. This gives me sorta working last position. Then I have a custom output that adds each frames distance traveled into one big number, if it number meets the distance number,i spawn a particle and reset the distance traveled back to zero by checking if a particle was spawned. Then it adds and adds until its over the limit, spawns, resets over and over in that cycle.


Thanks a lot for all these tips! Can you explain a little bit what you did in your Spawn_by_travel DataOp, since I don't understand the following parts: What is Sample_Inc_Speed and how does this "Integration Step"-calculation work? What happend after what (Execution Order, etc....)? It would bhe awesome if I could take a look into your file, but if you don't like to share it since it's something you achieved personally I totally respect that!
I just don't really understand what that "Pipe" and "Base:Step" is for and a lot of other things... Sad

After all I understand how the proxy input works, but not really what the advantages of your spawn by travel are...
Matthias Smile
View user's profile Send private message
PostPosted: Tue Dec 09, 2014 9:36 pm Reply with quote
nickolay411
Joined: 12 Jan 2009
Posts: 296
Location: LA




Hey Dewey, no problem.

Actually I didn't look at your spawn by travel op just sorta started cracking at my own and didn't even think about how simply it could be done like the way you did it.

The only way I see Your spawn by travel not working is if the particle turns around and flys backwards before it spawns again. so it travels 9 units up, turns arounds and flys 9 units down, traveling 18 units total but still being within 10 unit threshold of the last spawn. Make sense?

With Pipe you have a true or false statement, if particle tests true, then particles acquire the first input data if it tests false than particles acquire the second input data.

Base:step is a data discretizator subop, this ones tricky but it basically makes data simpler. at a step of 1, any info coming in lets say we choose absolute time it will rounded to units of 1, example 1,2,3,4,5... another example, 1.5 will become 1, 2.5 will be come 2.

now if you choose a step of 2, than your absolute time data will look like this, 2, 4, 6, 8, 10,12,14.

like the icon think Visually think a flight of steps, how far are you steps apart? I wouldn't call it rounding Razz

the execution order of all the data is on the far right of the image i posted. pre is first then after the dashes it goes normal then after those dashes its post.

Also I use the step end minus step start to get the proper speed traveled in world units. if someone changes between 24 fps and 30 fps in the scene than this method will insure the data will be stay correct.

cheers,
N
View user's profile Send private message AIM Address
PostPosted: Wed Dec 10, 2014 7:25 am Reply with quote
Dewey1916
Joined: 15 Jan 2014
Posts: 18




nickolay411 wrote:
Hey Dewey, no problem.

Actually I didn't look at your spawn by travel op just sorta started cracking at my own and didn't even think about how simply it could be done like the way you did it.

The only way I see Your spawn by travel not working is if the particle turns around and flys backwards before it spawns again. so it travels 9 units up, turns arounds and flys 9 units down, traveling 18 units total but still being within 10 unit threshold of the last spawn. Make sense?

With Pipe you have a true or false statement, if particle tests true, then particles acquire the first input data if it tests false than particles acquire the second input data.

Base:step is a data discretizator subop, this ones tricky but it basically makes data simpler. at a step of 1, any info coming in lets say we choose absolute time it will rounded to units of 1, example 1,2,3,4,5... another example, 1.5 will become 1, 2.5 will be come 2.

now if you choose a step of 2, than your absolute time data will look like this, 2, 4, 6, 8, 10,12,14.

like the icon think Visually think a flight of steps, how far are you steps apart? I wouldn't call it rounding Razz

the execution order of all the data is on the far right of the image i posted. pre is first then after the dashes it goes normal then after those dashes its post.

Also I use the step end minus step start to get the proper speed traveled in world units. if someone changes between 24 fps and 30 fps in the scene than this method will insure the data will be stay correct.

cheers,
N


Okey, I think I unsterstood everything, but the step start, step end...
I don't really know what these inputs return and what they are supposed to do. I can't even find an entry in the documentation Sad
If it is the start/end of the integration step (is that right?) I get the length of an integration step, but how does that help me with getting the right speed with different frame rates?

I will try to recreate you flow today, but this is the only part I don't understand.

Thank you for yout time Very Happy
Matthias
View user's profile Send private message
PostPosted: Thu Dec 11, 2014 9:55 pm Reply with quote
nickolay411
Joined: 12 Jan 2009
Posts: 296
Location: LA




these inputs return a time value, when converted to a real as ticks, you will get the amount of ticks per integration step in your pflow setup.

if user changes the integration step from frame to 1/4 frame or changes fps of max this insures we are multiplying the speed value by the proper amount of ticks.

reason we multiply speed by ticks is because a speed value isn't a world unit. And we must get a world unit in our speed to correctly add to a position vector.

ticks per integration step * speed = distance traveled in world units per integration step.


im sure Oleg can explain better than me. I'm not a math guy!
View user's profile Send private message AIM Address
PostPosted: Sun Dec 14, 2014 12:31 pm Reply with quote
Dewey1916
Joined: 15 Jan 2014
Posts: 18




nickolay411 wrote:
these inputs return a time value, when converted to a real as ticks, you will get the amount of ticks per integration step in your pflow setup.

if user changes the integration step from frame to 1/4 frame or changes fps of max this insures we are multiplying the speed value by the proper amount of ticks.

reason we multiply speed by ticks is because a speed value isn't a world unit. And we must get a world unit in our speed to correctly add to a position vector.

ticks per integration step * speed = distance traveled in world units per integration step.


im sure Oleg can explain better than me. I'm not a math guy!


It would be awesome if I could take a look at your file. Since I think I did something wrong with the Execution Order and Priorities... But I understand what you mean by with the "Step Start" and "Step Ende" Very Happy
View user's profile Send private message
Particle Parent
Orbaz Technologies Forum Index » Particle Flow Tools: Box#3
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Post new topic  Reply to topic  


Copyrightę 2004-2005 Orbaz Technologies, Inc. All rights reserved.
Powered by phpBB © 2001, 2005 phpBB Group
phpBB Style by Vjacheslav Trushkin