Ah, it's because you don't have 1 path, its lots of little segments that happen to line up next to each other.
A polypath sop will join them all into a single primitive, then you can use facet with 'remove inline points'.
Found 895 posts.
Search results Show results as topic list.
Technical Discussion » How to remove points but keep lines?
- mestela
- 1743 posts
- Offline
Houdini Indie and Apprentice » Blend 2 separate parts of mesh animations with paint attribute (weights from 0 to 1)
- mestela
- 1743 posts
- Offline
several ways, but the easiest if you're starting out might be to generate a mask, then use it to drive a blendshape.
see the attached hip.
see the attached hip.
Houdini Indie and Apprentice » Add ramp to Dome light
- mestela
- 1743 posts
- Offline
Good question!
19.5 added light material nodes, so you can do gobos, gels, projections. I've used it in spotlights and area lights, but never thought to try it in dome lights.
It kind of works, but it's likely I'm missing a trick. You need to get uv coordinates from the light, which look like this for a spotlight:
If you do the same for a domelight, the uv coordinates are weird; it projects two infinite planes that face each other, one of them upside down:
You can swap the texture for a ramp, having seen the previous image, this odd result makes sense, the left side has the ramp going from bottom to top, the right from top to bottom:
I've played around a bit with the various nodes and options in the light filter library context, I couldn't find anything that'd give you what you need, basically polar coordinates. As far as I can tell all the other mtlx nodes to return position, normals, tangents etc are expecting geometry, not an infinite light source, so they return the domelight's pivot at best, nothing or garbage values at worst.
The best I could do was to fix the upside down bit, and squeeze the uv's so that the values returned are more reasonable. This gives you a ramp that almost looks usable, but not really:
Anyway, I've attached a hip, but I'm quietly hoping one of the karma devs will either go 'dur matt, use this node', or 'dur matt, we've added a node to the next daily build'.
19.5 added light material nodes, so you can do gobos, gels, projections. I've used it in spotlights and area lights, but never thought to try it in dome lights.
It kind of works, but it's likely I'm missing a trick. You need to get uv coordinates from the light, which look like this for a spotlight:
If you do the same for a domelight, the uv coordinates are weird; it projects two infinite planes that face each other, one of them upside down:
You can swap the texture for a ramp, having seen the previous image, this odd result makes sense, the left side has the ramp going from bottom to top, the right from top to bottom:
I've played around a bit with the various nodes and options in the light filter library context, I couldn't find anything that'd give you what you need, basically polar coordinates. As far as I can tell all the other mtlx nodes to return position, normals, tangents etc are expecting geometry, not an infinite light source, so they return the domelight's pivot at best, nothing or garbage values at worst.
The best I could do was to fix the upside down bit, and squeeze the uv's so that the values returned are more reasonable. This gives you a ramp that almost looks usable, but not really:
Anyway, I've attached a hip, but I'm quietly hoping one of the karma devs will either go 'dur matt, use this node', or 'dur matt, we've added a node to the next daily build'.
Image Not Found
Technical Discussion » Assigning Data from CSV to Geo Points
- mestela
- 1743 posts
- Offline
Here's one way, its easiest to just slurp in all the data in one hit, then slice and dice afterwards using native houdini tools.
https://www.tokeru.com/cgwiki/HoudiniPython#Read_a_csv_as_points_with_attributes [www.tokeru.com]
https://www.tokeru.com/cgwiki/HoudiniPython#Read_a_csv_as_points_with_attributes [www.tokeru.com]
Technical Discussion » How to display local coordinate gnomon of packed prim?
- mestela
- 1743 posts
- Offline
flowerpeaceful
So, to display the local coordinate frame gnomon of the packed primitive, you just gotta dive into the node called "packedprim_geo" and enable the "Display Local Coordinates" option. Easy-peasy, right? Let me know if you need any more help, dude!
I'm an idiot, where is this option? I can't see a 'packedprim_geo' node in my tab menu. Went looking in the display options, can't see anything for packed geo there either...
Technical Discussion » How to display local coordinate gnomon of packed prim?
- mestela
- 1743 posts
- Offline
*mind blown with both these solutions*
thanks for sharing you two! any day I can replace a bunch of nodes and vex with a single button click is a good day...
thanks for sharing you two! any day I can replace a bunch of nodes and vex with a single button click is a good day...
Technical Discussion » How to display local coordinate gnomon of packed prim?
- mestela
- 1743 posts
- Offline
There must be an easier way than this, but figured I'd share my method...
I like stealing tricks from kinefx. The rigpose node is a nice neat way of showing local transforms, I've used it to manipulate independent points, then copy packed geo onto them.
Here I tried it in reverse. Works, but a little fiddly, I couldn't find a sop node to extract the packed transform to instance attributes. A few things got close, but weren't quite right.
So, shapes -> assemble + pack -> transform
Then a wrangle to get the transform as a matrix3:
And that to a rigpose, you'll see little gnomons to show the axis. You can use the same trick to extract an orient...
...and then use a regular visualiser to see the axis, except of course the viewport won't let you use visualisers over packed geo. If you extract the points you'll see them. Rigpose is easier.
Bonus points for then copying the original packed geo onto the rigpose points, but didn't want to over complicate the example.
I like stealing tricks from kinefx. The rigpose node is a nice neat way of showing local transforms, I've used it to manipulate independent points, then copy packed geo onto them.
Here I tried it in reverse. Works, but a little fiddly, I couldn't find a sop node to extract the packed transform to instance attributes. A few things got close, but weren't quite right.
So, shapes -> assemble + pack -> transform
Then a wrangle to get the transform as a matrix3:
3@transform = matrix3(getpackedtransform(0,@ptnum));
And that to a rigpose, you'll see little gnomons to show the axis. You can use the same trick to extract an orient...
@orient = quaternion(matrix3(getpackedtransform(0,@ptnum)));
...and then use a regular visualiser to see the axis, except of course the viewport won't let you use visualisers over packed geo. If you extract the points you'll see them. Rigpose is easier.
Bonus points for then copying the original packed geo onto the rigpose points, but didn't want to over complicate the example.
Houdini for Realtime » How to bake textures using GPU?
- mestela
- 1743 posts
- Offline
There's nothing out of the box.
Labs texture baking uses cops, so its faster than, say, mantra, but slow compared to GPU methods.
Karma has some basic baking functionality, but its CPU only for now.
You could maybe code something in opencl/heightfields, but thats pretty advanced.
Labs texture baking uses cops, so its faster than, say, mantra, but slow compared to GPU methods.
Karma has some basic baking functionality, but its CPU only for now.
You could maybe code something in opencl/heightfields, but thats pretty advanced.
Technical Discussion » vellum cloth/hair collisions misery
- mestela
- 1743 posts
- Offline
Broadly:
-if the wireframe view is just white with wires, its too dense, especially for vellum. I reduced everything to like 10% of the polys
-things have to be vaguely plausible in terms of limitations, space to move. the cloth collided with the ground plane at y=0, which meant the grass was going to be squashed infinitely thin. that won't work. i lifted the groundplane for the cloth to 0.005 to give the grass room to breathe.
-i restored both the vellum cloth and hair constraints to their default settings, usually its a good starting place
-big one here; when chaining vellum sims, clean the geo in between. otherwise sim data from the first gets carried over to the second, breaks things. here i just used a clean sop with clean attribs enabled, so it just goes back to having @P and nothing else.
-run the sim with default settings of 1 substep, 100 collision solver iterations. If you get stretching, thats a sign to increase substeps, but make sure to lower the collision iterations accordingly. so 2 substeps + 50 collisions, 4 substeps = 25 iterations etc
-cheat wherever you can. after i swept the grass into tubes, they intersected the cloth, so i lifted that a little bit.
-if the wireframe view is just white with wires, its too dense, especially for vellum. I reduced everything to like 10% of the polys
-things have to be vaguely plausible in terms of limitations, space to move. the cloth collided with the ground plane at y=0, which meant the grass was going to be squashed infinitely thin. that won't work. i lifted the groundplane for the cloth to 0.005 to give the grass room to breathe.
-i restored both the vellum cloth and hair constraints to their default settings, usually its a good starting place
-big one here; when chaining vellum sims, clean the geo in between. otherwise sim data from the first gets carried over to the second, breaks things. here i just used a clean sop with clean attribs enabled, so it just goes back to having @P and nothing else.
-run the sim with default settings of 1 substep, 100 collision solver iterations. If you get stretching, thats a sign to increase substeps, but make sure to lower the collision iterations accordingly. so 2 substeps + 50 collisions, 4 substeps = 25 iterations etc
-cheat wherever you can. after i swept the grass into tubes, they intersected the cloth, so i lifted that a little bit.
Technical Discussion » Can Houdini convert suffix numbers to letters?
- mestela
- 1743 posts
- Offline
I'm sure there's a tidier way, but you can use python to convert numbers to chars. chr(65) will return A, chr(66) B etc.
This is a python expression in an attribute create:
This is a python expression in an attribute create:
num = pdg.workItem().intAttribValue('wedgeindex') name = pdg.workItem().stringAttribValue('name') return name+'_'+chr(num+65)
PDG/TOPs » PDG - Python list to work items
- mestela
- 1743 posts
- Offline
Well, I only needed it to expand $HFS to a path, if you're using regular paths its not required.
PDG/TOPs » PDG - Python list to work items
- mestela
- 1743 posts
- Offline
This should work in a python processor top:
import hou paths = [ '$HFS/houdini/pic/butterfly1.pic', '$HFS/houdini/pic/butterfly2.pic', '$HFS/houdini/pic/butterfly3.pic', '$HFS/houdini/pic/butterfly4.pic' ] for p in paths: new_item = item_holder.addWorkItem() new_item.setStringAttrib('texpath', hou.text.expandString(p))
Technical Discussion » how to cap a inner hole??
- mestela
- 1743 posts
- Offline
Or a hacky sops way I learned a while back.
Divide sop in 'remove shared edges' mode removes all the interior polygons, just leaving the edges on the outside of shapes. This has the effect of turning every open hole into a polygon. This'll look like a mess, but each hole is now a polygon (with a giant super ugly one for the ocean bit).
You can then use a measure sop to calculate the area of these new faces, keep only the small ones, and merge with the original mesh.
Divide sop in 'remove shared edges' mode removes all the interior polygons, just leaving the edges on the outside of shapes. This has the effect of turning every open hole into a polygon. This'll look like a mess, but each hole is now a polygon (with a giant super ugly one for the ocean bit).
You can then use a measure sop to calculate the area of these new faces, keep only the small ones, and merge with the original mesh.
Solaris and Karma » Karma - Turn Off Self Shadowing On Particular Objects
- mestela
- 1743 posts
- Offline
Setting its render visibility to primary will mean it won't cast shadows, but will still receive shadows.
Technical Discussion » Lines from attributes.
- mestela
- 1743 posts
- Offline
Technical Discussion » Remove specific word from strings {[SOLVED]}
- mestela
- 1743 posts
- Offline
Solaris and Karma » Karma - Texture Baking
- mestela
- 1743 posts
- Offline
I got this going back on the alpha with some hints (ok, a LOT of hints) from Mark Elendt.
It's fiddly, but it works:
https://www.tokeru.com/cgwiki/HoudiniLops#Texture_baking_with_Karma [www.tokeru.com]
It's fiddly, but it works:
https://www.tokeru.com/cgwiki/HoudiniLops#Texture_baking_with_Karma [www.tokeru.com]
Technical Discussion » How to create contact sheet in copnet
- mestela
- 1743 posts
- Offline
Maybe, but cops frankly isn't great for that sort of thing. You'd be better off using imagemagick for that through tops.
I have a few examples you can play with:
https://www.tokeru.com/cgwiki/HoudiniTops#Mosaic_of_all_the_things [www.tokeru.com]
I have a few examples you can play with:
https://www.tokeru.com/cgwiki/HoudiniTops#Mosaic_of_all_the_things [www.tokeru.com]
Technical Discussion » COPs sequence with varying resolution
- mestela
- 1743 posts
- Offline
Technical Discussion » Which is better to learn for Houdini and UE? C++ or Python
- mestela
- 1743 posts
- Offline
-
- Quick Links