0% found this document useful (0 votes)
45 views44 pages

03 Procedural 2023

The document outlines a lecture on procedural modeling in Houdini, detailing homework assignments and tasks focused on geometry tools, VEX scripting, and various modeling techniques. It includes links to resources, tutorials, and examples for students to explore and apply their learning. Additionally, it emphasizes the importance of submitting work and provides guidelines for upcoming assignments and presentations.

Uploaded by

woomby.edu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views44 pages

03 Procedural 2023

The document outlines a lecture on procedural modeling in Houdini, detailing homework assignments and tasks focused on geometry tools, VEX scripting, and various modeling techniques. It includes links to resources, tutorials, and examples for students to explore and apply their learning. Additionally, it emphasizes the importance of submitting work and provides guidelines for upcoming assignments and presentations.

Uploaded by

woomby.edu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

Lecture 03

Procedural Modeling
CS348C-23W CG: Animation & Simulation

Prof. Doug James


[VIDEO] Houdini Student Reel 2016
https://vimeo.com/174686750
Homework #1:
Hello Houdini [1 week, 10%, ]

• Learn some Houdini!


• Start reading and watching videos
• Make something simple
• Submit Wednesday for Thursday “Weeklies”
Announcements
• Homework #1 tomorrow (Wed ~midnight)
• Submit zip to Canvas (hipnc + artifact)
• Submit artifact (image and/or video clip) to Dropbox File Request
• Please use video compression!
• If you can not attend the short show-and-tell on
Thursday, e.g., time zone, then:
• Also submit a brief (e.g., <30sec) screen capture explaining your
idea and how you approached it in Houdini, e.g., you can talk
over and show the Houdini network, motivational imagery, etc.
• Problems using Houdini?
https://www.sidefx.com/learn/getting_started

https://www.sidefx.com/tutorials/houdini-foundations-book
Let’s model things in Houdini
Focus on geometry tools for now, ignoring physics.
Some VEX or VOPs now.
Grab a screenshot.
Task #6: Groups: Model a Chessboard
Things to explore:
• Explore Groups
• Explore “Group Expression” SOP
Task #7: Iteration: Model the Cantor Set
Things to explore:
• Grid
• Scaled copies
• For-Each loop
• More on instancing later
Task #7b: Model the Sierpinski Gasket
Things to explore:
• Grid
• Scaled copies
• For-Each loop
• Instancing vs copying
http://www.sidefx.com/docs/houdini/copy

• Packed geometry & poly soups


http://www.sidefx.com/docs/houdini/copy/packed_an
d_soups.html

https://en.wikipedia.org/wiki/Sierpinski_carpet
Task #8: Explore Attributes
Things to explore:
• Attribute types
• Point, Vertex, Primitive, Detail
• Important attributes have names, e.g.,
• @P : Position
• @N : Normal
• @Cd : Diffuse color
• Attribute Transfer
• Attribute Blur
• Attribute Randomize
• Attribute Noise
• …
• Recall: Geometry Spreadsheet
HScript $ Description

Useful for simple expressions and $FPS Playback speed in frames per second (as set with the Playbar

controls).
references $FSTART Frame number of the first frame of animation (as set with the

Playbar controls). $NFRAMES (the number of frames in the

animation) = $FEND - $FSTART + 1.


Things to explore: $FEND Frame number of the last frame of animation (as set with the

• Simple parameter expressions Playbar controls).

• Avoids VEX/VOP nodes $F The current frame, (as set with the Playbar controls). This is a very

useful variable, especially for rendered picture filename numbering.

• E.g., Simplification $FF Floating point frame number.

• https://www.sidefx.com/docs/ho $NFRAMES Number of frames in the animation. $NFRAMES = $FEND -


udini/commands/index.html $FSTART + 1.

$T Current time in seconds. Equals ($F-1)/$FPS

$TLENGTH Total length of animation in seconds.

$TSTART Start time of animation in seconds.


VEX, VOPs & Python
• VEX wrangles for shader code:
• http://www.sidefx.com/docs/hou
dini/vex
• VOPs for visual shader networks:
• http://www.sidefx.com/docs/hou
dini/vex/lang.html
• Python SOP for advanced
scripting and data structures:
• https://www.sidefx.com/docs/ho
udini/hom/index.html
A VOP shader network
• Con: serial and usually slower
Task #9: Wrangle attributes with VEX
Things to explore:
• Attribute Wrangle
• Runs over points, vertices, primitives, or detail
(only once) ...
• Indexing: @ptnum, @vtxnum, @primnum
• Uses VEX scripting language
• https://www.sidefx.com/docs/houdini/vex
• VEX Attribute Glossary
• https://wiki.johnkunz.com/index.php?title=VEX_
Attribute_Glossary
• Python nodes also available
• https://www.sidefx.com/docs/houdini/hom
Task #10: Scatter smarties on a rubber toy
Things to explore:
• Scatter
• Randomize/create Attribute
• “pscale” size attribute
• CopyToPoints
• (Delete Attribute)
• Many "instance attributes"
• https://www.sidefx.com/docs/houdi
ni/copy/instanceattrs.html
• pscale, Cd, orient, trans, up,
materials, ...
Task #11a: Randomizing copies’ rotations
Things to explore:
• 1) Easy pre-copy way:
• create/randomize an "orient"
quaternion attribute before copying
Aside: Packed Primitives
http://www.sidefx.com/docs/houdini/model/packed.html
Aside: Packed Primitives
http://www.sidefx.com/docs/houdini/model/packed.html
Task #11b: Randomizing copies’ rotations
Things to explore:
• 1) Easy pre-copy way:
• create/randomize an "orient" attribute
before copying to points
• 2) Easy post-copy way:
• Use packed & instanced geometry in
copy to points.
• Attribute Randomize
• “orient” : InsideSphere
• Transform by Attribute
• Unpack
Task #11c: Randomizing copies’ rotations
Things to explore:
• 1) Easy pre-copy way:
• create/randomize an "orient" attribute
before copying to points
• 2) Harder post-copy way:
• Assemble
• Check: Create Packed Geometry
• Attribute Randomize
• “orient” : InsideSphere
• Transform Pieces (3 inputs)
• Unpack
• Example:
• https://vimeo.com/276975248
Good article
A Long-Winded Guide to Houdini Instancing
http://www.toadstorm.com/blog/?p=493
HW1 Show & Tell!
• Say “hello!”
• Brief description of your result
• What you did
• Something you want to know
Homework #2:
Procedural Modeling [1 week, 10%, ]

• Build on what you’ve learned


• Try a more advanced example
• Homework #2 link on webpage (PDF)
• https://www.dropbox.com/s/1zo8wsv5uc1fl54/Hom
ework%232_ProceduralModeling.pdf

• Submit by next Wed. for Thursday “Weeklies”


Procedural Modeling of Buildings

Mueller et al., Procedural Modeling of Buildings, SIGGRAPH 2006. Procedural Modeling (Houdini)
https://www.sidefx.com/gallery/procedural-modeling/
Task: Model a Brick Arch
Things to explore:
• PolyExtrude
• PolyBevel
• Copy and Transform
• Bend
• Noise
Houdini Modeling Tutorial: Sci-Fi Terminal & Tanks

https://www.sidefx.com/tutorials/sci-fi-terminal-fuel-tanks/
Task #11: Implicits: Find some isosurfaces
Things to explore:
• Conversion  INSPIRATION
• (points,mesh)  volume
• Volume/VDB tools
• Color isosurfaces

• Find largest isosurface


• Measure (area)
• Attribute Promote (for total area)
• Visualize
• Group Expression
Task 12: Explore Colors Spaces using VOPs
Things to explore:
• VOPs?!?: VEX OPerators
• Visual programming
• “Color Transform” VOP
• Color spaces
• RGB, HSV, HSL, XYZ, CIE Lab
• Draw some color cubes, etc.

• REFs:
• https://en.wikipedia.org/wiki/HSL_and_HSV
• https://en.wikipedia.org/wiki/Color_space
• https://en.wikipedia.org/wiki/CIELAB_color_space
VEX Resources

• VEX: Vector EXpressions


• Note: Often nearly half of my SOP nodes are VEX
wrangles :P
• Other useful VEX tutorials / refs
• https://github.com/jtomori/vex_tutorial
• https://github.com/kiryha/Houdini/wiki/vex-for-artists
• http://www.tokeru.com/cgwiki/index.php?title=JoyOfVex
• Deborah Fowler (SCAD)
• http://deborahrfowler.com/HoudiniResources/WrangleNodeExamples.html
Useful VEX Trick: Compute centroid of primitives.

• Primitive Wrangle:
• addpoint(0, @P)
• Here @P is the centroid
of the prim 🤯🤯
• Delete other primitives
• See also "Centroid" node
Entagma Example: VEX + Copy to Points

Instant Meshes
https://github.com/wjakob/instant-meshes

Entagma: Keycap Sculptures (Disco Ball Tiling)


https://www.youtube.com/watch?v=wLgeQUGywaQ&ab_channel=Entagma
VEX Task: Proximity calculations
• nearpoint, nearpoints, pcfind, pcfind_radius
• Many ways to find neighboring points efficiently
• xyzdist
• Finds closest location on geometry (prim + uv coordinate)
• Demo Tasks:
• Interactive nearpoints demo
• Build bounding spheres for primitives + overlap test
• VEX Skills:
• get/set attribs + nearpoints + primitive point access.
VEX Task: Make some waves
Task: Make an interface using channel parameters /
spares
• Customize a "Waves" node interface
• Useful for making assets with
adjustable parameters
• See "Using spare parameters"
• https://www.sidefx.com/docs/houdini/network/spare.html

• See "Edit parameter interface" of


nodes instances
• Later: right-click for "Type Properties" on
assets (not instances!)
VEX Task: Make some caustics
• Photon-mapping approximation using
surface mesh vertices.
• Use refract(ray, normal, eta)
• Trace paths manually or use Ray SOP
• Splat photons into an image buffer using
a VolumeRasterizeParticles SOP.
Ex: Noise VOP
• VOPs are visual alternatives to VEX code

• Often preferred by visual artists

• Simple Task: Make some noise and


expose/promote parameters in the VOP
interface
• NOISE: Always useful
• Various nodes for noise in Houdini
• Unified Noise VOP
• http://www.sidefx.com/docs/houdini/nodes/vop/unifiednoise.html
Houdini VEX Fractals

https://vimeo.com/176911687

https://vimeo.com/215581282
Procedural Modeling Warm-up

How would you


make this relief?

By flint83
Modeling Spread
• Example: An infection process :/
• Example: PyroSourceSpread SOP

• https://www.sidefx.com/docs/houdini/nodes/sop/pyrosourcespread.html

• Specify:
• group of “start” points
• point attributes (temperature, fuel)

• Cool: Reaction-diffusion processes

https://www.youtube.com/watch?v=ZU9VE7
Ys73Q&ab_channel=JunichiroHorikawa

• More later after we discuss solvers A platonic solid with a mild but spreading infection.
Solver SOP

• Useful for performing custom dynamics, simulations, e.g.,


growth, decay processes, etc.
• https://www.sidefx.com/docs/houdini/nodes/sop/solver.html
• Useful tutorial reference:
• The solver sop - cgwiki - Tokeru
• Example: Random walk
• Example: Fireworks
Creating Abstract Shapes

https://vimeo.com/174958114 https://vimeo.com/172251306
Other Solver Examples
• Air-bubble bubbler
• Aside: Implicit functions
• Signed-distance field (SDF)
• Paper mâché volcano
• Projecting onto implicit surface
• Particle system with collisions
• Explicit vs. implicit collider geometry
• Lead-in to next class
Example: Procedural Modeling of Chainmail

Ante Qu and Doug L. James. 2021. Fast Linking Numbers for Topology Verification of Loopy Structures.
ACM Trans. Graph. 40, 4, Article 106 (August 2021), 19 pages.
https://graphics.stanford.edu/papers/fastlinkingnumbers/

You might also like