Jump to content

Search the Community

Showing results for tags 'sop'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Lounge/General chat
    • Education
    • Jobs
    • Marketplace
  • Houdini
    • General Houdini Questions
    • Effects
    • Modeling
    • Animation & Rigging
    • Lighting & Rendering
    • Compositing
    • Games
    • Tools (HDA's etc.)
  • Coders Corner
    • HDK : Houdini Development Kit
    • Scripting
    • Shaders
  • Art and Challenges
    • Finished Work
    • Work in Progress
    • VFX Challenge
    • Effects Challenge Archive
  • Systems and Other Applications
    • Other 3d Packages
    • Operating Systems
    • Hardware
    • Pipeline
  • od|force
    • Feedback, Suggestions, Bugs

Found 126 results

  1. Hello, I have a few questions about vop nodes in mat context. I have no trouble with vops in sop, but things seem to fall apart in /mat (FYI I am working inside a material builder). 1. Is it possible to access @ptnum and @primnum? It doesn't seem to work 2. Some binds just don't seem to work. If I do the same bind in /obj vop context, it works perfectly, but binding it in /mat material builder doesn't. Why would it not work in the /mat context when the nodes are the same? 3. If the vop asks for a file and I use op: to get data from a node in /obj, it does not work and says error finding geometry. But if I do the same thing in /obj in a vop network, it works perfectly fine 4. In /obj in a vopnetwork, you can access the input from the geometry vop global parameter node. If the vop node asks for a file, you can wire it into opinput 1. How do you do that in /mat? What if I want to access the geometry to which the shader is applied? It's asking for a file, but I just want to use the geometry to which that shader is applied. Thanks
  2. Really having trouble with this / understanding the new workflow. If I have a fractured sphere and a static box what is the correct way to create glue constraints between each object and have them work with the new sop level solver? Seems like I am only able to create constraints that work by breaking objects. What if I just want to glue two shapes together? Any help will be hugely appreciated.
  3. 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
  4. Random File to Point

    Hey guys, new user here. I have a folder of objects built and exported from Houdini, and a bunch if random points scattered on a surface. I'd like to copy a different file to each point based on an index attr. I've gotten it to work using packed disk prims but not as full geo. The issue with packed disk prims is I loose all the existing attrs and groups in the files. Perhaps I'm going about this all wrong because it seems like there should be a simple solution. Any help you guys can give would be thrilling!
  5. How to remove points from render

    I was following a tutorial from @librarian (a nice dude) but i stepped on the following problem: the points render and at sop level appear. I have everything exactly the same on my proyect as the tutorial and still they appear on sop so they end up rendering It should look like this: My proyect grilla3.hip Model solu2od.hipnc Thanks a lot
  6. Hello; Is there any SOP node, or VEX function that can check if it's connected input object is a Curve or Volume or Polygon or Nurbs ...? Thanks.
  7. Hi! I'm loading an .obj file that contains multiple pieces of geometry(with different names). I want to apply Boolean to every pair of them, to union them into one big object. I'm assuming I'll probably need to use the for loop somehow, but I can't seem to figure it out. Can you help me out?
  8. 皆さん、はじめまして! 私は単純な問題に苦しんでいます。 私がやりたいのは、エリアに入るときにcopyAreaを恒久的に1に修正することです。 現在、ポイントWrangleで属性をコピーしようとしていますが、copyareaはareaと同期して0です。 サンプルシーンをアップロードしたので、ご覧ください。 あなたの意見を聞きたいです。 copyAttribute.hiplc
  9. Hi guys, I wanted to ask how can I achieve the following result: I have points scattered along a surface, on wich I have various noises affecting the color attributes of said points. What I want is for the points that are in the "red" zone to not move at all, and for the points in the "blue" to find the closest RED neighbour, and move towards it, controlled by a slider for me to animate. Seems easy enough, but alas, I am stuck. I wrote a point wrangle that does the job - well, sort of. The points are separated correctly, but I can't find an efficient way to attract them to the closest "red" neighbour. Most of them move, but not in a complete way as to seem as pure attraction. This is what I 've got so far: int nearpt = pcfind(0, "P", @P, chf("neighbourRad"), 2)[1]; i@nearpt = nearpt; string @INstatic = ""; //to separate the points in teams if (@Cd >= ch("color_tolerance")) { @INstatic = "yes"; @Cd = {1,0,0}; } else if (@Cd < ch("color_tolerance")){ @INstatic = "no"; @Cd = {0, 1, 1}; } //find closest points int ptneighbours [] = pcfind(0, "P", @P, 10, 1000); i[]@ptneighbours = ptneighbours; foreach(int j; i[]@ptneighbours) { s@affected = point(geoself(), "INstatic", j); if ( @affected == "yes") { @nearpt = j; v@nearPos = point(0, "P", @nearpt); } else { v@nearPos = point(0, "P", @nearpt); } } //move only blue closest points if( @INstatic == "no") { @P = lerp(@P, @nearPos, chf("percentcomplete")); } Any help would be more than appreciated, G.
  10. DOP not keeping the dent done in SopSolver

    Hello, Alberto here! I've been following many tutorials and checking many examples in Houdini Help but after some days I'm getting a bit lost with this. I'm trying to do modifications to points in a geometry using an extra solver, during a Dop RBD simulation. I've tried to reproduce other working examples that I've found over the web but when I do it by myself, is not working. I want the extra solver to keep the denting based on impacts during the simulation. I read and saw examples about "Unpack - Do The Operations - Reassemble" inside the extra SopSolver and that's what I've tried to do in the attached file. I get the dent only in the frame of impact, not keeping at all any of the deformations during the rest of the simulation. I'm not asking for "fixing the file", I'm more into understand what I'm doing wrong and why. Anyway, Fix the file will help Thanks everybody in advance! Metaballdent_extrasolver.hipnc
  11. Hi guys, I'm trying to learn a bit more about geometry creation and manipulation in vex. I've been attempting to create a simple grid with lines moving along in one direction. Once the line reach the end of the grid, it moves back to the other end. Like a treadmill. I've been able to create some stuff with addvertex and addprim in a for loop, but nothing nice and procedural. Anyone have an elegant solution to this? Thanks
  12. I'm using about 1000 points in a point wrangle SOP as seeds to generate lines, totalling about 20,000,000 points... performance seems almost single threaded, which I assume is due to the creation of new geo. Is there any way I can speed it up? Here's the code in question if anything obviously jumps out: // trace lines through nested velocity volumes void stepRK4(vector pos; const int prim; const float dt; const vector V0; float dir) { vector V1 = volumesamplev(1, prim, pos + (0.5 * dt) * V0) * dir; vector V2 = volumesamplev(1, prim, pos + (0.5 * dt) * V1) * dir; vector V3 = volumesamplev(1, prim, pos + dt * V2) * dir; pos += (dt / 6) * (V0 + 2 * (V1 + V2) + V3); } void step_forward(vector pos; float dir) { float dist = length(pos); // There are volumes at 5 levels of detail, starting from the origin. This distance metric chooses which to sample from int prim = int(max(log(dist / 8. * 2) / log(4) + 1, 0)); // advection step based on the voxel size float vd = volumevoxeldiameter(1, prim); float dt = vd * 2; vector vel = volumesamplev(1, prim, pos) * dir; stepRK4(pos, prim, dt, vel, dir); } int steps = 10000; int pr1 = addprim(geoself(), "polyline", @ptnum); int pr2 = addprim(geoself(), "polyline", @ptnum); vector pos1 = @P; vector pos2 = @P; for (int i=0; i<steps; i++) { step_forward(pos1, 1); if (length(pos1) >= 1 && length(pos1) < 1000) { int newpt1 = addpoint(0, pos1); addvertex(geoself(), pr1, newpt1); } step_forward(pos2, -1); if (length(pos2) >= 1 && length(pos2) < 1000) { int newpt2 = addpoint(0, pos2); addvertex(geoself(), pr2, newpt2); } }
  13. Hey everyone, just starting out with Houdini and trying to wrap my head around some effects I can produce, but I've hit a big of a snag when it comes to using a solver SOP on my animated model. The idea is that the model will be falling through the sky, and whenever a part of his body passes through some cloud, that part of the body will dissolve into cloud as well. So the the cloud points will trigger the body points whenever they get close enough. I'm using a solver SOP, having the points in the clouds use a PCFind node to trigger an attribute change in the points in the model. However, I have an issue when choosing the Import style for the solver's Prev_Frame. If I use Fetch Geometry from DOP Network, the model's animation freezes (in and outside of the solver) and nothing can proceed. If I use Transform Input Geometry, the animation resumes, but nothing seems to solve from the previous frame. I've attached a version of the file that has the some limited success in making the body dissolve, but the points snap back to the falling body as soon as they exit the cloud, and I have no idea how to proceed. Any clues on how to approach this problem would be greatly appreciated! CloudDive.zip
  14. Hi guys, wonder if anyone could help me. A bit new to Houdini and learning a bit of vex and the solver sop. I followed along with an Entagma tutorial on intersecting lines that build up interesting grid like shapes. Was looking at trying to get all the point movements to move non-linearly instead of in straight lines. I figured instead of of just giving the points a random initial direction vector, could use sin/cos(time) as the directions within the solver, add a point and a poly line on each frame to get the curved lines, but can't seem to get it working at all. Any help would be much appreciated! attached my hip file from the tutorial straight line setup here. thanks Intersecting_Lines.hiplc
  15. 凸幾何学をどのように埋めますか? 写真は悪い方法です
  16. I want to make Voronoi like the picture. Can I have some help please?
  17. SOP Solver and DOP import help

    Hello all! I have a question concerning SOP Solvers in an Auto DOP Network. Im using SOP Solvers and switches to activate fracture geometry at certain times. I am trying to activate a second RBD object in the scene. Inside my SOP solver how do I specify which object the DOP import node fetches from the network? My_Scene.hipnc
  18. Hello. Per this link I can use GU_PrimPacked::build to create a packed primitive inside some detail. But I'm not sure how or where I can add the geometry I want inside the packed primitive. Hopefully that makes sense. Thank you.
  19. How to project a grid onto another model

    I want to stick a grid completely to another complex geometry, just like a uv map. I tried the ray node, but maybe I don't know how to use it, so I didn't see the results I expected. What should I do?
  20. Hi ! I'm pretty newb in Houdini and after a few months of training myself I'm trying now to create my own setup. Here I want to move points from a grid randomly to x or y position. A random value is generated every seconds to change the direction and the axis of the next move of each point. I already understand it must be completed with a solver sop, but I can't understand why amplitude is multiplied when I move points into the solver. I need to scale down a lot the movement. Anyone can tell me why ? Or just take a look to my project file here. Could be nice to have a little help to understand this issue. Thanks Dot_Grid.hiplc
  21. Custom attract

    Hi I am trying to create a custom attraction tool using popvops. Its a method I learnt doing a houdini course I would like to improve on it but I have been stuck on it forever. Instead of using a pop attract we are using a popvop to calculate the distance of the particles to a point in space and making them move to this point, if I am using a single point to attract them to its working fine, but what I would like to do is to attract them to multiple points ie a mesh. I have tried using the importpoints but that just makes them go to origin. I would like them to move to the rubber toy. Any advice would be appreciated. I have attached the file and the particle stream I am using to test. Cheers Particles.72.bgeo.sc attraction test.hiplc
  22. Hi, I just want to do it for experimentation. What's the best way to break up the edges of a pyro sim post sim with or without rest fields, and avoid swimming noise? If I have dual rest fields, do you combine them using a Mix node where the connections are rest, rest2 fields and rest2_ratio as the bias? Because there is also rest_ratio attribute. After this, do you displace the density volume using velocity field, gradient of the density or gradient of the SDF converted from density? Also negate the direction? I read here some people advising to use gradient or velocity to the position of the noise for example. Lastly which noise is more suitable for this task? Thanks a lot
  23. Hello, I'm trying to use voronoifracture node and found that it's different from the previous version(H16.5). So I imported to H17 from my old project made with H16.5 and now I have two different SOP named same. Is there any way to create the old voronifracture node in H17? One on the left side is new voronoifracture node in H17, and the right one is imported from my project made with H16.5. Thanks in advance!
  24. Hi everyone, I'm trying to make each connected points(@class) being deleted overtime when they above XZ plan. I made a bounding sphere for each @class and copy to itself with decreasing @pscale when it's above the plan. And delete the points outside the sphere. It works well when I set it to "single pass" but it works totally wrong when merges all iterations together... I have attached an example file below, it'll be fantastic if someone can help me out with this. sopsolver_in_loop.hip
  25. Hi, I have several meshes and a point and I would like to find primitives/points, the normals of which are directed to that point. To make it so I want to get vectors (and store them as an attribute) from that point to each of the points of these meshes and then compare them to its normals. But the first part doesn't work as I expected, what am I doing wrong? Or should it be done in a different way? facing_to_q.hipnc
×