Blender for Biochemists | Intro to Blender

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay hello I haven't really done this sort of thing before but welcome to what will hopefully be a tutorial series on how to use blender to make really cool-looking protein images specifically targeted at biochemists now there's lots of cool tutorials out there on how to use blender but really there's nothing filling the niche about how to make or how to break into the field of using blender to make these cool images now we'll start off with what is blender if you haven't already go to blender.org and you can download the latest blender currently the latest blender is 2.2 2.8 - a download install that and boot it up and we're going to get started now if we boot into blender you'll be greeted with what is probably going to be a bit of an intimidating screen but hopefully we'll work through it as we need to I will not explain all of it but I will explain the parts that are required as we go through it now what is blend up when there is for a program for making 3d graphics and game design in all manner of things it's now also a fully featured 2d animation program as well as 3d animation but again we're going to go through it as we need to now it can be quite intimidating I know when I started out that I sort of didn't use it because there was just too much and you can because it's so powerful because you can do so many things it's hard to know when just where to start or what even you don't know to learn and so hopefully we're going to cover some of that but you'll be greeted by this sort of screen with this splash screen you probably won't have any recent files here but to begin with we'll just click this new general file and then BAM you're in a screen now this is what you'll always be greeted with when you boot up blender this here is what is known as the default cube right Siri leave me alone and this is present in the 3d viewport so this main window here is the 3d viewport off to the side here is the collections and this is how you can select your various things in your scene or you can left-click them on them in your scene and this is how you start interacting with things in blender now this part to the right here is looking quite intimidating we'll go through parts of this as we need it down here as well up here as well like I said we'll go through things as we need them but we are sort of getting ahead of ourself and so what I wanted to do first was open up PI mole you can use chimera as well but we just need a structure so I'm just going to fetch a structure now this is one of the proteins that I work on PPR proteins to get rid of those waters and what we've got here is a structure or a cartoon representation and so what PI molds done has taken a bunch of 3d information well XYZ coordinates of various atoms and that information actually looks like this now I won't go through the explaining ppb's most people are probably pretty familiar with it but blender can import this relatively easy enough but it's the cartoon representation it's the showing important side chains all that sort of stuff that is hard to do inside something like blender so what you'll probably find you do a lot is work on a file in PI mole set it up how you want it and then export it from primal into blender to then make look very pretty now what we're gonna do cartoon again and so what we have here is PI mole is taking a whole bunch of experimental information and creating a 3d object now one part of this is getting how do you get this 3d information into blender now there's actually a few different ways to go about this there's a few plugins for blender so one that I've been using a lot recently is blend mul by the Durant lab also quite a popular one as EPM V which comes apart of auto pack this is in various stages of development so I don't haven't actually used this a whole bunch I found that crashes a lot whereas blend mul actually works quite a lot smoother but to begin with we're going to do it the old-fashioned way and the way that I still find myself doing all the time is if you have a model like this you can simply file export image as the RM n v RM l2 now in order for blender to read it we need it in a 3d graphics format and so you can actually do something called save so if we just do help save you get a whole bunch of information about different file formats that play and well can save it in now you'll see the usual sort of ones there PDB faster etc but what we are interested in is the 3d graphics formats and so those are obj MTL wrld AE okay so they all have their pros and cons and variously sort of things but we are going to deal with WRL to begin with it's one of the most I suppose like stable ones I've found that work well so we're going to export our image as the RM l2 which is another word for w RL and so I'm just going to save that to my desktop PPR ok so it's written out that file v PR w RL and so if i actually open that file desktop 105 ppi o WR l know there we go so on Mac if you just press spacebar over the file preview will actually show you something will actually show you it and Windows 10 now comes with a 3d viewer as well so there's our 3d information okay so we want to get that into blender and so we want to click file import and then we got a whole bunch of different file formats that you can import things and so we're just going to choose the WRL Hill and desktop PPR WRL and so it's going to take a few seconds to load that 3d information in and display it and there we have it and so now that we have everything ready to go you're now seeing we can start constructing our scene making it look how we want it to and so we've got to learn how to now navigate around the viewport if you scroll in and out you'll zoom in and out if you have a middle mouse button click and hold the middle mouse button and you'll move your camera or you'll rotate your camera around if you hold shift middle mouse button then you can drag around and zoom in and out etc now if you don't have a middle mouse button you can use this up here and if you hold it and click and move around you can now rotate around and if you click on the hand you'll drag around click on the zoom button you'll zoom in and out now I highly recommend using a mouse in this program it's going to make your life a lot easier now I've just turned screencast keys on so in the down here in the left you should be able to see what I click on wheel up and down shift middle Mouse etc so you can if you get stuck if you miss what I do then you should be able to read it there pause the YouTube video etc so cool we've got a great thing in a grey scene nothing's looking super interesting so what we want to do is start giving it color start adding some lights start making things look cool and it's the whole point we're using blender in the first place inside blender apparently we're looking just at the 3d view what we want is a rendered view so if we hold down Z you can go up to rendered or you can use these four tabs here so this is the 3d view we were just in you can go wireframe you can go preview shading we can go into rendered so rendered is what we're gonna be dealing with and you can see if we just scroll in we're starting to see some light now I'm starting to see things look cool and so where this light is coming from is from this little point light source here you can see in the outline art that it's light and so if we go back to rendered view you can see that there's some light emitting from this area and we're getting some cool-looking shadows and stuff and so currently inside blender there are two major rendering engines there's Eevee which we're currently using this is sort of a real-time rendering engine so it's very snappy very quick and it still looks really nice you can get some fantastic results out of it I've used it on things like my poster and stuff that I'll put up now to get some really cool results but what we're gonna be working in today to get really nice-looking results is cycles now if you switch to cycles you'll probably notice that your computer starts screaming the fans turn up and that's because this is a very very computationally intensive render engine now cycles is photorealistic that means it takes your light source it takes a photon and it traces where it goes what it bounces off how it interacts of things it's very computationally intensive but what you end up with is a photorealistic rendering of what's going on and so currently we have photorealistic rendering being applied to our scene now if you have a dedicated graphics card you can change the CPU device render device to GPU compute that will significantly improve your life and I'm going to leave it on GPU if you only have a CPU and no dedicated graphics or currently if you're on Mac you can only work with CPU it'll your fans are gonna scream a whole bunch more but you'll still be okay so I'm gonna leave it on GPU compute now if I click around the scene and sort of look around it takes a little bit to update but I'm seeing some really nice lighting that's happening but I want to do something a bit more interesting with my scene so we're going to switch back to solid view and what I'm going to add is a floor and so the way that you add things to the scene is with shift a okay so they alternatively you can also go add up here on the left so add and you've got a whole list of things but it's best to try and learn as many keyboard shortcuts as you can blender is full of them and it's going to be overwhelming to try and learn them all but the quicker you learn them the faster you're going to be able to work within blender so if we go shift a mesh in a plane and and we what we have done is we've created a plane now currently this plane is within inside this box and so what we want to do is learn how to start moving things around inside blender and so I'm going to click on this box and I've now got it selected or alternatively I could click on it in this outliner so I'm going to click on the cube and to move things around I'm going to press G for grab and now I can move this cube around now because you're working in 3d space and you only have a 2d plane to work on which is your screen it's going to be hard to position things exactly where you want them to now that is why there are modifier keys on to your various actions so I'm just going to click that and press control Z to reverse it so if I press G and then press Y I'm going to start moving this cube only along this yellow line or the y-axis if instead I press X now moving along the x-axis if I press Z I'm now moving it only along the z-axis so this helps us make sure that we're moving it and the along specific axes and so I'm just going to press Y move it out there and click left click to apply that transform and so what we're left with is our plane here so I'm going to click on the plane and another transform we can do is scale so I'm going to press s and scale and so now you can see I'm scaling the size of this and so I'm just going to keep on moving it and you'll notice that as I move or as you move your cursor to the edge of the 3d viewport it now appears on the other side and so it's actually a super handy feature of blender is that you'll basically just go infinitely it saves a lot of time of clicking moving your mouse cooking again and so we're going to move it really really really big about there cool things are looking good so now we've got a plane we've got our protein we've got a cube and so I'm going to click on our protein press G Z and just move it up cool and now your protein is no longer clipping oh jeez ed so anymore now your protein is no longer interacting with the floor and so we have our protein in the scene and we have up cube now the cube I'm also going to make a bit bigger press s to scale and move it about there geez said to move up probably about there now G if I go shift said it now moves perpendicular to the z axis so it's moving along the x and y and so quick so that was G shift said it does the same thing as G shift X and now moves perpendicular to the X etc but I'm gonna press escape to cancel that so now I have a cube have a protein and so if I go hold down set and go into rendered view you can see I'm starting to get a scene that's setting itself up so what we're going to do now is going to start adding color to things now one of the biggest frustrations for me starting out and blender was how do I make this thing red I just want to make this protein a certain color how bloody hard is that to do just that now the caveat caveat with that is that you are now working within a photorealistic rendering engine and so you can't just make things red you need to make it red and metallic or red and skin like or red and looking like plastic things aren't just a cover they have a 3d surface and light interacts with them in a certain way and so blender doesn't accept well it can accept just colors and I'll show you what that looks like and so what we're going to do just gonna to rearrange your sort of viewport you can click and drag on these windows and so I'm gonna click and drag that up there so about half and half shift middle Mouse just so move that now I'm going to click on my protein so if we go into solid view you can see that I have it selected and so now down here we're gonna click on this and this you can change what these windows are and so we're going to change from currently it's the timeline so currently it's the timeline we're instead going to change down here to the shader editor and this is where you start giving blender information on how you want light to interact with your surface and so currently the protein which is selected nothing in this scene has any shader information and this box actually does but we're going to select our protein we're going to add a new shade up so click new and so bam you have a scary looking thing I'm just going to so scroll wheel in and out we have a scary looking thing this is called the node editor or how you shade things and so currently all of this information is feeding into the surface and telling blender how light interacts with your protein and so if we go back into the rendered view nothing has really changed it's still gray and boring looking but this base color so if we go to base color let's make it red cool now we have something that's starting to look red now you'll notice also there's some light that's it's looking red around it as well and that's because like in real life something or you're lighting something up that is red and that thing then emits some red light onto the surrounding objects so it's starting to make this cube look a bit red the SIRT the ground look a bit red etc and so well what else can we do we can make it be more metallic really crank that metal now the metal is a bit rough so we crank that down and now it's looking really shiny put that back to about 0.5 you can give it a sheen and so now we're give me a bit of Sheen clear coat like you would see on a car that sort of thing put that metallic back down specular you've got lots of different options and it's very very complicated once you get into shading we can even add in some subsurf to be about green and really crank the subsurf now what is subsurf if you look at your skin your skin isn't just one color light penetrates slightly into your skin and then you get colors further in and so subsurf is basically what color is it once you start getting deeper in and so you sort of see that this proteins looking kind of funky now if we change that back to Y it maybe it's more obvious you can sort of see it's like you can almost see slightly in to the protein and personally it's a little creepy looking so I'm going to put turn-off subsurface and we're just going to go back to our red protein this is just meant to be an example to sort of show you how you can customize your various parts of the shading but to begin with for this first tutorial we're just going to make a protein red and set up some cool lights so we have a red protein this ground I want to make a bit nicer so we're going to add a new shader so I selected the plain added a shader and we've got we're faced with that same base shader and so we're going to click I'm gonna make it a nice sort of blue make it really metallic and create the roughness a bit more now we've got a bit of a nice-looking ground and then for this cube just like that cube let's make that yeah why not we're going to make that really metallic not rough at all so it's really reflective so you can see the reflection of that protein now in the reflection of this cube now that looks pretty unrealistic so actually we'll give it a little bit of roughness there you go nice things sort of starting to blur out the reflection so now we want to start thinking about lights so if we just go back into solid view or if we look into our outliner here we can see there are two lights there's the light that comes with this default light that comes with every blender scene we're just which is this sort of central light here so I can move that around you can see that the light is starting to move around and there's also this other white which came when we imported the WRL I'm just going to delete that other light so I'm going to select it and press X X is delete and I'll ask you to confirm so left click now I've deleted it now there's only one source of light and that's this other light so you can sort of see some dramatic shadows and stuff playing around now don't actually I'm actually interested in this light so I'm just like you know press X and delete it now we have no lights and so we're going to add in a new one so shift a go down to light area light this is my favorite kind of like to work with so we what we've done is we have created an area light here and see it's quite small and so we're gonna go G said move it up a bit geez and G X and now we're gonna introduce the final transform that we can do and that's a rotation so if we press R we're now rotating it now the same sort of thing if you press a modifier XYZ it'll lock it so now it's rotating on the x axis rotating on the y axis rotating on the z axis so we're going to press Y to sort of angle it and you can see it we're now getting some directional light if we turn into rendered view mmm there's nothing going on now that's because the light's not very powerful currently so with our light selected our area light come on down to this light tab here and we click our power is currently at 10 watts so where's going to crank that up to 100 mmm still not a whole bunch 1000 I'm starting to see some light coming to the scene 10,000 they have a go now we're starting to see some nice lighting and so go back into solid take it up a bit more go back into rendered cool so now we're seeing some sort of dramatic shadows and stuff now if we go back into solid you can see it's quite a small source of light and if you've looked into any sort of photography or anything how sharp a shadow is is dependent on how large the source of light is so we're going to make this a bit more diffuse I'm going to take that up to maybe 10 meters so it's now 10 meter wide plane that's emitting this light so if we look into our rendered view we're getting nice too few shadows so if we take that back down to one much sharper shadows take that up to 10 much shorter diffuse shadows and so cool we're starting to get a scene together we've got our protein we've got a random cube actually I'll change this color of the cube maybe to something green mmm to be whatever you want but something green to begin with and I will actually move this cube so if we goji moving around shifts the moving parallel I'm sorry perpendicular to the z axis so I'll move that sort of just there so we can get some reflections so if we go rendered view there we go we're getting some reflections cool so now we have a scene set up we've got our protein imported it's red thankfully and we've got a cube that's looking kind of reflective how do we make an image now the way you make an image is with a camera object and so if you're looking your outliner you'll see two things here a camera and a viewpoint this one came in when we imported the WRL so I'm just going to extra delete it and this is the default camera so if we go back into solid you'll see this little object down here is the camera so this is where the camera in your scene everything that gets finally exported from blender has to go through a camera it may be sound counterintuitive but it you needs to do that it's important and so we have a camera down here so the way you can view your camera is if you go click on this little camera you're now viewing for through the camera or if you have a numpad 0 on the numpad goes in and out of the camera or you can click this camera here and so if we go into our camera you can actually see a we're quite close to everything so you can't really see anything so if we select our camera press G we're now moving our camera around and so alright we still but we need to bring it back a bit so if you press G and Zed we're now moving along the z-axis but if we press this out a second time we're now assuming in and out so we're just going to take it way back off I didn't mean this to happen but we're running into a bit of a problem you can see that the camera is view distance is sort of running out and so we just need to change that here in the camera settings so clip start and clip end currently it's only seeing to 100 metres away so we'll just change that to 1,000 I didn't mean to introduce that this tutorial but that's where we are now so we just press the G again Zed Zed and zoom on out go G Zed just take it up a whole bunch G Y move it along the y axis g y yeah about that gy so we're rotating if we go Zed now rotating around the z axis and cool and so we go rendered view cool camera seeing something but still not super happy with that so we're gonna go into the solid view you can actually manipulate the camera from the outside the view so if we press G like this go Y along to there G Zed take it down a bit starting to look okay and so finally the last sort of complicated thing I want to introduce is you can actually customize your viewport and so if you go into the corner of any of these windows you'll see this at a crosshair up here if you click left and drag you've now made a whole new window and so in this in one of these windows and the left one here I'm just going to highlight in here and press camera so now I'm seeing through the camera while I'm also manipulating the camera here so g x z g x and take it back a bit z and if we can go into this window and turn it into rendered you can sort of see what the final rendered view is going to look like and so I might actually grab this playing G shift Z so it's perpendicular move it away a bit bit more room in the scene and then if I click on this camera now currently it's 15 millimeters so if you haven't if you don't know anything about cameras the millimeter is how wide the lenses so the lower the number the wider it is the higher the number so I'm increasing to now 100 or so the more zoomed in it is so we're going to take this out 224 mil or too much take it at 35 and now we can camera G X and we just want to rotate Y and so now we've got a frame shot and everything is on this box is what's going to be rendered so you can see there's some reflections we've got a red protein I call the keen ground and this is probably enough that's probably going to go into the first tutorial and so cool you've got your scene set up now what so you can go up in this render tab you can click render render image if you want the it says there f12 is also render the image so I'm just gonna click f12 and you'll see that your computer will get to work now it's going to take a while for this to render if you have the more powerful your computer is the quicker this will take and so you know it's if you have a small laptop it may take minutes or hours if it's not super good if it's not super powerful but it eventually will get there so be patient but it's going to go through and render this image now you're seeing something that's looking certain to look pretty nice now if we look sort of at the preview there's a lot less noise and it's just looking a bit nicer in this rendering image in the preview it sort of previews it but it just doesn't trace through as many photons as you would in the final render dimension so now we have a final rendered image you can just go image and save as and save this image somewhere on your computer so I'm just gonna save that to the desktop untitled JPEG or PNG sounds good now we've got a rendered image and so now we've got something that we've managed to import some geometry from my mole into blender given it a color set up some lights and set up a camera and render an image okay so that's probably maybe far too much for the first tutorial or maybe not enough if you had some experience before we will get be getting into far more complicated things making membranes setting up scenes and emitting proteins all that sort of stuff but we need to start basic to make sure everyone's on the same page and hopefully maybe you've learned something hopefully you're now in the world of blender this program is very very powerful I've used it to make animations and posters and presentations some of my work on the corona virus you can see here on it's being picked up by various various new science and so blender is very very powerful you can see other people's work it's also very very powerful and so it's a good skill to have to be able to sort of play around in it so thank you so much for watching hopefully this has been some help if you have feedback if you want to see a particular thing done or how to do it if I went over things too quickly and you'd like to see things in more detail either tweet at me or just leave something in a comment in the comment section but otherwise I'll leave it there for now and thanks everyone for joining in I hope it was helpful
Info
Channel: Brady Johnston
Views: 16,434
Rating: undefined out of 5
Keywords: protein, science, sciart, blender, tutorial, biochemistry
Id: CfkjBoOaw0g
Channel Id: undefined
Length: 29min 54sec (1794 seconds)
Published: Wed Apr 15 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.