Website powered by

Houdini Blog #33: 2min Cliffs

General / 29 October 2019

This weeks post is about how you can generate a cliff. I made again a 2min video about it so you will have a good idea on how it is made. 

In general there is a lot of information out there about rocks generation. Of course most videos about it are long videos and here is then a 2min video that gives an overview on the cliff generation. You could use this setup for making stones and other type of rocks. By playing around with the base shapes and different noises.

I hope you enjoy the video :)

If you are interested in the file you can get it here: https://gum.co/hOLYc






Houdini Blog #32: Boolean+Voxel Workflow

General / 22 October 2019

For this weeks blog I wanted to share this workflow that I have been using. I think it is a nice way of working and it can go fast. The gun model was made in a few hours, this includes the High and lowpoly.

It seems that a lot of people seems to like these quick tutorials so I might now and then make some 2 min tutorials. It is a cool way of sharing knowledge but the downside can some times be that there is not always room for going in details.

I hope you enjoy this tutorial and let me know what you think :)



  


Here are more shots of the result.

Textured Version

Wireframe

A small gif that shows the reducing process. (this is in real time)


Houdini Blog #31: 2min House Generator

General / 14 October 2019

This week I made some changes to the blog. I wanted to experiment a bit with the look of the blog and some of structure. Definitely let me know what you think, in the comments. I have a small problem with exporting the image, the colors are not the same as in the software but that will be something to figure out for the next post.

Besides the new look, I want to celebrate the +1000 followers on Artstation and Twitter! If you are reading this thank you so much :) I have also seen some of you starting with Houdini and making awesome stuff.

To Celebrate it I made a 2 min House generator tutorial, I hope you enjoy it. I might be interested in making more like these videos (quick tutorials)





  That was it for this week, Thanks for taking a look at the blog and see you on the next one!


Houdini Blog #30: Base Roads

General / 07 October 2019

This week I build a small road system for the City generator. In previous blogs I have made the building generator and the tool to interact with the city in game engine. Next step is blocking out the roads and streets, at the moment I kept the system quiet simple and used some groups to decided where road are.

Definitely check out the other post because here I will continue to build on it.

Base Roads

To start building the roads you could first get the ground plane on where roads should be. This can be done by getting the bounds of all the input boxes (These are the boxes that represent the buildings). Once you got the bound you can extract the primitive that is facing down with a group node and then flip the primitive with the reverse. This primitive is now the ground plane, if you would play around with the settings of the bounds node you could make it bigger or smaller. (First part on Image)

Next will be splitting this ground plane in roads and places for the buildings. This will be done with group nodes. To make this selection I will be needing a lot of points on the ground plane. To add all these points I used the Divide with Bricker Polygons, by using this feature it will create points on fixed distances. So If my city is larger it will keep adding points with the same distance between them. (Second part of Image)

Then use a group node that select the points where houses are on the ground plane. You get the input boxes and align them with the Axis align node. If they are aligned, the boxes will collided with the ground plane. These boxes are used in the second input of the group node. In the group node use the Keep in bounding region, this will select all the point that are in the geometry of the second input of the group. (Third part of image)

This new group that represents the houses, will be expanded. You want to expand the group to add some walking space around the houses. By using the group expand node you can quickly expand the group more. Then you could also convert it to primitives with group promote. (Forth part of image)

Now you have a decent amount of information to add details and place around some props. (Last part of the image)


 Here are some examples of adding some details quickly.

Cables

1. Start from the ground plane with the groups.

2. Use the split node to split the primitives, so you have now the primitives of where the houses will stand. Also use a dissolve flat edges node to remove all the points that are not needed.

3.Fuse points together, this is a cheap trick to connect the cables form all the buildings together.

4. Then I loop over each primitive (by using carve node you can get primitives out of the lines). In a wrangle I create a parabola and add this to the current Y pos. More about this cable can be found in blog #1.

5. Moving the cables to a good position.

6. Adding support geometry (aka a tube) and merging it with the result.

Dirt along the road

1. Start from the ground plane with the groups.

2.Split the roads part.

3. Get the sides of the roads, in this case it is done by using a extrude node and disabling outputs front. So the idea is that based on the inset of the extrude node you can change how far props are being placed.

4.Scatter points on the surface.

5.Copy models on these points. To give some random rotation to the points you can use a small line of vex to get some randomness.

float angle =  fit01(rand(@ptnum), -35, 35);
@rot = quaternion( angle , {0,1,0});

6. The result, in game engine you can then replace these simple tube with the final model of some dirt or garbage props.



That was it for this week, I have not that much time late to build on the project but it is slowly getting there.

And as always feel free to share any feedback, thoughts or resources.


Houdini Blog #29: City Generation

General / 01 October 2019

This week in the blog post I will continue to build on the City generator/Builder. In last post of the city builder I talked about how an image can make the layout and place building for you. 

In this post I decided to change that system a bit. I started to experiment more with what I could use as input for the City.

As result I build in the tool that you now can use unreal Engine boxes that you can use as input. I found this a lot more fun to work with. 

I could blockout out a simple layout with cubes in Unreal Engine and the Houdini tool will build a City out of it. 


Here is a small Video on it.


From Boxes to buildings


As some of you already know from previous blog posts the buildings are pre-baked with the building generator. So this takes away the difficult part of generating a building and now I need to replace the box with a pre-baked building.


First step with the system is to use a Object Merge node and expose the object parameter, that way you can in Unreal engine assign cubes to the tool.

To test it in Houdini, just place around some basic cubes. Then each cube will need to represent one point to copy buildings on.

Take a group node and use the by normal feature. Then fill in -1 in the Y so all the primitives that are looking down are selected. 

These primitives are then used to get a middle point. (Similar like previous post where you could do the same with the layout for the image.) What you do is you use a for each loop and loop over each primitive. In the loop you use a fuse and set it on a high value like 100. (and disable Remove Repeated Vertices in the fuse)

This will result in getting the middle point of the primitive. In that point you could also store the Bounding box size of the original cubes. This value is then used to scale the pre-baked Houses. So if the box is 2 in height then is save that info in scale attribute and when doing a copy to points it will recognize the scale attribute with height 2. (Other mention to Blog 28, in there is a better breakdown on saving the box size in the points :) )

Gif is a small overview on how it is done.

Next steps is using the Copy to points with the buildings (with pack and instance enabled). This results then in the boxes being replaced by the Houses.


Adding basic details

Further you can use the input boxes to copy details on it or to add details between Houses. 

Starting with the bottom primitives of the input boxes. Those primitives will then be resampled, this will create new points that are equal placed along the primitive. After the resample you can add normals on these points by using the polyframe sop. In tangent name fill in N.

Last thing to do is removing the corner points, this is something that I prefer so models are not copied on the corners. 

Photo shows a breakdown of creating points to copy models on.

Removing the corner points can be done with a pointcloud. Place down a wrangle node and first input is the primitives with resample on them, second input is the bottom primitives. 

And what the pointcloud will be doing is that it will look for points in a radius. That means that you can compare input 1 and 2 from the wrangle, so only at the corners a pointcloud will see points from the other input.

int pcloud = pcopen(1, "P", @P, ch("range"), 10); //creating the pointcloud and expose the radius

if(pcnumfound(pcloud)>ch("amount_points")) //looking in the pointcloud to see how many point there are
{
    removepoint(0, @ptnum); //delete point if more then "amount_points"
}

Once having the points you could use these to copy models on. I have to say that this is still experimental, so it might change but for the moment it is decent,

In the image here there are 3 modular pieces copied over the points of the resample. In Unreal Engine you can add as many new slots to distribute new models on the points.


That was it for this week.

There is still a lot to explore with the generator and I'm curios in what direction it is going.


See you on the next one and feel free to share feedback or thoughts.

Houdini Blog #28: City Builder part 03

General / 23 September 2019

This post will continue on the city generation. As I have the base of the building generation, next part will be placing buildings around. 

The buildings will be pre-baked so the tools work a bit faster when placing around the buildings. 


The ground plane.

The buildings will be placed based on an image. A good example of this method can be found here

The node that can handle an image and convert it to geometry is Trace SOP. You can reference an image (in this case a top few of a city layout) and it will trace the image based on black and white values. In the filter settings of the Trace SOP you can do some clean up of the shape. But sometimes you will have to do a clean up with a fuse and the facet nodes. In the facet node you can use the remove inline points. This can remove points that are not really adding detail to a shape.

Photo above is example of an image turned into geometry.

This is then the layout that I want for my buildings. You can do an extrude to make buildings/boxes from these. What could be cool is that every building  has a different height and that the building is the center are bigger.

To make the variation, you can use the color attribute to save the information. With an attribute transfer it is possible then to convert colors. In the image below you can see that the sphere is transferring a white color into the layout. If you move the sphere the colors will also change.


This is then the blockout for the city by using the Cd value in the extrude node.

Placing buildings

Next step is then replacing the blockout shapes with the buildings that I generated in last post. Since I want to instance the buildings I have to be careful not to break the instancing. Using instancing of buildings will save some performance and it will also be nicer to work with the tool as it will work faster. 

First then that you can do is getting the middle point of the buildings. This point is then used to copy buildings on. An easy way of getting that middle point is by using a for-each connect piece loop. This will loop over all the building one by one. In the loop use a fuse and because it will snap on average it will go to the middle. (Also disable Remove repeated vertices)

The result should look like this.

With these new created points you can store the bounding box size of the blockout buildings.

You can do this with a wrangle node. The first input is the point and the second input of the wrangle is the blockout shape. This wrangle is also in the for-each loop.

@scale = getbbox_size(1);

By saving the values in the @scale Houdini will know what to do with this attribute when you use a copy to points node.

This should be the result when you copy to points a model.


Houdini Blog #27: City Builder Part 02

General / 16 September 2019

This week I continued working on the city generator. Last post I started exploring multiple options and making some prototypes on how I could build the city generator. 

I mainly focused on generating sci-fi looking buildings. The buildings are now fully procedural generated and don't use a modular kit, like I did with the house generator.

Here is a WIP of the city being generated, this is happening in real-time!  (Buildings are pre-baked and then instanced, that is why it works well in real time)


Further when working in Houdini I was wondering if you could get any matcap like material in the viewport. In the Game Dev Tools there is a shader for this. On this link here I share some materials that can be used in the matcap of Houdini. https://gum.co/gwcFy

Blockout shapes generator

This is a generator that will create a sci-fi looking model from a box. In the image below you can get the idea. (input is a box, output is a sci-fi box)

This will be the base of the building generator, so I started from scratch again and kept that idea from last weeks blog on a side. With the this tool I can create any box size that I want and it will create similar sci-fi looking models out of it.


Here is how it is made.

First you can start out with adding a few bevels on the edges. So the main box shapes is not that noticeable. Then you can scale the box a little bit and use it to create multiple layer. Like in the image below, Red part is normal scale and blue is scale 1.1 (so the can layer on each other).

Both the red and blue models are made by boolean the main box input. 

Start by creating points on the box, this can be easily done with the scatter sop. You can make a more complex system to get more control of where points will be, like fuse points on grid or use a wrangle and write code on what you want.

Once you got some points you can copy shapes on it, like boxes with a bevel. These shapes will be used in a boolean to create a more interesting look for the main box. This proces is repeated for the blue model but with bigger shapes copied on the points.

This is then the base idea of creating those models.


Copying shapes together

To create the buildings you need the generator from above and copy multiple of these boxes together. 

I used a technique similar like in this video, last weeks post had a similar with the copy stamp. I can recommend watching them both.


Here is a breakdown on one of my generated buildings.

1.  Copying big boxes on each other with the method shown in the video.

2. Copying smaller boxes on the main building

3. Adding more details and I automatically cut the building but this is still WIP.


As last here are more variations and a shot from UE4

That was it for this week, I hope you enjoyed it.

Houdini Blog 26: City builder

General / 10 September 2019

Another city generator? Yes :)

For this weeks blog I decided to start making a city builder tool. I'm looking for a tool that is easy to use and can create easily cities. The process of making this will take a few blogs. So as this is the first post about it, it will be more research and experimental ideas on the tool.


I also want to share this video of Indie pixel were he breaks down how to start with Houdini, so if you are new to Houdini or know someone new to it, the video gives a good overview what it will take to learn basics of Houdini.


Further in the week I have published a new art work on Artstation. In blog 24 I made the base of it.

https://www.artstation.com/artwork/8la5ww 


Base ground

To create the buildings I want a system were you can click or paint the building. For inspiration I really like this: https://twitter.com/i/status/1164926304640229376 made by Oskar Stålberg

As base for test I made a simple setup were you can paint buildings.

 To create something similar start with a grid or other shape you like. Then use a Voronoi fracture to create a layout for the city (see image below). Based on how you handle the fracture it will create the shape you are looking for, more can be found about fracturing in blog 10.

Once you got that use the paint SOP to color where you want the buildings. Don't forget to put a color with black (value 0,0,0) before painting.

With the Poly extrude you can then get buildings out of it. In the Poly extrude you got to Local control and use Cd in the Distance Scale. Notice that the Cd attribute has to be stored in the primitives, you can use a attribute promote to change the Cd from points to primitive attributes.

You should have something similar like the image above, what I also did in that image is snapping along the Y axis, so I control how long each floor is. You can snap the points by using a fuse sop with snap to grid or you can use a wrangle and use the rint function.


This is the simple base setup for the city, I might change it later. For early testing this will be fine.


Generate Buildings

For the buildings I choose to go more in a direction of Sci-fi. I have made a house generator before (see it here) but this time I want to experiment a bit more and see with what interesting systems I find.

To create the big main shapes of the building I used copy stamp SOP. In this video you can get a good idea on how it works and how you can set it up.

What I found that cutting that generated shape in half, can be useful as base for a building.

The order that I want create the building is first big shape then medium shape and then small shapes. (this is similar like the general approach of creating a model, start with big shape and go to more smaller shapes)

For the medium shapes in this case I took some medium houses and copy them on the generated base. I didn't use the scatter node to place them around, I felt with the scatter it was a bit to random.  So points are placed based on a grid, so buildings would less overlap.

The Copy Stamp was also used to create the houses to get a different size.


What I also want to show you is that in the Game Dev Tools is a cable generator. By simply drawing a curve it generates multiple cable. Based on what you are looking for, it can be useful. If you would be looking for something more complex like let's say you need a cable that reacts with collisions then you need a custom system or you could tweak the Game Dev tool.



This week was a bit more experimenting and trying out different systems. Next week I will continue trying out more systems and finding what I'm looking for.


Houdini Blog #25: Multi-parameters

General / 03 September 2019

In this blog I will show how you can make a multi parameter block. This can be really useful to have in a HDA.

A Multi parameter block allows you to create a list of multiple parameters. 

The gif below is a small demo of what you can do.

Making the multi parameter

First you can make a HDA and go in the Type Properties. Once in that menu create a folder, in the settings of the folder change type to Multiparm Block.

Adding new parameters in the folder will create automatically a "#" behind the parameters once Apply is pressed. The # shows that it will be a list of multiple parameters. If parameters are created the # will be replaced with numbers based on how many parameters you add.

Also the ui will change on the type of Multiparm Block you choose. In the image below you can see the difference.

By clicking on the plus and minus buttons you can control the amount of the parameters. Every time you press plus it will duplicate all the parameters in the folder you made in the HDA. 

Using the parameters

Once you added new parameters, you want to use them to control nodes.

As example I will make a system to add boxes and scale them individually. Normally if you want to reference parameters it would look something like this :  ch("../scale1")  . But with a list parameters that can be changed any moment this will not work.

What you need is a for each number (SOP), this will loop based on a number you give. The number in this case is the amount of parameters, which can be found in the folder. So reference the folder, ch("../FolderName"), in the foreach end sop in the iteration parameter. Now it will loop based on how many parameters you create.

Further you can use the for each loop to control the parameters that you create, example here I want to control parameter scale1 to scale10.

By using the current number of loop (or iteration) you can get the values of each parameter. The default way to acces the current loop number is this.

detail("../foreach_count1","iteration", 0)

Then you need to combine this number with the reference to the scale ( ch("../scale#"). By using an expression in the transform SOP you can combine these two strings together. The expression is strcat , this will return a combined version of two strings.

Using the following line in the scale of the transform SOP, the loop will go over each parameter and get the correct value;

ch(strcat("../scale",detail("../foreach_count1","iteration", 0) +1))

Notice that scale# is typed without the #, so the strcat will take care of filling in the number based on the iteration.

Overall using a multiparm block can be very useful if you need to control the amount of parameters. This can open a lot of possibilities and it doesn't require a lot of manual work as you can use loops.


That was it for this week!

Hope you learned something new and see you on the next one.

Houdini Blog #24: Sci-fi bolts generator

General / 26 August 2019

In this week blog I will show how I made a sci-fi bolt generator. I wanted to create a tool that could generate a variation of sci-fi bolts, these could then be used for kitbashing or as alpha/decal.



Ramp control

What I wanted for the tool is that the user with a ramp can control how it will looks. Using a ramp gives you a lot of possibilities compare to a slider to move a certain part up or down.

To create this controller there will be use of VEX, it will only be a few lines. For adding a ramp on a wrangle node use the chramp.

chramp("name_ramp" , value);

The values you have to fill in are the name for the ramp and the value to change. What you have to keep in mind is that the value that you fill in has to be in a range of 0-1. So as you want to move points and these values are not in that range, you will need to calculate the "percentage" of the points.

float(@ptnum)/@numpt;
//or
fit(@ptnum, 0, @numpt, 0, 1);

If you would wonder what ptnum or numpt stands for, they are current point number (@ptnum) and total number of points (@numpt).

Last step is then to use this in the chramp and use this in the y-axis (up axis). 

@P.y = chramp("ramp" , float(@ptnum)/@numpt)* ch("Height_multiplier");

Here is the result of that.

After that you can use this is a sweep to make the base shape of the bolt.

Boolean

A big part of this tool is done with booleans. It is best to not use a lot of boolean nodes as what I experienced it can slow down the tool. You can do multiple objects in one boolean without any problem, by simply merging shapes and use them in the boolean.

Using the boolean is quiet straight forward, you have  inputs and based on the settings they can be subtracted or added to each other. notice also that you can export certain groups in a boolean, you can then use this information to stay procedural.


A feature of the boolean that I want to talk a bit more about is the shatter. With the boolean on shatter it will create new meshes based on the inputs of the boolean. As you can see in the image below the boolean will create 2 meshes.

Further you can use a bevel, you can use the A-B seams group to make the bevel automatically on this cut of the boolean. If you were to move the box of the boolean the bevel will follow it and create decent result most of the time.


Experiment

I had the idea to get the heightmaps of the generator so I could use them in Designer and Painter. By using the maps baker of Houdini this could be automatic, I made a tool for this with the maps baker in it. Every time you make a change it can bake a heightmap, so if you link the time with the seed of the generator it will make every frame a new result and that will be immediately baked in a height map.

In 1:50 min it baked 50 heightmaps, so that is every 3 seconds a heightmap!!!

And here is a result of using the heightmap to create a texture.


That was it for this week, hope you enjoyed and see you next week.

Feel free to share feedback, thoughts or questions.