Master Vertex Displacement in Octane Render for Blender w/ Lino Grandi | NVIDIA Studio Session

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi i'm leno grande from otoy in this video we're going to describe vertex displacement in octane for blender so this is the second part of the two parts video about displacement in octane in the first one we described texture displacement so it's now time to get into the vertex displacement which solves some of the issues you may encounter when using texture displacement let's get started let's start adding a simple plane okay so while taxi displacement is based on voxels so basically you don't need to subdivide the mesh you're using vertex displacement needs more real vertices on your mesh so let's let's try something immediately i'm going to create a material for this plane and i'm going to add vertex displacement so let's start with this let's connect it to the displacement input and the universal material now we need a texture for the texture i'm going to use a mega scan displacement so let's choose a material i mean it can really be anything let's see i like this one let's go into the asset files so just open you know the the folder and i'm going to import the displacement texture in exr format which you know offers more depth so i prefer it over the jpeg also i'm going to change the gamma to 1 since we're dealing with basically high tapped data and something else which is very important to notice is that right now i'm using an image color note which is not needed in this case it's better to use a float image texture node which you know lets you use less memory for just to store the image and calculate the image and when you're dealing with the gpu render of course ram is very important so if you want to optimize you should replace this node with a float image text or not and you know we can do it pretty easily i'm just going to just select the image we already have loaded and get rid of this old color node so all i have to do now is to plug the float image texture image with a with our displacement image texture into the vertex displacement which is already connected to the displacement input of our universal material now if we turn on the preview we will basically see almost nothing you can notice there is you know a waiting time that's the time needed to load the image into the vram so what is cool is that the second time since it gets buffered you will not have to wait for that to happen because you know the image is still there and in the vram this is a big time saver anyway um so we see nothing i mean the height is set to one mid level should be set at 0.5 let's change the gamma to one uh but yeah we see nothing that's because we only have four vertexes we could use the subdivision level of the node but you know to get some good detail you should you have to use um you know high subdivision number um something very important just remember to use shade smooth on the plane uh if you want you know the subdivision to to happen in the correct way when using octane that's very very important by the way um yeah we could activate out about map here which is going to basically give us some the illusion that we have more polygons but still you can see we have not a sufficient number of polygons to get a nice effect so we can use uh different strategies here let's set the subdivision level to zero let's turn off the other bam map option for now and also let's go in edit mode let's subdivide this plane i'm going to divide it quite a lot let's go for like 100 cuts so you can see here we don't need well let's see the middle level let's take a look yeah we you know we can decide the right value for the mid level this is working pretty maybe zero point let's see this is at zero and this is at zero point one eighty let's see 170 i think that that works quite nicely and okay so let's turn on our band map again i'm also going to change the albedo color yeah let's change some stuff here let's go for a ggx model and less specular more roughness something like that so now the displacement is pretty strong considering you know the it's its purpose so let's go for something like 0.25 maybe you can see that in this case we already have some you know nice detail even if we're not using so many polygons it's about 20 000 polygons so pretty nice you can also yeah why not increase the subdivision level now so this is a good compromise i think we can maybe you know increase the height a little bit but this is basically it i mean we're getting a nice displacement with nice detail without using so many resources let's change the sound direction just to make it look better i'm not using an albedo right now i could but you know i just want to to show the displacement so pure displacement you know we can go further and increase the subdivision level to 3. yeah you know after certain number you will not notice any difference so now we are about that you know this is the amount of polygons so it's more than one million right now if we set it to four we probably reach three million or something like that let's take a look we can try you know it takes time to to subdivide the mesh and recalculate the the displacement yeah 5 million so but again this is too much because thanks to the other band map we don't need that you can see the difference with or without the the out of bound map option activated so yeah this is without and this is with and again you know we have to wait for the result to be recalculated but at this point we can you know low down the subdivision level so from four to three and you will see there will be not that much different you may notice something in the shadows but in general this is totally usable let's see subdivision level that too this is also you know already looking really good now let's say we need a larger terrain for our scene we could add a 3d transform node attach it to the transform input of the image and just change the scale to like 0.5 or you know 0.25 now the problem with of course two two different problems the first is that height now it's too high so let's divide by four to respect our initial height and you know you can see you can clearly see the tiling right so how do we solve that well it's pretty pretty easy first let's bring this back to 1 on all axes and let's multiply this by 4 again and we're back to our initial uh situation what i'm going to do right now is to create an instance of this object so i'm going to press alt d g and shift z so we can move it you know on the x y plane and i'm going just to you know move it like this and maybe rotate it a little bit and then i can repeat the operation and create another image but we have this issue here visible seams which is not good but even this it's pretty easy you know to to solve let's go in edit mode let's select just one yeah and i'm going to activate the proportional option pressing o and yeah i want to just select the vertex about you know in the middle press g and z so we can you know just deform the mesh like this and with the wheel we can enlarge the the influence of the proportional i think that's okay so back in object mode now you will see that the seam is gone and we can go on creating other instances maybe you know scale them a little bit rotate and do that again so this works pretty well for creating terrains it's pretty nice you will never you know see any tiling in this case you basically have full control maybe here we see something but we can again rotate the texture totally on the other you know way so this is pretty cool let's go in camera mode and yeah let's explore what what we've done basically you can see it's uh it's pretty nice it really works well let's let's add the albedo why not so i'm going to load the albedo in the scene attach it to the albedo color we have a rocky terrain i'm going to adjust the [Music] the clipping for the camera let's make it bigger and yeah so now i can get close and i can also why not activate some depth of field at this point you can even decide to increase the subdivision level why not but basically yeah that's what you get nice terrain and you can go on uh instancing uh those objects basically you know since you're using instances there is no memory overload so you can really subdivide the the plane as much as you want since yeah again there is no memory overload everything is related to everything is instanced so you're not going to duplicate geometry using instances we can also test other textures so let's just go to the bridge beautiful application and let's try this so let's go to files let's minimize that i'm going to basically load the displacement again set the gamma to one attach it to the texture and i'm going to do the same for the albedo so let's replace the lv as well ac this is a different uh texture so we probably yeah we need to change the height let's go for 0.1 yeah this is going to normalize everything so which totally changed the kind of terrain simply replacing the two textures something interesting that we can do now is to select one of the planes and duplicate it so i'm not creating an instance this time i'm just creating a copy of the object with shift d and then we can move it somewhere else now of course this object is still sharing the same material with the others so let's create an instance of it i mean a new one not the distance and this time i'm going to reconnect the older textures so now in the same scene we have basically two kind of displacement let's raise it up with 0.2 and what is nice is of course you can combine them so yeah you may not be able to see it if the height is not enough but yeah we can move it on the z yeah like this alt d so distance this time rotate yeah you you can totally you know combine different terrains and have total control artistic control on what you're doing so let's look for this new material i had let's take a closer look so yeah the variation in the terrain maybe in this case we should also color correct the texture maybe just changing the gamma can work yeah just yeah fast change of gamma and here we are seamless integration of two different vertex displacement generated meshes the kind of projection we're using for the displacement in this case is a uv projection because the the plane has a uv but what's cool about uh vertex displacement is that you can really use any kind of projection you need so you don't necessarily need a uv as it happens for texture displacement and yeah we're going to demonstrate this let's start with the new scene and i'm going to add round cube let's make it round okay and let's set the subdivision to 32 or so now let's create a new material i'm going to add the displacement texture we've used in the previous example of course we need a vertex displacement node okay all this setup if i start the render we see nothing that's because there is no uv on the object so it's not i mean octane doesn't know how to map that we need to specify a projection so i'm going to use a spherical projection since you know basically mapping the sphere so projection and you can see that without uv just using a projection this is working pretty well so out of bump and some additional subdivisions and we're pretty happy with that yeah i could add like a dirt texture which works really well in this kind of situations maybe the height is a little too high yeah zero point 20 yeah that's more like it and let's increase the detail here we can yeah color the texture let's go sheet smooth and yeah maybe another subdivision level to make it even better let's add the gradient texture because now we can have some fun with colors so you know you can really create without even using a color map you can create some some nice realistic rock maybe we can change the white to another color yeah let's go or something i'll leave my bluish yeah we can invert the normal to get a different total different effect yeah let's go ggx less specular more roughness so this is pretty nice and let's go back to let's do something like this i like that i really like that we can add a 3d transform to the sphere transformation and f control like on a single axis so 0.5 or why not 2 if we want different effect you know more proportionate scale on the three axis but also why not we can divide everything by two for example and then get a smaller texture you can push it further without problems like let's divide by two again now it takes a little time to recalculate but you see you now have more detail of course for both this example and the previous one we've been using bitmaps for simulated displacement what's nice about the vertex displacement is that you can use procedurals so let's take a look at that what i'm going to do now is to basically detach the displacement but also yeah the third texture in this case we don't need it and i'm going to add a procedural texture so let's add noise texture and let's connect it to the texture input so i'm going to load down the subdivision number so we can have faster updates but you can see i just attached this textures and without the need of any projection i can see it on on the object something very important you have to do if you want the other bomb map perfectly match the polygonal displacement well you need to add a projection when no projection is specified and you're using a procedural texture an xyz projection is automatically automatically used so let's add it xyz projection here it is but it's used but in word space so now nothing should change as you can see and that's basically not the correct result we need to set this to object space and then the vertex displacement and the bum map generated by the same displacement will perfectly match so don't forget to do that this is very important now what i want to do is to yeah to scale this so i'm going to yeah attach it to the transform in the image and set this to like two yeah so what's really nice and you know what let's attach the dirt texture again that's pretty nice maybe with invert i don't know no let's leave it like that so yeah let's make it even bigger than it is like let's go for four like this and i want way more octaves so let's go to 16 and this is a totally procedural generated displacement so yeah we can play you know with the contrast for example like 0.5 or more like this and get different results we can play with the gamma it's basically a lot of fun to to play with this kind of effects also the omega can be increased well you know in this case i would not do that okay let's leave it to 0.5 and let's change berlin to turbulence just to see a different noise or why not circular no less octaves just to see the difference it makes subdivide a little more i don't remember if i smoothed the object but yeah let's do it again so to be sure and yeah maybe we have too many details this is quite nice and let's raise up the octaves again also we have chips producing again a different effect now we get a good very good detail you know we can suit divide more if we need it really depends you know how close you need to to go to your mesh this is basically perfect let's increase the scale again that's cool that's cool i want definitely more height and yeah that's that's a cool result we can also mix different displacements you can use two methods and the first one that i'm going to show you is based on the displacement mixer so we have the vertex displacement mixer here that's added to the scene we still have you know the texture image texture based displacement we have been using and what i'm going to do i'm going to duplicate the vertex displacement node here but you know before doing that let's slow down the subdivision level we don't need it right now so now we can you know uh mix the two displacements using um the displacement mixer but before doing that i'm going to just make this displacement more recognizable you know the procedural one and yeah we can attach this here and this here and see the end result so now uh since the weight set for for both textures is set to one we have this kind of result okay basically yeah the the procedural displacement is winning over the texture displacement what we can do we can add noise texture and use it to modulate the effect opacity of the second displacement so let's add another 3d transform okay and let's take a look at this texture okay so i'm going to increase the contrast for sure i'm going to make it way bigger than it is okay so i have well-defined areas and let's attach this back and i'm going to plug this into the blend weight of the second displacement so now you see the opacity of the second displacement the procedural one is has changed and we can see bot displacements so we can also why not increase the subdivisions for bot and get a better result using the vertex displacement mixer you can mix up to 16 displacements which is pretty cool but you know there is another method you can use to mix displacements without even having to use the vertex displacement mixer so let's take a look at how this works i'm going to get rid of one of the two vertex displacement nodes and i'm just going to add a mix texture node so what i'm going to do is to simply connect the two textures to the mix texture inputs and then a mix texture output to the vertex displacement you can now attach this to the displacement again and you will see and now we have bought textures visible you know because the amount is set at 0.5 i set it to 1 we will see only the displacement the procedural displacement if we set it to zero we will only see the bitmap-based displacement so we can you know use the previous noise texture and mix the two seamlessly basically which is pretty cool so let's make some more practical example of how you can use displacement in octane for blender i will start adding a cube and a new material so first thing i'm going to add my vertex displacement note and then my syc projection because i want to use procedurals so you know this is going to be important and i also need a nice texture so that's it texter and the projection here let's add a 3d transform node so we can control our texture i'm also going to change the purlin into chips so you know to get something different than what noise offers oh you know what let's start with berlin so we can see we can better see the difference so again we have no no effect right now because of the subdivision level so let's increase the subdivision level right now we can yeah take it to something that's like six and i'm going to change the scale to four yeah six looks quite nice also the octaves let's increase those and let's activate auto band map so we have this result which is pretty interesting because you know it's just a box at the end with the procedural applied what i want to do now is to add a dirt texture so we can attach it directly and maybe invert the normal now let's leave it like that and increase the details and also add a gradient so i'm going to add a new color something like this yeah this is this looks pretty good to me maybe we can increase the black like that more white okay so we have created this rock and let's change to chips so we can get something way different than before and also the height probably is too high yeah like that i'm going to increase the scale to hate yeah so now what we can do is edit this object like i'm going to extrude this phase and you can see that basically you are modeling in real time the displacement applied also going to change the lighting a little bit yeah something like this is good and yeah i mean i can inset this i can extrude it again start creating this rock let's extrude move rotate and again this is uh pretty fast right now but of course as you add more polygons it may become a little slow i mean the update may become a little slow this is not the case right now but you know let's add some subdivision here and yeah extrude like that so we're totally free you know in modeling there's this sort of rocky landscape object let me go in camera mode and yeah let's go here also the specular is really high i like ggx mode and from the camera we can get some you know depth of field also we can change the the length so that's it so in no time we created something nice we can increase the subdivisions if we want so yeah that looks pretty cool to me especially considering you know that it has been created with no effort we can use a similar technique with other blender tools so let's get rid of this object right now and let's add metabol for example so metabol here it is and i'm going to assign the same material to the metaboli so probably now the subdivision level is really high so let's wait for yeah for octane to calculate the displacement and you can see level two it should be pretty fast uh you know i can move the metabol around and get it updated like this maybe subdivision level 3 is yeah still manageable and looks better so let's duplicate this metabol and you can see it's uh you know it's pretty cool that you can do something like that we can also change the mid level if we want and get you know this kind of shape and yeah let's duplicate again we can also add why not different shaped metabols like plane yeah let's scale it a little bit on the z let's duplicate it move it like this and again we're building some kind of landscape let's duplicate it again and again then i'm going to also duplicate the spherical metal ball so we can add you know some kind of rock in the middle another clone let's make it smaller yeah another clone let's bring it down a little bit and move it along the plane here so again we have created sort of landscape this time using some simple metal bolts very very fast and quite impressive i have to say as a final example i'm going to add a curve so let's add uh yeah curve path should work and let's bring it up now uh i'm going to use the geometry options here and add some depth to the curve that's a little too much problem 0.5 that's it's fine good compromise here i think this should work and what i'm going to do is again to apply the same material to the curve yeah we may need you know some different um yeah some different material so let's duplicate this material and change the middle level to something you know different for the curve but what is nice is that basically about the curve and the object are using the same texture the same material for displacement so i can edit this and you know combine them i can also why not extrude the curve like this we can do crazy thing i can why not i can uh duplicate the whole curve it's just yeah something like this so we can why not we can cross those curves like this and i'm going to do this as well we can change the the radius so it can be smaller or you can be bigger like this okay i like that so again a quick method to create some pretty nice landscapes like this and let's see uh we could maybe increase the subdivision level to make it look even better yeah we're still in a very reasonable polygon count right now so why not let's go for five now we reached uh about three million polygons which is still you know acceptable and fast to manage um we may notice that the scale or the rocks here you know it's different than the one for the curves but you know we can since we have two different materials we can totally change that and make it more similar so i think i've done the opposite right now yeah i should just maybe input 12 or we could make you know the rocks more detail if we want so just a little more detail so let's do that yeah now those changes should make the metabols and the curve more similar that's interesting i don't know exactly what happened here let's reset you know it may happen some glitch let's just wait yeah so yeah let's change the lighting we can do that in real time thanks to the power of octane and nvidia rtx so that's all for now if you have any question you can use the comments in this video i will answer and see you next time you
Info
Channel: NVIDIA Studio
Views: 16,822
Rating: undefined out of 5
Keywords: NVIDIA, NVIDIA Studio, RTX Studio, NVIDIA Creators, NVIDIA Design
Id: ev6iI8UJRWo
Channel Id: undefined
Length: 47min 44sec (2864 seconds)
Published: Fri Sep 11 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.