OP_ERROR MapResample::cookMySop(OP_Context& context) { OP_AutoLockInputs inputs(this); if (inputs.lock(context)>= UT_ERROR_ABORT) return error(); fpreal now = context.getTime(); duplicateSource(0, context); setVariableOrder(3,2,0,1); setCurGdh(0, myGdpHandle); setupLocalVars(); fpreal target = evalFloat("target", 0, now); target /= gdp->getNumPoints(); GA_RWHandleV3 pos_h(gdp->getP()); if (!pos_h.isValid()) return error(); UT_Array<GA_Offset> pointsToDelete; GA_Range pts_range = gdp->getPointRange(); GA_Size numPoints = pts_range.getMaxEntries(); for (GA_Iterator it(pts_range); !it.atEnd(); ++it) { GA_Offset ptoff = *it; GA_Index idx = gdp->pointIndex(ptoff); myCurPtOff[0] = ptoff; if (idx ==0 || idx == numPoints-1) continue; UT_Vector3 curPos = pos_h.get(ptoff); if (idx + 2 >=numPoints) continue; GA_Offset nextOffset = gdp->pointOffset(idx+1); UT_Vector3 nextPos = pos_h.get(nextOffset); GA_Offset secondNextOffset = gdp->pointOffset(idx+2); UT_Vector3 secondNextPos = pos_h.get(secondNextOffset); UT_Vector3 edge1 = curPos - nextPos; UT_Vector3 edge2 = curPos - secondNextPos; UT_Vector3 crossVector = cross(edge1, edge2); fpreal area = crossVector.length() /2.0f; if (area< target) { pointsToDelete.append(ptoff); } } for (GA_Offset i = 0; i < pointsToDelete.size(); i++) { gdp->destroyPointOffset(pointsToDelete(i)); } resetLocalVarRefs(); triggerOutputChanged(); return error(); }
Found 15 posts.
Search results Show results as topic list.
Technical Discussion » HDK local variables and updating the Viewport
- getuffassassin11
- 7 posts
- Offline
Hello, I have been trying to implement a resampling function with the hdk. I used the SOP/SOP_Flatten.C example as a reference which has a helpful comment about using local variables and the viewport. However, I still cannot get the viewport to update when deleting points, i.e, updating my parameter. I can see the geometry spreadsheet update, but when the display flag is on the C++ node, the viewport does not update, I was wondering if anyone has encountered this issue and has any suggestions. Any help?
Edited by getuffassassin11 - yesterday 03:44:35
Work in Progress » APEX Lego 2D face rig
- MatijaK
- 12 posts
- Offline
Houdini Indie and Apprentice » How would I pull this creature off
- cncverkstad
- 155 posts
- Offline
Assuming That you know How to make groups and UV's in Zbrush for that Wing (Dragon) use this file and I think its not complicated to make that Membrane. Try ... You can make membrane using Groom , you can use also Vellum , you have endless Solution in Houdini for this , use scatter and connect adjacent smooth and polywire...Or just Post that Wing with correct Uv's .
you can use Particles with minPose on that Uv's and make diff variation based on Noise Cd and Rest .
you can use Particles with minPose on that Uv's and make diff variation based on Noise Cd and Rest .
Edited by cncverkstad - yesterday 06:52:34
Technical Discussion » Kine FX stop foot clipping through ground
- lloydwood
- 107 posts
- Offline
Hello,
I'm new to KineFX. Ive managed to get 3 fbx animation blending together ok with motionclips and motionclipsequence SOPs. However, when the blends happen, the character's feet clip through the ground. What's the best way to fix this? I tried a motionclipextract and setting the feet joints to 0 in Y but the motionclipupdate would apply the change to a motionclipsequence output.
I'm new to KineFX. Ive managed to get 3 fbx animation blending together ok with motionclips and motionclipsequence SOPs. However, when the blends happen, the character's feet clip through the ground. What's the best way to fix this? I tried a motionclipextract and setting the feet joints to 0 in Y but the motionclipupdate would apply the change to a motionclipsequence output.
Houdini Indie and Apprentice » MaterialX Basic Questions
- catchyid
- 42 posts
- Offline
Hello,
Just started to learn materialX and shading, and I have super basic questions:
1) Can I save .mltx material directly from Houdini, let's say I want to save a materialX shading network created in Houdini and load in other app?
2) Are there any "artist" friendly demos/tutorials on MaterialX (even outside Solaris/Houdini)? For example: This is how you setup glass or metal with scratches in MaterialX. PS: I found some tutorials but they are basic, eg create "mtlx standard surface" and add textures to base colors, roughness, etc.
Thanks for helping
Just started to learn materialX and shading, and I have super basic questions:
1) Can I save .mltx material directly from Houdini, let's say I want to save a materialX shading network created in Houdini and load in other app?
2) Are there any "artist" friendly demos/tutorials on MaterialX (even outside Solaris/Houdini)? For example: This is how you setup glass or metal with scratches in MaterialX. PS: I found some tutorials but they are basic, eg create "mtlx standard surface" and add textures to base colors, roughness, etc.
Thanks for helping
Technical Discussion » Simplest Payload Setup
- antc
- 338 posts
- Offline
From your description I can't quite tell what stages of your workflow are asset construction (payload unloading/loading not relevant so much), versus using your asset in a shot or scene (with payloads loaded or unloaded).
Hopefully the attached file helps, just run the two rop nodes from left to right.
Hopefully the attached file helps, just run the two rop nodes from left to right.
Houdini Indie and Apprentice » How would I pull this creature off
- dparcell87
- 9 posts
- Offline
Alright, very informative and thank you for the reply. What tutorials would I need to check out to learn all this as a m new to Houdini and scatter brained as of now. I know gnomon has a grooming one but then yeah I’ve seen vellum as an option, which do you think would be better? Thanks again for help as I’m getting somewhere now.
Houdini Indie and Apprentice » MaterialX Basic Questions
- Enivob
- 2628 posts
- Offline
Houdini Indie and Apprentice » Questions on Resample node
- zooropa
- 25 posts
- Offline
Hi. I am using a shortest path node and a fuse node afterwards, which leaves me with 1600 points on the mesh. When I add a resample node with everything inactive (I use it only to get the curveu attribute), the points increase to 260k.
Why do I get an increase in points when no resampling option is active? The viewport does not show any visible change.
The second question is in regards to activating the resampling options of the node:
You can notice that I get overlapped edges, almost like a spiderweb at some mesh areas.
I am not sure why resampling contributes to overlapping edges when the original mesh "looks" clean; I am just trying to increase equidistant points, but I get an irregular distribution of points with multiplication of edges on top of each other.
Is it possible that the shortestpath + fuse displaying clean edges does not show that I have several overlapping edges, and when I resample, they become visible?
Thank you
Why do I get an increase in points when no resampling option is active? The viewport does not show any visible change.
The second question is in regards to activating the resampling options of the node:
You can notice that I get overlapped edges, almost like a spiderweb at some mesh areas.
I am not sure why resampling contributes to overlapping edges when the original mesh "looks" clean; I am just trying to increase equidistant points, but I get an irregular distribution of points with multiplication of edges on top of each other.
Is it possible that the shortestpath + fuse displaying clean edges does not show that I have several overlapping edges, and when I resample, they become visible?
Thank you
Edited by zooropa - yesterday 13:09:28
Rigging » How to make a parentConstraint in Apex ?
- MatijaK
- 12 posts
- Offline
I'm trying to create a simple reverse foot like effect, for both legs together of my LEGO character in APEX. In the attached HIP file, I made an example using KineFX with parentconstraint, but I'm struggling to reproduce it in APEX. Any help is appreciated
Image Not Found
Edited by MatijaK - yesterday 14:07:15
Houdini Indie and Apprentice » Questions on Resample node
- tamte
- 8833 posts
- Offline
zooropaThis is exactly what causes both of your issues
Is it possible that the shortestpath + fuse displaying clean edges does not show that I have several overlapping edges, and when I resample, they become visible?
Shortest path is likely to produce overlapping paths especially because many paths end up travelling through the same edges before eventually diverging
Fuse just fuses the points but the amount of curves will not change so the overlapping segments prevail
Resample even without resampling likely makes points unique per curve to be able to store curveu since if points are shared among multiple curves then a single point would have to store multiple different curveu values
So to clean up your geo you can append Convert Line SOP + Poly Path SOP after your Fuse
That will make sure each path is a single curve at least up to the branching point
Then Resampling to should behave better
But instead of using Resample to also compute curveu, I'd recommend Edge Transport, to get some real distance attribute for curve network rather than notmalized curveu per curve as those will be just segments between branching points
Edited by tamte - yesterday 14:33:07
Technical Discussion » Simplest Payload Setup
- revilo3d
- 30 posts
- Online
Thanks Antc,
Appreciate the file, and settled on something pretty similar! Interesting use of the empty sublayer node. I see it setting load payloads to off, and controlling that for the whole stage?
Why does simply setting a reference node to payload for the usd file still do nothing. I'm very confused about that.
My expection is with viewport payloads off:
Reference > ReferenceType > Reference File = A Reference (not treated as a payload)
Reference > ReferenceType > Payload = An unloaded Payload (and turned on and off using viewport masks)
Seems like one can't have a usd file that supports acting behaving as either reference or a payload. Shouldn't payloading purely be a loading behaviour when we call on the usd file?
Inside the usd file it switches between:
prepend references = @D:/downloads/geo/sphere.usd@</Sphere>
prepend payload = @D:/downloads/geo/sphere.usd@</Sphere>
But both show just the bounds until I load payload :S
Appreciate the file, and settled on something pretty similar! Interesting use of the empty sublayer node. I see it setting load payloads to off, and controlling that for the whole stage?
Why does simply setting a reference node to payload for the usd file still do nothing. I'm very confused about that.
My expection is with viewport payloads off:
Reference > ReferenceType > Reference File = A Reference (not treated as a payload)
Reference > ReferenceType > Payload = An unloaded Payload (and turned on and off using viewport masks)
Seems like one can't have a usd file that supports acting behaving as either reference or a payload. Shouldn't payloading purely be a loading behaviour when we call on the usd file?
Inside the usd file it switches between:
prepend references = @D:/downloads/geo/sphere.usd@</Sphere>
prepend payload = @D:/downloads/geo/sphere.usd@</Sphere>
But both show just the bounds until I load payload :S
Houdini Indie and Apprentice » Swirly Multi-colored Glass
- GregBollella
- 41 posts
- Online
Advice needed: Any ideas on how I might approach creating objects like these marbles? I have tried Vellum Softbodies, Flip Sims, and Vellum Cloth but nothing seems to give me good results. Could be my inexperience, of course. Any suggestions for how I might approach this would be greatly appreciated!
Edited by GregBollella - yesterday 17:00:31
Houdini Indie and Apprentice » How would I pull this creature off
- gordig
- 55 posts
- Offline
Grooming and Vellum are not mutually exclusive. Grooming refers to creating and manipulating hair/fur, and Vellum is a physics simulation system. Regardless of how you end up creating the webby membranes, you'll probably want to Vellum simulate them.
Technical Discussion » Simplest Payload Setup
- antc
- 338 posts
- Offline
revilo3d
Why does simply setting a reference node to payload for the usd file still do nothing. I'm very confused about that.
My expection is with viewport payloads off:
Reference > ReferenceType > Reference File = A Reference (not treated as a payload)
Reference > ReferenceType > Payload = An unloaded Payload (and turned on and off using viewport masks)
The behavior I'm seeing from Step 2 in the file I attached is that when the reference lop is configured to "Payload File" it's possible to load/unload in the viewport. Sorry if I'm misunderstanding.
Edited by antc - yesterday 23:15:49
-
- Quick Links