This is a vex snippet and not an hscript expression so you cannot use $F.
Use @Frame (or @Time so that your animation is not framerate dependant).
docs [www.sidefx.com]
Found 37 posts.
Search results Show results as topic list.
Houdini Indie and Apprentice » sin wave animating pscale
- Nicolas Longchamps
- 37 posts
- Offline
Houdini Indie and Apprentice » Modeling Tips & Questions
- Nicolas Longchamps
- 37 posts
- Offline
Just think of your node network as a construction history that you never flush, and is also non-linear…
Make use of subnets to keep things sane, and you can always “freeze” your model by writing out as a bgeo and reading it back in. Or use the lock node which essentially freezes everything upstream from that node, and saves that geometry state in your hip file. This is interesting because it's like a history you can “unfreeze”.
Make use of subnets to keep things sane, and you can always “freeze” your model by writing out as a bgeo and reading it back in. Or use the lock node which essentially freezes everything upstream from that node, and saves that geometry state in your hip file. This is interesting because it's like a history you can “unfreeze”.
Houdini Indie and Apprentice » getting HDA error, reference node outside subnet
- Nicolas Longchamps
- 37 posts
- Offline
Even with relative paths the materials would still be outside of the HDA, no? If you are referencing materials you need to pack them into the HDA in a material network, and use relative paths to the materials in there. That, or expose the path to the materials as parameters.
Edited by Nicolas Longchamps - April 1, 2020 21:16:04
Houdini Indie and Apprentice » Dot Product and VOP Noises
- Nicolas Longchamps
- 37 posts
- Offline
Yes, by using the SDF gradients.
Given an SDF, you can do a dot of a vector (up in your case, 0,1,0) with the gradient of the distance field.
Given an SDF, you can do a dot of a vector (up in your case, 0,1,0) with the gradient of the distance field.
Houdini Indie and Apprentice » Bevel by Cluster Attribute
- Nicolas Longchamps
- 37 posts
- Offline
Houdini Indie and Apprentice » how to mesh different sources in the same flip sim
- Nicolas Longchamps
- 37 posts
- Offline
I looked at your scene. I had no problems separating the streams so i'm not sure what you meant there.
The problem i think you're having is with the VDBs and resurfacing process where the inner cavity disappears when the outer liquid fully encloses the inner one. So instead of having a shell you have a blob.
To fix this i took only the flip particles (int the particle_fluid obj) and split the streams. Each stream connects to a ParticleFluidSurface node that is set to output Surface VDB. Then using a VDBCombine, i subtract the inner VDB from the outr VDB (SDF Difference).
The inner VDB you can use as is.
Both VDBs are then converted to poly or polysoup using ConvertVDB. At this point, if necessary, you can transfer necessary attribs (velocity, color, etc) from the original sim.
The problem i think you're having is with the VDBs and resurfacing process where the inner cavity disappears when the outer liquid fully encloses the inner one. So instead of having a shell you have a blob.
To fix this i took only the flip particles (int the particle_fluid obj) and split the streams. Each stream connects to a ParticleFluidSurface node that is set to output Surface VDB. Then using a VDBCombine, i subtract the inner VDB from the outr VDB (SDF Difference).
The inner VDB you can use as is.
Both VDBs are then converted to poly or polysoup using ConvertVDB. At this point, if necessary, you can transfer necessary attribs (velocity, color, etc) from the original sim.
Houdini Indie and Apprentice » Best workflow for importing an image and model it?
- Nicolas Longchamps
- 37 posts
- Offline
- In a geo node : Load an image in a file node and it will create an image plane. I think the size is 1 unit == 1 pixel. The resulting object is a 2D volume you can manipulate as you wish.
- In a geo node : Use a cop2net node. Load image in there. Result is roughly the same as above, but you'll have a bit more options like gamma, resolution and obj type. etc. You can also edit the image in the COP as needed.
- Load images into your network view. Use ctrl-i to arrange them. I like this method a lot for reference images im not using directly for modeling.
- In a geo node : Use a cop2net node. Load image in there. Result is roughly the same as above, but you'll have a bit more options like gamma, resolution and obj type. etc. You can also edit the image in the COP as needed.
- Load images into your network view. Use ctrl-i to arrange them. I like this method a lot for reference images im not using directly for modeling.
Houdini Indie and Apprentice » controlling voxel size in vdb from polygon
- Nicolas Longchamps
- 37 posts
- Offline
You can have multiple VDBs with different resolutions but voxel size is constant in a single VDB. What you might be looking for is a VDB mask to localize the blurring.
Houdini Indie and Apprentice » Scatter 250 rocks using HF scatter
- Nicolas Longchamps
- 37 posts
- Offline
The way i usually load files from disk, assuming they are in the same folder:
- use a python node to read from a directory, create a point per file found that i want with the path and name as point attributes.
Then a for loop, iterate over points. For each point load the file given the path in the point's attrib. Load directly or as packed disk prim. Add class or name attrib based on loop iteration.
The HF Scatter node allows to define pieces by attribute. However i found name attribute doesn't work, so it possibly doesn't like string attribs. Use an integer attrib like class. Using this method you can scatter your 250 objects in one pass.
One bug i found however is that the point relaxation is done before object instancing, so i think the relax does not take into account the actual instance size, just the scale value in the “variability” section. Im not sure how to fix that without cracking open the scatter tool.
- use a python node to read from a directory, create a point per file found that i want with the path and name as point attributes.
import os node = hou.pwd() geo = node.geometry() #get dir contents dir = node.evalParm('pPath') # from path parm dirContent = os.listdir(dir) #create pt attribs attribPath = geo.addAttrib(hou.attribType.Point,'filePath','') attribName = geo.addAttrib(hou.attribType.Point,'fileName','') #loop over dir contents for f in dirContent : p = os.path.join(dir,f) #make sure it is a file and type is bgeo if os.path.isfile(p) and os.path.splitext(p)[1] == '.bgeo': pnt = geo.createPoint() pnt.setAttribValue(attribPath, os.path.abspath(p) ) pnt.setAttribValue(attribName, f )
Then a for loop, iterate over points. For each point load the file given the path in the point's attrib. Load directly or as packed disk prim. Add class or name attrib based on loop iteration.
The HF Scatter node allows to define pieces by attribute. However i found name attribute doesn't work, so it possibly doesn't like string attribs. Use an integer attrib like class. Using this method you can scatter your 250 objects in one pass.
One bug i found however is that the point relaxation is done before object instancing, so i think the relax does not take into account the actual instance size, just the scale value in the “variability” section. Im not sure how to fix that without cracking open the scatter tool.
Houdini Indie and Apprentice » Flat Road projected onto surface / topography
- Nicolas Longchamps
- 37 posts
- Offline
Project only the center of your road onto the terrain. then extend the sides. Or if you road mesh is already done, project the center of the cross sections, leaving them flat. Then project the heightfield to the road to adapt the terrain.
Edited by Nicolas Longchamps - Nov. 4, 2019 13:22:48
Houdini Indie and Apprentice » View simulation in Scene View when outside of DopNet
- Nicolas Longchamps
- 37 posts
- Offline
In the Scene View, there's a pin next to the path bar. This path is what you are currently viewing. Just pin it when inside the DOP and it should stay there a you navigate elsewhere in your graph.
Houdini Indie and Apprentice » Change default path in File Cache
- Nicolas Longchamps
- 37 posts
- Offline
In the parameters panel of any node there is a gear icon next to the name field and expression language selector. Click on that and you will get a drop down menu. There is a section for saving presets and permanent defaults if you really need.
For presets, when you create a new node of the same type, you will find your defined presets at the bottom of this same menu. If you save them to your user pref dir it creates a preset folder in your houdini env folder (same as where your hda's are).
https://www.sidefx.com/docs/houdini/network/parms.html#presets [www.sidefx.com]
For presets, when you create a new node of the same type, you will find your defined presets at the bottom of this same menu. If you save them to your user pref dir it creates a preset folder in your houdini env folder (same as where your hda's are).
https://www.sidefx.com/docs/houdini/network/parms.html#presets [www.sidefx.com]
Edited by Nicolas Longchamps - Oct. 20, 2019 00:58:19
Houdini Indie and Apprentice » Export point positions and color from dds textures
- Nicolas Longchamps
- 37 posts
- Offline
Should be simple enough to convert them.
Any reason you are using .dds textures? I imagine S3 texture compression would be horrible for storing positional data. Can you output to another format with a higher bit depth? preferably float16 or 32?
Any reason you are using .dds textures? I imagine S3 texture compression would be horrible for storing positional data. Can you output to another format with a higher bit depth? preferably float16 or 32?
Houdini Indie and Apprentice » How can I make the only top of a tube look at an object?
- Nicolas Longchamps
- 37 posts
- Offline
Here's a quick example using a for-loop to bend multiple tubes in a single geo. For every point, the cylinder is copied to the current point, a direction vector is calculated from the point to the null and the bend sop is configured using the current position, goal direction and tube length.
It also uses compile block to multithread the loop and speed it up quite a bit. You can see the speed difference by disabling the compile block. It complicates the example a bit but its a good use-case for compiling.
It also uses compile block to multithread the loop and speed it up quite a bit. You can see the speed difference by disabling the compile block. It complicates the example a bit but its a good use-case for compiling.
Houdini Indie and Apprentice » Export point positions and color from dds textures
- Nicolas Longchamps
- 37 posts
- Offline
drop a COP2 sop into a geometry. Set it to points mode.
Each generated point refers to a pixel on the image plane.
Inside the cop net, load your dds images and unpack the values where necessary and output 2 planes named P and N.
The cop will write P and N to the generated point attributes.
Each generated point refers to a pixel on the image plane.
Inside the cop net, load your dds images and unpack the values where necessary and output 2 planes named P and N.
The cop will write P and N to the generated point attributes.
Houdini Indie and Apprentice » Orbolt assets not editable?
- Nicolas Longchamps
- 37 posts
- Offline
Orbolt assets are locked by the asset creator by choice. Sometimes they are left open. Sometimes the free version is locked and paid version open. Its a feature to allow HDA creators to protect their work. You can blackbox assets from within Houdini also:
Assets–>Create Black Boxed Asset from Selection.
Careful to keep your editable asset file, you wont be able to open the blackboxed version.
Assets–>Create Black Boxed Asset from Selection.
Careful to keep your editable asset file, you wont be able to open the blackboxed version.
Houdini Indie and Apprentice » Is select color to mask possible in Houdini?
- Nicolas Longchamps
- 37 posts
- Offline
You would do the keying operations in a COP2 network. Set the cop to output a volume slice on ZX plane. Generate a mask plane in the cop with your desired mask content. Then in sop combine to terrain using a heightfield layer node.
Houdini Indie and Apprentice » How can I make the only top of a tube look at an object?
- Nicolas Longchamps
- 37 posts
- Offline
Ah sorry!
The wrangle node is for setting up the direction of the object. I like setting up the attributes i need once, in a centralized location, rather than doing math in a parameter channel. In this case the desired direction is a normalized vector from the cylinder base to the null. Something like v@dir = normalize(NullPos - CylPos);
So now that wrangle node has a detail attrib called “dir” which is a vector that points to the null.
The purple line is a spare input reference. Spare inputs are a cool feature that aren't documented much. There's documentation for spares in the compile block but they are usable everywhere. It simply lets you add an input to a node.
Here the bend node has a spare input, which points to the detail wrangle node. Then i can simply refer to it in the parameter using ‘-1’ rather than a path to an external node. Normal wire inputs have indexes from 0. So a VOP for instance has inputs 0-1-2-3. Spare inputs go the other way, so -1, -2, -3, etc.
Then the bend node's direction is:
detail(-1,'dir',<index>)
get detail attrib of input -1 (linked via first spare). attrib name is ‘dir’ and use component <index> (x=0,y=1,z=2).
Note also i have one cylinder per object. The setup is different if all your cylinders are in the same geometry; you will have to setup a for-loop to handle that.
The wrangle node is for setting up the direction of the object. I like setting up the attributes i need once, in a centralized location, rather than doing math in a parameter channel. In this case the desired direction is a normalized vector from the cylinder base to the null. Something like v@dir = normalize(NullPos - CylPos);
So now that wrangle node has a detail attrib called “dir” which is a vector that points to the null.
The purple line is a spare input reference. Spare inputs are a cool feature that aren't documented much. There's documentation for spares in the compile block but they are usable everywhere. It simply lets you add an input to a node.
Here the bend node has a spare input, which points to the detail wrangle node. Then i can simply refer to it in the parameter using ‘-1’ rather than a path to an external node. Normal wire inputs have indexes from 0. So a VOP for instance has inputs 0-1-2-3. Spare inputs go the other way, so -1, -2, -3, etc.
Then the bend node's direction is:
detail(-1,'dir',<index>)
get detail attrib of input -1 (linked via first spare). attrib name is ‘dir’ and use component <index> (x=0,y=1,z=2).
Note also i have one cylinder per object. The setup is different if all your cylinders are in the same geometry; you will have to setup a for-loop to handle that.
Edited by Nicolas Longchamps - Oct. 7, 2019 10:10:51
Houdini Indie and Apprentice » How can I make the only top of a tube look at an object?
- Nicolas Longchamps
- 37 posts
- Offline
You can set the Bend node to a direction. Here's a quick setup;
Edited by Nicolas Longchamps - Oct. 4, 2019 09:33:17
Houdini Indie and Apprentice » boolean issues....
- Nicolas Longchamps
- 37 posts
- Offline
Your character looks like it's still an SDF volume. Make sure to set the vdb convert to polygons (its set to volume by default). If you want to fracture a volume you should use VDB Fracture instead.
-
- Quick Links