Houdini Tutorial Week 6

The topic of this week is how do we use two different solvers together. We reviewed the previous learning content, also saw some beautiful particles, and then learned some new knowledge points on the basis of previous learning, including using the rigid body and the particles at the same time to do an effect.

The Display Options

Change the point size to make the particle point bigger

Geometry

Level of Detail — Increases or decreases the display resolution of metaballs, NURBS, and Beziér surfaces.

Volume Quality — Controls the display quality of volumes in the viewer.

  • Very Low — Draw volumes as parallel slices along one axis. This is the fastest option but produces a visual pop as the volume rotates in the view. Overlapping volumes will produce visual artifacts.
  • Low — Draw volumes as slices parallel to the viewport. This is the fastest of the view-aligned, useful for working interactively with dozens of volumes. Overlapping volumes will render correctly.
  • Normal — Draw volumes as slices parallel to the viewport, with more tightly-spaced slices than the “Low” option. Balances quality and performance.
  • High — Draw volumes as slices parallel to the viewport, with even more tightly-spaced slices than the “Normal” option. Slowest but best quality option. Adds some random variation to the volume sampling to break up the slices and 3D texture sampling.

Enabling HDR Rendering will remove any banding artifacts from volumes.

Polygon Convexing — Fixes concave polygons by tessellating them to triangles so they appear the correct shape. There are two options for determining when to redo the convexing:

  • Fast — Only redo convexing on full topology changes. Ignore changes to point position (P).
  • Accurate — Redo convexing on full topology and point attribute changes.

Particles

  • Display particles — How Houdini draws particles and disconnected points.
  • Point — Draw points as uniform dots, controlled by Point Size (in pixels). In this mode, close and far points are drawn at the same size.
  • Pixel — Draw points as single pixels. This may be useful for very dense particle simulations.
  • Line — Draw particles as streaks. This only affects particles (disconnected points are drawn as dots).
  • Disc — Draw particles as filled circles, with the radius controlled by Disc size (in world space units). In this mode, particles are drawn as actual geometry, so closer particles appear bigger than far particles. This only affects particles (disconnected points are drawn as dots).
  • Display Sprites — If particles have sprite attributes (see the Sprite node), draw the sprite image at the particle location.
  • Point Size — The size (in pixels) of particle and unconnected points, when Display particles is “Point”. 
  • Disc Size — The size (in Houdini units), of the filled circles, when Display particles is “Disc”.

Scene

  • Antialiasing Samples — Smooths edges of lines and polygons in the viewport. Increasing this increases the amount of framebuffer memory Houdini uses. Only use modes higher than 4× if your graphics card has 2GB of VRAM or more. Modes above 16× are significantly slower and give diminishing returns on quality, so it is best to find a “good enough” setting rather than maxing this value.
  • HDR Rendering — Produces higher quality render of volumes and transparency. This doubles the amount of framebuffer memory Houdini uses. When this is on, flipbooks will contain HDR images. Can use this with a LUT (in the Color Correction section) to view super-white values.
  • Enable X-Ray Drawing — Draw objects with the X-ray flag (bones and nulls) as wireframes when they’re behind solid surfaces.
  • X-Ray Strength — Controls the strength of the X-Ray wireframe. Values less than 1 will dim the lines, and values greater than 1 will widen the lines.
  • Enable Object Origins — Draw axis and pivot points at the object origin of objects with the Display Origin flag.

Depth of Field

Camera Depth of Field

Turn this on and set the view to look through a camera to simulate depth of field in the OpenGL scene view. You can control the range that is in-focus using the camera’s F-stop parameter (the F-stop must be non-zero to get depth of field).

This effect works by blurring the OpenGL rendered pixels, so it is quite fast but can give strange results in areas with lots of blurring, since it is a post-process that can only work with the available pixels. So for example it can’t simulate light blurring out from behind objects.

Example 1

Create the node

  • Torus
  • Vdbfrompolygons
  • Scatter
  • Voronoifracture
  • Explodedview (for visualization)
  • Transform
  • Null ( rbd_packed_source)

VDBfrompolygon — fog VDB density

Dopnet

  • Rbdpackedobject ( Sop path — the null )
  • Bulletrbdsolver
  • Ggroundplane
  • Gravity
  • Merge

Add the assemble to make the gravity work

Unselect create name attribute and select create packed geometry

Add the Popforce and Multisolver so that the piece will fly up

In the popforce node, increasing the Amplitude to make the effect work

Make it progressive — to create the group and group type points

And enabling keeping in bounding regions and bounding type : bounding box

Add key frames on the bounding box and change the group name (static)

Add the attribcreate and name (active) / value (1) / Group (!static)

Change Class to point and the type will change into float and guess

! + NAME means everything except that

Select the overwrite attribute from sops and there will be three attribute

Change the type in group into integer

In oder to increase more details add a scatter and merge them

Add the popdrag and increase the air resistance

Color ramp

Add — If an input is specified, this OP adds points and polygons to it as specified below. If no input is specified, then it generates the points and polygons below as a new entity. Extract points — Used in conjunction with a point expression, the Add op can be useful for extracting a specific point from another op. For example, to extract the X, Y and Z value of the fifth point, from a Grid SOP in geo1: Points added in this way are appended to the end of the point list if a Source is specified. Click the Information Pop-up on the op Tile to find out how many points there are. For example, if you have added two points and there are 347 points (from 0 to 346), you have added the last two point numbers: 345 and 346.

Create an Add SOP and set it to create a single point, then append a Copy SOP and set its number of copies to the (possibly animated) number of points you want. This works correctly even when number of points is 0, unlike some other approaches.

Select the delete Geometry but keep the points — This will destroy all the polygons, NURBs, and other primitives, leaving only the points intact.

Create the attribvop to do some visualization

and the aanoise to increase the contrast

This operator generates anti-aliased (fractional brownian motion) noise by using the derivative information of the incoming position to compute band-limited noise. This type of noise is ideal for shading.

  • The roughness parameter determines the coarseness of the noise. The maxoctaves parameter limits the noise to a fixed number of iterations.
  • The amplitude parameter is a scale factor on the resulting noise. The default output range of noise is -0.5 to 0.5. 

Clamp — This operator clamps the input data between the minimum and maximum values.

Bind export — name active

The noise work so only part of the pieces moving

Next step — timetable and dependent

Float to Integer — This operator converts a float value to an integer value.

Fit Range — This operator takes the value in the source range (srcmin, srcmax) and shifts it to the corresponding value in the destination range (destmin, destmax). For example, fit(.3, 0, 1, 10, 20) would return the value 13. Values outside the input range will be clamped to the input range.

Add the addconstant and clamp so can make animation

Addconstant –– This operator adds the specified constant value to the incoming integer, float, vector or vector4 value. It represents a simpler version of the Add operator because it does not require a second input. It is ideal as an increment (i++) operation in a While loop.

node

make the add input2 promote parameter so turn to the attribute vop there will be inout number parameter to adjust

key frame

Outcome

Next make the piece more and more smaller when moving

create the primitive and change the scale

connect the primitive to dopnet and make object merge except rbd

dopimport

  • dop network — dopnet
  • object mask rbd*
  • select the import style — fetch geometry from dop network

Add the attribpromote and change the new class into Primitive

Add the sopsolver and paste the primitive and attribpromote to the dopgeometry

Outcome — pieces become smaller

Measure — This node can be used to measure curvature, which is useful in game development workflows for determining sharp cliff-like areas in terrain, so that rocks or other items can be added to those areas of high curvature, giving the landscape a more natural look.

Measuring area is useful in character workflows, as artists can measure the polygons of characters before and after animation to determine where the polygonal mesh is highly deformed. This information can then be used to blend texture maps.

Measuring volume is often used in destruction workflows, where objects are shattered. Often very small pieces can be deleted (volume under a certain amount), as they don’t affect the overall look and can speed up simulation times. Similarly, measuring perimeter is useful for determining how large things are in 2 dimensional space. For example, this can be used for measuring the 2 dimensional footprint of a city.

add the attribwrangle

  • f@tokeep = f@tokeep * 0.97 ;
  • group : @active =1

So far I found that my pieces do not fly up so I think some important issues are missing. I remember that the software crashed before me, so some of the content was not saved, so I went to pop force to give it a Y up force

Make the blast paste it between the attribwranle and outout

  • Blast — Group : Subset of the input geometry to delete.
  • group @tokeep<0.1

So now the effect is right, from the local slowly broken, until the whole object broken. The broken fragments move upward, and the process of moving gradually becomes smaller, and finally disappears.

I also tried to use a sculpture model that I used to crush before to try different crushing effects.

Example 2

  • grid
  • scatter
  • pyrosource
  • volumerasterizeattribute
  • null

Popsource — mode: source smoke

change the attribute names float and density

change the amplitude so the smoke will change the volume

Convert to circle

with arnold light

Make the ground

Make convertvdb and vdbvectormerge and fileache

dopnet

POP Advect by Volumes — The Advect by Volumes POP is designed to make it easy to advect a particle system by a fluid simulation. Often the fluid simulation will be simulated as a separate pass and the velocity fields read off disk. However, the particles can be live-linked to an existing simulation.

air residence of popdrag and POP Advect by Volumes can change the speed and fly degree

merge the smoke and particle

sphere and copy to point

Example 3

Blast and select delete non selected

Keep the path

It’s going to convert to poly soaps, to polygons. You can convert it to poly soap, and it will make it not as heavy as polygons. And the only thing the only problem with poly sources is they have limits. Just convert it to polygons.

Convert — When converting from a set of polygons to a mesh, a single mesh will result only if:

  • more than one polygon is in the input
  • each polygon has exactly four points
  • the polygons are arranged as n rows by n columns
  • the polygons share coincident points (see Facet OP)

Otherwise, each polygon is converted individually into a mesh. In fact, any individual face can be converted to any surface. This is accomplished by cutting the face into three or four adjacent sections, and then creating a patch from them.

Fix the problems

Floor

The Fuse SOP is used to snap points together or snap points to a 3D grid, and optionally fusing points after the snap.

To restrict the points that can fuse and be fused to, points can be query points, or target points, or both. With only one input to the node, both query and target points are from the single input. However, with a second input to the node, only points in the first input can be query points and only points in the second input can be target points.

Polyfill

  1. Select at least one edge in each hole you want to fill.
  2. Click the PolyFill tool on the Polygon tab.
  • The Quadrilaterals fill mode is most useful for filling in small groups of polygons, and can handle a wider variety of shapes, such as an L-shaped hole or a spiral.
  • The Perfect Grid Quadrilaterals fill mode can handle fewer shapes, but often generates a better patch with better interpolated attributes.
  • If you are filling in a round hole, the Perfect Grid Quadrilaterals fill mode will likely give you the best results.
  • Some holes may require additional smoothing to fix UV values. You can use the Smooth parameter to position the geometry where you like, then append a UV Smooth to fix the UV values separately.
  • If a projection plane normal cannot be found for your geometry, you may want to use the Clean SOP to clean up your geometry first, especially consolidating points.

Stairs

wall

Whole building clean

Merge the two and finish the preparation

3 ways to reduce the number of polygons and geometry

1 . polyreduce

This version of PolyReduce gives very fast, highly accurate reduction while preserving the shape, textures, attributes, and quad topology of the input as much as possible.

This node has multiple features to let you guide where the node reduces and reshapes:

  • prevent the node from moving unshared edges in 3D and UV space.
  • specify [points and/or edges to preserve.
  • paint an attribute in areas where you want to retain more density.
  • retain polygons based on visibility from certain view points.

2 . Create the vdbfrompolygon + convertvdb

change the voxel size to increase / decrease the details

3 . Create the sphere and ray

The meteor is going to create a sphere on top of that meteor that creates sort of a bonding sphere. And then add the Ray node after the sphere

The Ray operator projects rays from each point of the first input geometry in the direction of its normal, and then moves the point to any geometry the ray hits from the second input. You can use this node to drape clothes over surfaces, shrink-wrap one object with another, and other similar effects.

So change the frequency of the sphere to increase/decrease the details

Extracttrasnfom

This SOP computes the transform (translation, rotation, and optionally scale) that best aligns the reference geometry’s points with the target geometry. If Use Piece Attribute is enabled, a transform will be computed for each piece in the geometry, instead of for the geometry as a whole. Additionally, if a piece contains a single packed primitive, the SOP will compare the primitive transforms between the inputs to allow transforms to be extracted from animated packed primitives without unpacking.

The output geometry of this SOP contains one point for each piece in the reference geometry, with point attributesdescribing the transform. These points can be used with the Transform Pieces SOP to apply the transform to geometry.

This extraction can be useful for setting up rigid body colliders (for which an animated rigid transform is ideal) from baked geometry files that represent rigid motion.

Point Deform

This node computes the how a point cloud (the deformation lattice) deforms (compared to its original “rest” point positions), and applies those deformations to the input geometry. The node works by having each point on the lattice “capture” and influence nearby points on the model. The closer the points, the more influence (computed using the Elendt metaball formula).

This allows you to animate proxy geometry and transfer that to a high resolution mesh. In that case, the points of the low res proxy would act as the lattice, capturing and deforming the high resolution geometry.

The deformation lattice points can be connected by edges. The node uses connected points to find local transforms, allowing accurate transformation of rotating models. This avoids the “collapsed” look you might get with from Lattice node’s point mode when the mesh rotates.

Separate multiple layers

So because that building has multiple layers on the on the walls and inside the walls. If you use the same sketcher , you will come up with this issue that have the same shapes repeating. So the multiple layers inside the walls become useless. They become redundant. And rigid body simulation won’t be as interesting as it could to be.

We want to have different seeds for every one of these layers.

Connectivity

The default name for the attribute is Class. Each primitive or point is assigned a number from 0 to the number of connected sets minus 1. Two primitives or points that share the same number will be connected.

For each connected pieces

Blast — select Alembic path

Create for each named primitive

Change the piece attribute to path

Single Pass

Runs a single iteration at the given offset. This is useful for debugging piecewise loops, showing the output of an individual piece/iteration.

Split

Split is designed to divide your geometry into two separate streams, the portion that matches the group and the portion that doesn’t.

Group different parts

vdbfrompolygon and scatter and voronoifracture

Add details to do the voronoifracture

remesh

scatter

normal

This time I encountered a problem, that is, my destruction effect is not displayed. After me and Mehdi were one-on-one, he told me that because my version was relatively low, the attribute type under connectivity needs to be changed to string instead of integer, but I don’t have this option. So he replaced connectivity with assemble.

more datails

Block end

Connectivity

Rbd Material Fracture

Most of the later part of this lesson is to repair some large buildings to prevent some strange faces when they are broken. It is very important to deal with the broken model in Houdini, especially some complex models.(obj_merge>blast>unpack>fuse>polyfill>connectivity>foreach_begin>vdbfrompolygon>scatter>foreach_end)

Often in rigid body simulations, you want a solid object to break into pieces because of some impact or force. For example, you might want an earthquake to destroy a house, with the concrete walls fracturing, the wood door splintering, and glass windows shattering. Or you might want a swinging demolition crane ball to cave in a wall.

Most fracturing tools in Houdini support a pre-fracturing workflow, where you break the geometry into pieces in SOPs, with the pieces held together by glue constraints. Pre-fracturing gives you full artistic control over the look of the destruction (for example, do you want big blocky pieces or small jagged pieces). The object will crumble when a force overcomes the glue strength, or you can manually animate the glue off when you want the object to break down.The high-level tool for pre-fracturing geometry is the RBD Material Fracture SOP, with plenty of controls over different types of fracturing. There are many lower-level SOPs if you need even more control over fracturing.

Simulates breaking patterns associated with different materials: concrete, wood, and glass.

  • Can iterate multiple levels fracturing.
  • Can simulate low-res proxy geometry and copy piece transforms onto high-res geometry.
  • Automatically sets up glue constraints between the pieces.
  • Updates existing constraint geometry as it fractures.
  • Outputs groups and attributes with information about the fractures if you want to do more complex post-processing.
  • Use the Group node to name groups of primitives. For example, the door, individual windows, and walls. This will allow you to fracture them individually.
  • If you see pieces spinning/wobbling in the simulation, you can particle drag to freeze them.
  • The RBD Material Fracture node can work on fast low-res proxy geometry. You need to set up high-res and low-res geometry with the same named pieces (for example, by breaking up the high-res geometry into named pieces and then copying and reducing the number of polygons to create the proxy).

Clustering refers to grouping fractured pieces into bigger clumps. There are two main clustering workflows:

  • If you just want a bunch of pieces to stick together permanently, give them all the same name attribute. Nodes that work on pieces will treat them as once piece.This can be useful, for example, with wood splintering, where you often want to group small splinters into bigger jagged chunks.
  • For certain directable crumbling effects, you will often want to work with bigger pieces early in the shot and have them break down into smaller pieces later in the shot. You can do this with a hierarchy of glue constraints. You can animate higher-level constraints off to break up bigger pieces into smaller pieces.

The RBD Material Fracture node provides clustering controls when the Material type is “Wood”. You can do manual clustering with the RBD Cluster node.

Effect so far

This entry was posted in Houdini & Lighting. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.