Jump to content

How to use multiple POPs for computation inside a Geometry VOP DOP?


magneto

Recommended Posts

Hi,

 

I am trying to do some experiments with the new POPs, but I can't figure out how to use 2 POP nodes similar to SOP nodes inside a Geometry VOP DOP:

 

VePRvH6.png

 

When I do this, the result of both popforce and popdrag gets merged but I only want the result of the pop drag. How can I use the result of one node while using others as reference just like how it's done in SOPs?

 

 

Thanks :)

Link to comment
Share on other sites

DOPs and therefore POP DOPs work differently than SOPs, they modify data directly, without keeping the copy

 

so in this case the Geometry data lives on POPobject and POP DOPs are just modifying it

so your poplocation1 is adding points to that Geometry data

popforce1 is changing force attribute on it

popdrag1 is changing airresist and targetv attribute

but the data doesn't exist on any of this nodes, they are just modifiers or solvers if you want

so it really doesn't make sense to use them in a way you want

but you can still access attributes in your GeometryVOP DOP or  POPVOP DOP at the values that are coming in and as in your case POPforce and POPdrag are modifying different attributes, there is no problem

 

if however you had two POPforces and wanted access resulting force from both of them for some reason, you can use for example POP Wrangle DOP after the first POPforce, store force value to some temp variable like v@tempforce = v@force;

then after second POPforce you can access force attrib which will be result of both POPforce nodes and tempforce which will still contain values after only first POPforce

  • Like 1
Link to comment
Share on other sites

Thanks anim, that's very helpful. So there is no way to do comparisons in DOPs? I wanted to compute the differences between particles at 2 different states.

 

I will do it like you said using the temp variable. But this sort of thing can't be turned into a digital asset in case you wanted to compute the difference between the result of any 2 DOP nodes?

Link to comment
Share on other sites

I just tried storing the P after popforce1 and then accessing it after popforce2, but for some reason tempP and P are the same even the the force accumulates correctly.

 

YHQxu8d.png

 

I guess there is no way to store the state of the simulation at any point?

Edited by magneto
Link to comment
Share on other sites

as I said forcepop computes just force attribute, it doesn't modify P

P is as well as v integrated inside of POP Solver DOP at the very bottom (similarly as in old POPs forces were changing only accel)

 

you can compute tempP from P and current force attribute (it may not be however what it would be inside POP Solver, depends on if you consider all attributes as POP Solver or not )

 

just look inside POP DOP nodes to see how they work, it's usually VOPs or VEX code

Edited by anim
  • Like 1
Link to comment
Share on other sites

Thanks anim. I see what you mean now. I thought they were integrated at every step. In that case my idea wouldn't work because I wanted to be able to calculate the difference between 2 particle states. So I wouldn't be able to know what kind of things are at play. The user could be modifying P directly for example.

Link to comment
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.

×
×
  • Create New...