Jump to content


Photo

Position of Thinking Particles "parented" to the position of the emitter?

Cinema 4D Thinking Particles Xpresso

  • Please log in to reply
13 replies to this topic

#1 louderthan11

louderthan11

    MoGraph Regular

  • Members
  • 65 posts
  • Gender:Male
  • Location:Boulder, Colorado
  • Interests:Climbing, Movies, MoGraph, Learning, Sharing, Whiskey

Posted 22 June 2012 - 01:22 AM

Not sure how to phrase this as a topic. I have a sphere with null objects clamped and locked to the surface of that sphere. When the sphere rotates (it's constantly rotating over time) the null objects stick to the surface and rotate along with it. I'm clamping the position of the Nulls with a constraint tag and aligning the Z axis as the constraint so the Z axis of all the null objects point outward from the surface of the sphere. I have PStorm thinking particle emitters emitting particles directly outward along the Z axis from the position of those null objects. As the sphere rotates, the particles trail behind the position of the null/emitter position as you would expect them too. But what I want the particles to do is move relative to the position of the emitter. As if all the particle positions were "parented" to the position of the emitter/null object. So they don't trail behind the position of the emitter at all. So if a single particle is born, travels directly outward along Z and a line is drawn from (A) the position of the emitter to ( B) the position of the particle the line AB would remain tangent to the surface of the sphere as it rotates. Did that make sense? Anyone have any ideas on how to do this? I'm pretty stuck. I really appreciate the help guys!

Edited by louderthan11, 22 June 2012 - 01:23 AM.


#2 florio

florio

    MoGraph Megastar

  • Members
  • 247 posts
  • Gender:Male
  • Location:Brooklyn, NY
  • Interests:blowing shit up ... in 3d

Posted 22 June 2012 - 01:01 PM

seems like xpresso would be the way to fix this ... got a scene file so we can see exactly whats goin on?

#3 wysee

wysee

    MoGraph Regular

  • Members
  • 93 posts
  • Gender:Male
  • Location:Los Angeles

Posted 22 June 2012 - 03:13 PM

Hi,
what do you really want to do at the end ? Do you just want trails or particles? The final goal of the project will help helping. Looks like mograph could be part of it.

#4 louderthan11

louderthan11

    MoGraph Regular

  • Members
  • 65 posts
  • Gender:Male
  • Location:Boulder, Colorado
  • Interests:Climbing, Movies, MoGraph, Learning, Sharing, Whiskey

Posted 22 June 2012 - 03:23 PM

Here is an example scene file I just whipped up:

https://docs.google....aktYRHB3T2xuWlU

Not my actual scene file--as that one has a ton of other stuff going on. In this example, you can see that a PStorm TP Emitter is clamped to the surface of a sphere rotating over time. As the particles emmitt and the sphere rotates, the path of the particles form a "curve" as one would expect. What I am trying to do--is get those particles to emmitt straight out from the emitter position and as the sphere rotates that path of the particles form a straight line perpendicular to the surface of the sphere. I don't want to affect the particles with dynamics in any way to get them to behave that way. That's not a solution that will work for me. It's almost as if the particles would be "parented" to the emitter position so they would move in space relative to the position of the null. Hope this helps clarify things. Thanks for the help guys!

#5 florio

florio

    MoGraph Megastar

  • Members
  • 247 posts
  • Gender:Male
  • Location:Brooklyn, NY
  • Interests:blowing shit up ... in 3d

Posted 22 June 2012 - 05:01 PM

I've gotten the particles to stay in a straight line (adding a null for rotation at the center of the sphere seemed to help) but it's still not perfectly straight ... I'll have to play with it some more but is that the general look your going for?

~Florio

#6 louderthan11

louderthan11

    MoGraph Regular

  • Members
  • 65 posts
  • Gender:Male
  • Location:Boulder, Colorado
  • Interests:Climbing, Movies, MoGraph, Learning, Sharing, Whiskey

Posted 22 June 2012 - 05:30 PM

https://docs.google....QlE2X2ZUS1hsN3c

Ok, here are some more Examples. Two this time. Getting the particles to stay in a straight line may be part of the battle. I should have posted these examples to start with. This is a clearer idea of the look I am going for. In the first example scene file "ExampleNoRotation.c4d" is the look I am going for with TP except the sphere does not rotate. In the 2nd "ExampleWithRotation.c4d," it's the same thing except the sphere rotates and you can see what happens to the particle trails/sweep NURB objects. I need my fractal/tree like structure to maintain its shape while rotating on the sphere.

florio, I really appreciate your help thus far! I owe you a beer!

#7 douwe

douwe

    MoGraph Megastar

  • Members
  • 260 posts
  • Gender:Male
  • Location:Brussels

Posted 22 June 2012 - 06:44 PM

Before you get lost in Difference Vectors and stuff...

Have you tried taking a static version of your Sphere, cloning on your Particles, Caching the Clones, Tracing the Clones and then Childing all this to your moving sphere ?

quick preview
www.c4dlounge.eu : dutch c4d community (Belgium / Netherlands)
//////////////////////////////////// douwe on vimeo

#8 florio

florio

    MoGraph Megastar

  • Members
  • 247 posts
  • Gender:Male
  • Location:Brooklyn, NY
  • Interests:blowing shit up ... in 3d

Posted 22 June 2012 - 06:56 PM

Douwe ... thats sick! I wasn't even close. I'm thinking (and I'm probably wrong) but since thinking particles that are emitted don't really have coordinates it's really difficult to constrain any of their movement, they react to the world.

louderthan11, Sorry man I wasn't much help ... but at least I learned some shit today. My original solution when I saw your files was throw that bad boy in an xref and call it a day but the particles wouldn't solve properly

~Florio

#9 louderthan11

louderthan11

    MoGraph Regular

  • Members
  • 65 posts
  • Gender:Male
  • Location:Boulder, Colorado
  • Interests:Climbing, Movies, MoGraph, Learning, Sharing, Whiskey

Posted 22 June 2012 - 07:23 PM

Thanks douwe! That certainly works and gets the results I want. I feel like I should have thought of that. Guess my brain got tied up in xpresso. :) I really appreciate you taking the time to record a demo as well. You rock!

Florio, I appreciate your efforts! I appreciate anyone willing to take the time to help. I'm trying to keep an eye on the board and help others too. But I'm not that smart :) I'd still be interested to see your possible solution as well. Even if it didn't work. I'm still curious/wondering if there is a way to do this in xpresso as well because it would allow for much greater flexibility.

This may be a question for a whole new topic but is there a way to iterate through multiple MoGraph Cache tags and bake all of them at once? Rather than selecting them all and baking them? I dropped the MoGraph Cache tag in the Xpresso editor but there doesn't seem to be any input for the "Bake" button . . .

#10 florio

florio

    MoGraph Megastar

  • Members
  • 247 posts
  • Gender:Male
  • Location:Brooklyn, NY
  • Interests:blowing shit up ... in 3d

Posted 22 June 2012 - 07:38 PM

if you wanna bake everything at once ... nitrobake

http://nitro4d.com/b...ware/nitrobake/

check it out

~Florio

#11 David Wickenden

David Wickenden

    Newbie

  • Members
  • 41 posts
  • Gender:Male
  • Location:Ballina, Australia

Posted 27 June 2012 - 02:22 PM

I'm still curious/wondering if there is a way to do this in xpresso as well because it would allow for much greater flexibility.

Here's an XPresso-based solution. The only script nodes are two Python nodes which replace Matrix2Vectors & Vectors2Matrix pairs for brevity.

There's a stand-alone example and a solution for the ExampleWithRotation scene. In the latter, the PStorm node was deleted from my expression and the relevant data channel added for each PStorm node in the existing setup.

The group to be affected is loaded into the User Data on each XPresso tag.

This has been an interesting exercise which has helped iron out a few kinks in my understanding of particle matrix calculations. I've added copious remarks to the expression which may of use to anyone interested in a deeper understanding of such things.

#12 louderthan11

louderthan11

    MoGraph Regular

  • Members
  • 65 posts
  • Gender:Male
  • Location:Boulder, Colorado
  • Interests:Climbing, Movies, MoGraph, Learning, Sharing, Whiskey

Posted 27 June 2012 - 06:06 PM

WOW. That's really badass. Way over my head right now! I'm psyched for all the remarks you added. I'm going to do my best to break this down for sure. Much appreciated!

#13 David Wickenden

David Wickenden

    Newbie

  • Members
  • 41 posts
  • Gender:Male
  • Location:Ballina, Australia

Posted 29 June 2012 - 11:05 AM

WOW. That's really badass. Way over my head right now! I'm psyched for all the remarks you added. I'm going to do my best to break this down for sure. Much appreciated!

No worries, let me know if you have any questions.

I've updated the TP expression so that birth status is determined using a PAge node. Particles are generated separately without modification to the setup.

This means that it is now fully portable. Just drop the tag onto an emitter null and drag the corresponding particle group into the tag's User Data field. The particles will then move in the local space of the null.

TP_EmitterSpace_02

Edited by David Wickenden, 29 June 2012 - 11:07 AM.


#14 louderthan11

louderthan11

    MoGraph Regular

  • Members
  • 65 posts
  • Gender:Male
  • Location:Boulder, Colorado
  • Interests:Climbing, Movies, MoGraph, Learning, Sharing, Whiskey

Posted 29 June 2012 - 06:03 PM

I really appreciate your willingness to share and help out. It's gonna take me a while to dissect your expression. I don't yet understand a lot of the nodes and math involved. I'm gonna have to spend some time looking over the reference manual.

I could totally use your help here: http://mograph.net/b...l=&fromsearch=1

I'm having trouble making my own Xpresso setups fully portable . . . I would love to understand what I am doing wrong.





Also tagged with one or more of these keywords: Cinema 4D, Thinking Particles, Xpresso

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users