Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won


Everything posted by amin.khormaei

  1. what is intrinsic in VEX?

    some function like below one: setprimintrinsic() carry the intrinsic with themselves, what are they, and how we can use them?
  2. iterate over certain points

    I have this code below: i[]@TP = neighbours(0,0); foreach(int i ; @TP) { @P.y = 1; } how can I tell Houdini to just move the points insideTP array? foreach move all the points.
  3. I'm gonna use nearpoint with the position of add+transform. int point = nearpoint(0,v@opinput1_P,1); if(point == @ptnum) { @Cd = {1,0,0}; } but it doesn't work.
  4. iterate over certain points

    thank you for all answers. the simplest way was: i[]@pts = neighbours(0,0); foreach(int i ; @pts) { if(i == @ptnum) { @P.y = 1; } }
  5. iterate over certain points

    your code doesn't work
  6. volume of an object affect on your effect

    thank you
  7. volume of an object affect on your effect

    hey guys , how can I calculate the volume of an object in VEX , I want to write something like this one below: the line of your script * volume of a specific object I used getbbox_size but the result is a scalar. I want everything in the object to have the effect. what should I do? best regards
  8. volume of an object affect on your effect

    thank you so much, but you didn't get me. I want this effect (the wave) to occur inside the sphere, and outside the sphere nothing happens. the sphere act like an effector in cinema4D.
  9. volume of an object affect on your effect

    I tested that , it didn't work, could you modify my file and upload that?
  10. volume of an object affect on your effect

    this is the file , I tried several things : detailintrinsic , primintrinsic , totalvolume but I couldn't solve that Vex.hip
  11. volume of an object affect on your effect

    how can I import an attribute to wrangle from it's second input?
  12. volume of an object affect on your effect

    thank you ' i'll try that
  13. Thank you for your explicit answer
  14. hello everyone,i'm learning c++ and I'm new to Houdini HDK. I was reading another topic, someone told that you can use example files and manipulate them. so I have some questions for you: as you can see the header code and it's definition namespace HDK_Sample { /// Run a sin() wave through geometry by deforming points /// @see @ref HOM/SOP_HOMWave.C, SOP_HOMWave, SOP_CPPWave class SOP_PointWave : public SOP_Node { public: SOP_PointWave(OP_Network *net, const char *name, OP_Operator *op); virtual ~SOP_PointWave(); static PRM_Template myTemplateList[]; static OP_Node *myConstructor(OP_Network*, const char *, OP_Operator *); /// This method is created so that it can be called by handles. It only /// cooks the input group of this SOP. The geometry in this group is /// the only geometry manipulated by this SOP. virtual OP_ERROR cookInputGroups(OP_Context &context, int alone = 0); protected: /// Method to cook geometry for the SOP virtual OP_ERROR cookMySop(OP_Context &context); private: void getGroups(UT_String &str){ evalString(str, "group", 0, 0); } fpreal AMP(fpreal t) { return evalFloat("amp", 0, t); } fpreal PHASE(fpreal t) { return evalFloat("phase", 0, t); } fpreal PERIOD(fpreal t) { return evalFloat("period", 0, t); } /// This is the group of geometry to be manipulated by this SOP and cooked /// by the method "cookInputGroups". const GA_PointGroup *myGroup; }; using namespace HDK_Sample; void newSopOperator(OP_OperatorTable *table) { table->addOperator(new OP_Operator( "hdk_pointwave", "Point Wave", SOP_PointWave::myConstructor, SOP_PointWave::myTemplateList, 1, 1, 0)); } static PRM_Name names[] = { PRM_Name("amp", "Amplitude"), PRM_Name("phase", "Phase"), PRM_Name("period", "Period"), }; PRM_Template SOP_PointWave::myTemplateList[] = { PRM_Template(PRM_STRING, 1, &PRMgroupName, 0, &SOP_Node::pointGroupMenu, 0, 0, SOP_Node::getGroupSelectButton( GA_GROUP_POINT)), PRM_Template(PRM_FLT_J, 1, &names[0], PRMoneDefaults, 0, &PRMscaleRange), PRM_Template(PRM_FLT_J, 1, &names[1], PRMzeroDefaults), PRM_Template(PRM_FLT_J, 1, &names[2], PRMoneDefaults), PRM_Template(), }; OP_Node * SOP_PointWave::myConstructor(OP_Network *net, const char *name, OP_Operator *op) { return new SOP_PointWave(net, name, op); } SOP_PointWave::SOP_PointWave(OP_Network *net, const char *name, OP_Operator *op) : SOP_Node(net, name, op), myGroup(NULL) { mySopFlags.setManagesDataIDs(true); } SOP_PointWave::~SOP_PointWave() {} OP_ERROR SOP_PointWave::cookInputGroups(OP_Context &context, int alone) { return cookInputPointGroups( context, // This is needed for cooking the group parameter, and cooking the input if alone. myGroup, // The group (or NULL) is written to myGroup if not alone. alone, // This is true iff called outside of cookMySop to update handles. // true means the group will be for the input geometry. // false means the group will be for gdp (the working/output geometry). true, // (default) true means to set the selection to the group if not alone and the highlight flag is on. 0, // (default) Parameter index of the group field -1, // (default) Parameter index of the group type field (-1 since there isn't one) true, // (default) true means that a pointer to an existing group is okay; false means group is always new. false, // (default) false means new groups should be unordered; true means new groups should be ordered. true, // (default) true means that all new groups should be detached, so not owned by the detail; // false means that new point and primitive groups on gdp will be owned by gdp. 0 // (default) Index of the input whose geometry the group will be made for if alone. ); } OP_ERROR SOP_PointWave::cookMySop(OP_Context &context) { OP_AutoLockInputs inputs(this); if (inputs.lock(context) >= UT_ERROR_ABORT) return error(); duplicatePointSource(0, context); fpreal t = context.getTime(); float phase = PHASE(t); float amp = AMP(t); float period = PERIOD(t); if (error() >= UT_ERROR_ABORT) return error(); if (cookInputGroups(context) >= UT_ERROR_ABORT) return error(); GA_Offset ptoff; GA_FOR_ALL_GROUP_PTOFF(gdp, myGroup, ptoff) { UT_Vector3 p = gdp->getPos3(ptoff); p.y() += SYSsin( (p.x() / period + phase) * M_PI * 2 ) * amp; gdp->setPos3(ptoff, p); } if (!myGroup || !myGroup->isEmpty()) gdp->getP()->bumpDataId(); return error(); } my first question is: we have this int header file : SOP_PointWave(OP_Network *net, const char *name, OP_Operator *op); where is it's definition in *.c file? ----------------------------------------------------------------------------------------------------------------------------------------- my second question is: void newSopOperator(OP_OperatorTable *table) { table->addOperator(new OP_Operator( "hdk_pointwave", "Point Wave", SOP_PointWave::myConstructor, SOP_PointWave::myTemplateList, 1, 1, 0)); } why this function is void? I know because it won't return anything, but why it shouldn't? why newSopOperator's parameter is a class (i know a class is custom data type) but why? and what is table in the parameter? ----------------------------------------------------------------- BEST REGARDS
  15. Houdini HDK

    hello, nowadays I'm working on Houdini HDK I created a discord server to help each other this is the discord's link: https://discord.gg/RtNRscp and this is my blog:https://aminkhormaei1.wixsite.com/base i put solutions inside my blog. please share this post, maybe your friends are into developing a plugin for Houdini BEST REGARDS
  16. pyro with speedy particle problem

    i wanna make an explosion form particle and the particles has high speed velocity as you can see in the image the particle can not make a trail? what should i do? i set the higher substep i manipulated the motion blur in create density volume node but no proper result please help me BEST REGARDS
  17. pyro with speedy particle problem

    nope , this is just a simple emitter
  18. Creating pyro from paint

    as you can see in the picture that i attached , i wanna emit the pyro with the red color i painted on the plane . i set the value to $CR and i'm gonna use this attribute for source volume node, but i can't find any attributes in source volume node to use the attribute create node, am i wrong to do this ? is there other ways to do this? please help me best regards amin khormaei
  19. Creating pyro from paint

    thank you all , actually i connect the plane to the paint node and afterward, turned on the override color in paint node next i connect a pop network to the paint node , and i set the emission attribute to Cd and set the fluid method to set stamp point
  20. Houdini cloud to open vdb

    how can i convert houdini cloud to open vdb? best regards..
  21. Houdini cloud to open vdb

    thank you guys i figured it out but the issue that i encountered with that the quality of open is less than the original ? what's the solution? i know about step size , but step size is not my issue. please help
  22. vector question

    what is vector production good for in 3d software? what could we do by that? i know it might be stupid question. best regard.
  23. making detail in pyro by displacement

    many of us have problem for making detail in pyro by displacement in pyro shhader. i have seen many videos that their pyro effect has detail. please someone make a tutorial for how to use that ... video tutorial , pdf , webpage , even in this forum with explanation and one thing more how to create pass for pyro effect all of the tutorials and even houdini help doesn't mention that. best regards
  24. making detail in pyro by displacement

    thank you. but this is not what i'm looking for
  25. snap to surface

    is there any way to make an object live like maya's feature , i'm gonna create curve on surface not to use snap... the left is an polygon and the right nurbs . curve on nurbs is more percise. is there any way to do it on nurbs in houdini? best regards.....