iamjaideep80 Posted February 28, 2007 Share Posted February 28, 2007 Hi Everybody.... There is a strange problem I am facing while creating VRAY procedure. My VRAY code takes two inputs. A source Geometry and a Template Geometry. And copies source geometry on each point of template geometry. It is same as Copy SOP but only a VRAY procedure. Inside the code, I am using "queryObject" and "queryGeometry" to get pointer to gdp. Here sgdp is Source_Geometry and tgdp is Template_Geometry. The code is like, for(i=0;i<tgdp->points().entries();i++) { ppt = tgdp->points()(i); gdp->clearAndDestroy(); gdp->merge(*(GU_Detail *)sgdp); xform.identity(); xform.translate(ppt->getPos().x(),ppt->getPos().y(),ppt->getPos().z()); gdp->transform(xform); final_gdp->merge(*(GU_Detail *)gdp); } And I am using final_gdp as the output. Now the thing is, The code compiles normally and renders properly when my camera is somewhere near to the template object. As my Camera moves around, the x,y,z values of template points sometimes show correct values and renders properly and sometimes the values are wrong and doesn't render the object(or may be the object moves out of screen because of the values)..I checked it using console. I don't know why the values are changing as my template object is static. What is the problem with getPos. According to my knowledge it returns the world position, so the camera position should not matter. ----iamjaideep80 Jaideep Khadilkar TD, Sciclone Motion Graphics Quote Link to comment Share on other sites More sharing options...
iamjaideep80 Posted February 28, 2007 Author Share Posted February 28, 2007 HI...... Is the problem related to LOD parameter passed to render function. Because LOD is the only parameter that changed as the camera changes. I commented all code that was modyfying anything and only checked the point pos x,y,z for my Template Geometry. But still it is changing as I change my camera. The problem is with getPos function. Thats for sure. Is LOD affecting the getPos function. I am not using lod in my code anywhere... ----iamjaideep80 Jaideep Khadilkar TD, Sciclone Motion Graphics Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.