Modeling & Rendering a Quartz Crystal in Houdini 16

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
as some of you might be aware of I have a small obsession with minerals I really like the intricate shapes and structures they can form one of the first things I do when testing out new render engines is I try to render a given piece of a mineral crystal for example quartz and building a general quartz geometry is not that complicated but getting it right takes a bit of experimentation and trial and error for example when you look at this image of a course from Wikipedia you see several things happening on the one end of course is a general geometric shape of the crystals on the other hand there are small inclusions there is birefringence there is dispersion also there is this slight unevenness in the crystal how the crystal is formed and also there are cloudy parts and of course some fractures in the crystals so what we have to do in order to model a decent quartz crystal is take care of all these imperfections the first step is to actually model the geometry of quartz crystal what you want to research in order to give you an idea of how crystal shapes are formed is you want a googol crystal habit yes there are a few sites popping up which will inform you of that drugs are bad for you but just add quartz crystal habit to your google search and you will be directed to pages that show you how the shapes of quartz crystals form and if there's anyone out there who's into minerals and who can explain this better or give some additional in-depth information I'd be happy if you guys contact me because I'm really into the stuff but the general idea of how I understood crystals form is basically by combining different examiner and trigonal shapes in essence combining different platonic solids and what I want to do for a crystal is I want to combine a hexagonal shape with a dodecahedron using one of the new cool features in Houdini 16 that is the dual tool so in Houdini let's drop down a geo sob call this one crystal dive in there delete the file node and drop down a tube which is gonna be our hexagon let's set the tube to be a polygon with six sides and end caps also let's scale back its radius to something like a point 1 and let's add vertex normals okay this is our exact an all shape let's create the dodecahedron by dropping down a plutonic and setting it to like he drawn let's add normals highlight this and at a transform scale this down a bit translate it upwards of it and rotate it so let's drop down the new bull sub and wire up our tube and the Platonic and highlight the bull and you see we immediately get this shape here which will be our basic quartz crystal the next thing I would like to do is there are these small dents in the crystal and I look at this image here so let's account for this from our rule I'm going to drop down a convert line which will take our polygons and keep only the edges and after that I'm gonna drop down a scatter node scatter points on those lines in our case let's scatter one of 20 points and disable the relaxation now I'm gonna create a sphere set that to be polygon as well increase the frequency and I'll down the scale to something really small now I'm gonna drop down a copy two points up which in essence is the old copy shop which just contains the functionality to copy objects on to points wire up the sphere and the scattered points in here highlight it and we see we now scattered the sphere onto those points what I want to do however is bury the scale of a sphere a bit so let's drop down and add Ferb randomize and we'd like to randomize an attribute called P scale it is only one dimensional it's just one float and it should be between 0 & 1 yr this up in here and we see we have now randomly scaled spheres and what I want to do is subtract these spheres from our basic quartz crystal shape however if these spheres are a bit too round to perfect so let's drop down a mountain salt to distort them a bit this is a bit too huge so let's decrease the height also decrease the element size and that looks promising so let's create another bool put this to the side wire up our basic geometry in here and our clone spheres in here highlight the bool and this takes a little while and let's set this pool up not to do an intersection but to subtract the second input from the first input so we end up with something like this and we wanna uncheck collapse tiny seam adjacent edges right time to save this and when we look at this quartz image again we see in those areas here we have internal fractures of a crystal so let's try and model these for that what I want to do is basically take a noisy volume mesh that and use it as an intersection in another boolean so we can cut the crystal into different time slices so let's create that volume by first dropping down a bound node to get the boundaries of this basic crystal here and let's add some padding to it like so and turn it into a V DP v DB from polygons so dial down the voxel size let's use a V DB fill the interior and have only one exterior voxel and highlight this up and now let's drop down a volume Bob and fill this volume with noise dive into the volume Bob and let's drop down a unified noise wire its output into the density slot here and let's wire up the position to the position input let's promote the fractal type by middle clicking on it to promote parameter same for the octaves like genera t roughness and scroll down here the basis the frequency and the offset let's have the fractal type to terrain and set the frequency to let's say 17 for now Ahnold and drop down II convert VDB sub and let's convert this to polygons let's tile up the ISO value something like this and drop down another boolean and let's set this to shatter I let it fingers crossed and we can see we have now a fractured crystal let's uncheck collapse tiny seam adjacent edges again and what I found when looking at different photos of quartz crystal is we now model is a uniform distribution of internal shattering because our noise is pretty uniform our noise that we're meshing into geometry and using as an intersection geometry and what helps tremendously and increasing the realism of the crystals that I modeled was driving the noise frequency by its position within the volume so let's do that by using the bounding box position here which goes from 0 to 1 in each axis depending on where in our volume we are currently in this voxel so let's convert that with a vector to float type in our bounding box here and we are interested in the Y position in our volume let's use that to drive the overall frequency of the noise and what I want to do is multiply this with a given number so let's drop down a multiply here wire up the Y output in here let's drop down a float to the vector 4 to convert the result of the multiplication back into a vector with four components which is going to drive or noise frequency here like so okay dive up one level and what we need to do is increase this input number two which is the second port on our multiplication node and in our case let's set this to 40 so we can see we get this behavior now so we have lots of fractures at the top and bottom end of the volume and rather low number in the middle here which is exactly what I wanted also what I want to do in the convert eb node is style down our ISO value and our volume Bob let's add our noise type to wall-e like so again these are parameters that I dialed in by lots of trial and error and test renderings I ended up using those because they looked good well let's highlight the boolean again so looking at this image of a quartz another thing that's happening within the crystals are these small inclusions so let's create those by using a similar technique that we use to create this intersection geometry here starting with a V DB from polygons up with a voxel size of point zero zero three again we want to create a fog B DB with one exterior band and we want the interior to be filled we wire this up to the boolean and after it drop down a volume Bob again dive into that Bob and drop down a unified noise again wire up the position and the output goes straight to the density out let's promote the standard inputs tied up one level and set up our noise now let's use a convert VDB again and convert our volume to polygons again like this and we might want to dial up the ISO value like so so we have this really nice inclusions going on here save that and add normals to this geometry okay what we have now is this fractured quartz crystal with these chips that have fallen off the edges and we have this inclusion geometry here let's just drop down another normal behind our boolean so a crystal has some normals okay let's drop down to material nodes to assign materials to on the one hand the inclusions and on the other hand on the crystal and merge those two finally drop down an output which will be used as the general geometry output okay time to build our materials let's drop down a material network dive in and the material network replaces the shop context so either what you can do is on our top level go into the material level or in the obj and geo level just drop down a material net and build your materials in there which has the advantage that you will copy your materials over if you're copying geometry or setups around so that's what I like to do and in here let's create the shader for the crystal and what I'd like to use is the classic shader which is one of the two kind of nuber shaders that aren't there in h16 and one there's a classic shader on the other and there's a principal shader which relies on a Disney shader model which some artists find easier to use I'm kind of a fanboy for the classic shader so let's drop this down and what I want to do here is on the wined disable diffuse because when I look at my crystal it is refractive and reflective but does not have diffuse let's check that we have enabled the base reflections which we can leave as is don't need a reflect coat yet we should enable refractions and I would like to choose the GTX reflection model and what this allows me to do is I can dial in dispersion down here and dispersion is gonna take care of these color fringes that we see here because it'll bend light differently according to the lights wavelength but I also see one looking at this crystal on the one hand is this kind of bumpy structure that comes from the way the crystals have grown like layer by layer and this milky inclusion area so let's model both in the shader on the one hand by enabling subsurface and let's decrease the scatter distance and those tiny crystal layers that you can see build up in reflections let's model them using displacement let's disable true displacement and use a noise for displacement and increase only the noises frequency along the y axis which will yield those layered structures also let's just play with the offset a bit again values that I found out by trial and error and decreases the amplitude and that should be good let's disable subsurface for a minute and in our obj level drop down an environment light as well as a camera control clicking on those icons and in the environment light let's load up an HDR I render light geometry and make sure cameras is locked to a viewport zoom out of it like so go to render you in the out level and we already have a mantra I PR drop down here so let's just go to rendering and set our render engine to physically based rendering and hit render okay we see it on the one hand we get more normal errors on the other hand we haven't attached material let's take care of both so in our case let's just go to the obj level dive into the crystal geometry and let's take the cheap and easy route here and just style down the cusps angle to say something like three which is gonna fix my normals for now of course admit this is a cheap method but in this case it works let's assign the material to our main geometry let's just pick the material we created hit accept and go to the render view and while this test rendering is converging we can see several things on the one hand the fractures were kind of nice the dispersion is there we have small problems with our inclusions because they turn out black that's what these black spots are in there so we have to take care of those because they don't have a material yet and those chips work nicely also I'm getting some like artifacts here I'm wondering if this is either a reflection of my background HDR or maybe my radius isn't high enough solace to the out node and in the mantra node on their limits let's dial aathi reflect and refract limit let's just check in our material under settings there are two things which I want to change on one hand I want to disable the shade both sizes front that was giving me errors and was giving wrong results okay that seems of taken care of the most dark spots also what I want to check is the inside IR which is the refractive index of the material and 1.33 is the IOR of water and of course and I think quartz is all you are is let me look this up he has something like one point four six one point four five eight in my case so this means my material bends light stronger let's take care of the inclusions and what the inclusions are in most case our conveyer bubbles so let's model a quick air shader again using the classic shader and I want to uncheck the diffuse again let's keep the reflect and enable the refractions let's use ggx here as well no dispersion and under settings let's set the inside IR which is what's inside of my volume which is air21 which is the refractive index of air and the outside IR to the refractive index of what's around this area in our case quartz so let's at this one to one point four five eight and call this shader here head up one level go to this material node here and assign the material like so and as you can see now the black spots are gone and they have been replaced with small inclusions in the form of air bubbles okay the last thing I would like to adjust in this shader are the cloudy areas of the course that we see in this photo I would like to model them using subsurface scattering so in our material network in the classic shader which is our quartz shade or so maybe we should call this quartz and also on the quartz shader under subsurface let's enable subsurface scattering in our out let's go to the mantra IPR and let's increase our subsurface limit something like eight and our diffuse limit too and I'm a sampling let's dial up the subsurface quality of it and let's go back to our material quartz and in our case let's just dial up the subsurface intensity to ten now we can see parts of our crystal now turning into this milky kind of cloudy crystal however what I'd like to do is have only parts of only certain areas in this course to be milky so let's use one of the new features of the material net and use a noise to drive the subsurface intensity so let's drop down a unified noise and on the surface tab subsurface is way down here subsurface intensity is this let's pipe this in the out and the noise needs a position let's stop the rendering for a while and the position is derived from the variables so let's drop down those and we have our position here so let's wire that into the noise and just noise settings again found them out by trial and error and what kind of work for me was a simplex noise with a standard fractal type frequency was all set to seven I had the gain checked set to 0.9 and I also had the output range enabled and set the ANU maximum to seven let me just check yes should be it so let's collapse that safe and hit render again and what we can see now is that we have areas in the crystal like here and here where there's the cloudiness showing through coming from the subsurface and we have areas like here which are pretty clear and transparent so that is working and in order to render out a final image out of this I would increase my maximum amount of rays samples to something rather high like 64 one at 28 maybe dial down the noise level a bit and then let this converge which might take a good while admittedly so the takeaway here is basic crystal shapes are nothing more than a combination of bulls and platonic solids on the one hand on the other hand you can use the new blue features to a really detail and fracture geometry and is really powerful and stable the new material networks give you on the one hand core features such as dispersion on the other hand they allow you to directly adjust shader parameters on the material level without diving into the materials themselves and just wiring up notes and chaining notes together which is really comfortable and a really straightforward workflow so while I set this up for a final rendering and let it converge forever I hope you're having fun with this I hope you are creating amazing artwork with this always intrigued to see what you guys come up with add its Cheers and goodbye
Info
Channel: Entagma
Views: 51,115
Rating: undefined out of 5
Keywords:
Id: pq2bYZGurzc
Channel Id: undefined
Length: 19min 12sec (1152 seconds)
Published: Thu Dec 26 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.