Jump to content

amin.khormaei

Members
  • Content count

    23
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won

    1

amin.khormaei last won the day on March 5 2013

amin.khormaei had the most liked content!

Community Reputation

5 Neutral

About amin.khormaei

  • Rank
    Peon
  • Birthday 04/23/1986

Personal Information

  • Name
    amin
  • Location
    iran,bushehr

Recent Profile Visitors

1,350 profile views
  1. Thank you for your explicit answer
  2. 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
  3. 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
  4. pyro with speedy particle problem

    nope , this is just a simple emitter
  5. 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
  6. 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
  7. 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
  8. 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
  9. Houdini cloud to open vdb

    how can i convert houdini cloud to open vdb? best regards..
  10. 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.
  11. making detail in pyro by displacement

    thank you. but this is not what i'm looking for
  12. 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
  13. hi guys i test everything to enable self shadow for smoke which created by burn or heat in flames and the others except billowy smoke. i checked the billowy smoke and i found it doesn't use pyro shader , and i used depth map shadow and nothing happened . any tips? best regards.
  14. ("../something" , something else)

    hello?
  15. i wonder when you write this expression ("../something" , something else) in a section what do you tell houdini to do? please help me? i don't know what users call this , if i have knew this i have referred to houdini help. if someone could help me with more detail i'll appreciate you, best regards...
×