2 DOPS Problems: Delete RDB on Collision and getattribute()

   2050   1   1
User Avatar
Member
28 posts
Joined: Aug. 2013
Offline
I am getting there on the look and function of my black hole, but now I am running into two issues that are affecting me preparing to get the whole thing put together. The first one that I would like to address is the RDB objects being deleted when they collide with the black hole. I have been searching and have been unable to find even a bad way of doing this. I had a classmate suggest just moving the objects to some obscene distance away from my frame, but that would leave them in the simulation and when I get to where I am doing my final scene, that wasted geometry will become a real problem. I need it to destroy it and store the relevant data.

The issue is my black hole growth simulation. I am struggling with getting my getattribute() vex function to work properly. I can't seem to get the number into my calculations. Again, I have dug and dug and not found any good straight answer for how to do it. What I have is a Detail attribute that relates to the total mass that the black hole has destroyed which will then do things like increase the gravity of the attractor as well as the radius of destruction and of many parameters of the geometry of my black hole itself. It is a fairly important skill that I can't seem to get right.

Attachments:
blackHolePOPSim1.hipnc (306.9 KB)
blackHoleBuildingWork2.hipnc (511.8 KB)

User Avatar
Member
8549 posts
Joined: July 2007
Online
1. to delete packed rbds, you can just delete the point using popwrangle, geometry wrangle or SOP Solver
so just attach Geometry Wrangle to your multisolver1 and use code similar to:
vector goal = chv(“../popattract1/goal”);
if(distance(goal, @P)<5) removepoint(0, @ptnum);
NOTE: instead of using chv() to get parm value directly from another node, I recommend creating spare parm on geometry wrangle and reference values from another node. I just did this here for clarity and simplicity, but would break if you rename your popattract1

2. for getattribute(@OpInput1, …) or getattribute(0, …) to work you need to define the input(s)
so go to Inputs tab of your popwrangle1 and set Input 1 to Myself

you can as well use detail() instead of getattribute() to get detail attrib directly
like:
float intensity = detail(0, “intensity1”, 0);
still needs your Input 1 to be Myself
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links