Jump to content


Popular Content

Showing most liked content on 11/08/2021 in all areas

  1. 2 points
    or you can just plug your AO texture in the diffuse weight input.
  2. 1 point
    A simple mycelium growth simulation that works in 2D and 3D: It constantly adds points to the outer edge of point clouds (1) and favours doing so towards food (2). 1: Direction away from surrounding points: float radius = chf('radius'); int pts_max = chi('max_points'); int handle = pcopen(0, 'P', v@P, radius, pts_max); vector pos_avg = pcfilter(handle, 'P'); vector dir_avg = v@P - pos_avg; v@N = dir_avg; 2: Weighting probabilities and adding points: int pt_near = nearpoint(1, v@P); vector pos_near = point(1, 'P', pt_near); float prox = distance(v@P, pos_near); float weight_prox = fit(prox, prox_min, prox_max, 0.0, 1.0); float weight_rim = fit(length(v@N), rim_min, rim_max, 1.0, 0.0); float weight = dens * (weight_rim + weight_prox); if(nrandom('mersenne') > weight){ vector pos_add = v@P + normalize(v@N) * offset; int pt_add = addpoint(0, pos_add); addprim(0, 'polyline', i@ptnum, pt_add); } mycelium.hiplc
  3. 1 point
    This has clarified a lot for me, thank you so much for the detailed reply, greatly appreciated!
  4. 1 point
    Or use a multiply node and two RSTexture nodes inside the material blender. I'll often tint my AO passes with a solid color using this technique.
  5. 1 point
    Sphere HDA with more regular quads: Left: Normalized box with dense corner regions. Right: More regular quad mesh (see code below). // Turns unit size box into sphere // Source: http://mathproofs.blogspot.com/2005/07/mapping-cube-to-sphere.html vector pos = v@P * 2.0; float x2 = pos.x * pos.x; float y2 = pos.y * pos.y; float z2 = pos.z * pos.z; float x = pos.x * sqrt(1.0 - (y2 + z2) / 2.0 + (y2 * z2) / 3.0); float y = pos.y * sqrt(1.0 - (z2 + x2) / 2.0 + (z2 * x2) / 3.0); float z = pos.z * sqrt(1.0 - (x2 + y2) / 2.0 + (x2 * y2) / 3.0); pos = set(x, y, z); v@P = pos; konstantin.quad_sphere.1.0.hdalc
  6. 1 point
    Hi, it sounds like you're animating the meshes with a transform node and trying to export this to FBX ? That will result in a point cache. Maya will understand that (don't know about Blender, but I would think that it would work). But for other applications (especially game engines), point caches are not supported. For maximum compatibility, bones should be used. Here's three ways to animate something. Point Cache, "Geo Anim" (where the actual transform of the object is animated), and Bone Anim. Anytime you animate something from within a Geo node, it is a point cache. That green clock next to a node generally means Point Cache when exported (unless special care is applied !) Once you have something animated in this fashion, depending on the case it can go from slightly complicated to a very big pain to convert it to bones. Rigid bodies can be converted to bones (if packed. Unpacked can be harder), soft bodies without changing topologies can use Dem Bones Skinning Converter, and if you have changing topology, then I have some bad news for you.. Geo Anim is probably what you expected. If you animate a mesh in Maya, 3DS Max (and I'd imagine Blender as well), this is equivalent. Bone Anim is what you want. Thankfully, KineFX came in and made life much easier. We can animate bones in SOPs ! Getting to know how to work with it is a necessary step (I'm very much a beginner with it). (This is very probably not an ideal setup for KineFX, as I said I'm not used to it. Note that there are two bones, because with a single one, Maya was converting it to a group, and not understanding the skin.) The FBX exports for the point_cache and the bone_anim are in their geo node, and for geo_anim, look into the OUT context. Here's a scene with the three above examples (in Non Commercial - I tested on my work PC, and duplicated the setup on my home PC. You can do the same, back to Indie or whatever license that can export FBX). fbx_anim_export_examples.hipnc I hope I answered your question somewhere in there !
  7. 1 point
    Playing around with emulating some of the per-character animations that you can generate using expression in After Effects. This example is pretty much a direct lift from motionscript.com with the Javascript converted to VEX. Here are a few variations on the post processing of the Javascript scale. BBOX derived: Direct Y-axis manipulation: ap_AE_javascript_font_110421.hiplc
  8. 1 point
    Hello, Thank you for your help. I see the issue was I put a semicolon after this: if (v@Cd == set(0,1,0)).
  9. 1 point
    Finally after a very long time I stumbled upon this post and found my answer! Down the bottom of this page, user ch3 points out a very efficient way to load and randomly offset instance files. If anyone would like to see this working with Redshift proxy files, the .hip and rs proxy sequence is attached Rand_Proxy.rar
  10. 1 point
    Hey everyone! Finally finished my newest personal Houdini project and thought it was time to post it places! This was probably my most render time heavy project so far but happy with how it turned out
  11. 1 point
    We could also advect and grow few frames . I totally forgot the existence of the softpeak , thanks to refresh my memory
  12. 1 point
    Ok, a bit off topic I should have tried to do it with vellum but I had this idea. What about using chop as post-process for filtering the noise/jittering? Usually the jittering starts or at least is visible when the object is almost static. In this case you can use the length of velocity to blend the cloth/vellum object between the filtered/non-jittering simulation and the non filtered object. This way you get the best from the two. This trick saved me a lot of times (if you consider three a lot) and the supervisor was happy about the "clean sim" vellum_basics__jitter_02_chop.hip
  13. 1 point
    The problem is that material override parameters need to have a special parm tag to flag them as being material overrides: "material_spare" = "1". This needs to be set on every parameter that is being applied. The following function is what I use to handle this type of thing. Given the object node to apply the operation to, it will find the material node, ensure it's actually a material, then take care of modifying all the parameters and sticking them in the right place. def applyLocalOverrides(objnode): """ Promote all material parameters from the Material SHOP to the node. """ # Get the path to the material. material_path = objnode.evalParm("shop_materialpath") # Try to find the node. material_node = objnode.node(material_path) # The node type for the SHOP material node. material_type = hou.nodeType(hou.shopNodeTypeCategory(), "material") # If the material node doesn't exist we need to throw an error. if not material_node: msg = "{0} is not a valid node.".format(material_path) raise hou.OperationFailed(msg) # If the material node is not actually a material we need to throw # an error. if material_node.type() != material_type: msg = "{0} is not a material.".format(material_path) raise hou.OperationFailed(msg) # Grab the parm template groups for the material and object. material_template_group = material_node.parmTemplateGroup() template_group = objnode.parmTemplateGroup() # We need to loop over every entry in the material group and apply the # 'material_spare' tag with a value of '1'. for template in material_template_group.entriesWithoutFolders(): # Grab any existing tags. tags = template.tags() # Apply the tag to signify it is a material spare property. tags["material_spare"] = "1" # Set the tags back to the template. template.setTags(tags) # Replace the original template with the modified one. material_template_group.replace(template.name(), template) # Find the folder to place the parameters into. material_folder = template_group.findFolder("Material") # For each entry in the template group, append it to the material # folder. for template in material_template_group.entries(): template_group.appendToFolder(material_folder, template) # Set the parm template group with the new parms to the object. objnode.setParmTemplateGroup(template_group)