How to "clean" the transforms of a gdp

   5018   5   1
User Avatar
Member
543 posts
Joined: July 2005
Offline
Hello,

How do you “clean” or reset a gdp (GEO_Detail *gdp) of any previous transformations from calling gdp->transform() ?

I can't find anything in the docs and I've tried something like:


UT_Matrix4 xform(1.0);
xform.identity();
gdp->transform(xform);


But no luck, the transforms continue to accumulate every time I transform the gdp to a new location.


Thanks!

Mark
========================================================
You are no age between space
User Avatar
Member
4262 posts
Joined: July 2005
Offline
I thought the gdp was just the point/prim data and there isn't any “history” of the transforms to speak of.

If you want to mark where they used to be you'll need to add some frame or other bit of information that you can refer back to.
if(coffees<2,round(float),float)
User Avatar
Member
543 posts
Joined: July 2005
Offline
Yea, that's what I thought too, and when looking over the various methods in GU_Detail & GEO_Detail it appears there's no particular method to do such an operation, so I assumed as well it wasn't needed.

Still trying a few different approaches, I think I must be missing something else.

I'll post an example if I can't resolve this today.


Mark
========================================================
You are no age between space
User Avatar
Member
543 posts
Joined: July 2005
Offline
Edward (AI) answered my question on odforce:

***********
In general, you can't because when you're transforming the geometry, you are modifying the point positions directly. So you have to decide what you want the “rest” position to be and transform it again to that.
***********


Coolness!


Mark
========================================================
You are no age between space
User Avatar
Member
282 posts
Joined: Jan. 2006
Offline
I can propose you to make smth like a stack of transforms and then make a backtransformation of your point.

M*pow(M, -1) = 1
Houdini is great! O'right?
User Avatar
Member
282 posts
Joined: Jan. 2006
Offline
or rest positions like Edward already propose
Houdini is great! O'right?
  • Quick Links