Mantra Vray Procedural Transformation Problem

   4945   1   1
User Avatar
Member
82 posts
Joined: April 2019
Offline
HI……

I am writing a Mantra Vray Procedural. What I want to do is , read a bgeo file, say A,which has some 100 points, and read another bgeo file B, which is to be copied
on the 100 points in geo A.
I am reading file A in pointGdp, and file B in archiveGdp.
and the calls to the mantra functions are like this,

FOR_ALL_GPOINTS(&pointGdp,pointPtr)
{
pointPos = pointPtr->getPos();
xform.identity();
xform.translate(pointPos.x(),pointPos.y(),pointPos.z());

openGeometryObject();
setTransform(xform,0);
addGeometry(archiveGdp, 0);
setSurface(“showst type st”);
closeObject();

}

The problem I am facing is, the object translation is happening in
screen space and not world space. Is there any other special function,
other than “setTransform” to do that???

Even I tried using xform.translate(i,0,0); and incremented “i” each time,
just to check, and it is getting translated in screen space.

Plz Help
iamjaideep80 (Jaideep Khadilkar)
User Avatar
Member
1002 posts
Joined: July 2005
Offline
You might want to use the queryTransform() function to retrieve the existing transform (the one on the geometry object in Houdini) and then apply your translation to that. The default space for transforms in mantra is camera space, so the identity will place an object at the eye point.

Andrew
  • Quick Links