Vertex 2021 - ExplosiaFX Tutorial - Rendering Fire & Smoke

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] we've made this training available to everyone because we're at virtual vertex 2021 visit vertexconf.com to find out more the rest of this explosionfx training series is included with all new purchases and available to customers in their maintenance period in this video we're going to build an advanced cycles 4d material to render exposure effects fire and smoke we'll bring in the exposure effect data and have it drive our emission strength we'll then use temperature in the blackbody node to give our fire a natural color we'll then repeat the process but this time for volume scattering and absorption to create our smoke lastly we'll use a flamethrower setup to demonstrate thicker hydrocarbon smoke okay so we're going to be rendering some fire and smoke using exposure effects and cycles 4d and of course we need to generate that data from exposure effects to pass into a cycles 4d material that's what we have at the top here we have a natural fire and smoke system if i expand it you'll see that we have the exposure effects object it has been cached and then we also have some the sources which was actually a log pile and you can see that in the viewport when i hit play our cache starts to load in and you can see we were generating fuel we were generating heat that was then mixing creating the burning effect which then generates our smoke it also generates more more heat as well so i've actually scouted ahead to a frame that i quite like the look of to work on that's frame 90. there we go and what we're going to do is we're going to start with the fire of our fire and smoke or our simulation here and of course fire is emissive it gives off light so we're going to need to add an emissive shader to a cycles 4d material now if we go to the cycles 4d drop down in the materials manager you'll notice at the bottom we have actually got an xp exposure effects uh menu and if you need to get going fast and just uh start working on a scene just add one of these presets drop it on your exposure effects object it'll automatically load in those channels and then you can just get going start tweaking and changing the colors there so that's a great way of getting up and running really quick however we're going to build ours up from scratch and the reason to do that of course is to get a good understanding of why we do those things and it'll help you be able to create your own materials as well so of course i'm going to add that emissive material and we find the emission shader in the surface menu because of course it can be a surface and a volume so let's drop that in like so let's move this over to the right here and you'll see that the output node the port that this the emission node is piping into is surface so i want to change that to volume and you'll see our preview actually even changes and that's now a volume emission material whilst we're here let's rename this to efx natural fire and smoke and when we say natural here in this context we're talking about the fuel so of course we've got these logs perhaps they were cut down freshly recently they'd obviously have a lot of moisture in them they're obviously made up of a lot of carbon as well and that will actually dictate what our smoke looks like of course we'll get on to that later but that's just what we're referring to when we say natural okay so let's actually apply this material to our exposure effects object let's hit play in the real time preview and you'll see that we get this big block of volume this big block of emissive volume now what this actually is is if we go to the exposure effects object in the display tab we can actually activate the adaptive bounds and you can see that's what cycles 4d is seeing it's just this adaptive bounds is the volume bounds and then within that volume bounds it doesn't really know that there's any data there it just knows to give it exactly one in every single voxel so every single voxel is being treated as having a density of one it's then applying this color i can actually change the color and you'll see that this is what's driving those voxels and there we go and you can see it is volumetric we are getting sort of a denser or a higher emission value the the deeper we go into the cube which is the adaptive bounds here but it's not what we want we obviously want this to be our our fire or our fuel so in order to bring in data from exposure effects into a cycles 4d material we need something called a point density texture node now if we're looking for a node in cycles 4d we can get that from the node list and i have it hidden at the moment and i'll show why in a second but if we go to our options in the top left of the node editor window go to show node list and then we get this list of nodes we could just browse for the point density texture node now if i expand the textures list point density texture is there i could have just typed it at the top here in the filter and it would just filter it to the one node which is very handy however like i said i have this collapsed because i like to use the tab command which just brings up that list wherever your cursor is and i find that much more convenient so i'm going to start typing point density texture and let's drag that and drop it into our node editor here into our material so first things first is that a default point density texture node is set up to bring in xp particle position data now we don't want that to happen we want it to bring in exposure effects data and we can change that with this drop down in the middle so let's click on that exposure effects and the information we want to bring in is the burn channel so i'm going to click on burn now nothing is happening because we haven't got it connected up to anything and also i want to turn off some of these options i don't need the add radius 2 bounding box i don't need the normalizing and also we'll we'll come back to the linear which is the interpolation in a second but if i hit the solo on the density of our of our point density texture now we'll actually see some information and you can see this is actually our fuel channel so when we say efx burn in this point density texture it's actually referring to the fuel channel in exposure effects itself so obviously that's uh burning is obviously we've got the fire and so those are in interchangeable in this situation so i've soloed it out but what we really want to do is we want it to drive our emission node so i'm going to unsolo go back to that large cube volume and then drop in the density into the strength multiplier there so there we go we're actually multiplying the strength of the emission shader with the density from our exposure effects simulation and particularly the fuel and the burn channel or the fuel burn channel which is interchangeable okay so you can see that it is quite uh sort of dim at the moment so we can actually increase the density of this we can once we've brought it in without having to re-simulate we can actually multiply up this density using a math node so this is a really convenient thing so i'm going to grab a math node and i'm going to drag that in like so i'm going to drag it in between the wires now at default this is set to be an add function so it's just adding 0.5 value to every single voxel we don't want it to do that we want to multiply what we already have coming in so change the function to a multiply and let's change the value to let's try really high let's go for 50 to start with and you'll see immediately we get a really hot looking volume and this is how we get that over brighting that kind of the way that a camera captures fire if it's overexposing you get this really bright core of the fire so i'm going to bring it back down to something a little more subtle but still 10 times the original value there we go that looking really nice now if i zoom into our or if i actually change our camera and i actually zoom in to our fluid you'll see that that we've got a nice sort of smooth looking fluid but if i get too close to the voxels we can actually start to see the voxels themselves it's not too obvious here we are seeing some of it here however that's this is what what's happening here is the voxel is actually being blended it's being interpolated so between the voxels we're getting a bit of smoothing going on and the default interpolation is linear as you can see over here it's this uh drop down on the on the bottom of the point density texture node now if i change this to closest this is essentially just importing the voxels and the voxel data so essentially up to the bounds of each voxel is exactly the same amount of data there's no smoothing there's no sort of softening of that and we get this really if we go back far enough of course it's actually quite hard to see that so it's very fast to render that but we will get these bands and we will get some lines showing you might not be able to see that but it's the closer you get they're really obvious that this is quite pixelized now this is very similar to image processing where you have bicubic sampling you have closest neighbor and that kind of thing whereas this is just the difference here is that we're dealing with voxels so we've got an extra dimension versus pixels so the one we want to actually use is cubic so if i click on cubic this is actually going to smooth our our voxels much nicer and we can we can tighten them up later on as well and there's no evidence of the voxels anymore and it's just this very smooth looking volume so that's just something to note that you're going to want to probably change it either from linear to cubic or leave it on linear if that's working but generally avoid the closest setting unless you want that voxelized look okay so i've brought in the data here so we've got our fuel data is coming in we're multiplying it up by 10 and what we want to do now is we actually want to change where our our fire is actually being applied where our actually actual density is being applied and we can actually do that using a ramp node so a color ramp so i'm going to move this over here and i'm going to grab a color ramp like so drop this in between our math multiply and our point density texture you'll notice that it's connecting up the alpha node to this value and that's because the type of output here matches the input here so cycles 4d is trying to to helpfully connect them however in this case we actually want to connect up the color of course it's just going to be a black and white value because we're multiplying it here and what we want to do here is we can actually see that if i change the gradient if we look at the viewport as i change the gradient you can see i'm actually clipping the fluid so i'm actually clipping out so up to sort of 50 information i'm actually removing from our our render here even though it's not changing the original simulation we're just interpolating or interpreting that data and we're actually remapping it using a gradient here or ramping it so what i want to do with this actually is i actually want to create a similar look to the fire in the viewport in that the core of the fire the fire closest to the logs is actually quite hollow it's actually as if the fuel before it's reached its full temperature and we actually get this sort of hollowing effect so if i zoom in a bit like so we'll be able to see this a little more clearly so i'm going to actually bring this one in on the left here i'm going to bring our white up to the right so it's going to make it much brighter in this part of the fluid and then i'm actually going to add another knot i'm holding ctrl or command when i grab that and i'm just going to put this over here like so and when this clears up you'll see that we're getting a much more fiery looking uh fluid there so it's it's it's got that hollowed out look it's got that much more detail it's looking really nice and this is a really good way of bringing in more detail as well if i really clamp this down and have it really fine here you'll see we get a much sharper edge but it's quite unrealistic fires don't tend to completely just cut off like that so you're going to want to have a little bit of softness around the edges and work with that okay so that's actually a really good start for our fire of course we're going to need to work on the color of our fire it's currently blue now what we're going to do for coloring is we're going to actually use something called the black body node and i'm just going to add that in on its own i'm just going to bring these down over here and let's just add a blackbody node so blackbody and what this does is this actually translates kelvin values to a temperature on the blackbody spectrum and what this is is obviously as you heat objects or certain objects up they go through a color range and if i actually attach this to our emission we'll actually see that the temperature here at 1500 kelvin is this really deep orange now the the minimum is the 800 on this on this particular node and you'll see we actually get a pure red when we do that as i go up through i'll step up through you'll see we end up getting more desaturated out to the whites there we go and then actually if we go all the way to the ten thousands it's actually going to get backed into a sort of a blue tone now what really colors a flame it's very commonly is this black body spectrum and it's particles in the flame actually getting to their temperature where they will start emitting that particular wavelength of light now there are other ways to color flames of course different chemical luminescences and that kind of thing but we're just going to be dealing with blackbody emission here so i'm just going to set this to 2000 for the moment and now one thing is is that this is universal so this whole flame the whole burn density or the fuel density is all the same black body temperature so it's all the same color technically now that obviously we're getting different densities of it so we're getting more sort of brights here and sort of darker areas where it's thinner however what we want to do is we actually want to use the temperature of our simulation to drive this blackbody gradient now this is really cool so what we can do is we can actually bring the temperature in from our our simulation using the same kind of nodes so in fact we want both a ramp in fact i'm just going to copy the point density texture that is burn so it's exactly the it's set up exactly the same except this time i'm going to change the efx burn to efx temperature okay now if i solo this we'll actually see the temperature channel represented and there we go it's a lot softer if i zoom out a little bit we'll see it nice and clearly and of course the temperature is sort of cooling down it's dissipating as we we go on and that's actually in the simulation settings i'm dissipating the the temperature okay um as as we've got this if i just input this into our black body here and i uncheck this solo let's see what happens and we have an extremely red color fire and the reason for that is that the density the temperature that is coming out of this point density node is of course zero to one now the zero to one means that essentially the input into the black body is the minimum it can be which is that 800 so because of both 0 between 0 and 1 is of course miles off the range that we need we're going to need to remap that data that's coming out of this density temperature here so i'm going to actually add a something called a map range node now this might look a bit scary let's drop that in and i'll drop it in between our efx temperature point density texture and our blackbody shader or blackbody generator and what we're going to do is we're going to take the range of temperatures the zero to one and we're actually going to map it to that temperature range in the black body so we're going to start with setting our maximum so basically when the temperature is one in our simulation which is sort of an arbitrary number we're going to map it to the maximum temperature on the blackbody spectrum that we want and we want it to be around about 3000 to start with so let's go for 3000 like so and hopefully we'll see a change there we go and immediately you're seeing that we are now getting a range of colors now obviously that red is pretty extreme because it's it's at the very highest or the very lowest temperature on the blackbody spectrum and in reality what happens is is that when it's at that color it's also at a very low power so it's at a very low brightness level so the brightness level actually fades off with the black body but it's not being represented in our in our simulation here however we are getting the range so what i'm going to do is i'm going to set this lower part of the range to 800 which is the minimum input on that black body range okay so we're still seeing a lot of red but it's a little less aggressive and what i'm going to do is i'm going to bring down that max value as well to 2400 and we should get a nice range of colors here and we're getting a lot warmer colors so the lower the temperature is the hotter the redder it'll get essentially the warmer the color will get and so uh what we've got here now is we've got this very red area at the bottom of our of our simulation and to compensate for that we actually want to multiply the lower temperatures into our strength and what i mean by that is if i move this up a little bit further what i'm going to do is i'm going to take the the output of our temperature and i'm going to ramp it i'm going to give it a color ramp so let's grab let's just duplicate this particular color ramp and what i'm going to do for this one is i'm just going to reset it to default i'm going to have the temperature go into there and then what i'm going to do is i'm going to multiply that together with this particular gradient this particular ramp like so so if i grab another math multiply so math multiply let's disconnect that and let's drop our math down here now of course we've unchecked so essentially we're just coloring our voxels now we're not actually multiplying their strengths so we get a universal strength but actually the color is coming from a black body still so it looks quite cool but it's not what we want so i'm going to change this to a multiply let's connect this up here and connect this that down here and then let's pump that into the the main multiplier the main booster essentially so immediately you'll see that our the bottom part of our simulation here is no longer that really extreme red and that's because i'm essentially clipping out the bottom by multiplying the temperature into the to the burn now it's a little hard to see but i'm going to actually clip this in even further and you'll see they're essentially taking out the cooler temperatures are no longer going to be emitting any light at all so we've got two methods here for remapping or changing the range we've got the color ramping and we've got this map range now the map range gives us a very specific set of values whereas the color ramp gives us a bit more of a visually useful and artist-friendly way of manipulating our fire so i'm pretty happy with that it's actually removed the the really red parts of the flame at the bottom there and we're getting pretty close to what i would say is a good finished flame so one last thing is that we can we can actually insert a hue saturation value change into this chain just to be able to do minor tweaks drop the saturation perhaps tweak the hue and all sorts of things because this is just color data now so you can treat it like it like a like a you would an image and you can play around with the pixel colors the pixel values except of course we're dealing with voxels so i'm going to add an hsv node which is hue saturation value i'm going to add it in between our blackbody and our emission color input and there we go nothing has changed of course because i haven't changed any values now i can actually play with the hue so i could change the hue maybe i want to tweak it a little bit to the right there i'm getting a much more yellow flame if i go a bit further we'll get to the greens like so that's obviously a bit too vivid green now of course i'm tweaking it away from its natural colors i don't want to do that but i might want to drop the saturation down so if i drop it to like 0.5 that's a bit extreme but it really depends as well if we're trying to emulate some kind of camera film the way that certain films capture color we we can uh apply these saturations and things to the actual fire itself so i'm just going to drop it down a very slight touch that's what i like to i tend to like to do is just drop it down a little bit and as you can see it gives you this very natural looking fire okay so let's just recap we've brought in our burn our fuel channel we've remapped it to give it that kind of hollow look uh we've then multiplied that with our temperature which then gives us this essentially this masking of our lower temperatures so we're multiplying this part of our our gradient which is the lower temperatures and we're removing that essentially from our our main strength multiplier which is our fuel and our fire burning and we're multiplying those together then we're boosting it with this multiplier here which is just a simple multiplier of 10. and then for the color we're bringing in that temperature we are mapping that range to a blackbody friendly range we're inputting it into the black body which then generates that range of nice warm colors and then we're just slightly dropping the saturation and there we go we're getting this nice looking fire now just to demonstrate how versatile this now is we can actually take this map range and we can actually have it drive a totally different um node and that node is the wavelength node so if i grab wavelength what the wavelength node does is it essentially allows us to change the color in fact if i just input this directly into our hsv and you'll see it's updating shaders and you'll see that our wavelength is set to 500. now 500 it's actually referring to the nanometer wavelength so 500 so if we go down to sort of shorter wavelengths we're going to be going towards the the blues and the purples and the ultraviolets and then if we go back up really high to 600s you'll see that we are hitting into the reds and then if we go too far we'll get into the infrareds which of course aren't visible to the simulated eye that we've got in our viewport here or a real-time preview so of course i've just created this this new wavelength object this has a different range to our blackbody range so what i'm going to do is i'm going to duplicate the map range i'm going to input value is going to be from our temperature again but instead of mapping it to 800 to 240 i'm actually going to map it to some wavelength values that i know are sort of blue to red so i'm going to say 480 which is a blue to 625 which is a the red that you're seeing there pretty much so i'm going to actually then input that into our wavelength and we will get an interesting looking simulation so you can see that we're getting these greens where it's cooler and we're getting the red obviously where it's hitting that higher value now we can of course tweak the the input ranges to map exactly where this is on the fluid so i'm going to actually increase this so i want it to be where the temperature is much hotter like so that should give us a nicer range so can you see how we're getting this really nice green sort of spectral look and of course we can invert this so i could say have this at one this at point five so we're mapping the ranges so now the lower range is the reds and the higher ranges is the blues and there we go so you can see we're getting this really interesting looking flame so if we're trying to create sort of a magic fire perhaps we've thrown something in there that's burning a rather strange chemical we can use all of these sort of methods to color our our simulation and of course we can just straight up color it with a color ramp as well so let's do that whilst we're demonstrating all the different methods so let's add a color ramp and we'll still use the temperature as the input so i'm gonna input that there like so and then if i zoom out a bit just so we can get back down to that hsv put that into the hsv and now it's obviously just a black and white flame but if i load a gradient preset and if i expand that gradient down load preset i can just add any of these so let's add heat which is quite a classic good diagnostic one and we actually get that spectral gradient again because of course that's actually going through the the spectrum there let's grab a rather bizarre looking one let's grab the the sort of the test gradient and there you go you get a really interesting look but of course this has so much control you can actually color very specific parts of your smoke of course most of it here is being colored by the right hand side of this gradient so if we change if we just add another knot in here and let's give it a really bright pink color we should start to see some of that coming in there we go a lot of that coming in in fact okay so i'm going to leave it where i'm going to remove our i'm going to go back to our black body coloring let's delete these wavelength nodes i just wanted to demonstrate that you can color it in so many different ways it's very very versatile now we've created this emission set up here i'm actually going to group this up in fact i'm going to frame this up to make it nice and tidy let's put the output all the way up here and let's frame this so we've got this in a frame if you hold alt and then f it'll put it into a frame and there we go they're nice and tidy and i can actually rename that if i have it selected i hit enter and we'll call this the flames and there we go we have our flames already set up and what we're going to do next of course we're going to move on to our smoke and i'm gonna actually duplicate our point density texture again because it's already set up with our with our nice interpolation and with all the defaults that we don't need turned off and i'm gonna change this from efx temperature so i can grab the drop down effects or exposure effects and then change it to smoke now of course nothing changes because i'm not outputting this anywhere but if i solo our density channel we'll actually get a view of our smoke in the render preview there we go so what we're going to do with this smoke it's a very similar process to our burn we're actually going to use a color ramp to change the density of it to change the look of it we're going to multiply it but in instead of it going into an emission shader it's gonna go into both a a scatter a volume scatter and a volume absorption so we'll start with the scatter and i'm gonna add a scatter volume scattering node like so now what scattering is it's um essentially in real world if you imagine the smoke is full of these particles or molecules and the light comes in it hits one of those those molecules and it scatters off in all sorts of different directions and of course depending on what color it's scattering it cannot actually return a different color to the viewer so you'll actually end up with a blue smoke or an orange smoke and then also we have an absorption and i'll actually add that node as well so we have a volume absorption and so those molecules if they're really dark imagine it's carbon or something like that it's going to be very dark and therefore it's going to absorb that light and it won't actually come back out of the smoke so with these two nodes with these these two volume nodes scattering and absorption we can create really realistic looking smoke so like i said i'm going to start with the scatter and i'm just going to run the density into that scatter and what i'm going to do is i'm just going to pipe the scatter directly into our volume output and that's going to take away our emission we're going to have no more fire and if i turn the density soloing off we should now have some scattering so it doesn't look like much at the moment however if i increase this so let's multiply it let's get a math node do exactly the same as we did before but this time we are multiplying our smoke so multiply by 10. in fact i'm going to go for even more let's go for 20. there we go and there we go we're starting to get to get this really nice looking thick smoke and if i rotate the camera around you'll see that we're getting some shading to it as well now if i really exaggerate this so if i go to say 200 you'll actually see it scatters so much that we actually get some absorption as well so it's actually scattering so aggressively that we get some darkness on the other side of the smoke but it's giving it a really nice looking shape and you can see that this is very promising so i'm going to actually drop it back down to our our 20 that's a bit low obviously we don't want the 0.5 let's drop it to our 20. and what i want to do is actually really want to thicken a lot of this smoke up but i want to keep the wispiness on the edges so what i'm going to do is i'm going to use a ramp so let's grab a ramp color ramp connect it up now remember it connects up the alpha it tries to be clever but it actually doesn't work in this scenario there we go okay so now we've got this color ramp in we can actually really change the the exact ranges of where the the smoke is what i'm probably going to do is i'm probably going to just clip a bit of the smoke now if i clip it too much so if i bring this black knot to the right essentially i'm going to clip a lot of the smoke and you can see it actually gets rid of almost all of it even if i'm not that far along this ramp so of course we've got smoke coming in here smoke density so zero to one and of course if i increase the amount of zero multiplier or dark multiplier i'm actually getting rid of a lot of that sort of middling smoke there so i'm only going to bring it in a very small amount sort of maybe two percent and then what i want to do is actually want to change this i'm going to change this to a cubic interpolation let's change it to cubic i'm really going to crank the uh the middle knot up to this this side here this should thicken up our smoke quite a lot there we go so you can see we're getting that real thickness there that's looking good but now i want to actually bring in that absorption i want to add the absorption in as well as the scattering so what we do for this of course we need to actually insert the same density now we can actually control these separately but most cases you can actually have the smoke multiplying at the same amount as the sorry the scattering multiplying at the same time as the absorption so i'm multiplying them both by 20. there we go and then what i'm going to do is i'm going to add them together so what we do is we go add and then we want to add the add shader so add shader this isn't a maths node this is actually a proper shader node and then i insert the volume absorption now at default you'll see not too much of a difference because our color default here if i go to the hsv is only 80 now if i go darker this essentially will will result in a much darker smoke and there we go now of course we're not seeing much color here and what happens is in natural smokes is that we actually get scattering of the blue wavelengths and if i test that out here so let's let's actually have it reasonably saturated about there and hit okay and let's see that update and immediately you're seeing this blue in the scattering blue in the edges of this smoke and this is really nice this gives us a a really kind of realistic looking smoke you often see this in sort of tobacco smoke in wood smokes that kind of thing you get as it gets thinner it scatters the blue light but the core of it is quite a warm color so what i'm going to do is i'm going to actually increase the brightness of that make sure it's really bright and i might increase the saturation like so but i want our absorption to absorb the opposite wavelength there so i'm going to have it absorb the orange lights also the warmer colors i should say so i'm just gonna cheat and grab that color and then i'm just gonna minus 180 degrees so we actually end up exactly on the opposite side of the color wheel essentially so hit okay and see what we get from that and there we go now you're seeing that we're getting this really red core of this this this smoke it's very noxious looking i mean that's pretty extreme in terms of the coloring there so we probably don't want to go that aggressive so i'm probably going to drop it back down let's drop it to let's drop it to 30 saturation and let's drop the amount down a touch more as well that should bring it back in there we go so this is a really nice preset here or set up for the for natural looking smoke and that's really it for our smoke and what we'll do is we'll bring in our emission as well our fire but let's first frame this up just like we have with the the flames so you just hit alt and f hit enter and we'll call this smoke and of course we just need to now add these together so essentially we have scattering and absorption added together to create our smoke and then we've got our temperature and our burn and our fuel combining to color and give the strength of our emission which gives us our flame but to combine them all we just need to add them together with these add shaders i'm just going to duplicate this one just control dragging or command dragging it and then i'm just going to connect that up like so and this should now add our fire in to our simulation and there we go we have created a fire and smoke shader and using the principles of the volume scattering volume absorption and then also the temperature coloring with the blackbody gradients and the fuel as the density and we're remapping we're changing the ranges we're multiplying it up to increase the thickness of it that increase the density we've created this really complex looking but actually quite controllable shader okay so now we've actually dealt with this this natural looking smoke let's have a look at it in motion a little bit let's just uh play a few frames now of course this won't be real time but it'll update nicely and you can see if i pause it like an early frame you'll see that that knocking out the bottom part of the flame has really worked well around the logs here and you often get that where the fumes are coming off the log um which is actually the fuel that actually ends up burning all the the vapors that burn and you you don't actually see much it looks transparent almost the fuel and there we go as we generate more smoke it actually picks up and let's scrub to a much later frame so 160 there we go i've actually got it animating down as well so you can see here where i've turned the the fire down we're getting much more smoke and if we move around so that the camera the light is behind here you'll see that we're seeing a lot of the red and the blue fringing here is very nice and very realistic now i do have a sky in this scene and it's worth having a look at this with the sky on i also have a floor so let's turn those on so we have a floor that's just a reflective floor and then we've got this sky now the sky obviously is scattering into our into our our shader as well here but we're still seeing this is working nicely in a bright environment as well as a dark environment and that obviously makes it a really versatile material now one other thing we want to look at is the render settings themselves because they do have an influence on the volume shading so let's open those up and you'll see here in the cycles 4d options at the settings i've got the integrator and sampling panel open now i'm going to go straight down to this one here this is volume sampling heterogeneous now the volume step size is set to a default of 10. now if you want to get more detail in your fluid and you're finding that you're seeing stepping in your fluid it's very obvious when you see it but in this case it's not very particularly obvious uh what you want to do is you want to reduce your volume step size now this will allow the cycles for the engine to actually sample the volume more frequently and therefore you'll have more slices from the camera essentially what that does mean is that your scattering and your absorption might become thicker so you might want to watch out for that you might need to compensate in the material but just definitely worth noting that the volume step size has an effect on the look something else that has an effect on the look is in the light paths and ray depth you'll see that we have this volume steps or ray depth and if i decrease it we're actually going to get a darker fluid because we're scattering less so essentially it's getting less bounces so much like when you're dealing with glass in any render engine you're going to be creating more bounces to actually get more light into it and that's exactly what this volume uh depth does and if i increase it a lot we're gonna lighten our fluid a lot so if you develop your fluid at the or your the material if you develop your material with a couple of volume steps you should be okay but if you're doing it at volume steps of zero you might need to tweak the material after you increase them okay so that really covers it there the only other thing that has a big effect on volumes especially when it's like bright stuff like fire is the clamping so i've currently got this clamped to direct uh rays only clamped to a value of five and indirect to a value of one now if i clamp it too hard our fire won't be able to create that really hot look um so essentially if i go to 0.5 of course it's going to dim the whole image but just make sure you have enough room in this clamping if you're getting rid of noise using the clamping just be sure not to decrease it too far okay so that's the render settings that affect our volume mostly and the next thing we're going to look at is actually a slightly different system but it's using exactly the same concept in the material itself and you may have noticed the material is sort of spoiled what's coming up and that's this uh efx flamethrower now let's turn off our environment and let's actually rotate the light around because i know that this suits better for this scene so i'm going to rotate that around 90 degrees so it's more front facing and you can see our natural smoke is now getting front lit a lot more but we're going to turn that off so let's turn that off and hide it and let's reveal our hydrocarbon smoke and let's have a look at what we have inside here so it's another cashed out system but this time we're dealing with a flamethrower and if i expand that out you'll see that we have an emitter inside this nozzle of our flamethrower and if i hit play hopefully we'll see something there we go our particles are firing out of the nozzle and they are actually our effects source so they're adding the fuel and the temperature that's then burning and giving us our smoke and in this material our smoke is absorbing a lot of light so it's high absorption still got some scattering in it to give it that nice scattering look and if i hit pause on this frame let's try that let it develop a bit in fact let's go into the camera that's front facing there we go so you can see if i click on the material the efx flamethrower material we have a pretty similar setup we have the smoke at the top here and then if i go down it's being added so the smoke is being added to this fire down here now the fire is is pretty much the same setup as we have in our natural fire and smoke material you can see we're bringing in the burn channel the the fuel we're then ramping that fuel we're multiplying it a little bit only by two there that goes into the strength of our emission shader and then the temperature is driving again a a blackbody mapped range and also that's actually being clamped we're using the temperature to clamp out the lowest values as well so it's a slightly different setup but the overall result is is very similar so let's actually take a look at the scattering and the absorption because that's slightly different here as well so you can see i've got a multiply so if i take a look at these you'll see we have a multiply for each of the volume nodes the volume shaders we've got a 30 multiplier going into scatter and then into absorption we have a huge 400 times going into that and the color that they are scattering and absorbing actually comes from a single rgb node which has a very um desaturated blue color that it's scattering and then i'm actually inverting that color which makes it dark remember because we're inverting it and that then goes into the volume absorption but it also makes it quite warm so that's why we're getting this really warm parts in pretty much all parts of the fluid all parts of the smoke it's as if in real life where you have carbon inside the smoke like elemental carbon it's going to absorb a lot of the light and in natural smokes that have a lot of moisture in them obviously you're getting water and carbon in that smoke now obviously the more water you have the lighter that that smoke is going to look and the more carbon you have the darker it's going to look and hydrocarbons like petrols gas fuels those kind of things have very heavy molecules and they generate a large amount of soot a large amount of black carbon that absorbs the light and there we go that's why we have this dark looking smoke in this scenario of course this would work for explosions as well and because this is automated essentially we apply this material to any exposure effects object that has these channels active and calculates them that will work on there and to prove that i'll actually drag our natural smoke onto the flamethrower like so it'll look a little strange of course but it'll work and there we go so you can see our flame looks very interesting here it's actually quite cool and the smoke is very light compared to our our hydrocarbon flamethrower smoke now of course we could tweak that so we could go into our natural smoke material and we could multiply our absorption uh we could actually just make our absorption simply a lot darker and it'll give us a different look now we're still scattering quite a lot here as well remember so we need to tweak that as well we'd need to perhaps multiply them up but you can see that just with one material you can actually adapt it for almost any scenario involving fire and smoke of course we can change the color of that fire the color of that smoke this could be a magic or a different chemical that we're burning here so actually the flame is green or blue anything like that and it makes this these kind of shaders really versatile now i'm going to undo those steps just so that we've got our material back to default and i'm going to put our flamethrower back on here and we'll just scrub a few more frames now if i could jump ahead you'll see we haven't it actually is a quite cool sim it fills up this container this box and you'll see as it hits the size of the container we're getting this we're obviously getting quite a lot of scattering on this front face because that's where a lot of the light is but then immediately it's a it's getting absorbed so it's very thick there we go let's scrub along a little bit further and you'll see the shadow it's casting as well is also the same color as the edges that it's scattering and that's something important as well that's a very realistic effect we're scattering away the or sorry we're absorbing away the blues and we're leaving the oranges as it gets through the other side of the smoke which of course means that it colors the shadow in that orangey color okay so what we would do now is we can render these out and then in comp i will just add some slight glows and a little bit of sharpening but we could also add the glows in the cameras in our scene here by just adding a cycles camera tag so if we right click and we go to add a cycles 4d camera tag and you'll see we have post effects post effects is what we're looking for now the bloom threshold if i get to a point where we have a lot of the the fire in the scene let's just make sure it's showing a lot of that and if i look at the bloom here and i activate it you'll see it's extremely bright and also it's picking up a lot of this background here now what i'm going to do is i'm going to increase that bloom threshold until it's only picking up the really bright parts of our scene and of course this is positive this is above one because it's emitting so we can actually have our threshold quite high and we know that the the orange part is what's going to be glowing so there we go that's a nice way of giving it some nice bloom but i tend to always do those in post you
Info
Channel: INSYDIUM LTD
Views: 6,730
Rating: undefined out of 5
Keywords: X-Particles, INSYDIUM, C4D, Cinema4D, Cinema 4D, MAXON, VFX, MotionGraphics, Update, Sneak Peek, Cinema, 4D, xparticles, particles, simulation, cgi, vfx, mograph, motion graphics, 3d, 4d, effex, visual fx, software, tutorials, tutorial, tip, hint, help, quicktip, trick, hints, explosiafx, rendering, cycles 4d, cycles 4d tutorial, vertex, 2021, training
Id: fN7emTrvW_M
Channel Id: undefined
Length: 48min 11sec (2891 seconds)
Published: Thu Feb 25 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.