Tuesday, May 3, 2011

Day 40

I've re-created the rock generation hip file in the houdini commercial version.

It's not complete yet but it will soon become a digital asset as I still have to edit and add more parameters and options for users to use with ease.

Since I had to re-create the hip file I thought I might as well post a step by step walkthrough of what I did for anyone who is interested in creating a rock generation digital asset in houdini.

If you want to you could also grab the original file which wasn't created by me from this thread in odforce:
http://forums.odforce.net/index.php?/topic/10798-procedural-stones%3Cspan%20class=

What I did was hack and play around with the file until I understood what was going on. If you want to you could download the file and read this walkthrough to understand how it was created.

I'm still considered a rookie though so I apologize if there are parts in the walkthrough that I've not explained clearly enough.

This is not to be classified as a professional tutorial either.

I couldn't find much vopsop tutorials to aid me in my research, therefore I'd like to share what I've learnt so far and hope this walkthrough would be useful to anyone who wishes to learn about vopsop.

=======================================================================

First part is pretty simple, all I did was create a box geometry and apply a mountain for some randomness in the shape.





















Next, I subdivided the geometry (just nice, not to much or little) so that I can apply detailed rock features onto the geometry later on.





















Last step in the geometry level, I just created a vopsop as that's where I can apply a lot of nice noisy cracky attributes onto the geometry.





















Now we dive into vopsop. The first step I did was to apply a worley noise into the displacement node.

Like cell noise and voronoi, worley noise has it's own cell-like pattern. That's pretty much the rough idea I have about these noises. Whats important is that I want a nice looking shape and that's what matters.

With that the worley noise will displace and deform the geometry to shape it as shown below.

I'm not worried about tweaking the looks of the geometry now as later I'll add parameters that would enable users to shape the rock any way they want.





















Next, rocks are rough, so I wanted to add some rough sandy looking noise. I created a crackle and a turbulent noise. I'm still pretty new to using crackle (so correct me if I'm wrong) but from what I know so far it creates a lot of holes all around the geometry. It's kinda like a hairy fruit with all the hair's plucked out visually speaking. As for turbulent noise it will give the geometry a rough looking layer which is what I need too.





















I applied a vector to float for the global node to connect to the crackle node. Vector to Float and Float to Vector are nodes that act like... adapters used for plugs and electrical stuff. In this case we're actually converting an attribute from a node such as global to an attribute which can be read by crackle. Sometimes we apply these for S and T coordinates which are similar to our usual coordinates X and Y.

As you can see the thorn-like layer is the result of crackle. The turbulent noise can't really be seen now since the crackle layer is more prominent.

Most importantly, I created an add node (similar to merge node in geometry level) as it will be used to stack up all the layers of patterns and noises I will be applying on to the geometry.





















So I applied a clamp to reduce the value limit of the crackle noisy attribute.

Reminder: I'm not changing or tweaking any attributes for the looks of the rock now. I will create parameters later on which is much convenient and reliable for users using this digital asset.





















In this step I've added additional noise using another turbulent noise and global node. I added the turbulent noise as a layer over the already noisy rough looking rock to make it look... well... more rough.





















Next, what's a rock without cracks? Slightly similar to adding the turbulent noise in the previous step, however now I'm using veins to act as cracks on the rock.





















As you can see here, if I apply the veins directly into the add node, the veins are being projected onto the geometry. The veins are also displacing the geometry but now they're pushing out way too much. What we need is a control to control the depth of the veins.

If you want to have a clearer vision of how veins are projected onto the geometry, plug it right into the displacement node.





















I've applied a fit which acts like a clamp but is somewhat different. I still have to confirm with Mr Ron the difference between clamp and fit.





















Next, I want to push the veins inwards, not outwards. I created a constant to be multiplied with a parameter to push the veins inwards and control the depth of the veins displacement at the same time.





















The constant node (input) would cause whatever value I type into the parameter (crackDepth) attribute to be negative.

Note: That means the float value in the constant should be changed to -1.





















Parameters

Now since I already have my first parameter which is the crackDepth, I've decided to start creating parameters for the rest of the important attributes and noises that need to be tweaked.

Remember that parameters are like controls, controls that are made for cg artists to tweak the looks of something with ease. Parameters are created inside the vopsop and promoted to be used in the geometry level, so that users don't have to dive into vopsop to search for the attributes and values they want to change. You can do many things with parameters like restricting maximum and minimum values, determining default values, giving the ability to change certain options, labeling their names and functions and more.

All the parameters which I'm about to create are optional. The reason why I've created them is because I find them useful. To some artists, some parameters are probably not useful to them. Whatever it is, it's your own preference to create whatever parameters you want for yourself or others.





















Here I've created 2 parameters for users to change the frequency and offset of the worley noise.





















Next I've created a parameter for users to scale up the worley noise to their liking.






















This is what I mean when I say parameters getting promoted to geometry level (I hope it's actually the correct way of putting it in terms of houdini speaking). For now I have 4 parameters: Depth of cracks, Worley Offset, Worley Frequency and Worley Scale.





















Later, I added a parameter for the additional noise, Additional Noise Scale. This will allow users to control how much additional noise they want to displace the rock with.






















2 more parameters which I've created:

Jaggedness of Cracks - This parameter changes the value of the noise amplitude of the veins. As described in the label itself, this controls the jaggedness of the veins, giving it a more lively random feel instead of just having straight veins projected.





















Crack Spacing - Although it says spacing, from what I see it actually determines the number of veins I want projected onto the geometry. I suppose you could say it's like subdividing a geometry with edges but instead this uses veins to subdivide. Thus the more the value, the more crack veins will be projected onto the geometry. Lesser value however will result in fewer projection of crack veins.





















This is what my vopsop looks like for now. It's still a work in progress as I think there's still a couple of more useful parameters I could add in. There are also still improvements that can be made to this rock generation, like adding more layers of patterns and noises to the geometry.








































Now that I have a decent number of parameters to work with, users can finally tweak the looks of the rock geometry to their liking!

I've not converted this into a digital asset yet, I'll do it only after I'm completely satisfied with this rock generation file. After all flexibility is a pretty important factor.

So I suppose this walkthrough shall be continued in the next upcoming post, hopefully along with my storyboard scans as well.

No comments:

Post a Comment