8/14/2019 Oceanos y Olas
1/18
New Ocean Techniques in Blender
Creating large bodies of water in Blender 2.41 Part 4
By Cog aka Colin Litster
Balancing Detail, and Painting with Light
In this, the concluding part of my New Ocean Techniques Tutorial, I will cover the topics of balancing detail against render time andalso ways in which a ray trace like look without the render time overhead can be achieved. We will also finish off our ocean by
adding a bright morning sun and a simple panoramic cloud backdrop.
Flexible Modifiers
Since Blender v2.40 the developers have added some very useful facilities. One of these is the new modifier system. This allows usto add mesh deformations in a non-permanent way. It also allows one to have a stack of modifications one after the other where
you can not only change parameters but also change the order of the modifications. This is great because in our example it meanswe can try some subsurface modifications and experiment with the level and thus check the effect on render time.
Set a Subsurface Modifier
With the ocean object selected go to the Editing button (F9) and select theModifiers Tab and select Add modifier.
From the displayed list of modifiers select Subsurf and initially set the render levelsto 1. Thats the default lowest level, but it will double the render detail of the object.
The levels option is the number of subsurfaces in screen mode. Since we cannotsee the displacement until render its not worth setting this higher than 1.Optimal Draw makes it easier to see complex meshes in view mode.
Page 40 Created by Colin Litster February 2006
8/14/2019 Oceanos y Olas
2/18
New Ocean Techniques in Blender
How Much Subsurf?
You can in fact go to 6 levels of subdivision but above 4 your computer will probably become unstable with such a large vertexmesh as our ocean. Below is part of a test render for each level up to 4 with timings. The actual render size was 1692 x 720.
,,
As you can see the render time increases exponentially with eachincrease in Subsurf. Here is a graph based on those figures.
What does that tell us? Well up to Subsurf level 2 there is only a15% increase in render time. Go up to level 3 and it takes nearly50% longer to render.
Page 41 Created by Colin Litster February 2006
Thus I wouldnt go higher than level 2.
8/14/2019 Oceanos y Olas
3/18
New Ocean Techniques in Blender
There is another reason to not go above Subsurf 2 and thats the Far-sea object behind. It is only a 4 vertex plane so its very flat.
As you increase the subsurface of the Close-sea object that flatness becomes more apparent, therefore breaking the illusion.
All 3D modelling is a balance between achieving reality, or the artistic look you want, against the time available to achieve it.
Painting with Light
Time to add some magic that will turn our current rather flat coloured ocean into a sparkling morning in the Mediterranean.
Did you use a modelling light, as suggested earlier, to show the specular reflections on the waves? If so you could equate that lightto a kind of Sun as it would have given very bright specular highlights centred from the location of the light.
Page 42 Created by Colin Litster February 2006
8/14/2019 Oceanos y Olas
4/18
New Ocean Techniques in Blender
One of the of the happy accidents that happen all the time in 3D is that this particular specular only light paints the top surface ofthe wave in much the same way as a raytrace reflection would. However, because it is a single light source it only lights a cone of
specular light that comes to a point near to the location of its source.
Reduce Brightness & Duplicate the Light
Blender has the ability to both fine tune the brightness, colour, and effect of a light source, as well as duplicate lights, or any objectsin a scene. We will use these abilities to paint the surface of the waves from the horizon to the foreground.
If you created a special modelling lamp move it to the following location. If you havent got one create a new lamp at this location.
LocX: -97.884LocY: 103.899LocZ: 2.791
From its material settings (F5) and Lamp button set No Diffuse.
Also set its Distance to at least 171. This ensures that the light will actually light from the horizon to beyond the camera.
Render a small test image.
As can be seen the light is very bright but it does stretch from thehorizon to the camera.
Now we are not after creating a Sun like reflection at this time so ifwe were to reduce the intensity of that lamp and duplicate it acrossthe horizon we will produce a light painted specular illusion ofraytraced reflection. Lets start by duplicating the light across thehorizon.
Page 43 Created by Colin Litster February 2006
8/14/2019 Oceanos y Olas
5/18
New Ocean Techniques in Blender
Duplicate the light on the horizon
Your cursor should be on the single light you just created. If not select it and press SHIFTS for Snap and Cursor to Selection.
From the camera view press SPACE, for Add and Mesh, Plane.
Whilst still in Edit mode, locally scale the plane mesh so that it stretches across the horizon and the bottom edge is at the sameheight as the lamp recently created.
Now delete the top vertices of theplane. The easiest way to do this is topress BKEY, Border select, and middlemouse button (MMB) drag the marqueeto surround the bottom vertices. Whenyou release the MMB only the top
vertices will be selected.
Now press the XKEY to delete thesevertices.
Page 44 Created by Colin Litster February 2006
8/14/2019 Oceanos y Olas
6/18
New Ocean Techniques in Blender
Subdivide the Remaining Vertices
Reselect the remaining vertices AKEY and press WKEY and Subdivide Multi.
The default is 2 subdivisions. If not set itto 2 and subdivide multi 5 times.
This will produce a nice straight mesh
with 244 vertices. Quite enough toDuplivert our light to.
TIP: If you look in the top right of yourBlender screen you should seedisplayed the current objects data.
This will show number of Ve: (rtices),
Ed:(ges), Fa:(ces), Me:(mory) used, andname of the object.
Duplivert the Lamp to this object
Go out of mesh edit mode TAB, and reselect the lamp nearby. Now SHIFT Select the line mesh once more and parent it CTRLP.
We can now setup a Duplivert for the line mesh which will copy our lamp to every vertex in our line mesh.
Select just the line mesh RIGHTCLICK, on the line and from the Object menu (F7) select DupliVerts.
Page 45 Created by Colin Litster February 2006
8/14/2019 Oceanos y Olas
7/18
New Ocean Techniques in Blender
If you were to do a test render now there would be so much light that the scene would be washed out. Fortunately each of these244 lights just reference a single light. If we lower its level all others dupliverted will be reduced by the same amount.
So select the single light that we just dupliverted and change its material settings tothe following.
As you can see the Energy level has been reduced to 0.010.
I have also slightly altered the colour to try to match the light blue I use as abackground. If you change the colour only make very small changes. Unless you wantto create an out of this world ocean of course.
SAVE YOUR WORK HERE
Page 46 Created by Colin Litster February 2006
8/14/2019 Oceanos y Olas
8/18
New Ocean Techniques in Blender
Render a Test Image
Not bad. The line of low energy lamps, at the horizon, has added a subtle reflection like effect that helps define the detail in ourwaves.
Time to add the finishing touches to our ocean. The Sun and cloud backdrop, and a horizon mist.
Page 47 Created by Colin Litster February 2006
8/14/2019 Oceanos y Olas
9/18
New Ocean Techniques in Blender
Creating a SUN
Creating a Sun may appear to be a simple case of adding a single light source in a location matching where you sun should be.Unfortunately 3D light sources are much more precise that the natural equivalents. They emanate from a finite point in the 3Dspace and thus can look unnatural. We must therefore use similar tricks used to paint with the horizon lights to help spread thesunlight specular effect and help bloom out the Sun to make it look solar system size rather than pin-point.
Create a lamp at this location:-
Now produce several instances of the lamp (ALTD) one after the other towiden the number of lamps seen by the camera. You will notice that they areplaced a similar distance from each other as the horizon lamps earlier.
We could have used the Duplivert technique but there are only a few lightsand its probably quicker to just instance them. By the way if you set them toofar apart the effect will look like lights in a line and not a single sun likespecular light.
As I we have about 8 lights here it will be necessary to reduce their energy alittle or the effect will be too bright. So with one of the lights selected reduceits Energy to 0.500.
Also select No Diffuse so that the light will only give specular highlights.
Page 48 Created by Colin Litster February 2006
8/14/2019 Oceanos y Olas
10/18
New Ocean Techniques in Blender
SAVE YOUR WORK
Render a test image.
Things are coming along. Lets now add a background and an additional light to give a nice bloom to the Sun.
Page 49 Created by Colin Litster February 2006
8/14/2019 Oceanos y Olas
11/18
New Ocean Techniques in Blender
Setting the World
Select Material (F5), and World, and set the following settings:-
This will produce a light blue blend to almost white at the horizon. In our case thats like a mild hazy morning in this part of ourworld.
Mist
Blender has a rudimentary mist system that while not perfect (in fact I seldom use it), canhelp us produce the fading at the horizon a little. Since this is set from the World setting
we might as well set it up now. From the Mist/Stars/Physics tab set as follows:-
Sta: 100.00, Di: 45.00, Hi: 0.00, Misi: 0.00
SAVE YOUR WORK
Page 50 Created by Colin Litster February 2006
8/14/2019 Oceanos y Olas
12/18
New Ocean Techniques in Blender
Sun Bloom
Create a new Spotlight with the following location, and orientation. Then set its Lamp settings to that shown on the right below.
Note: You will see that the spotlight has been setwith No Diffuse & No Specular effectively makingthe light invisible. However, the Halo is set and thiswill produce the bloom effect.
SAVE YOUR WORK
Test Render the scene at this point.
Page 51 Created by Colin Litster February 2006
8/14/2019 Oceanos y Olas
13/18
New Ocean Techniques in Blender
OK it looks a bit odd at the moment a kind of shaded sun. The Halo of the light has created an alpha mask for the sun and becausethere is no other object behind it, it defaults to a black background effectively adding the alpha value to the background we createda few pages back.
We can overcome this odd effect by adding a huge tube object, with a nice cloud image mapped to it, centred at the camera.
Select the camera and move the cursor to it. (SHIFTS), Cursor to Selected.
From the top view Add a tube object. SPACE, Mesh, Tube, 32 vertices.
Now scale it out in mesh edit mode to approximately just before the line of horizon lights.
Page 52 Created by Colin Litster February 2006
8/14/2019 Oceanos y Olas
14/18
New Ocean Techniques in Blender
And scale its Z dimension to approximately this. Thats just below the horizon and above
the camera top field of view.
Still in Edit mesh mode select Set Smooth in the Edit button (F9).
Map a new material to this tube with the following settings.
NOTE: That Traceabl, Shadow, & TraShad areall turned off. This ensures that the tube will notblock any lights behind it, or cause any shadowson the ocean. The material has also been set to
Shadeless which will ensure that it will remain atfull brightness no matter what.
We still have 2 more settings for out tubematerial.
Page 53 Created by Colin Litster February 2006
8/14/2019 Oceanos y Olas
15/18
New Ocean Techniques in Blender
The No Mist setting in the Mirror Transp tab is important as it will ensure that the world mist, we have set up, will not affect thistube material. Otherwise it would just disappear in the mist.
We also have Col set and Tube mapping so that we can attach an image texture of our clouds.
Page 54 Created by Colin Litster February 2006
8/14/2019 Oceanos y Olas
16/18
New Ocean Techniques in Blender
Attaching a Sky Image to the Tube
For this exercise Im not going to ask you to create a brand new cloudy sky image from scratch. If you would like to learn how to doso please read my:-
Cogs Quick Tutorial No.5 Cloud Creation in BlenderSo here is a link to the image that I was used to create the renders you have seen in this New Ocean Techniques Tutorial.
http://www.cogfilms.com/tutorials/new-ocean sky-27-07-05-03.jpg
Create a new Texture for our Tube material.
Page 55 Created by Colin Litster February 2006
http://www.cogfilms.com/CQTs-5.htmlhttp://www.cogfilms.com/tutorials/new-ocean%20sky-27-07-05-03.jpghttp://www.cogfilms.com/tutorials/new-ocean%20sky-27-07-05-03.jpghttp://www.cogfilms.com/CQTs-5.html8/14/2019 Oceanos y Olas
17/18
New Ocean Techniques in Blender
NOTE: because this image isnt setup as acircular panorama image Im repeating it in the Y
axis so that it is not too elongated as itsstretched around the tube. This does mean thatthere will be some joins in the texture but we cansimply turn the tube around so that any join ishidden out of the field of view.
whole
If you wanted to pan your camera however, itwould be best to have a 360 panoramic image
mapped to the tube so that no join can be seenwhen the camera pans.
SAVE YOUR WORK
Test Render the scene.
Page 56 Created by Colin Litster February 2006
8/14/2019 Oceanos y Olas
18/18
New Ocean Techniques in Blender
There is our ocean. Render a 10 second animation (250 frames at 25fps) and admire your handiwork.
Taking things further
Because the wave materials are mapped to a separate Empty. Its possible to move the ocean meshes without moving the material.We can use this to help pan the camera without the need for a larger complex mesh under the camera as it pans. Just Parent theClose mesh and Far mesh to the camera. Then when you Pan the camera the mesh will apparently stay with the camera view butthe material will move as though you are panning over it. You should also parent the line of horizon lights so that they pan with thecamera.
Well this has turned out to be a big tutorial but I hope you will find it just a little useful. Cog
Page 57 Created by Colin Litster February 2006