Houdini Algorithmic Live #121 - Rainbow Simulation

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay hello good afternoon hopefully my sound is on all right so uh what time is it so it's 1 00 am in Japan time let's get started okay so hello this is junichurikawa this is the live stream tutorial tutorial live stream for Houdini which is called as a Houdini algorithmic algorithmic live and did they is 121st one and the topic today that I'm gonna show you is a rainbow simulation so I'm gonna show you how you can create a rainbow simulations using Houdini from scratch using pretty simple algorithm yeah and I'm going to show the volume I mean I'm going to show the Rainbow on top of the volume like here uh which is pretty easy to do this is the one you actually see from the camera and system one that's looking at this image from other view so this is the way rainbow works is um the relationship between the angle between the camera view and the the sunlight so you can only see the right one the left one is kind of a analyst an analytical view which never be able to see from in the real world but but it's still interesting to see I mean it's in in the virtual world you can see from any angle so that's interesting and using the same algorithm for the rainbow you could use a Point light as well instead of sunlight to simulate the rainbow which would make some interesting effect like these so I'll show you how you can do that as well okay but first off I think I should explain how exactly rainbow Works how exactly rainbow is being created or can be seen physically so that we'll be able to implement it in virtual world so I don't have a tablet today so I'm going to switch it to a camera view to write some sketch hopefully you can see it all right so the the algorithm for the rainbow is pretty simple first of all um I think you can imagine when you can see the rainbow it's most of the time it's after the rain and that is because the rainbow will be seen on top of small water droplets these and by reflecting the sunlight with the droplet you're actually seeing the color okay and the angle difference between this reflection angle and the eye angle makes the color difference and when the light reflects inside the water droplet it actually reflect a little bit inside a water droplet like this based on the refraction rate it's based on the wavelengths of the light um So based on different colors it has different reflection late so the angle the reflection angle differs based on the uh the light wavelengths which makes array comes like these hey and probably this angle the steepest angle could be a red and the bottom angle will be violet and in between you have like something like yellow and so on and you can based on the eye angle which you are looking at the water droplet like this or maybe somewhere else let's say you are looking at this direction and by calculating the angle between this I view the view angle and the reflection angle in this case this Theta and by evaluating what Theta is you can actually say what color you can see so and it's the angle rate is in between something like 170 something to 129 278 something like that and that is written on the paper so we can look at it right now check so if you search for a rainbow simulation algorithm and something like that you'll be able to see a paper called physically based stimulation of rainbow and this is a paper explaining how you can simulate the um realistic rainbows and computer graphics though the method explained here is a bit complex because it's trying to simulate the physics um property precisely but I'm just gonna get the essential part so that we can make it really simple so here it could explain the reflection part so based on the wavelengths deflection angle changes by uh so reflecting the light inside a water droplet and the angle difference between the red to Violet is written here on page four so this Theta 17 137.7 for the violet for the Nano millimeter wavelengths and the red light is hey sorry all right now red red light is this angle and the Violet angle is this angle so the angle difference between the red and violet is just like two point uh 1.9 or something like that so it's pretty small angle difference and in between those angles you are seeing those rainbow colors okay interesting so what we need to do what we need to just do is to calculate estimate the angle between the The View Direction and the sun Direction and calculate the difference between the angle difference between 177 137.72 139.6 so that we can estimate that there is going to be a rainbow color in between those angles and we can create the color value by using these wavelengths the red 700 nanometer and the Violet is 400 nanometers now there is no straightforward equations to convert from wavelengths to RGB colors so we're gonna look for some equations online for that okay but it's pretty simple let's let me just first search for that okay so wavelengths to RGB simple algorithm stack overflow yeah so this is one of the complex formula which explains how you can convert the wavelengths to LGB and it also has a c source code which is nice but it's a bit overwhelming it's a bit too long to implement in short time so let's try another one like this one this is more lazy algorithm which still might work for quick prototyping so I'm just going to use these one for today but if you want to have more precise color conversions then you might want to try to use this one instead but I guess this one is okay all right so let's have this to convert from wavelengths to RGB and using these information to convert the angle to a rainbow color or wavelengths let's just try implementing implementing this from scratch now I think it is better to implement this from a simple like setup so I'm gonna stop by simulating the Rainbow on a grid first then later I'm gonna bring the same algorithm to volume okay so that will be easy to understand so I'm gonna create a geometry node I'm gonna stop by creating grid let's make this uh X Y plane I'm gonna try to show a rainbow color on top of this grid as a first test so consider this is a flat layer of water droplet each point stands out as stands as a water point or some kind of a Mist well more wall of the Mist or something like that okay and why we wanna what we want to calculate is the the sunlight Direction to each point and The View direction from the camera to each point and compare the angle between the calculate the angle between the I Direction and the sun Direction and based on the angle I'm gonna decide what color each point will be okay so let's increase the number of rows and cons all right like 100 by 100 might be good enough for testing okay so let's start by creating a directional light I mean it doesn't have to be a real light but uh maybe it's easy to control so let's have distant light the directional light okay and let's bring this and rotate this randomly for now what we want to have is this directional information from this light okay and we also need the camera because we need the angle between the camera view and this uh sunlight view so let's create camera okay and let's bring the camera somewhere around here let's also split the view to two views so that we can use the left hand side as a analytical view or another perspective view so that we can control the camera view without interfering the rainbow okay so let's have I want to change this to perspective okay so this the right view is coming from the camera one which is used for rainbow simulations the left one is just to check how it works okay so we have a setup let's try simulating the rainbow using Point wrangle okay rainbow Sim hello everybody thanks for coming so first of all we need two informations one is the light directional light information and the camera information so let's bring that I'm gonna create a parameter for this uh node which is the operator path so that we can select the directional light and the camera so that we can ex extract the directions and positions okay all right so let's first select directional light it's inside RPG decent light and the camera is this one okay so from the distant like or directional light you just need the the forward Direction so let's try to get that information first okay so how we do that we can use a Vex code called op transform which will give you a transformation matrix from specific path so the path that I'm looking at is this directional light so CHS now this will give you a matrix for a light transform I think let's check let me check the geometry spreadsheet yeah so I'm getting those 4x4 Matrix which is which includes the position rotation and scale of this uh node here now from that from Delta into from those informations what I just need is the direction so uh let's try to get that and I haven't come up with an easy way to get the forward Direction maybe there is one but uh what I'm gonna do is to first get the rotational information or Euler information from The Matrix then convert the Euler um rotation to quaternion then use the quaternion to rotate the negative z-axis so that it will be a it will become the the forwarded direction of the the light object I'm just gonna explain how I can do that so first I'm going to crack crack the transform this one so that I can get the the rotational information as a vector value or Euler Vector value so to do that you need to use the function called crack transform and what I need from here is a rotation so c equal to one yep so so the first one yield 0 second one is zero this is just the order transform translate rotation and scale x y z and the C is equal to one the pivot is zero zero zero I don't think you need the rotate so yeah that's about it Okay so the output you want to get is the rotational angle for x y z and zero zero one set zero zero zero this is the pivot for the translation and finally you can input The Matrix and this will give you an angle value of this transform light transform and Euler angle let's check okay so this is in degrees obviously so X Y is the angle and I want to convert this into a quaternion so that I can rotate specific a vector value with it so let's name this quad and I'm going to convert this oil angle into quaternium using Euler to quaternium function uh gonna convert it into rotation and the order is zero meaning starting from X and Y and Z okay now that I and probably I need to convert this into radians since this was degrees but you need to use radians for this function okay now now that I have a quaternion I can use Q rotate to rotate the vector value using this quaternion and the angle the the vector value that I want to rotate is this one this is the default um direction for a forward Direction when the angle is equal to zero zero zero so from zero zero zero angle to this rotational angle you are you can use this quaternion to rotate this original forward Vector value and use the rotated one as a rotated forward Direction let's see if it's that's true so hopefully I'm getting a light Direction out of this calculation and let's check I'm going to for example set the normal for each point with this light Direction and check whether this is correct or not so if I visualize the normal looks like this and if I look at the angle of the light looks correct but let's make it sure okay so what I want to change is by changing the angle of this light dynamically like this like that I need to have the normal aligned same as this light Direction so if it's forwarding this direction then it should the normal direction of each point should also facing the same direction check and looks yeah looks correct so think this is good now that I got the light Direction next thing I need is the camera Direction so that I can calculate the angle between the light View the light Direction and the camera Okay so and for the camera uh angle I mean camera directions what you need to know what you need to have is the angle I mean the vector from the camera itself to each point okay it's not static like light Direction but the angle the direction changes based on when which point you're looking at so in those cases you need to have the position of each point which you can get by accessing at p and you also need to know the camera position which you don't have it right now so let's get that so for the position you can also use op transform from the camera path so let's do the similar things like I did for the light uh transform so I'm going to use the op transform to access the camera get the camera Matrix now next uh things that I want here is not the rotation but just the position so camera position is crack transform correct transform so 0 0 is the same this is the order for the translate rotate and scale this is for the axis x y and z the third one is whether you want to get the position rotation or scale if it's zero that's translation if it's one it's rotation the other stuff is all the same so something like that and you should be able to get the camera position like this and by subtracting the point position by camera position you should be able to get the direction from camera to each point let's zoom in a little bit and let's also bring the light a little bit closer to the plane so that we can see it inside the camera I mean the position of the directional light it doesn't really matter because you're just looking at the direction but just to make sure make it easy to prototype that's all it is for the position of the directional light okay now that I have it let's check whether if I got the position correctly or not okay let's check okay so I got this camera position 5.221 something and if I check the camera here okay so this X Y oh okay so X is this one and yeah looks correct so I'm getting the correct camera translation or camera position so that's good so I'm going to name this as camera Direction maybe I can normalize it maybe I don't really need it because I just need to calculate the angle but just in case so now I have a light Direction and the camera Direction it's time you can calculate the angle between those two so let's do that Okay so in order to calculate the angle um if you just want the angle between 0 to Pi the easy equation you can use this using a cosine Arc cosine and off dot between the normalized light Direction which already is and the normalized camera Direction which already is normalized so which should give you the angle between two angle I mean two vectors let's check I'm going to convert the radians to degrees so that it'll be easy to see okay so the angle right now is something like these and let me draw some sketch how it looks like so right now what I did is taking one point and there's a light view light Direction there's a camera Direction okay and now what I what I have just calculated is this angle here okay but uh the actual angle what I want is actually this one here data quote so beta quote is 180 degrees minus Theta that I have just calculated so so that I can use it for a rainbow uh threshold and if the angle Theta angle is in between what was it um one 37 point seven two one thirty nine two point E6 you're getting rainbow okay which in this case um red to file it yep so let's have this code it and Houdini sure so now that I have this angle let's make this degrees or maybe I can just subtract it by pi which is same as a 180 degrees okay and maybe convert it into degrees after all let's check so now the angle looks something like these okay sum of the angle is within the rainbow threshold I guess so Now's the Time We convert this angle to a color value okay now first thing I'll do is to convert the angle to this wavelength okay then later I'm going to convert the wavelength into a color actual color value which can be seen as LGB so let's do that so if it's uh 700 then you get 170 130 7.7 degrees if it's 400 then you get 139.6 so let's just use a fit function to convert the angle which is in between 137.7 to 139.6 and convert it into a wavelength between um 700 to 400. okay let's check that okay and since I am using a fit function it is being clamped with minimum maximum maybe I don't really really want to Clump it uh instead of clumping maybe I should use other kind of function if you use efit it's not going to clamp but if it goes over like these angle or emits smaller than this angle or a larger than this angle it will just expand the threshold and gives you uh let more than this or less than this okay like that I think this is much better it's also giving you negative which might not be a correct value but that's fine because you're not gonna see those light colors anyway okay now that I got this wavelengths time we convert this wavelength into a RGB using some kind of conversion algorithm and I'm just gonna use the one that I found on stock overflow by searching convert light frequency to RGB I don't know how much is this is correct but uh it says it's taken from science engineering Spectra so either I'm not gonna um say this is correct I'm just gonna use it as a prototyping easy procedo algorithm if you want to really have a precise conversion algorithm then you should look at a link like these explaining all those behind scene algorithm but I'm not gonna go in deep into this one today because I just wanna visualize it so I'm just going to copy and paste this one to use to convert the wavelengths to a LGB see if this can be used gonna paste it probably I need to rename some of it because this is being written or probably C or something obviously I Get the Era so let's fix this first thing first I don't need to use static and probably I can just export Vector value and you cannot use double in Vex so you just can run convert it and float and I can also convert this into a float constant value float double wall GP float LGB okay and the error is here okay so here I think I need to create the vector value starting with zero okay okay and okay I can delete this math since this is creating as an integer value probably the range is in between 0 to 255 yeah where it does this intensity now yeah so maybe I don't really need to have this one I can just say one and I don't really need to make it as an integer value and I don't need to make it rounded all right then LGB dot X LGB dot y GB dot C hmm okay probably need to bring this inside a function all right I have a question this rainbow physically gripped well mostly um should be close to the physical simulations but I am assuming that the water droplet is really small and fear but if you look at the paper that I showed this shows more precise physical simulations which determines the water droplet shaped more like this one like a slimy shape which is being affected by the gravity or something and based on the size the shape changes so the refraction light chain also changes so the the range of the rainbow also changes based on the water droplet size so if you want to make it really physically correct then you should follow something like these as well what I'm showing here today is more of a simplified version estimating that you are just using a really clean sphere water droplet okay so you gotta make sure to understand that okay okay so I have just uh brilled up these wavelengths to LGB let's see if this if this thing works so now I have wavelengths here let's use this function to convert it into a vector value which should be a LGB value okay and what I'm gonna do is to apply a color Point color with this value that I've just created let's see the result and yup I kind of see already seeing some rainbow like color here ready it looks good and outside the wavelengths outside these ranges you are already seeing those colors as black so that also sounds good okay let's check how it looks like in terms of all GP okay and you can see that by changing the camera Direction the shape of the rainbow changes because the simulations is done between the camera view and the live view so if you change the camera Direction obviously the shape of the rainbow changes interestingly enough okay makes sense and if you change the angle of the light it also changes the rainbow position okay okay so hopefully this is correct not sure but don't let me make it smooth shaded and have this a little bit more resolutions here and I can use this view to close up and looks like it is in shown as rainbow color so probably this is correct seems like you have a tons of red colors here about the Maybe okay um I have a question I may be jumping the gun here but can it be made smoother transition with camera change Well yeah if you just change the camera view using those timeline then you can make it smooth but when you're just using the interface to change the camera then you always get the result where the camera ended up so I mean if you you could sing some expression here to rotate the camera then you can smoothly change the camera but uh if you want to do it like that hey it's okay so let's say this is good but let me also test out with the algorithm the the color changing algorithm that I found out previously looks like this one and actually I have asked the chat GPT to create this function for me to convert the wavelengths to RGB so let's see how different it is comparing to the one that I have here okay so I'm going to paste another function here let's make a note so I don't know where the source is for this one so not I can't really say this is correct but let's see and this is what I got and it's pretty similar to what I was having previously so not bad jet GPT but I'll go with this one yes a bit brighter for this one hmm okay so so far so good um um question can you make these calculations on detail parameter sure for single point yes I mean single as a single value you can use that you can do that but the calculation the angle calculation is done per points so it I think it makes more sense to do in point uh Wrangle but um obviously I mean you could definitely do that on detail parameters as well for sure you just need to change this to detail and instead of getting the point position from at p just change it to something else static value that's all you need to do okay so so far the rainbow simulation seems good and let's try this with a point light as well see how this makes difference in terms of the point light the direction is not single Direction anymore but more of more similar to camera in that meaning you are getting the direction from the point position to the I mean the light position to the point position just like we did uh with the camera so that will obviously change how the angle be calculated and as a result you get different kind of rainbow look so let's see how it looks like on flat plane so I'm gonna create another light and actually I don't really want to enable the the light itself so that I can just see the default light to see it effectively I just want to use it as a the guide geometry so obviously it doesn't really need to be a light object at all it could be a null object as well but in case you want to use it as a light later okay so this is the point light that I would like to use where did the rainbow go okay and maybe I still need to enable to change the type so I'm just going to set the intensity to zero for now okay now for the point light you just need to get the point position to get the uh light direction from the point position to each point that's how Point light works so just like you did for the camera let's try to do that and maybe I want to have an option to switch between the directional light and the point light so let's create a toggle so that we can switch between the directional light and their point light Maybe instead of toggle I'm going to use a ordered menu and the first one is directional light second one is 0.8 later maybe you could use like Spotlight which is similar to point light but the the bright area is being limited with the cone so might give you more interesting effect by limiting the area Okay so having those two that we can choose between point line and their directional light let's have another parameter to set the path for the point light using operator path I'm going to give a path parameter for the point light Instead try to delete that okay and using the switch or ordered menu value I'm going to I would like to switch the light Direction between the direction light and the point light so where should we do that so we have this directional light here so it's first of all get the ordered menu value um light type c code to Chi what's the name light type okay and if light type is equal to zero which is directional light you get in these and let's initialize the light direction as zero outside uh conditions and fill in the variable inside a condition else if light type is equal to 1 which means Point light then you want to do something similar to what we were doing for the camera so I'm gonna copy this one and get the transformation from the point light path get the light position from the right transformation then a calculate the light Direction just like you did for the camera the light direction is equal to normalize at P minus light position this is it okay easy as that reference the undefined variable light type spell mistake okay and if everything else is stay the same think okay so accept and let's try to change it from directional light to point light and you see something Wicked here so let's try to change the position of the point line to see how this affects the visual of rainbow shape stink so it is the relation between the camera and the point light Direction and based on the position of the point light and the camera view you're getting something really interesting effect here on a flat plane all right the interesting and if you change the camera view it's like these okay so that's that that's that for the flap plane now what I wanna do now now that it's um logically I we can see that it's possible we want to bring guests bring this into a volume so that it will look more three-dimensional um or make it more real uh make it look make it look it look like a real rainbow because in real physical environment the rainbow shows up and uh and the water droplet or in the mist or something like that after the rain or something where you have tons of small water droplets exist so we want to create those kind of situations and we could simulate that kind of situations using something like pyrol was uh together with the volume structures so let's try to do that so for 2D let's say this is okay pretty simple you just need one single point wrangle now is the time to do the simulations for a volume and I'm just gonna use a simple Pyro volumetrics simulations and use that result to view the rainbow so I don't go deep into the thyroid itself I'm just gonna use the default setup by searching for a pyro let's use this pyro configurability smoke okay I'm gonna change this a little bit because the default setup gives you a bit too much volume for testing so see how it looks like right now and it's pretty heavy for my PC here because this is my PC doesn't have a good GPU let's see how it looks like okay I guess I should have a light here Maybe after all makes sense to have a light somewhere maybe a distance together with the Point light Maybe doesn't really make much effect well let's just make it one or maybe I just need the directional light to test out okay now pyroid looks like these which is pretty but um there's too much uh volumes going on here for testing so let's make it a bit lighter for a testing prototype I mean if you would like to have this kind of uh volume then that's fine but for me no it's not okay so I'm gonna make up it smaller lighter okay first of all I would like to start the volume from a square like shape instead of Taurus what I mean Taurus is fine but um just for my preference just gonna use a box instead okay and I'm gonna make the size four by four and point one so like something like really flat box I'm gonna use these as a emitter for the Pyro okay connect this instead off Taurus I mean this is not really necessary this is just for the light setup so it's up to you how you want to make it now these things are I guess fine attribute velocity it's also fine but one thing I want to add here is the color attribute to this one right now if you look at it you have um where did I maybe yeah I maybe I can add it additional attribute here and on pyro source right now I have two attributes one is density and one is temperature but um I want to add additional one so that I can use as a color value okay for later visualization so I'm gonna add one custom one let's call this call and make a vector value and as initial value let's make it as a white value one one one for LGB okay next hmm I think I need to change some stuff here to make it a bit more lighter maybe not here but uh the solver itself first of all um go to the fields and this patient this is like a lifetime of the particles or the smoke I'm gonna make it one so that the particle dies quicker so that you have more like a fire like smoke effect let's check so you can see that the smoke is disappearing sooner no I don't really want to have these Direction going this way so it's also removed that that is probably coming from here no that's not going upward is fine maybe going to the solver and there is a forces like wind somewhere sourcing nope what was it let me check I don't really do tops much myself so I don't really know much about it okay um let me see so setup bounce Collision sourcing he feels and that looks fine okay here so I don't really need wind man for the other stuff I think it's fine to have Freon C or disturbance or turbulence so let's see how it looks now okay now it's not really shifting it's going just going upward looks good yep so let's say this is okay um what I would like to do now is to visualize the I mean map or calculate or simulate the Rainbow on top of these volume now compared to the flat plane this has a depth so the way the rainbow looks might look might be different than how it looked on plane so we gotta have to check whether how the how does this depth difference will make visual difference okay now let's also check if I'm getting the color uh volume as an output nope okay I'm missing here so hmm I think I needed to actually maybe I don't I don't really need it to add additional attribute here maybe I'm just gonna delete it and instead going to the solver he going to the field there's a color option here so maybe this will just create the color volume there you go yeah that's better okay so I'm going to play a little bit too so that I can have some volume and from there I'm going to try to do the similar rainbow simulations that I did for 2D this time try to do it for 3D volume okay now before connecting this into a glowy smoke looks like this now will always smokes uses like something like temperatures and stuff to convert the color value so I don't really need this but instead I'm just gonna try to visualize I mean you could still use this but just to make it simple I'm gonna use uh my own rainbow visualize volume wrangle okay so I'm gonna use the volume Wrangle and before that maybe I could cache the simulations and let me open up the cache manager maybe I can increase the top knit a little bit let me play this into the end for now to Cache it okay wait for it hmm [Music] um all right Okay so the simulations looks like these now obviously the opacity is a bit too low here so let's make this more hmm transparent more translucent so that we can see through the smoke to make it look more like a low density mist Okay so how much RAM do you have uh the Mac that I'm using right now it has 64 gigabyte Ram I think okay so where was I okay so the volume Wrangle so now I could bring all those calculations that I did here to a volume wrangle see what happens so I'm gonna call just copy all these paste it here might need to change something and I'm already seeing something here okay now I am going to be add parameters maybe I can just press here change these to different type for this one operator path this one as well operator path as well operator and for the light type make it I mean for this one I'm okay with the integer that is it because I'm just gonna copy these parameters from here from 2D to 3D or ease okay copy paste and finally the light type to here there you go now let's change this to directional light for you initial testing now I'm already seeing something here on a volume if you look from this perspective view which is not related to the camera saying something like this now the resolution is a bit too low so let's increase the resolutions a little bit shall we um how much should I increase it going back to the Pyro I don't know previously I I was I think I was doing with this setup which was supposed to be fine but uh looks like the resolution is a bit too low here where can I increase the resolutions so this is 57 which is a bit too low but anyway I mean for testing I guess it's fine or not I don't know I mean at least I could see briefly see the effect here and if I change the camera yeah it is obviously changing it so I guess that's fine for initial testing now I don't really want to make the the other color to be black but I want to preserve the original color like these a bit more maybe a bit more low density but uh preserve the color itself so let's try to modify these color implementation or color apply Min to preserve the original color but use the rainbow color at the same time so to do that let's see um first of all I probably need to know what's the difference between the colored rainbow part and the other black part and before going to those steps maybe I might want to have more resolutions this might give you a higher resolution [Music] let's see yeah a little bit better okay let's go with these okay so first uh I'm gonna determine how I can get the difference between the rainbowed part and the black part uh the black part obviously has the low s HSV value so we could probably convert the LGB to HSV Hue saturations and value and get the lightness or contrast value to check whether it's in it's within the rain board part or not so I have this color here I want to check if this is really dark or not so um I'm gonna calculate the HSV using LG V2 HSV the last value is more like a contrast value so if it's contrast value is really low then it means it is close to Black so So based on this value I would like to change the volume color by lurping from original white color of the volume to the color of the rainbow using HSV Dot C which is the brightness okay and let's see how it has now looks more like it okay now I think I need more low density for the whole volume so for that I'm just going to multiply the density itself by small number and you have something like that looks better a bit too light Maybe maybe I can make it as a parameter I want to make the the white part really translucent but at the same time I want to make the Rainbow part to be brighter so in those cases you might need additional parameters for the rainbow color by multiplying something like brightness here something like that which should be more than one so let's say maximum is 100 see what happens okay something like that maybe 10 is good not sure and maybe that's too polite uh well you choose to balance now if I play it I see something like that so for the directional light uh maybe this is tube light or directional light you always get the similar result for the rainbow just like you did on the flat plane the result you get is always an arc shape interesting even if you have a depth like these but if you look from at this View you can see that the let's pose this a little bit so from the camera view it's always an arc shape but if you look from the other view other direction looks like this it's this is the actual camera view but you are just seeing it like that on three dimension so that's another way to look at the rainbow in an interesting way to look at the rainbow shape now that's cool let's try the point light then if I change this to point light what would happen now am I seeing it it's a bit hard to see what's going on here if I increase the okay let's try to change the point light position or increase the brightness okay that where is the point light so if I change the point light position you're seeing something like uh oil on the water or something effect probably the rainbow you see on the oil is some using the similar algorithm or procedures by looking at it by looking at this one now this is a bit too bright I guess but what I would like what I wanted to show is these interesting stripe pattern on three dimension previously if you're on 2D you are just seeing one strip but becoming three dimension you are seeing multiple strips because of the dips so that's what's interesting about this uh Point light based rainbow okay let's see it uh really hard to find the best position of this point like clearly see now this it also shows the changes of Point light I mean the rainbow and stripe okay well this is up to you to test I mean obviously the resolution is not that good right now because I'm choosing kind of a low res value to test and maybe the brightness is a bit too much as well so but you I guess you could feel the interestingness of this one how about making this well hmm what if I resample the volume to make a bit more high-res would it change filter scale okay this doesn't really change oh wait not this one but this one okay now the number of volumes changed okay this didn't really changed much maybe it's the Viewpoint what's important oh well at least I think I or I was able to show what I wanted to show here I'll have a comment that looks like a bit like a projection dropped through a dust I think it that's exactly what this is interesting let's play this out hmm so if it's just a directional light it is just a normal arc-like shape but by using light type like Point light you could create some interesting visual effect it's pretty interesting yeah and probably by changing the the perspective of focal length of the camera that might also change the effect let me try that as well right now the cameras focal length is equal to one huh one that's interesting let me change this to 30. and aperture to I don't know 40. five or something yeah this also affects the angle so maybe not because I'm just looking just using the point position of the camera so maybe it's not really important but anyway that's how I did it and let me put look back at the things that I did previously see what's different well this one looks more subtle I mean looks more the resolution looks better somehow so maybe I'm missing something here not sure what that is let me try to change that um first thing I could try is trying out the chat LGB I mean chat gpts way to change the wavelength see if it's gonna change something a little bit a bit cooler color well other than that what else hmm let me check the Pyro setup that I did previously and try to use the same setup okay so starting from here same value bounds I think I didn't really change anything here nope Collision nope source source is the same temperature velocity yep feels so I say I have dissipation equal to one cooling rate yep same shape we on C disturbance turbulence all the same look density scale maybe this one is a bit different no it's the same hmm interesting why am I getting the different result previously looks like this and by using the volume Wrangle it changed to this so maybe something inside a volume Wrangle is different let me check so I have these density multiplication which is same multiplying by 0.01 okay the brightness the brightness where does this brightness comes from ah where is it uh Okay so well it's just using the fixed value like 20 so pretty similar so if I change this to 20 looks like this other than that it's all the same I think so nothing different maybe this is the right view just just the matter of the right angle and right Point light position maybe that's it or actually I am having d I am we're disabling the directional light but instead I was using the point light that might be the reason okay now this looks a bit better I have so many stripes here but uh that is due to the position of the point light so make it closer I should have small number of stripes like that it's very interesting yep looking good looking good yeah so that looks good it's more like it all right so uh that's it that's it for simulating the the Rainbow on volume both on volume and to the plane since I did it for volume I mean you could also use the same method to apply it on like mesh surface or anywhere so try that on your own okay so that's it for today I guess let me know if you have any questions or feedback or suggestions if not I'm gonna end the live for today uh and prepare for the next one well thank you for watching I mean I am going to as always I'm going to upload the file and paste the link to the video description page of this live stream so come back later to download test it out by yourself yeah the next week's topic is to create the 3D bubble simulation without using physics which is kind of related to the last live stream that I did which which was weighted centroidal foreignoid tessellations I'm going to use the same algorithm to create the bubble motion on 3D Volume and add this as an as an additional bubble making simulations I'm going to create the curved interval for the bubble to make it more make it look like more like a bubble in real world I'm not sure how it looks in real world actually as a cell but uh uh at least I was satisfied with the results so maybe you might be also interested you might also like it at least it looked it looked um pretty unrendering if that's all matters okay you Tom prism sorry I don't know about that let me search for that later Okay so that's it thank you for watching thank you for coming this late night at least in Japan um hopefully I'll see you next week on the same time hey good night and see you
Info
Channel: Junichiro Horikawa
Views: 2,386
Rating: undefined out of 5
Keywords: houdini, sidefx, live, tutorial, procedural, procedural modeling, parametric modeling, parametric design, parametric, fabrication, digital design, computational design, 3d, design, isosurface, lattice, structure, 3d modeling, modeling, computational, generative, line drawing, drawing, illustration, fractal, reaction diffusion, celullar automata, simulation, trail, particle, vfx, mitosis, volume, rendering, computer graphics, visualization, algorithm, motion graphics, graphics, remesh, quad, flower, plant
Id: -Tfa6Rpie2g
Channel Id: undefined
Length: 98min 11sec (5891 seconds)
Published: Fri Jul 07 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.