Houdini Frog Generator – Controllers and Foot Webbings

June 4, 2019

Houdini Frog Generator

Controllers and Foot Webbing

Foot Webbing

The general concept was to take a line of points and move every other one along its normal to create a general zig-zag pattern. Then, you resample it to make it smoother and wavier. I have another set of points that are along the foot that will create the inner boundary of the webbing. You then use the Add SOP to create a closed polygon between these line boundaries.

To make this more consistent, I wanted to create the line using points from the toes. This way, the webbing will follow the toes around properly as I shift them around. This was easy to accomplish by just adding another point at the tip of the toe geo and setting it to have an id attribute of 0. I could then connect all of the same attribute valued points in a line with the Add SOP.

The line between all of the toes would then be made up of a number of points equal to the toes. I needed to add a single point between each pair of toes to move to create the wave in the webbing. This could be done with a resample that adds a point in the middle of each polygon.

Controllers

I wanted to practice setting up overall controllers to start making it easier to work with my frog generator from a few ruling nodes.

I first practiced this by setting up a controller for the foot to control the webbing parameters. This controller was tied to: webbing length, webbing curvature, and webbing origin.

The length is how much overall area the webbing covers between the toes. The curvature is how wavy, or how far the inner webbing points are away from the general curve. Finally, the origin just helps move the inner boundary of the webbing around in case it is too far from the foot or too far in.

I then moved on to creating a body controller, which had a lot more parameters. This also required connecting some ramp parameters, which are a bit weird in Houdini.

These parameters include:

  • Body Length
  • Spine Shaping
  • xScaling Body
  • yScaling Body
  • Dorsal Start
  • Dorsal End
  • Dorsal Projection Angle
  • Dorsal Projection Ramp
  • Back Leg Position
  • Back Leg Angle
  • Arms Position
  • Arms Angle
  • Eyes Position
  • Eyes Angle
  • Tympanum Position
  • Tympanum Angle

The body length is just the general overall length of the body shape. The spine shaping is a ramp that lets you add curvature to the body. The xScaling and yScaling are ramps that independantly alter the general width or height of the body throughout.

The dorsal variables control the larger dorsolateral dermal plica on the back of the frog. These are raised ridges a lot of frogs have. These control how far along the frog’s body these ridges go, the radial angle around the body they are projected, and a ramp to control how much it deforms the general body in the normal direction along the ridges.

Finally, all of the positions and angles control the connection point locations for various body parts of the frog to the general body. These select a specific point along the main spine to project out onto the body surface, and the angle determines the radial projection around the body these points are located. These two features together let you place the body parts anywhere on the body very easily.

Creating Houdini Digital Assets

May 28, 2019

Houdini Digital Assets

Youtube – Introduction to Houdini – Chapter 4- making digital assets

By: Rohan Dalvi

Making Digital Assets in Houdini seems to be a core part of creating a procedural model generator, so this tutorial gets into the very basics of setting one of these up.

The practice used here is that you create a Null object off to the side where you “Edit the Paramter Inteferface” under the settings of the node (the gear icon). You select the type of values you want to vary (floats, ints, ramps, vectors, colors, etc.) and add those to this Null object. Specifiying a range here can be helpful to inform the user of useful values. You then “Copy Parameters” from this Null control node, and “Paste Relative Expression” to the nodes/variables that they make sense. This way, when the Null control node has its values changed, they will directly correlate with changing the designated value within your network of nodes.

C# LINQ Extension Methods

May 23, 2019

C# LINQ Extension Methods

Microsoft – => operator (C# Reference)
Youtube – C# Tutorial 13 LINQ Extension Methods

By: Derek Banas

I was working on a tutorial for GPU Instancing and dynamic batching a while ago to look into some ways to visually instantiate a lot of objects in Unity without overloading the computer and there was a lot happening in the code I was unfamiliar with. The biggest parts that stood out were the ” => ” operator along with some list and array methods.

The => operator was used within a list method called “Select”, so I started looking into both of those. The name of the => operator is the lambda operator. The simplest aspect seems to be that it’s a function with the parameters on the left side and the performing function on the right side. IT also seems to be used a lot with LINQ, which I am unfamiliar with.

Procedural Fence Asset in Houdini

May 20, 2019

Houdini Procedural Fence Asset

Vimeo – Intro to Procedural Modeling in Houdini: Making a Fence Asset

By: trzanko

Notes: Projecting Curve down onto surface – make sure curve is entirely above surface first – done by transforming this up in y an amount equal to the bounding box of the terrain – can use Ray node – used wrangle – VEXpression to project curve onto terrain: vector rayd = {0, -100, 0}; vector hitP, hitUVW; int hitPrim = intersect(1, @P, rayd, hitP, hitUVW); @P = hitP; – this has every point fire a ray downward and determines where this ray intersects the terrain, and then sets that point’s position to the intersection point Create Orthos – used a Polyframe node – turned off the Normal Name and reassigned the Tangent Name to “N” – this made all the point normals basically follow allong the curve – use VEXpression to direct normal vectors – used wrangle: – VEXpression: vector up = {0, 1, 0}; v@side = normalize(cross(up, @N)); v@up = normalize(cross(@N, v@side)); – Seeing as this did two cross products in a row, I this sets v@side directly perpendicular to the curve (in plane) then v@up creates a vector perpendicular to all of this, including the plane (so this creates a vector that is up from the line) Created the Posts – simple boxes where we polyextruded the top with a bit of an inset Copy Posts to Terrain – Used simple copyToPoints with our post and points along the terrain – this placed their centers at the curve location however, so they were buried half way underground – to fix this, we added another attribute wrangle before the copyToPoints where we moved the points along their v@up vector a distance equal to half of an offsetDistance – the offsetDistance channel then referenced the box sizey so it was always half of the height of the box – this positioned the posts directly onto the surface Starting Fence Links Simple Spread – Made 3 new copies of our offsetDistance wrangle node – the general offset to center the posts went into the first copy – this copy offset was used for the link locations – this copy then went into both of the remaining offset copies – one of these final offset copies had an inverse relative reference to the other’s offset – these were merged – this merge with the combined offsets created a spread, where changing the offset of the one offset corresponded to a reverse offset of the other Creating Separate Staggered Lines – put all of the points of the link lines into a group called cut – used polycut node to turn all of these small line segments between the points into individual prims – used an attribute wrangle with modulus 2 function to basically remove every other primitive – we then used a copy of this setup but with the opposite modulus (when equal to 1 instead of 0) to delete the opposite segments – these were then combined with an offset to give an overall controllable pair of segment groups – this entire setup was then copied to create a second set of links all together Parameterization – Using the offset attribute wrangle we created in several different locations lets us control several dimensions of the fence links – overall distance of links from the ground – distance between the two sets of links – spread distance within a link set itself Creating Links – used a small grid as the base object – used Sweep node to place these all along the link points – used a Polyfill (the polycap they used must be deprecated) to fill in the ends of the links Extra Polish – to make the fence links feel less identical, they added a varied horizontal offset to them – this was done by using another copy of the offset wrangle created, but changing the v@up to v@side – they then added a dir (direction) vector, which used another mod 2 function, but fit the result between -1 and 1 – this was also applied to the offset, so the links would alternate offset directions with each link

More Houdini Tutorials – Procedural Assets and More Basics

May 18, 2019

Houdini Tutorials

Procedural Assets

Vimeo – Intro to Procedural Modeling in Houdini: Making a Fence Asset

By: trzanko

SideFX – Introduction to Procedural Modeling

By: SideFX – Game Tutor

Since my main issues for my procedural modeling project stem from not being familiar with procedural asset tools, I figured I should finally take that approach for my tutorial searches to help learn some new techniques. This led me to this great tutorial on creating a simple fence asset that I think will actually give me some pretty relateable tools when it comes to positioning parts for my frog generator. I am really hoping this helps me control the digits and toes of the frogs in a much nicer way.

The other link is actually a series of small tutorials. I wanted to grab these as well since they cover the basics again, which is something I can still use review on as often as possible, as well as leading into the creation of a procedural stair asset. This seems fairly simple, which is a nice way to start looking into how procedural assets are designed.

Objects Follow Player in Formation

May 16, 2019

Follow Player Script for Unity

Follow with Formation and Noise

Vimeo – Demonstration of the FollowFormation Scripts with Noise Features

By: Me

This clip just shows off the different aspects and functionalities for my FollowFormation scripts so far.

I was working on a system in Unity for a class project that would allow a player to collect objects around the map by running into them, and then they would follow the player around in some sort of formation. This ended up working better by splitting the concept up into two classes: Leader (on the player object) and Follow (on the following objects).

Leader script

Since we wanted to control the general formation of these objects as well, we’ll start with the Leader script. To make a simple and easily modifiable system, we decided on making a system based on a bunch of transforms childed to the player that would serve as the formation locations. The Leader script basically just grabs all of the children objects and holds them in an array. This is the formationPositions array. It then has a public static method that gives one of these gameObjects and then increments a counter so the next time it is called it returns the next one. This leads into the Follow script.

Follow Script

The Follow script is placed on the objects that will follow the player when collected. The first action is having them be collected in the first place. This is done with a simple collision that starts the following (and turns off the collider so they don’t interact with anything, including the player again). To help with the overall idea of being in formation, the Follow object actually grabs that next gameObject in the formationPositions array to follow around. This is how each object actually gets a different spot in the formation to follow around. With this setup, we just needed to determine how we wanted them to follow.

Various Follow Methods

First, I tried using a combination of LookAt and adding a velocity in the transform.forward direction. This was solid for giving them a bit of an organic movement feel, but it was not very controlled. If the speed was very different from that of the player, their movements felt awkward and they would also tend to clump up. This could be an interesting solution route, but it would take a lot more work to function properly.

Next, we looked at simply setting the transform.position to the follow object. This wasn’t great as it looked very mechanical, especially immediately upon collecting the object. It would just teleport behind the player.

Finally, we settled on using a Lerp function along with the transform.position. With use of an additional speed variable, this gave us a nice, smooth motion that was easy to modify to give various feels.

FormationNoise

After settling on the foundational movement for the following objects, we wanted to look into adding some noise to their movements to make them feel a bit more lifelike. Since I knew there were going to be a few different options of noise I’d like to switch between to see which ones felt better/worse with different parameters, I looked into setting up an enumerator with a switch case statement to easily switch between these different options. I simply created an enum called Motion that held a value for each of the different types of noise I made, and had a switch case check the Motion motion to determine which noise that specific object would use. This ended up being extra nice as I could also have different objects testing different types all at once.

It should also be noted that in order to keep things simple, I added the FormationNoise script directly to the formation position gameObjects that were childed to the player. Moving these simple transform objects would in turn move the following object following it as it is specifically given this gameObject transform to follow.

Finally, since everything was dealing with keeping these objects in the general area designated for their spot in a formation, the initialLocation is recorded on Start so we know its initial localPosition. This helped move the objects around this point, as opposed to continually adding or something and having it fly out of position.

Noise Methods

The first noise we tried was a simple random range applied to the entire position vector of this formation position object. I created a variable for the max and min of the random range to randomly sift through, and every frame a value in this range would be added to the initialLocation. This actually ended up being pretty nice for creating a “buzzing” or “vibrating” effect, which was nice since these would eventually be applied to bee characters for the ‘ project, but other than that it was not very interesting motion.

Since that method seemed a bit too hectic, I wanted to test just adding some noise to a single dimension. I chose the x-axis to randomize along since that seemed like it would give the most interesting results from my camera top view. This did seem a bit more controlled, but still mostly just had a “buzzing” feel to it.

Finally, I thought about what general motion I would like along with the noise and I thought a nice overall controlled swaying and/or bobbing would be nice to have with the noise. This method got a bit more involved. I created a sway variable, which would determine the amplitude they would drift on a given axis (for initial testing, I just did the x-axis). I also created a swaySpeed to determine just how fast they moved between the max and min sway locations.

Since I liked the “buzzing” feel of random moving the point around a small range, I kept that for the y-axis and z-axis. I just had the sway controlling the x-axis movement. This had the object buzz around a bit as it moved back and forth relative to its given initial formation position. This all led to a nice movement that was still very controlled, but felt a lot more alive.

POTENTIAL IMPROVEMENTS

The movement of the objects when they are following a significantly fast player still looks pretty direct and parented. It appears that if their overall speed is much greater than the movements/speed of their internal noise methods, the noise gets a bit lost or drowned out. This is something I will just have to player with more when dealing with the relative speed of the following objects and the player.

Possibly control more axes of noise a bit more. Adding a bobbing effect by swaying in the y-axis would give a nice effect. If we control too many axes, we’ll have to recheck if it’s still a nice effect or if we’ll need to add more actual noise to the movements again to keep them from feeling too robotic.

Currently the setup of the Leader’s formationPositions array only makes an array the size of how many children the player object has at startup. This makes the system a bit rigid, or require having a bunch of unneccessary children objects for a while with possible errors for large numbers of followers exceeding the array count. A more variable system might use a list instead of an array, or just a large array with some method that creates gameObjects as followers are gained to add to that array.

Houdini Basics Overview

May 15, 2019

More Houdini Basics

Add Node, Along with Basic SOPS and Loops

Youtube – Houdini add node tutorial (RUS)

By: Houdini Nodes


Houdini – Add geometry node

By: SideFX


Youtube – Houdini Training – Appendix 01 – basic SOPs overview

By: Gianvito Serra


Youtube – Houdini Tutorial – SOP loops

By: 3D Tutorials and News


My procedural modeling class recommended looking into the “Add” SOP to get some webbing for my frog feet generator, and searching for this also led me to some interesting basic overviews concerning SOPs in general in Houdini. Although I don’t speak Russian, the first quick video still makes sense with what is happening visually. The other videos are just really nice overviews for a lot of different SOP options available, which are going to be key for me to have a good understanding of for my frog generator.