Jump to content
Sign in to follow this  
louderthan11

Xpresso tags/setups cancel eachother out? Fully portable/independant xpresso setups?

Recommended Posts

So I have built this TP rig (posted it before) and have created a link user data field so I can drop an object into that field and the PStorm node will emit from the position of that object referenced in the user data field. That much works just fine. When I duplicate the rig--that is, the Xpresso tag on a null object--and drop an object into that user data field (different from the other one) only one of the PStorm emitters works. In my attached example, I have two xpresso tags. One is attached to TP Null and the other TP Null.1 . In the user data (labeled "Particle Group Controls" rather than the user data tab) for TP Null, the reference for the emitter is "Light." In TP Null.1 the reference for the emitter is "Light.1" As you can see, the particles start emitting from one object but not the other. I want to be able to duplicate my rig multiple times, drag an object into that reference field and have multiple TP setups emit accordingly. I feel like maybe the user data fields are referencing the same PStorm Nodes. In which case I'm not sure how to create separate instances of the Pstorm emitters. I was assuming duplicating an xpresso tag creates a self contained system? The more I think about that it seems like that wouldn't be the case. How do I make an xpresso setup fully portable or independent?

 

https://docs.google.com/open?id=0ByisW6OXOLfYSWRwVDdTTkUxUVk

Share this post


Link to post
Share on other sites

After trying to figure this out some more I realize the problems is something to do with particle groups. If the emitters never pass particles into separate groups the problem doesn't occur. Is there a way to keep TP groups relative to specific xpresso tags?

Share this post


Link to post
Share on other sites

Depending upon what the expression is doing, conflicts can occur when different emitters share the same particle groups. A solution is to have separate sets of groups.

 

In this example, each set of groups has a parent dragged into the emitter's User Data field. Its subgroups are automatically piped into the PPass and PGroup nodes.

Edited by David Wickenden

Share this post


Link to post
Share on other sites

Thankyou David! Your help has been priceless. I'm learning a lot! I figured it had something to do with the emitters sharing the same set of particle groups. I don't know anything about Python but looking at your code in the python nodes it looks like you are iterating through a hierarchy of particle groups, among some other things to get the desired result. Is there a way to achieve this without writing any code, just Xpresso? Using a hierarchy node or something?

Share this post


Link to post
Share on other sites

Glad to help.

 

The Hierarchy node is specifically for iterating through object hierarchies, so scripting is needed. I've updated the Python node to use a search path for multi-level particle group hierarchies, using the same shortcuts as the Hierarchy node.

 

You can create custom preset pools under the XPresso editor's X-Pool tab (Edit menu). Python and COFFEE nodes can be dragged into a pool and then accessed like built-in nodes.

 

PGroup_Selector.zip

 

Group_Selector.jpg

Share this post


Link to post
Share on other sites

No worries. I can be used in any TP setup and uses a search path starting at a reference group to select another group. In the example scene, the Reference port on each node is connected to a User Data link on the emitter null. If you delete the second XPresso tag and replace it with a copy of the first, it will autmatically locate all of the groups in the second set.

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.

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.

Sign in to follow this  

×
×
  • Create New...