Jump to content

Leaderboard


Popular Content

Showing most liked content since 09/16/2018 in all areas

  1. 15 points
    A lot of people asked me to share this fake fire method.If you interested it, you can will check this simple hip. After rander i used ACES for a better look. fake_fire_rnd.hip
  2. 6 points
    I can't take credit for it, but it needed to be shared. This made me cry with laughter.
  3. 5 points
  4. 5 points
    I've wanted to tackle mushroom caps in pyro sims for a while. Might as well start here... Three things that contribute greatly to the mushroom caps: coarse sub-steps, temperature field and divergence field. All of these together will comb your velocity field pretty much straight out and up. Turning on the velocity visualization trails will show this very clearly. If you see vel combed straight out, you are guaranteed to get mushrooms in that area. If you are visualizing the velocity, best to adjust the visualization range by going forward a couple frames and adjusting the max value until you barely see red. That's your approximate max velocity value. Off the shelf pyro explosion on a hollow fuel source sphere at frame 6 will be about 16 Houdini units per second and the max velocity coincides with the leading edge of the divergence filed (if you turn it on for display, you'll see that). So Divergence is driving the expansion, which in turn pushes the velocity field and forms a pressure front ahead of the explosion because of the Project Non-Divergent step that assumes the gas is incompressible across the timestep, that is where where divergence is 0. I'm going to get the resize field thingy out of the way first as that is minor to the issue but necessary to understand. Resizing Fields Yes, if you have a huge explosion with massive velocities driven by a rapidly expanding divergence field, you could have velocities of 40 Houdini units per second or higher! Turning off the Gas Resize will force the entire container to evaluate which is slow but may be necessary in some rare cases, but I don't buy that. What you can do is, while watching your vel and divergence fields in the viewport, adjust the Padding parameter in the Bounds field high enough to keep ahead of the velocity front as that is where you hope for some nice disturbance, turbulence and confinement to stir around the leading edge of the explosion. or... Use several fields to help drive the resizing of the containers. Repeat: Use multiple fields to control the resizing of your sim containers. Yep, even though it says "Reference Field" and the docs say "Fluid field..", you can list as many fields in this parameter field that you want to help in the resizing. In case you didn't know. Diving in to the Resize Container DOP, there is a SOP Solver that contains the resizing logic that constructs a temporary field called "ResizeField", importing the fields (by expanded string name from the simulation object which is why vector fields work) with a ForEach SOP, each field in turn, then does a volume bound with the Volume Bounds SOP on all the fields together using the Field Cutoff parameter. Yes there is a bit of an overhead in evaluating these fields for resizing, but it is minor compared to having no resizing at all, at least for the first few frames where all the action and sub-stepping needs to happen. Default is density and why not, it's good for slower moving sims. Try using density and vel: "density vel". You need both as density will ensure that the container will at least bound your sources when they are added. Then vel will very quickly take over the resizing logic as it expands far more rapidly than any other field in the sim. Then use the Field Cutoff parameter to control the extent of the container. The default here is 0.005. This works for density as this field is really a glorified mask: either 0 or 1 and not often above 1. Once you bring the velocity field in to the mix, you need to adjust the Field Cutoff. Now that you have vel defined along side density, this Field Cutoff reads as 0.005 Houdini units per second wrt the vel field. Adjust Field Cutoff to suit. Start out at 0.01 and then go up or down. Larger values give you smaller, tighter containers. Lower values give you larger padding around the action. All depends on your sim, scale and velocities present. Just beware that if you start juicing the ambient shredding velocity with no Control Field (defaults to temperature with it's own threshold parameter so leave there) to values above the Field Cutoff threshold, your container will zip to full size and if you have Max Bounds off, you will promptly fill up your memory and after a few minutes of swapping death, Houdini will run out of memory and terminate. Just one of the things to keep in mind if you use vel as a resizing field. Not that I've personally done that... The Resolution Scale is useful to save on memory for very large simulations, which means you will be adjusting this for large simulations. The Gas Resize Field DOP creates a temporary field called ResizeBounds and the resolution scale sets this containers resolution compared to the reference fields. Remember from above that this parameter is driving the Volume Bound SOP's Bounding Value. Coarser values leads to blurred edges but that is usually a good thing here. Hope that clears things up with the container resizing thing. Try other fields for sims if they make sense but remember there is an overhead to process. For Pyro explosions, density and vel work ok. For combustion sims like fire, try density and temperature where buoyancy contributes a lot to the motion.
  5. 4 points
    - rather than doing it in detail wrangle use point wrangle as you want trail per point - also you can create prims directly in wrangle too so no need for id - addpoint() can take reference ptnum which it will clone with all the attribs so no need to import the attribs manually - and to your question, no, it's not possible to access attributes from new points as the creation will happen at the end as a separate single threaded process, all you are doing with geometry creation functions addpoint() setpointattrib(), ... is queuing those for later here is a simple pointwrangle volume trail code: float step = chf("step"); int niter = chi("niter"); if (niter <= 0) return; int prim = addprim(0, "polyline"); vector P = @P; vector v = 0; for (int i=0; i<=niter; i++){ int pt = i == 0 ? @ptnum : addpoint(0, @ptnum); addvertex(0, prim, pt); P += normalize(v)*step; v = volumesamplev(1, "vel", P); setpointattrib(0, "P", pt, P); setpointattrib(0, "v", pt, v); } volume_trails_VEX_fix.hip
  6. 4 points
    Hi All, update on my work in progress. I am quite satisfied with my progress up to date on the crabe project, but before triggering the render button for 250 frames, I would love to consider any suggestions of improvements to make this short sequence great for my reel :-) Any advice is more than welcomed ! The first image is an animated GIF
  7. 4 points
    "Circular Paths" Embraced by the universe we try to get our roots, our feelers, our nerve endings into it's substance to feel more connected with it, with each other, with ourselves, with life and love... Created in Houdini Rendered in Redshift Post in Luminar Cheers, Tom
  8. 4 points
    There are so many nice example files on this website that I am often searching for. I wanted to use this page as a link page to other posts that I find useful, hopefully you will too. Displaced UV Mapped Tubes Particles Break Fracture Glue Bonds Render Colorized Smoke With OpenGL Rop Moon DEM Data Creates Model Python Script Make A Belly Bounce Helicopter Dust Effect Conform Design To Surface Benjamin Button Intro Sequence UV Style Mapping UV Box and Multiple Projection Styles Ping Pong Frame Expression Instance vs. Copy (Instance Is Faster) Particle Bug Swarm Over Vertical and Horizontal Geometry Rolling Cube Rounded Plexus Style Effect Pyro Smoke UpRes Smoke Trails From Debris Align Object Along Path Fading Trail From Moving Point Swiss Cheese VDB To Polygons Get Rid Of Mushroom Shape In Pyro Sim A Tornado Ball Of Yarn Particles Erode Surface Unroll Paper Burrow Under Brick Road Non Overlapping Copies Build Wall Brick-By-Brick FLIP Fluid Thin Sheets Smoke Colored Like Image Volumetric Spotlight Moving Geometry Using VEX Matt's Galaxy Diego's Vortex Cloud Loopable Flag In Wind Eetu's Lab <--Must See! Wolverine's Claws (Fracture By Impact) Houdini To Clarisse OBJ Exporter Skrinkwrap One Mesh Over Another Differential Growth Over Surface [PYTHON]Post Process OBJ Re-Write Upon Export Rolling Clouds Ramen Noodles Basic Fracture Extrude Match Primitive Number To Point Number Grains Activate In Chunks Fracture Wooden Planks Merge Two Geometry Via Modulus Fill Font With Fluid DNA Over Model Surface VDB Morph From One Shape To Another Bend Font Along Curve Ripple Obstacle Across 3D Surface Arnold Style Light Blocker Sphere Dripping Water (cool) Exploded View Via Name Attribute VEX Get Obj Matrix Parts eetu's inflate cloth Ice Grows Over Fire Flying Bird As Particles DEM Image To Modeled Terrain Pyro Temperature Ignition Extrude Like Blender's Bevel Profile Particles Flock To And Around Obstacles BVH Carnegie Mellon Mocap Tweaker (python script) Rolling FLIP Cube Crowd Agents Follow Paths Keep Particles On Deforming Surface Particle Beam Effect Bendy Mograph Text Font Flay Technique Curly Abstract Geometry Melt Based Upon Temperature Large Ship FLIP Wake (geo driven velocity pumps) Create Holes In Geo At Point Locations Cloth Blown Apart By Wind Cloth Based Paper Confetti Denim Stitching For Fonts Model A Raspberry Crumple Piece Of Paper Instanced Forest Floor Scene FLIP pushes FEM Object Animated Crack Colorize Maya nParticles inside an Alembic Path Grows Inside Shape Steam Train Smoke From Chimney Using Buoyancy Field On RBDs In FLIP Fluid Fracture Along A Path COP Based Comet Trail eetu's Raidal FLIP Pump Drip Down Sides A Simple Tornado Point Cloud Dual Colored Smoke Grenades Particles Generate Pyro Fuel Stick RBDs To Transforming Object Convert Noise To Lines Cloth Weighs Down Wire (with snap back) Create Up Vector For Twisting Curve (i.e. loop-d-loop) VDB Gowth Effect Space Colonization Zombie L-System Vine Growth Over Trunk FLIP Fluid Erosion Of GEO Surface Vein Growth And Space Colonization Force Only Affects Particle Inside Masked Area Water Ball External Velocity Field Changes POP particle direction Bullet-Help Small Pieces Come To A Stop Lightning Around Object Effect Lightning Lies Upon Surface Of Object Fracture Reveals Object Inside Nike Triangle Shoe Effect Smoke Upres Example Julien's 2011 Volcano Rolling Pyroclastic FLIP Fluid Shape Morph (with overshoot) Object Moves Through Snow Or Mud Scene As Python Code Ramp Scale Over Time Tiggered By Effector Lattice Deforms Volume Continuous Geometric Trail Gas Enforce Boundary Mantra 2D And 3D Velocity Pass Monte Carlo Scatter Fill A Shape Crowd Seek Goal Then Stop A Bunch Of Worms Potential Field Lines Around Postive and Negative Charges Earthquake Wall Fracture Instance Animated Geometry (multiple techniques) Flip Fluid Attracted To Geometry Shape Wrap Geo Like Wrap3 Polywire or Curve Taper Number Of Points From Second Input (VEX) Bullet Custom Deformable Metal Constraint Torn Paper Edge Deflate Cube Rotate, Orient and Alignment Examples 3D Lines From 2D Image (designy) Make Curves In VEX Avalanche Smoke Effect Instant Meshes (Auto-Retopo) Duplicate Objects With VEX Polywire Lightning VEX Rotate Instances Along Curved Geometry Dual Wind RBD Leaf Blowing Automatic UV Cubic Projection (works on most shapes) RBD Scatter Over Deforming Person Mesh FLIP Through Outer Barrier To Inner Collider (collision weights) [REDSHIFT] Ground Cover Instancing Setup [REDSHIFT] Volumetric Image Based Spotlight [REDSHIFT] VEX/VOP Noise Attribute Planet [REDSHIFT] Blood Cell Blood Vessel Blood Stream [REDSHIFT] Light Volume By Material Emission Only [REDSHIFT] Python Script Images As Planes (works for Mantra Too!) [REDSHIFT] MTL To Redshift Material [REDSHIFT] Access CHOPs In Volume Material [REDSHIFT] Mesh Light Inherits Color [REDSHIFT] Color Smoke [REDSHIFT] FBX Import Helper Dragon Smashes Complex Fractured House (wood, bricks, plaster) Controlling Animated Instances Road Through Height Field Based Terrain Tire Tread Creator For Wheels Make A Cloth Card/Sheet Follow A NULL Eye Veins Material Matt Explains Orientation Along A Curve Mesh Based Maelstrom Vortex Spiral Emit Multiple FEM Objects Over Time Pushing FEM With Pyro Spiral Motion For Wrangle Emit Dynamic Strands Pop Grains Slope, Peak and Flat Groups For Terrains Install Carnegie Mellon University BVH Mocap Into MocapBiped1 Ramp Based Taper Line Fast Velocity Smoke Emitter Flip Fill Cup Ice Cubes Float [PYTHON]Export Houdini Particles To Blender .bphys Cache Format Collision Deform Without Solver or Simulation Mograph Lines Around Geometry Waffle Cornetto Ice Cream Cone Ice Cream Cone Top Unroll Road Or Carpet Burning Fuse Ignites Fuel or Painted Fuel Ignition Painted Fuel Combustion Small Dent Impact Deformation Particle Impact Erosion or Denting Of A Surface Helicopter Landing Smoke And Particles Radial Fracture Pieces Explode Outwards Along Normal Tangent Based Rocket Launch Rolling Smoke Field Tear/Rip FLIP (H12 still works in H16) Rain Flows Over Surface Smoke Solver Tips & Tricks Folding Smoke Sim VEX Generated Curve For Curling Hair Copy and Align One Shape Or Object To The Primitives Of Another Object (cool setup) A Better Pop Follow Curve Setup FEM Sea Cucumber Moves Through Barrier Fracture Cloth Smoke Confinement Setup Merge multiple .OBJ directly Into A Python Node Blood In Water Smoke Dissipates When Near Collision Object Whirlpool Mesh Surface Simple Bacteria Single Point Falling Dust Stream Flames Flow Outside Windows Gas Blend Density Example Localized Pyro Drag (smoke comes to a stop) Granular Sheet Ripping Post Process An Export (Post Write ROP Event) Corridor Ice Spread or Growth Set Velocity On Pieces When Glue Bonds Break Water Drops Along Surface Condensation Bottle Grains Snow or Wet Sand Starter Scene A Nice Little Dissolver Turn An Image Into Smoke Fading Ripples Grid Example Stranger Things Wall Effect Face Through Rubber Wall [PYTHON]Create Nurbs Hull Shelf Tool [PYTHON] Ramp Parameter Select Outside Points Of Mesh, Honor Interior Holes Sparks Along Fuse With Smoke Umbrella Rig Melt FLIP UVs Tire Burn Out Smoke Sim Flip or Pyro Voxel Estimate Expression Motorcycle or Dirt Bike Kicks Up Sand Particles Push Points Out Of A Volume [PYTHON]Cellular Automata Cave Generator Punch Dent Impact Ripple Wrinkle VEX Rotate Packed Primitive Via Intrinsic Kohuei Nakama's Effect FLIP Fluid Inside Moving Container Particles Avoid Metaball Forces FLIP Divergence Setup FLIP Transfer Color Through Simulation To Surface Morph Between Two Static Shapes As Pyro Emits Constraint Based Car Suspension Pyro Smoke Gas Disturbs Velocity Wire Solver Random Size Self Colliding Cables Fast Cheap Simple Collision Deform CHOP Based Wobble For Animated Character Slow Motion FLIP Whaitewater Avoid Stepping In Fast Pyro Emission FLIP Fluid Fills Object Epic Share Of Softbody/Grain Setups (Must see!) Balloon, Pizza, Sail, Upres Shirt, Paint Brush Create Pop Grain Geometry On-The-Fly In A DOPs Solver Varying Length Trails VEX Based Geometry Transform Determine Volume Minimum and Maximum Values Grain Upres Example Animated pintoanimation For Cloth Sims Batch Render Folder Of OBJ files Use Google To Discover Attached HIP Files Useful Websites: Tokeru Houdini Houdini Vex Houdini Python FX Thinking iHoudini Qiita Ryoji Video Tutorials: Peter Quint Rohan Dalvi Ben Watts Design Yancy Lindquist Contained Liquids Moving Fem Thing Dent By Rigid Bodies Animating Font Profiles Guillaume Fradin's Mocap Crowd Series(no longer available) Swirly Trails Over Surface http://forums.odforce.net/topic/24861-atoms-video-tutorials/ http://forums.odforce.net/topic/17105-short-and-sweet-op-centric-lessons/page-5#entry127846 Entagma SideFX Go Procedural
  9. 3 points
  10. 3 points
  11. 3 points
  12. 3 points
    Hello everybody! I am glad to present you my latest tutorial “Liquid pixels simulation. Houdini tutorial”.
  13. 3 points
    Woop I just made a matcap GLSL shader for the Houdini viewport! Will be sharing the shader with some info & explanations soon when I have time.
  14. 3 points
    Project Non-Divergent Step and Mushrooms The Project Non-Divergent DOP is responsible for 99.9% of the simulation's behaviour. Yes hundreds of DOPs inside the Pyro Solver all playing a part but all funnelling through that single Non-Divergent step. This means that if you don't like the look of your sim and the mushrooms, it's ultimately because of the Non-Divergent step creating a vel field that doesn't do it for you. If you want to see for yourself, unlock the Pyro Solver, dive in, find the Smoke Solver, unlock that, dive in and find the projectmultigrid DOP and bypass it, then play. Nothing. For most all Pyro sims, this is the Project Non-Divergent Multigrid as it is the fastest of the Non-Divergent micro-solvers. This specific implementation only takes the vel and divergence field and assuming across the timestep that the gas is non-compressible when divergence is 0, will create a counter field called Pressure and then apply that pressure field to the incoming vel to remove any compression or expansion and that gives you your velocity, nice turbulent and swirly, or combed straight out. Just tab-add a Project Non-Divergent Multigrid DOP in any dop network and look at the fields: Velocity Field, Goal Divergence Field and Pressure Field (generated every timestep, used, then removed later on). All the other fields in Pyro are there to affect vel and divergence. Period. Nothing else. At this point I don't care about rendering and the additional fields you can use there. It's about vel and divergence used to advect those fields in to interesting shapes, or mushrooms. If you want to create your own Pyro Solver taking in say previous and new vel, density, temperature, and then in a single Gas Field VOP network, create an interesting vel and divergence field, then pass that straight on to the Project Non-Divergent Multigrid microsolver, then advect density, temperature and divergence afterward, go for it. Knowing that only vel and divergence drive the simulation is very important. All the other fields are there to alter the vel and divergence field. So if you have vel vectors that are combed straight, divergence (combustion model in Pyro) or buoyancy (Gas Buoyancy DOP on temperature driving vel) have a lot to do with it. Or a fast moving object affecting vel...
  15. 2 points
    My implementation of a bezier handle using new custom states in H17. Please don't hesitate to criticize/suggest features. Thanks! ao_utility__bezierhandle__1_0.hdalc
  16. 2 points
    Hey, I know I will look stubborn, but check this file, this should do what you want : it gives your image a name that contains the name of the object you are rendering (using splitpath). You'll have to adapt it as I don't know how you stored the data, but the file is easy to understand. Just use the same wrangle and the null whose purpose is to capture the name of your obj, in your Instance node. The parameter of the null I have added is then referenced in your Mantra node, in the name of the saved image. All of that before using the Wedge that controls everything. Hope that will solve you problem for good :-) wedgeRenderObj.hip
  17. 2 points
    Tried to get mud surface effect with some reaction to the geometry without heavy simulations. iskalvlup_heightfields_mud_worms.hip
  18. 2 points
    Maybe a little too inside baseball, but some interesting peeks at the internals of Houdini here:
  19. 2 points
    Awesome release indeed still some surprises in the launch presentation! To celebrate, I decided to transcribe the list at the end : Light path expressions Accl motion blur New PBR SSS for faster convergence of shadowed areas Much lower memory usage for rendering packed prims Support for multiple GI lights Better Bake texture ROP Pyro shader support for heat, density and temp Data window for deep EXR better Hqueue Alembic layering Better unified Noise VOP Better periodic noise support 64-bit vex AVX accl vex POP fluid DOP Smoother agent clip blending Agent unpack SOP compressed bclip file support color coded node parms channel stats in the animation editor much faster deform sop new blendshape version falloff sop point velocity sop triangulate 2d 3.0 windin number SOP better trace SOP Support for vertex groups in the group sop More compilable SOPs Faster UV transform Better FBX support HEX color support better parameter search and filters NVIDIA OptiX AI denoiser for Mantra/IPR
  20. 2 points
    Here's something that might get you started. nut_pile.hipnc Uses ideas explained on these pages: http://www.tokeru.com/cgwiki/index.php?title=HoudiniDops#RBD_deintersect_the_easy_way http://www.tokeru.com/cgwiki/index.php?title=ForLoops#De-intersect_a_scatter_with_heavy_geometry
  21. 2 points
  22. 2 points
    Also python 2.7, VEX, XML, and several proprietary scripts (ui, ds, cmd) in supporting roles.
  23. 2 points
    Hello Guys, We're looking to hire for multiple jobs: SENIOR HOUDINI TD / INSTRUCTOR The jobs consist of creating advanced Houdini setups that can be used to create training material. Bonus: Comfortable recording instructional videos.(not required) INTERMEDIATE/SENIOR HOUDINI C++ DEVELOPER The ideal candidate must be very comfortable with HDK and C++ and have a good understanding of how to write opengl/gpu plugin to extend the Houdini viewport. INTERMEDIATE/SENIOR HOUDINI TD -TECH SUPPORT We run our own discord channel and have a private forum where we provide feedback to all our students, the feedback can be provided in text format and in other/many cases cases requires someone to check and fix hip files and add various notes to explain to the student where the problem was and how it can be fixed. Bonus: previously joined one of rebelway's workshops. Here is link to find more details about the jobs and please feel free to email us jobs@rebelway.net if you have any questions. https://rebelway.net/jobs/ Thanks Saber
  24. 2 points
    Tried your scene in redshift without the holdout. Upped the resolution on the spheres and added some tapering on the ends of the curves.
  25. 2 points
    "And so we shine, silently" Created in sidefx Houdini 16.5 Rendered in Redshift Post in Luminar 2018 & Exposure X4 Cheers, Tom
  26. 2 points
    During the last 3 weeks, a did some Rnd and published my results on vimeo . Some people asked me to share my files here, so here we are i hope it will help!
  27. 2 points
    New blog post series on building a Python Rop in Houdini Useful if you need the Rop or intro to HDA building tutorial. Included download for noncom. Check it out. Thanks. http://www.eyevex.com/
  28. 2 points
    I think I would just pre-fracture everything and set i@activate=0;. Inside the DOP net add a Solver and use if statements to set i@activate=1; on specific point numbers at specific times when the character is directed to break something. if((@Time >= @range_on) && (@Time<=@range_off)) { i@active=1; // Start piece falling. v@v = {0, -1, 0}; } Attached is a setup that demonstrates how to detect time ranges and activate/deactivate various RBD objects. ap_packed_trigger(1).hiplc
  29. 2 points
    DNEG have shared open source tool for vdb operations. If somebody already checked this, will be nice to hear comments. https://www.dneg.com/openvdb-ax/ https://github.com/dneg/openvdb_ax OpenVDB AX is an open source C++ library that provides a powerful and easy way of interacting with OpenVDB point and volume data. This exposes an expression language to allow fast, custom manipulation of point attributes and voxel values using a collection of mathematical functions. Expressions are quickly JIT-compiled and to offer great performance that in many cases rival custom C++ operators. It is developed and maintained by DNEG Visual Effects, providing a flexible and portable way to work with OpenVDB data.
  30. 2 points
    Woop I just made a matcap GLSL shader for the Houdini viewport! Will be sharing the shader with some info & explanations soon when I have time.
  31. 2 points
    You can also wrap pages by offsetting rotations a little for every page. // PARAMETERS float start = chf('start'); float touch = chf('touch'); float speed = chf('speed'); float flip = 1 - chf('flip'); vector fade = relbbox(0, @P); // POSITION @P.y -= vector( getbbox_size(0) ).y * 0.5; // WRAP PAGES matrix m = ident(); float copy = ( ch("../copy1/ncy") - prim(0, "copynum", @primnum) ) * flip; float t = @Time * speed - start - copy + sin( fade.x ) + fade.z * touch; rotate(m, smooth(0, $PI, t) * $PI, {0, 0, 1}); @P *= m; // TEXTURE COORDINATES v@uv = set(fade.x, fade.z * -1, 0); book_flip_pages.hipnc
  32. 2 points
    "Digital Fossil" And one more GLSL Shader Displacement:
  33. 2 points
    I'm sure you can't do it without an additional data. For example, is it possible to retain transform matrix on points of original geometry? Then yes, just multiply it by inverse. Dealing with object transforms is the most straightforward way, and you need only transform, simple box with some snapping techniques with desired transform is fine. Extract Transform OBJ. There is another nice method I didn't found in Houdini, maybe it will fit you. If you have at least two triangles, or any arbitrary 3 points transformed, of before-transform and after-transform states (for example, if you store rest position or if you could recreate it more or less exact), then you may easily calculate transform matrix between them using triangles's "local spaces" created from triangles's sides. Here the code for Primitive Wrangle (I used "0" as group, it runs only for first polygon) with two identical geometries on inputs, where second is arbitrarily transformed. // Create a basis from points of triangle. matrix3 basis_from_triangle(vector p1, p2, p3) { // Axes vectors. May not be orthogonal. vector X, Y, Z; Z = p2 - p1; X = p3 - p1; Y = normalize(cross(Z, X)) * length(p2 - p3); return set(X, Y, Z); } // Calculate rotation matrix rotating triangle ABC into triangle DEF. matrix3 rotation_between_triangles(vector a, b, c, d, e, f) { matrix3 basisABC, basisDEF; basisABC = basis_from_triangle(a, b, c); basisDEF = basis_from_triangle(d, e, f); return invert(basisABC) * basisDEF; } // Calculate transform matrix transforming triangle ABC into triangle DEF. matrix transform_between_triangles(vector a, b, c, d, e, f) { matrix transform = ident(); matrix3 r = rotation_between_triangles(a, b, c, d, e, f); transform *= r; translate(transform, d - a * transform); return transform; } 4@transform = transform_between_triangles(point(1, "P", primpoint(1, @primnum, 0)), point(1, "P", primpoint(1, @primnum, 1)), point(1, "P", primpoint(1, @primnum, 2)), point(0, "P", primpoint(0, @primnum, 0)), point(0, "P", primpoint(0, @primnum, 1)), point(0, "P", primpoint(0, @primnum, 2))); Now, transform points using Point Wrangle with second input as geometry, simply getting first primitive's transform attribute. @P *= matrix(prim(1, "transform", 0)); Or, being contemporary, Deformation Wrangle, because it is exactly why it was created. pos *= matrix(prim(1, "transform", 0)); It will properly transform attributes you need to have transformed. With Point Wrangle you need to use other wrangles to transform vertex normals or other attributes. Actually, for normals only there is special checkbox on Point Wrangle, and sometimes it works. betweentria.hipnc
  34. 2 points
    Methods to Stir Up the Leading Velocity Pressure Front We need to disturb that leading velocity pressure front to start the swirls and eddies prior to the fireball. That and have a noisy interesting emitter. Interesting Emitters and Environments I don't think that a perfect sphere exploding in to a perfect vacuum with no wind or other disturbance exists, except in software. Some things to try are to pump in some wind like swirls in to the container to add some large forces to shape the sim later on as it rises. The source by default already has noise on it by design. This does help break down the effect but the Explosion and fireball presets have so much divergence that very quickly it turns in to a glowing smooth ball. But it doesn't hurt. It certainly does control the direction of the explosion. Directly Affecting the Pressure Front - Add Colliders with Particles One clever way is to surround the exploding object with colliders. Points set large enough to force the leading velocity field to wind through and cause the nice swirls. There are several clever ways to proceduralize this. The easiest way is with the Fluid Source SOP and manipulate the Edge Location and Out Feather Length and then scatter points in there then run the Collide With tool on the points. Using colliders to cut up the velocity over the first few frames can work quite well. This will try to kick the leading pressure velocity wave about and hopefully cause nice swirling and eddies as the explosion blows through the colliders. I've seen presentations where smoke dust walls flowing along the ground through invisible tube colliders just to encourage the swirling of the smoke. You can also advect points through the leading velocity field and use these as vorticles to swirl the velocity about. The one nice thing about using geometry to shape and control the look, as you increase the resolution of the sim, it has a tendency to keep it's look in tact, at least the bulk motion. As an aside, you could add the collision field to the resize container list (density and vel) to make sure the colliders are always there if it makes sense to do so. Colliders work well when you have vortex confinement enabled. You can use this but confinement has a tendency to shred the sim as it progresses. You can keyframe confinement and boost it over the first few frames to try and get some swirls and eddies to form. Pile On The Turbulence Another attempt to add a lot of character to that initial velocity front is to add heaping loads of turbulence to counter the effect of the disturbance field. You can add as many Gas Turbulence DOPs to the velocity shaping input of the Pyro Solver to do the job. Usually the built-in turbulence is set up to give you nice behaviour as the fireball progresses. Add another net new one and set it up to only affect the velocity for those first few frames. Manufacturing the turbulence in this case. In essence no different than using collision geometry except that it doesn't have the regulating effect that geometry has in controlling the look of the explosion, fireball or flames, or smoke. As with the shredding, turbulence has it's own visualization field so you can see where it is being applied. Again the problem is that you need a control field or the resize container will go to full size but if it works, great. Or use both colliders and turbulence pumped in for the first few frames and resize on the colliders. Up to you. But you could provide some initial geometry in /obj and resize on that object if you need to. Hope this helps...
  35. 2 points
    Temperature Field and Divergence Field and what to do about it Combed straight velocities lead to mushroom puffs. Large directional forces lead to combed straight velocities. The pressure wave leading the divergence field leads to combed straight velocities. So what to do? Looking at Temperature first, it is directly used with Gas Buoyancy to drive the intensity whereby the upward direction is multiplied by temperature and then added to vel. Temperature is also used to burn fuel at an ever increasing rate with higher temperatures which then ultimately affects the divergence field. Temperature is also used by some of the shaping tools to inject noise or trigger confinement within the simulation, amongst other fields. Temperature and Gas Buoyancy DOP High temperature values fed in to the Gas Buoyancy DOP will affect the velocity field quite effectively, in a singular direction no less, the buoyancy direction. This inherently leads to nicely combed velocity with higher temperature values and large amounts of buoyancy as the simulation evolves which leads to nice mushrooms leading the way. Just like in real explosions and initial bursts of hot smoke/steam. But the director always wants more "character". That's fine and manageable in most cases as the velocities aren't that large, especially in smoke simulations where the temperature is driven by the sources. In the case of explosions, the burning of fuel can create very high temperatures and cause large upward velocities. Working Temperature with Disturbance By default the Disturbance field affects temperature. It is also cited as one way to break up or diminish the mushrooms. But how and why? And does it work? Using disturbance is designed to add noise to the temperature field around the simulation. This is one way to try to kick or disturb the rising velocity field, in an indirect way though. For Pyro, temperature is used to ultimately affect vel in two ways: Buoyancy and Combustion (which inevitably drives the divergence field). What is Divergence? Well it's randomly generated noise. It's not time coherent turbulence. Yep. If you dive down in to the Gas Disturbance DOP, in to the disturb_field Gas Field VOP you will find a lowly random VOP that is fed a vector 4 (vector P and an animated offset) and generates random incoherent noise per substep. If this sounds desperate, well it kinda is. But it works very well in some cases to etch the leading edge of the velocity to cause eddies that then form ripples and swirls. Think volcano smoke. Disturbance can be applied to temperature and it will eventually have an effect, or you can have it work directly on the velocity for a brute force immediate effect to try to etch away at that leading velocity front generated by the rapidly expanding divergence field. if it is strong enough and if it is localized to just around the evolving sim so that our container doesn't resize to maximum and take too much memory and take too long to simulate, it can work very well. Perhaps this is why the shelf tools only allows for a small value relative to the velocities that are present in an explosion or fireball: it doesn't really work for these types of sims at it's defaults. We have all of the necessary tools to implement this well enough. The Gas Disturbance DOP built in to the Pyro Solver and exposed as the Disturbance parameters can do this. It has support for a control field and even a ramp with min and max threshold values to really dial this in, if you have a field to use that is... For Smoke and combustion fire type simulations (no explosions), you can gleefully use the density field as both your Threshold Field to control the cut-off threshold for the disturbance and as the field to control the amount of disturbance you want. Or use temperature as the Control Field as with rising smoke, the temperature tends to lead the density. For fast rising smoke, you can set the Control Field to temperature and then use the Control Range to say 0 and 0.1 to try to etch the velocity field prior to it being run over by the advancing wave. For Explosions, there is feint hope. Unless you envelop the entire container with shredded velocity, there is no other field at your disposal to use to control where the disturbance should be applied. Yes you can create an additional field containing an expanded divergence field to try this, but there's better ways to coax swirls in the initial part of the explosion. In the end, as with all the other shaping tools, it comes down to magnitude. If the magnitude of the previous frame's velocity is much larger than the velocity shaping amplitude, knowing that velocities are for the most part added or subtracted in most simulation engines, you aren't going to see much effect, especially after the Non-Divergent step gets rid of most of this random pressure hash anyway. When you are dialling in a sim, you have to have the vel on for display and adjust the Visualization Range (working the leading red envelope) to get an idea as to where the velocity is fastest and what those values are (in Houdini units per second). If you have a velocity of 10 in the leading velocity pressure front and you set disturbance amplitude to 0.5, you know it won't have much of an effect. One thing that will have an effect is to apply Disturbance directly to vel for explosions and apply it within the divergence, burn, temperature or any other field that's playing a role in the fireball itself. But not to the surrounding area unless again you bypass the resizing of the container. Heck you don't even need to bypass the resize container DOP. If you are resizing on density and vel, the container will max out after the second or third frame anyway. And you can live with completely incoherent noise that for the most part is wiped out by the Non-Divergent counter pressure field. Divergence and Burning Fuel The divergence field in explosions and fireballs is the main contributor to mushroom caps over the first second or so. It will comb the velocity vectors perfectly straight in the leading pressure wave advancing in front of the density, temperature, fuel, whatever. We know why. It's the Non-Divergent step trying to remove any pressure across the timestep outside of the divergence field. It makes perfect sense then that when carefully inspecting the velocity around the leading edge of the divergence, you will find the greatest velocities. Divergence pushing outward creating a large pressure front causing the Non-Divergent step to add a very large counter pressure field that gives you that front of straight combed velocity. Large amounts of burning fuel (fuel + temperature = burn, divergence (gas expansion) then uses burn and fuel to drive the expansion of the sim) leads to a strong divergence field. Gas Buoyancy affects vel very effectively and divergence allows for rapid expansion. How do the explosion and fireball shelf tools try to avoid mushrooms? Well we see that the timescale is reduced for both options in an attempt to add enough time to evolve interesting swirls in the simulation as it evolves. But for many cases doesn't give you that nice character over the first few frames of the simulation. We also see Disturbance added but at a meagre 0.75 Shredding is set to 1. Shredding is a very nice tool for adding character to fire. As it's name implies, within the threshold tolerance of the effect, the velocity field is either stretched along a gradient direction or compressed. It is the transition between the two that gives you the real nice licks of fire. Shredding defaults to 1 and it has visualization option to see where this shredding occurs and how strong it is by it's color in relation to the velocity. If you look at the shredding, by default it is being applied along the surface of the temperature field where the Threshold Width is being set. Again this won't work for the first second of the explosion. Same for Turbulence and Confinement. They too work within the fireball and not the leading edge of the explosion. so what to do?
  36. 2 points
    Coarse Sub-Steps If you have an expanding gas field front that from frame 1 to 2 or frame 2 to 3 travels one or two Houdini units and substeps are set to 1, you will get combed straight velocity vectors which means mushroom caps. No matter how much turbulence or confinement you set on your Pyro Solver DOP, there simply isn't enough time to evolve these fields and have an effect on the result. More substeps means smaller velocities to deal with between substeps making things more manageable too. In an attempt to keep substeps at 1, you can manufacture noise and pump that in to vel but in the end two things will happen: The Non-Divergent step will take your noise and negate most of it, or you end up pumping in so much noise because it isn't working with smaller values you tried earlier, that it swamps the entire effect and it looks like a fractal hash and not that nice evolving fireball. Oh and if you really pump in tons of noise in to vel, it too can create many smaller velocity fronts pushing ahead and you end up with smaller mushroom caps! Doh... This is in essence what the Gas Disturbance DOP does. The Pyro Solver has a Gas Disturbance DOP in it's logic and those parameters are promoted up to the top asset interface but we're concerned about substeps right now and allowing enough time for turbulence and confinement to create the nice swirls on the leading edge of the explosion. So it's coming down to sub steps to try and allow for a lot more character around the leading pressure front for fast evolving explosion type simulations. Two ways to go about this: Brute force increase the global substeps for the entire DOP network, or use the Pyro Solver Substeps in the Advanced tab. Brute Force Global Substeps For explosions, the huge almost instantaneous velocities happen at the first 5-10 frames. It would be nice to keyframe animate the Sub Steps parameter, but you can't (DOPs is that way). If you set the global sub-steps to get enough detail in the first few frames you have to carry those sub-steps through the rest of the sim when things are moving a lot slower and those substeps are no longer required. Not that great. No wonder everyone tries to inject their own pumps to affect vel to avoid global substepping. Pyro Solver Substeps The Pyro Solver exposes minimum and maximum substepping logic to control when and how the Pyro Solver will substep. This sounds interesting and could be just what we need. But what is CFL Condition? No it isn't the Canadian Football League even though we know that 3 downs rule and 4 downs are for those that can't deal 3. It's named after a couple guys who in the '20's, that's 1920's, who were trying to figure out the frequency of data samples they required in order to map and predict fluid simulations and pressures/resistance to flow with fast moving collision objects (that be ships). The help note on the actual Gas SubStep DOP explains it quite well: timestep will be reduced if the velocity field will move only 1 voxel in a timestep. A CFL of 2 will allow it to move 2 voxels in a timestep. Or something like that. You can find it on wikipedia. You can set your minimum substeps to 1 and your maximum substeps to a high enough value such that if the CFL Condition is exceeded, more substeps will occur when the simulation has large velocities and less when the velocity is smaller. Hopefully this gives enough time to let the turbulence and other methods to stir up the vel field kick in. Keyframe Timescale There is a third option to controlling sub steps but that is to keyframe animate the Timescale. Yes more than valid to do this to slow down the sim at the start and then speed up when the huge velocities subside. As a matter of fact, the shelf tools set Timescale to 0.65 as an attempt to get a good looking explosion or fireball without having to resort to substeps. But this is not an automatic method. This requires intervention if you want to animate the timescale. This means you have to run the sim and evaluate. Then you keyframe the timescale and you end up with an entirely different simulation. Then you move your keys, run again. Then you increase the resolution of the simulation and everything changes again. In many ways, it's worth to at least give the min and max substeps a go and see if you can dial in the CFL Condition to get a happy balance. As you increase the resolution of the simulation, the CFL condition measured in voxels will allow substeps to run up a bit faster to the max without too much of a change in the final result.
  37. 1 point
    I think he meant something like: for a given point, find the node the furthest upstream in which this point is created. I'm not sure this notion is well defined. For example if you merge two curves, it would allow to change the selection in Network view to one of the two curves I don't know a way to select something in Network view based on a selection in Scene View, (unlike at Scene level)
  38. 1 point
    Just move your mouse into the network view and press SPACE-G. You will "go" to the selected node.
  39. 1 point
    I don't think you can. This is a feature that is available at Scene Level AFAIK BUT... Let's say you want to tweak the curves, while having a node downstream set as the DISPLAY node. The information you're looking for doesn't exist in Geometry Spreadsheet, so in a way it's lost, unless you store it somehow. It's possible to have the node name displayed with Visualizers, attributes, point wrangles.. but it's intrusive, and it won't allow you to jump to it However, you can use persistent handles. Go to the node(s) you want to tweak (later somewhere in your graph). Switch to handle mode, then right click on the handle. Enable persistent. Now you can display another node, and still have the handles for that other node Obviously the handle is unaware of anything that happens downstream, so if you transfer the curve after that, the handle won't match the curve. You can mitigate that by templating the curve (violet button, second from right on the node itself) while you work on it.
  40. 1 point
    In the dop i/o sop, you can check out "Compute Min/Max Values", which will create a couple of extra primitive attributes. Alternatively, you can see the same values in the intrinsics of each field. volumeavgvalue, volumemaxvalue, volumeminvalue are all good ones.
  41. 1 point
    Use it in you conde: SHIFT_CLK = kwargs["shiftclick"] CTRL_CLK = kwargs["ctrlclick"] ALT_CLK = kwargs["altclick"] Cheers! G
  42. 1 point
    QVBoxLayout is also part of QtWidgets now, not QtGui, so you'd have to modify your import accordingly. Everyone has different opinions on the import style, but I typically use something like: from PySide2 import QtGui, QtWidgets, QtCore That way when you're calling these functions later on, it's very clear which module you're using: self.verticalLayout = QtWidgets.QVBoxLayout(parent) For cross-compatibility between PySide and PySide2, I'd recommend checking out Qt.py. It allows you to write all of your code as if it were PySide2, but will translate to PyQt4, PySide, PyQt5, and PySide2 interchangeably. There's a few gotchas when dealing with models and .data() overloads, but it's mostly seamless. I'd recommend avoiding Qt Designer in general as it has some limitations that may cause more harm than good later on. If you need it, though, you can use Qt.py's QtCompat module for the loadUi() function.
  43. 1 point
    Really really cool, this should help spice up my underwater shipwreck sand.
  44. 1 point
    Here is a third option as well. ap_trails_v02.hiplc
  45. 1 point
    Few tips and tricks to manipulate gas simulation. 1. Independent resolution grid. E.g. Overriding vel grid size independent to a density grid. 2. Creating additional utilities. E.g. gradient, speed, vorticity and etc which can be used to manipulate forces. 3. Forces via VEX and some example snippets. smokesolver_v1.hipnc P.S. Some of this technique are not Open CL friendly though.
  46. 1 point
    What about something like this... ap_flip_inside_a_container_071618.hiplc
  47. 1 point
  48. 1 point
    "Shells of Light" My second piece with extreme DOF in Redshift. The basis is a shell made of wires. There are no lights other than a HDRI environment in the scene and no post effects are used other than color correction in Luminar2018 & Photoshop. All the structures are the result of the very shallow depth of field. Rendered at 10000 pixels square for high res printing. Took about 9 hours with a GTX 980 TI and a GTX 1080 TI at 32768 samples per pixel max. Prints: https://fineartamerica.com/featured/shells-of-light-thomas-helzle.html
  49. 1 point
    Another, focused on instancing smoke objects. Manipulating points with basic instancing attributes, i@cluster, v@scale and f@sourceframe. How to activate smoke object and holding a volume source. This method ideal for triggering independent gas simulation on impact data. Additional examples, e.g. grid clustering method for trail and non-trail which I'm merging from a separate thread. smokesolver_v2.hipnc
  50. 1 point
    I wrote a small tool for attaching pieces to other geos. But it was done really long long ago. So dont ask me how it works and why it is done this way.)) I guess I was just young and unexperienced. Anyway it may help and it works. trans_and _rot_matrixArchiFollow.hip
×