Jump to content

Recommended Posts

Greetings all,

 

I have a set (9 or 10) of simple spheres or "planets" orbiting around the origin, using a bunch of transformed nulls that drive the animation.

I'd like to have each sphere emit some particles, which eventually drift toward the center, but I'd like to save my self the labor of having to copy/paste all the objects, tags and ThinkingParticles nodes to each planet. I would think there might be a way to bake the whole thing to a singular cached geo which could be used as a single emitter surface (vs. making having to set up each single planet as its own emitter).

 

I tried using Timeline > Functions > Bake Objects, though this appears to only create a keyframe for each animated transform track (which in this case, are null objects only), but doesn't actually record the mesh data

 

Character > Point Cache only appears to work on mesh deformation at the object level, but not at the world level, in other words, its parameters are unavailable when the tag is applied to a null object.

 

I've considered turning the whole rig into a MoGraph object and baking that, though I'm not sure whether that would work as I don't know whether MoGraph Bake actually only caches the template points, or whether it also  can cache the instanced objects attached to the template points.

 

I've also tried various export / import formats (abc., fbx., dae., etc) but could not find a way to a solution.

 

Hoping someone might have a tip or two - I'm using R18

 

Many thanks!

Nik

 

 

Share this post


Link to post
Share on other sites

I would iterate over the objects in Xpresso.

  • Like 1

Share this post


Link to post
Share on other sites
  • Topic Author
  • Many thanks for the response, srek !

     

    While I understand the concept of iteration, I don't have much experience at all with Xpresso so it's still very much a foreign language to me.

     

    I looked at this tutorial https://www.youtube.com/watch?v=HT2T9P_tpQo 

    and built the simple scene it demonstrates, however, I am totally lost when it comes to understanding where and how to link the particle generation node (in this case PMatterWaves) into the geometries that I'd want to use as my emitter. 

     

    In the attached scene, I've dragged  the Cube node which I'm running Iteration on into the Object slot of the particle generator, though it appears to yield no results. I'm sure I'm missing a step or two in the process.

     

    Thanks again,

    Nik

     

     

     

    XPresso-Iterator.c4d

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • srek, 

    Thank you again for the suggestion! I appear to have figured things out as far as creating an iteration group and linking it to the emitter node so that  particles are emitted across all objects at once!  Attaching a new file to show.

     

    A couple follow up questions, if you would be so generous:

    • I'd love to see the emitted particles inherit some velocity from the emitter geometry so that rather than leaving an immediate trail, they explode outward a bit from the spheres before drifting away.  I've approximated the effect (badly) by keyframing a few of the emitter's parameters, but this is of course less than ideal. Here's something from an old post of yours:
    • Quote

      The velocity input on PStrom is used to distribute particle emission between frames. It is not meant to make the particle inherit the velocity of the emitter.

      It's not to hard to set up though. Use a PGet data node to get the particles velocity, use a math:add node (in vector mode) to add the Position Velocity from the Emitter object to the velocity and feed the result in the already existing PSet Data node.

      This makes a lot of sense to me in theory, though I can't seem to make it work in reality (please see my file. Though you're talking about PStrom I don't see how the same wouldn't apply to PMatterWaves).  I can't get a green wire when trying to connect my Math node to the PSetData node. I'd guess this is what would happen when you try to connect incompatible data types, but I've set the mode to 'vector' as suggested.  I'd also wonder where the Position Velocity is calculated from on the Emitter object (is it per point, or poly, or from the world position of each new particle at its frame of birth?, etc.)

    Also, a tangental question that's probably a noob question:

    • Is there a way to enable keyframes created in Xpresso nodes to show up in the timeline under my viewport, the way most keys do?

    Thank you again,

    Nik

     

     

     

     

     

    XPresso-Iterator-v02.c4d

    Share this post


    Link to post
    Share on other sites

    You use the Position Velocity, which is a local value, from an object that is not moving localy since it's movement is inherited from the parent. Either animate the object directly or you have to create an own global velocity tracking setup that.

    Please find attached a scene with a workaround for this (the multiplicator is only ther for experimentation, set it to 100/100/100 to make the influence more visible).

    XPresso-Iterator-v02a.c4d

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • Wow, this is great - thanks very much for pointing me in this direction!

     

    As I mentioned, I'm quite new to Xpresso (but  I should mention I have been studying Houdini for the past year or so, and the approach is somewhat similar). Looking at the way you amended my file, there are still a few things that are a little mysterious to me:

    • So the tag that contains the main setup (Iteration > LinkList > Object  > PMatterWaves, etc) has to somehow reference the "Global Velocity" data on each of the spheres, so based on your setup, I would assume the Global Velocity data gets assigned to the sphere object itself through their individual Xpresso tags, and this data gets collected in the LinkList node? 
    • I'm a little confused about what exactly the "Tag" operator node and the one next to it called "Xpresso" are actually doing (see attached jpg). In the "Xpresso" node, it appears we're referencing the tag of the first object in the LinkList and calling on it's "Global Velocity" user data?
    • Also, is there any danger in changing the names of the Xpresso tags? In other words, are the names read as string values, or are all references absolute when your working in Xpresso?

    Sorry for the continued naive questions - I'm trying to wrap my head around how this system works.

     

    Many thanks again,

    Nik

     

     

     

    Capture3.JPG

    Share this post


    Link to post
    Share on other sites

    Here's my 2 cents -

     

    Iteration usually works by having a sample object that represents all the objects to be iterated. The sample object 'becomes' each iterated object in turn by injecting each object ID into the object input port on the sample object.

     

    In your jpeg, the spheres are referenced in turn and thus their XP tag. The XP tags have user data Global Velocity as output. The node marked XPresso is an object node that 'becomes' whatever you connect to its input port (marked object).

     

    The tag node takes the object that has the tag as input, and outputs the tag. If there's more than 1 tag on an object, you can set the tag type to dynamic, texture etc to select the correct one. In your case,  type = XPresso.

    • Like 2

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • @Jed,   

    Many thanks. I appreciate the explanation! I think this clarifies quite a bit.

     

     

     

    Share this post


    Link to post
    Share on other sites

    TBH I don't know much about TP emitters, so my comment was about iteration in general. Having user data actually on the XPresso tag confused me a bit, until I realised what was going on.

     

    Iteration is a very powerful tool.

    Share this post


    Link to post
    Share on other sites

    The Userdata on the Xpresso tag was just convinience to make the function portable to any number of objects.

    Share this post


    Link to post
    Share on other sites

    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.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


    • Recently Browsing   0 members

      No registered users viewing this page.

    YOUTUBE CHANNEL:

    ABOUT US:

    C4D Cafe is the largest CINEMA 4D community. We provide facilities for discussion, showcasing and learning our favorite software :)
    ×
    ×
    • Create New...