Before we start I’d like to say that the method I use here is far from perfect and maybe there is an easier way. But that works for me and I think it’s a good start to experiment.
Anyway, let’s begin !
The first step would be to add a stud with the proper material on your model on Mecabrick, if you want multicolor water you will need to add a stud for each material that you want.
Next, set up your scene like usual, run the script, add light etc…
Once your scene is set up it’s time to generate our water.
The first step will be to add a plane below the model. The plane will act as a receptacle to catch your water.
SHIFT+S => Cursor to center will put your 3D cursor on the center on the scene.
SHIFT+A => Mesh => Plane will create a plane.
Scale the plane then press CTRL+A and apply the scale of the plane. It’s a REALLY important step, the physics engine don’t really like to play with the scale of the object.
You can also add border to your plane to avoid your stud to fall off.
Next you will need to add a rigid body to your plane. The physic panel is on the far right of the property tab, you will probably need to rescale the right panel to see it.
Once you click on the rigid body button, change the type to “passive” then you’re done !
You can change the friction of the plane to make the stud a little less slippery but it’s not really mandatory.
Now, let’s take care of the stud !
If you have multiple stud select only one, the others are just here so we can pick up the right material information from them.
The first step will be to pick up your stud then place it over your plane, a few units high, it’s important to let enough space for your stud to fall down.
Create a new “empty” ( SHIFT+A => empty=>axes )and drag and drop your stud in the scene tab from “Model” to your new “empty”. It’s not really mandatory but will help a lot for organizing your viewport.
Be careful when creating your empty, put it away from your stud or you will duplicate it too and your scene gonna be an hell real quick.
Next, go to the physic tab and add a rigid body to the stud, this time make it active. You don’t have to change anything else but it would be useful to experiment with the mass and the shape of the rigid body collision.
By default it’s on “Convex hull”, it’s the best for having precise collision that will slow down your computer a lot. I think you can probably use a sphere, but you will need to go on edit mode and move the origin of the stud to make the sphere fit the stud.
You can probably even use a low polygon stud with a simple collision shape to make larger “ocean” it’s up to you to experiment.
It’s important to do that step before the next one, trust me you won't be happy if you forgot and have to delete all you work from the next step.
Next, let’s take care of the material if you want different colors on your stud.
Select the stud and go on the node editor.
Before the “Transparent” node add a ColorRamp and a Object info node.
Connect the color ramp on the color bracket of the transparent node then connect the “random” bracket of the object info node on the FAC bracket of the ColorRamp.
On the ColorRamp next to RGB, change the type from “Linear” to “Constant” then add a color stop for every material that you want.
Change the color information of the node to the color that you want, it’s where the other studs are useful, you can select them, copy their color information then delete them.
The more space a color have on the color ramp, the more stud of that color you will have.
The color will only show on the rendering, don’t panic if you don’t see a result right away.
The next step will be to duplicate that stud. The better way that I found is to hide your model by clicking CTRL + The eye in the scene tab, it make things a lot easier to see, it’s also a lot more practical when you need to select a line of stud to duplicate it.
You need to duplicate your object a lot, in big superpose lines. It’s also very recommended to rotate every stud in the line to avoid the object to fall flat.
You will need a lot of objects to have a proper water effect, but be carefull, if you have to much duplication your computer will probably explode (or worse, blender will crash).
Once you have a pretty honest size grill, it’s time to go on the timeline.
Switch on the timeline then add some frame to the “end” section. Usually I go up to 300. Be careful, if you add a larger number, you will need to go on the “scene” section of the “property” tab to change the “Rigid Body Cache”, by default it’s set to 240, that means that in the 240 frames the physic animation will stop no matter what.
Once you have your frame it’s time to go to the beginning of the animation then press ALT+A to start the animation.
It will take a long time, several minutes, don’t be surprise if you don’t see a lot of movement.
After the animation, if finish “baking”, it will start to play in loop. Pause it and select the frame you want, I usually chose the last frame for a still image where the stud have settle to the floor.
If you don’t like the result, it’s time to change now. The next step is irreversible.
If you’re ok with the result, you can go on the final step and clean up the mess !
Be careful, if you start deleting things then decide to redo the animation the result won’t be the same.
Star to clean up the stud that pokes through your model, delete the stud that are not in view of the camera, you can even change the material of the stud near your model to make some foam, from this point it’s up to you !
If you do this step in the right order, it’s pretty easy to have the same result !
If you have trouble understanding me or if you have a problem with this tutorial don’t hesitate to comment below, I will do all i can to help you !
Have fun !
Nice tutorial and it looks easy to follow. I need to try that when I will find a bit of time. Thanks a lot.
Just a random idea. Would it be possible to use particles?
Probably yes, but based on what I've seen you'll need to edit the particles after to add a rigid body.
I'll do some test tomorrow, if it's easier with particles I'll update the tutorial !
I actually don't know anything about particles so I don't want to mislead you.
It's fine, I love using these systems !
I did some test and it's not possible by default with Blender.
You can use a particle emitter to avoid duplicating the object manually, then make the particles real and add a rigidbody to them.
I also found a script ( http://blenderartists.org/forum/showthread.php?279329-Copy-Particles-to-Rigid-Bodies ), who can be useful but I did not get my head around it yet.
I'll try to use it the next time I'll do some water render, if it's easier to use and save time I'll definitely post my result here.
This looks awesome Saitogray! This has given me some crazy ideas as well! 😛
This reminds me of another great tutorial on how you can use Blender's built in fluid simulation and convert it to lego bricks. I took the tutorial a step further by integrating Mecabricks models and materials. The effect creates a very similar look and style to that of the lego movie with the added ability to animate it.
[youtube]bpYkNTwK9Pg[/youtube]
Thanks, it's really easy to follow your guide !
I gave it a little try here http://www.mecabricks.com/en/models/AzOjo5AAa6Z#qVXJmD
@Mathieub: Oh cool ! I didn't think of making snow with it ! You gave me some idea !
@BallisticBricks: I already try similar tutorials but the water didn't convince me. The Lego Movie Oceans are awesome, full of detail, the foam is Stud and the rest of the water is stack up smooth piece. And I don't see a way to have the same result with Blender.
That why I decide to go see what people do with MOC and to see if I can reproduce to result.
https://www.flickr.com/photos/mark-of-falworth/14318497742/in/pool-lego-palm-trees/
You can also animate this method. Add a few frames, wait for the stud to fall down then add an invisible passive rigid body in front of your model and animate it.
The passive rigid body will push the stud away and you should have a pretty good result.
Anyway, thanks for the video, i learn a few tricks !
I have to say this method takes a lot more tweaking to collision shapes and positioning if you use a piece that isn't vaguely round like a stud is. (Imagine that 😛 )The result is still rendering, so I'll post it later.
Edit:
Bananas!
Bananarama! Nice tutorial! 😄
Hahaha, that's pretty cool !
Yeah, you must have chosen one of the worst shape possible to play with the physics engine 😛
LEGO, le logo LEGO, la minifigurine et les configurations des briques et tenons sont des marques déposées de LEGO Group of Companies. ©2024 The LEGO Group.
Mecabricks, le logo Mecabricks et tout le contenu non couvert par les droits d'auteur du groupe LEGO sont, sauf indication contraire, ©2011-2024 Mecabricks.