lucap

lucap

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

some questions about POPs Nov. 6, 2009, 1:15 p.m.

question 1:
in order to understand what is happening here you have to first understand the fundamentals of how POPs works. On each time step acceleration gets interpreted as velocity and then on the following timestep velocity get interpreted as position:

a->v->p

in order to see this in action create a popnet with the oversampling set to 1.
create a location pop that creates 1 point on the first frame.
add a force pop with the a value of 0 10 0
open up the spread sheet and take a look at what happens:
frame 1 : acceleration, no velocity, no change in position.
frame 2 : acceleration, change in velocity, no change in position.
frame 3: acceleration, change in velocity, change in positon.

the point doesn't move until frame 3!

so now lets go back to your original question. Why is the force pop
not working with the velocity pop. this is probably because the values
in the velocity pop are overriding the velocities from the force pop.

so for example in the velocity pop if you set the value to (10,0,0)
the velocity coming out of that pop is always going to be (10,0,0).
but if you do something like ($VX+10,$VY,$VZ) then a velocity of ten
will be added on each time step and you'll be able to see the effect(note this
will be cumulative).

questions 2 and 3 - don't have to much experience doing this the first
things that come to mind are the “slide” and “stick” features of the collision
pop. You might be able to use the state sop to flag a particle as stuck or sliding as soon as it born. might want to look at the creep pop as well.

hope that helps
Luca

dealing with nan values Aug. 14, 2008, 12:39 p.m.

I posted a similar post on odforce, so I apologize if you are reading this twice.

I have a vex operator that's reading an i3d file, some of the values being returned are nan
values. I was wondering if there's a way to test for nan values and replace them
with something different

eg

if foo==nan then
foo=0

thanks
Luca

hdk group centroid position Aug. 9, 2007, 5:47 p.m.

I don't know if there's a function that does this for you (might want to look at UT_BoundingBox). I did it the old fashion way:


FOR_ALL_GPOINTS(gdp, ppt)
{
UT_Vector4 pos4=ppt->getPos();

txSum+=pos4.x()/pos4.w();
tySum+=pos4.y()/pos4.w();
tzSum+=pos4.z()/pos4.w();
}

myCEX=txSum/myTotalPoints;
myCEY=tySum/myTotalPoints;
myCEZ=tzSum/myTotalPoints;

hope that helps
Luca