Particle Systems for Cool Biological Visualizations !!!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone uh today's video we're gonna look how to uh add particle systems to our scenes uh to create a dust or to have molecules move around uh so i've done a video similar to this but this is gonna go into more detail uh the idea is to have this uh be a feature in bioblender but for now uh i got someone requesting it so i'm doing this video just showing how to do this manually but in the future it's gonna get much easier uh once it's fully implemented in bioblender uh all right so uh one thing to notice is i'm also on version 3.0 alpha however uh all the things i'm going to be showing work as well in version 2.9 uh bioblender is still not fully functional in version 3.0 but i've been working on this because i've been trying to transfer it to version 3.0 uh but all right so uh let me go ahead and uh this is how it would look in cycles but let me go on to eb uh so it's a little more uh so i can move more in the scene uh so as you see here the idea today is to create this uh particle and this effect uh but every anything else as you can see it's generated with bioblender so here i just imported a red blood cell and then i imported ubiquitin and then i uh this one i distribute around uh the way to do this is like if you press on the object and shift d then you have a duplicate and you can uh shift it from the camera view maybe uh get it closer and uh move it around so i i think this one went pretty far but uh you see the point you just uh duplicate your object and you can move it around uh move it in y change the rotation uh so this is a static scene uh in regard to the proteins i haven't animated those but if you see if i press space by space bar here the particles are animated so that's what we want to see how to add these particles and we can change change these particles to be molecules or proteins and then they would have this motion so this is what i'm going to try to show today um as you see it's a full setup with lights and uh uh force fields uh other than that the other thing that's new here it's um or the other thing i've added uh it's this membrane emitter from bioblender so all i did there was import a planar membrane as we would normally do and then i went into edit mode and then all i did was uh basically move this uh in the z axis so as you see here uh i'm i have a proportion on editing so i can uh press uh g c and then with this scroll bar i can uh have it uh it affect more uh and so basically i was just i could have something like this uh this is just basically gonna change how it looks in the final render i can uh go back here so this is just adds this wave in uh but you can play around it and change it uh all right so to create this effect let me go ahead and open a new blender file so we are going to go into a new blender file all right so we are here in blender first thing i'm going to do is import a ubiquitin i'm going to go ahead and also give it a particular material let's work with the electric materials today and let me change the color just so it's a little shinier uh maybe something uh that looks like this so we can go into uh cycles here and visualize our protein all right so that's looking good uh okay so the next thing i'm going to do is uh add a um for example i'm going to add a vesicle so this is going to add our basically there's something uh going on with version 3.0 that for cycles it looks like this i'm not sure really why it's been uh work it's in development still so what i'm gonna do now is change my render engine to eb and let's work on eb uh from now on um notice that i have ambient occlusion activated and i also have uh i'm also gonna activate bloom and screen space uh reflections i'm gonna have all those three activated uh in film i'm gonna have uh i'm this time i'm actually gonna have uh the actual film show here and then i'm gonna go to the world settings uh to just um change my uh setup so let me go into shading here and then i'm gonna go change object to world and then we're basically gonna replicate uh ah so this is how not default usually you should uh you shouldn't have this uh environment texture uh but you can do that uh so this is what a regular uh by default blender would come as i just have that added into my default file but what you can do to have that is have an environment texture and then we can go ahead and plug this here i'm going to go ahead and duplicate this um background and then i'm gonna add a light path node as well and then i'm gonna basically add last thing is gonna be a mix a shader i'm gonna mix this to shaders so this is just a nice setup to have even if you're not working with bioblender this is just a nice lighting setup to have always in your scenes uh and then we're gonna grab the camera array uh and put it here as the factor and then we're gonna go here all the way down to black and then last thing we have to do we can go here into our render view as you see everything looks purple because we have an open uh a hdri here so the way to get an hdri uh you can have a folder with all your hdris but i usually use the ones defaulting blender uh so i'm gonna go ahead onto my blender folder i have a couple of versions here i'm gonna go into the one i'm using 3.0 3.0 data files then studio lights world and then these are the default hdris in fact you could download hdris and uh copy them into this folder and then they would appear uh here if you turn this off they would appear here uh so as you see this uh the ones that are showing here are exactly the ones we have here so for now let me just select uh the forest exr and have it added there um all right and let me activate uh these two things again all right uh so let me go ahead and all right why is this frame black oh okay we have to invert these two here yeah there you go so you need to have the background uh the color black in the bottom and then the hdri on the top and as you see all this did was basically uh give us a black background while we still have a lights coming from the hdri but we do not see that hdri uh we're gonna see it in some reflections uh but other than that it's not as you see here you can tell there's an hdri in the reflections but other than that uh it gives us a black background that we can even uh change the color uh and then this is gonna control the color of our background if we want something blue and so on i'm just gonna keep it in in black for now all right so that's uh the world setup that we're gonna have now we're gonna go to layout again here all right so the question was uh how to uh so usually what we would do to have uh molecules or have a particle system added to our scene is we would create a molecules uh collection here and then for example here i'm gonna add one ubq and i'm gonna press on my ball membrane immediate and i'm gonna press uh emit and that's what's gonna generate it's a bunch of ubiquitin here and then maybe i'm going to go a little uh i'm going to remove some of these particles so maybe just 100 proteins here and then if i press spacebar then they're going to achieve towards my uh inside my emitter we can maybe change this cross section to zero so we get something that looks like uh this uh and the reason uh they're accumulating in the middle is because they're following the origin so they're all trying to get to this origin uh that's why they accumulate in the middle uh however maybe we want a different effect um so we're gonna see how to do that uh but the reason this is this has this behavior is because i was made for uh it to follow an object so if i press spacebar and then move my membrane emitter and this is not a good idea well i have particles on it because it's going to become very laggy but yeah that was the idea for it but uh i'm working on another implementation that it adds uh uh that we're basically gonna go through that today manually so the first thing i'm gonna do is delete that and then i'm gonna go back here let me set this again to 0.5 so we have all our sphere uh so to be a little more similar to what the person had i'm gonna go and scale this on the z axis so it's not uh completely and i did that uh during edit mode so make sure you do that in edit mode all right so i have something that looks like this uh other thing i'm gonna do is uh grab it and press shift d so i have a duplicate and then escape so it stays in the same place and i'm gonna maybe name one of them i'm gonna name it volume here in the top i'm gonna go to the modifiers and then i'm gonna basically remove all the modifiers for that volume one so as you see uh it it looks like a um it just looks like a white surface right if we hide our mold membrane then this is where we duplicate it that's all we have here uh all right i'm gonna grab that volume and then i'm going to go into materials and then i'm going to add a new new material uh this you go then you want to go to surface and then you're going to remove this material that it it has at it and then you want to go to volume and then add a principal volume here so i've added a principal volume um let's go with the densities to something like 0.4 or values from 0.2 to 0.4 are gonna work okay all right and also let's start setting up our camera so maybe somewhere over here let's set up our camera somewhere over there all right and now the other thing we're going to do to this object is that we're going to add a uh particle limit so we're going to go into particle settings and we're going to press the plus button here we're going to make sure it's here i mean emitter is selected and then we're going to change the number to something like 100. uh frame start one and frame end also one that way we all our particles are within here as you see it's not putting anything inside uh we're going to change that in a second lifetime this is going to be the length of your uh simulation of your entire scene of your entire animation so if you change this value here make sure you also change it here otherwise some particles are going to disappear getting close to that depending on this value you select here all right source i'm going to change this to volume [Music] and then this is looking okay just volume yep closing source uh cache we don't really have to go here velocity uh i'm gonna turn off a normal velocity so my particles are not gonna have a normal velocity uh for now they're just gonna fall to the ground as you see other thing i'm going to change here is rotation i'm going to check rotation and i'm going to go randomize all the way and then also phase and randomize phase all the way and then that's it for rotation physics we're going to add some brownian motion in a second but i will come back to physics in a second render these are an important one you want to select instead of pad you want to select collection you don't want to show the emitter so remove show emitter i scale let's leave it at one and then uh the collection we want is the molecule collection again so as you see that already changed to my uh ubiquitin in this case uh like right now things are to scale if i leave this to one but as you see uh the membrane i imported is uh if i show that it's like things are getting crowded so maybe let's change this to 0.2 uh but b or no that's too tiny 0.5 maybe something like this but be aware that that is already changing the scale of everything so you would also have to think about how the lipids scale all right but for now uh that's working correctly uh let's do uh keep working on our settings here so we also want to go to buffer display uh disable showing uh now we actually want to keep uh show emitter that way we we see our volume and in fact in render we also want to show a meter otherwise our volume would disappear all right uh let me see uh what else do we need here uh we can also like um so let's say let's bring another protein into our scene uh something like this i think this is uh this should be hemoglobin uh so let's go ahead and use bioblender to get hemoglobin into our scene uh there it is let's give it a dielectric material let's go into the material settings i press on the second button there and let's change the color so we go here into the base color this hemoglobin is uh in red blood cells so let's give it a red tone okay that's good and i'm gonna drag it onto molecules and as soon as i do that you see everything it appears here we can play with the count so if we go to particle settings uh where you can do use count and then go in here and then this is going to be basically if i i have two ubiquitins that's going to be out of all the particles is going to be distributed in a ratio two to one uh so if i have two and two is the same as having one and one so that would be the same but if i have something like uh 10 to one uh then it's going to be 10 times more dense uh you'll be uh a ratio of ten to one ubiquitin to uh hemoglobin in this case all right so that's looking okay uh now let's add some motion into these particles so what we can do here is if we go uh if we i was if i press space bar everything goes down to the ground as before let me go ahead and change the color of my voluminous uh real quick so this is gonna give it also like how your scene is gonna look so maybe something blue we can go with something blue all right so that's looking good so if i press play again everything goes to the ground uh that the reason for that is i would need to turn off gravity so the way to do this i'm going to go back to the particles and then in physics uh no not in physics i want to go to fill weights and once i found field widths i would i'm going to go ahead and turn gravity off and now if i press space bar everything stays still because there is no initial velocity for our particles uh so that's why i turn normal to zero if i turn this back to one uh everything is going to fly away from our scene so we don't want that either so let's keep this at zero but what we're gonna do here is go to the physics and then we're gonna do a uh brownian motion so let's turn this maybe to something like five and we can also turn damping and drag to something very small so uh the motion gets damped uh so let's see what uh the effect of this had uh so as you see uh now we're getting some random motion of our particles uh we can maybe increase this to something like 15 and then that motion is going to be much faster um uh we can maybe increase the damping as well and uh so you can play with these values to see what uh different results you get for now i'm gonna leave it at point one and maybe something like 30. however once i start going to these high values you're going to see that most of my particles uh disappear from my camera because they're just uh flying away uh so the way uh and i i'm not sure if there's another a better way to do this but this is the way i've kind of uh like to do it so i'm going to go ahead and add a force field a wind force field here i'm going to move that um so let me go into uh viewport and then i'm going to move that so group x or gx uh let's so in like two yeah two is looking all right then uh we're going to rotate it so r and then y uh we want to do minus 90 degrees so it's facing uh towards my uh emitter here i'm gonna do then uh shift d and then i'm gonna do minus four that way it's all the way in the other side i wrote it y uh 180 degrees right we want to facing this way then we're going to graph both shift d again uh rotate c180 so not 180 90 degrees in this case so uh that way it's this way and then i'll shift d one more time and then we're gonna rotate so r x 90 that way we have uh these wind force fields everywhere we maybe want to scale these ones a little bit so s c and get them closer here all right so that's looking everything is looking symmetric and then we can go ahead into our camera view go back to our render view and press play and as you see uh most of the particles are staying inside because of this wind that is pushing them so that is a way to how to keep them inside and you can play with the settings to change how this looks for now i'm going to go ahead and activate this again and then i'm going to grab this and then going to do a cross-section of zero and actually let me keep it a cross-section of minus 0.5 but let's set up our camera inside so an easy way to move the camera inside is if you change this to view then the z-axis is going to be the normal of the screen so we can do gc and then we can even animate this to get like inside but for now let's just go here uh maybe we want to rotate it inside of there oh no let's for now let's keep it this way uh all right so this is the effect that we're getting uh what i had before was a little bit different so let's try to get something similar uh one thing you have to do here is for example uh go to the camera settings and change this uh focal length to something like a little larger uh something like 32 and that's gonna uh give you a more uh field of view right and then uh we're gonna activate depth for field and then uh one thing that we could do could be select a specific protein but for now i'm gonna add a uh empty object uh empty plain axis and then i'm gonna let's see where this plain axis is let me scale it ctrl a apply the scale let me put it something over here uh let me see how far that is from the camera yeah that's okay and then i'm gonna select my camera again and then uh let's focus on that uh empty so we're gonna select the empty and then we're gonna select the f stuff to be something uh small like 0.7 so as you see the only thing that's on focus is that hemoglobin close to it uh but uh things are gonna change right uh so uh in fact what you could do uh it's uh add an object and then parent it to the empty that way uh when the empty moves uh you keep focusing on that object that way you can change how uh how it focused but for now it's just focusing on that at that distance so everything in that distance uh gets into focus all right so uh let's go ahead and uh change into cycles see how this is looking in cycles so as you see in cycles uh the volume renders a little bit better uh in eb uh something that we can do to fix this is let me see yeah we can turn down the uh the strength of our hdri uh that could help uh in this case i'm not really seeing the volume so let me go ahead and maybe increase the density of the volume uh so let me see yeah maybe we can increase the density of this volume uh all right no no oh sorry i forgot in ev the problem with it is that you really need um lamps instead of the hdri to affect the volume uh so that's why the other setup also had lamps so we're gonna do a light uh spotlight here we're gonna move it so let me go into top view with seven move it over here and then let me rotate it so it's pointing this way uh so something like that uh we can go into top view again uh let me rotate so it's looking this way all right so that's looking okay and then let's go ahead and increase this to something like a thousand uh there you go so that's already creating this effect uh oh not five thousand five hundred maybe a little less uh actually a thousand was looking pretty good and then you can add different cameras uh to this so let me let me change the volume the color of the volume so i can go to the volume uh you make it darker so like something like that looks like this uh and then the other thing i can do is again as i was gonna mention before you can change the uh strength of your uh hdri so in this case navy is not gonna really uh oh sorry this is not the strength of the hdri let's try it here yeah so this is the strength of the hdri so you can have it in uh zero for eevee i think that works pretty good right now there is not much light because our sphere is outside our light is outside here so we can maybe have it inside and now this should be much better we're going to render yeah so this is looking much better uh again you can add different light sources to this uh to have to change the effect and to have it look even better but this is already looking uh really good we can turn down the density by quite a bit maybe like 0.2 and then i'm gonna just duplicate that light source so i'm going to do shift d while i have the light spotlight shift d maybe move it over here rotate it uh oh this is rotate c hold shift to make small rotations showing like this uh so maybe the lights are too powerful so let me turn them down to like 500 and maybe i can turn this one to a hundred now that they're inside yeah so even less so in like 50 and then we can have a light uh some lights from the front so we duplicate this put something over here let me see where this is going uh i'm just pressing the numpad to change the different uh views here so i'm going to rotate this this way all right all right so we have we're having the shadow of i think we were having this shadow of this so let me disappear those two we're still getting these very big shadows i think it's because one of the lamps is very close to let me go back to here so it's easy to work uh let me see where are my lamps so this one is pointing that way maybe scale it yeah move it all the way inside there you go this one should be okay so let's take a look at this yeah there you go i think yeah at least the big shadow disappear let me go back to the frame first frame we can turn off overlays all right uh so this is how this is looking uh you can play around with it and get different effects but this is just a quick way you have to do this um as i mentioned before this is going to get implemented into bioblender so that's the idea so that this is much simpler to do in the future uh how we can let's before we leave let's try looking at this in cycles uh so i'm using the new 3.0 version which is faster than the old version uh because it now has this noise and and so on uh so we can activate the denoiser have it be 64 and then here also 64. change change this to open image albeit on normal and then accurate uh and maybe let me change this to 32 so it's faster and you'll see with 32 samples and with the dino is we're already going to get a pretty good uh idea of what it's going to look like and the blueprint is also much more responsive in 3.0 yeah there you go so that's the denoise image again you can increase the sample to have a better image but or go back to eb if you just want to see it and then you can hit render once you are ready for it uh one thing i want to show so in this case i show how to do this with proteins however the original file i had that was this uh particles one if you see here i had a uh instead of actual uh proteins so the proteins here were distributed manually and i'm uh the i'm focusing on this hemoglobin in the middle that's why everything else looks blurred uh but the only difference i had here was uh that okay my volume was a cube but that really doesn't matter that much but the main difference was that my particles here if we go ahead and look at these particles so let me select one of them and where are these particles yeah over here so these are the three particles that i had so instead of having proteins i just had all these three low poly shapes uh that i basically created with uh adding a mesh ico sphere and then plain with it to have these different shapes and those are basically all these particles that we see in our scene but again the idea for this is to be by defaulting bioblender and then i will also probably add this dot blend file into the bio blender download so if you like what you see and if you would like to uh have this add-on you can go ahead and uh it's for sale in uh you can buy it from a blender market and the link will be below if you like this video and you please make sure you leave a like and subscribe and until the next time see you
Info
Channel: Science with Blender
Views: 222
Rating: undefined out of 5
Keywords:
Id: eTGoFk9s-iY
Channel Id: undefined
Length: 26min 2sec (1562 seconds)
Published: Sun Oct 17 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.