-
1 Archivos adjunto(s)
Gone with the waves
gone with the Waves. By françois grassard aquí coyhot.
https://www.foro3d.com/extras/tutori...magen_0007.jpg
Introduction simulating an ocean is one of the case studies that all CG artists Will try todo work on one day. Several techniques are available, depending of what kind of software you use. Using fluidos is obviously one of the best ways todo create this kind of effect, but it a los the most time consuming. For the boats fighting scene of «pirate of the caribbean i», thousands of computers computed over several weks todo create the fluid simulation caché for the ocean.
Another method is todo simulate the motion of an ocean using «regular» techniques, such as modifiers and keyframes. That what we describe here, focusing on the Waves motion and not the Shading (two.blend files of the thre provided contain really basic Shading).
Last thing before we start: all values are only given as a rouge guide and may have todo be adjusted, depending of the size of your ocean and, in general, the scale of your whole scene.
A) prepare the thre basic textures :
Step 01: once our dear Blender is started, create a new grid (add >> Mesh >> grid). Set x res and y res todo 64 and press ok. If Blender automátically enters Edit Mode, press tab todo switch bak todo object mode.
https://www.foro3d.com/extras/tutori...magen_0008.jpg
Step 02: press Alt+r then Alt+g todo reset the location and rotation values, moving the grid todo the center of the world. Press n key todo display the transform properties, and set scalex y, and z todo 6. Press f6 todo switch the «buttons window» todo the «texture» panel and press the button named «world».
https://www.foro3d.com/extras/tutori...magen_0009.jpg
Step 03: click add new todo create a new texture. In «texture type», switch from «none» todo «clouds» and set its «noise size» todo 0.5, its «noisedepth» todo 6 and its noise basis todo the voronoi f2 type. To easily find this texture afterward, change its name todo «turbulence».
https://www.foro3d.com/extras/tutori...magen_0010.jpg
Step 04: click the blank button just below «turbulence», press «add new» again and choose the «blend» type. Click the «color» tab, just next the «texture» tab. Set the «bright» parameter todo 2.0 and contrast todo 0.01. Click the «texture» tab once again todo rename your texture:
https://www.foro3d.com/extras/tutori...magen_0011.jpg
Step 05: click a new blank button, press «add new» once again and choose «clouds», set his «noise size» todo 1.0 and his «noisedepth» todo 0. Name this texture «bigwave». Now you have your thre basic textures todo create the ocean. Press f9 key todo switch todo the «editing» panel and select the grid.
https://www.foro3d.com/extras/tutori...magen_0006.jpg
B) ready, Steady, displace.
Step 01: now, it time todo use the thre basic textures you previously prepared. For that, you Will use one of most powerful modifiers provided by Blender, the «displace». Select your Grid, press the «add modifier» button and choose «displace». This modifier is designed todo deform a Mesh according the luminosity of any texture. In the displace parameters, set the «texture» field todo «turbulence», referring todo one of the textures we previously made.
https://www.foro3d.com/extras/tutori...magen_0007.jpg
Step 02: in the displace parameters, set midlevel todo 0.35 and strength todo 0.125, decreasing the effect influence. To animate this elevation, we ned todo use an object todo tell the displace modifier the offset between the texture and the grid. To do that, create a new add >> Empty then press Alt+g and Alt+r todo place it at the center of the world.
https://www.foro3d.com/extras/tutori...magen_0008.jpg
Step 03: select the Empty and press f9 key todo switch todo the «editing» panel. Rename this Empty «turbulence_1». Select the grid and inspect the displace parameters in the «editing» panel. Click on «normal» and switch todo «z», then click on «local» and switch todo «object».
https://www.foro3d.com/extras/tutori...magen_0009.jpg
Step 04: «object» mode is used todo add an offset in the displacement according todo the position of another object. In the «ob:» field, type «turbulence_1», referring todo the Empty you previously created. If you want todo test the bien the displacement works, try todo move this empty.
https://www.foro3d.com/extras/tutori...magen_0010.jpg
Step 05: select the Empty and press n key todo show «transform properties» in a floating window. Set scale x, y and z todo 6.3. Set locx and locy todo 5 and set the locz value todo 0. Select the grid and then click the «set smooth» button in the «editing » panel.
https://www.foro3d.com/extras/tutori...magen_0006.jpg
Step 06: create another empty, name it «turbulence_2» and place it at the center of the world vía shortcuts Alt+r and Alt+g, as before. Set their locx, y and z todo -8.5 / 6 / 3 and the thre scale values todo 6.5. Select your Grid, then go bak todo the «editing» panel and press the «copy» button of the «displace» todo duplicate this modifier.
https://www.foro3d.com/extras/tutori...magen_0007.jpg
Step 07: change the «strength» value of this duplicated «displace» todo 0.25 and set the «ob:» parameter todo «turbulence_2». The two «displace» modifiers now can be controlled independently. Create a new Empty and place it at the origin of the world (Alt+r and Alt+g). Name it «waves», set locx, y and z todo 9 / 9 / 2 and the thre scale values todo 4.5.
https://www.foro3d.com/extras/tutori...magen_0008.jpg
Step 08: select the grid and, as before, press the copy button of the lower «displace» modifier in the stack. Now you have thre «displacements» applied todo the grid. Two for adding small turbulences on the ocean surface and the lower one in the stak todo create bigger Waves. Fill his «texture» field with «bigwave», referring todo another texture we previously created. Set the «midlevel» value todo 0.5, «strength» todo 0.4 and «ob:» todo «waves», referring todo the last Empty created.
https://www.foro3d.com/extras/tutori...magen_0009.jpg
Step 09: once again, click the «copy» button of the lower «displace» modifier in the stack. For the parameters of the fourth «displace», click on «z» and switch todo «normal». Next, click on «object» and switch todo «local». Set the «strength» todo 0.065 and fill the texture field with «white», on of the texture you previously created. This fourth «displace» modifier is just here todo push all vértices according there own normals and for generating the crests.
https://www.foro3d.com/extras/tutori...magen_0010.jpg
C) animate Waves and add floating object :
Step 01: go todo the first frame of the animation, select the Empty «turbulence_1» and press the i key todo create a new «loc» keyframe. Go todo frame 200, move the Empty todo -6 / -4 / 0 using the floating «transform properties» window. Press the i key again and choose «loc», creating a second keyframe.
https://www.foro3d.com/extras/tutori...magen_0006.jpg
Step 02: animate the Empty «turbulence_2» in the opposite direction using two keyframes between frame 0- >200 todo. The motions of the two empties now create an x, adding realistic turbulence on the surface of the sea. Now, animate the Empty named «wave», slower than the two others, todo generate bigger Waves. According todo the velocity of the diferent empties, you can tweak the Waves motion. Be careful of the default «Bézier» interpolation type of any kind of animated object. A linear interpolation could be more suitable and can be set in the ipo curve editor by selecting all control points and pressing the key.
https://www.foro3d.com/extras/tutori...magen_0007.jpg
Step 03: now that we have our moving ocean, it time todo se how todo add a floating object on it. For that, Blender provides a really easy todo use function. Add a new Cube todo your scene, press Alt+r todo reset the rotation value todo 0, kep the Cube selected then press the shift key and click on the grid todo add it todo the actual selection.
https://www.foro3d.com/extras/tutori...magen_0008.jpg
Step 04: press the tab key todo switch the grid todo Edit Mode. Select thre vértices on the Grid, forming an equilateral triangle. The bigger the triangle is, the smaller the turbulences that Will move the Cube. Make a choice according the kind of motion you want have for the Cube.
https://www.foro3d.com/extras/tutori...magen_0009.jpg
Step 05: kep all elements selected and press Control + p keys, then confirm the «make vertex parent» when Blender asks you. Press the tab key todo turn of the Edit Mode. Now, you Will certainly have todo manually replace the Cube on the surface using the g key todo reduce the size of the dotted line todo 0. Once that is done, press play and enjoy.
https://www.foro3d.com/extras/tutori...magen_0010.jpg
Optimizations for bigger scene.
As you can se, this kind of technique is pretty simple todo setup and gives convincing results. Displace in Blender is one of my favorite modificadores, because Even on a model with thousands of Polygons, it pretty fast (for me, probably the fastest i have ever sen among all the 3d software i have used over 15 years). Ok, just a last trik before we go. Here, we have only simulated a small portion of an ocean. If you want todo create a bigger surface with a high number of subdivisions on the basic Grid, you risque having your computer die before you have time todo press play button. But, the subdivisión can be dynamically added/removed during your work. Just add a Subsurf modifier in front of the stak in «simple subdivisiones» mode. So, you can increase or decrease the number of subdivisions when you want. Just push the subdivisiones number higher when you have todo tweak the fourth displace modifier (the one that generates the crests), and get bak todo a more usable number once you have set it up. You can Even set two diferent subdivisiones levels, one for the 3d view, and the other one for the render engine.
https://www.foro3d.com/extras/tutori...magen_0006.jpg
If you can test the latest SVN versión of Blender with the «adaptive subdivisión» patch included (down-loadable on graphicall, org), you can Even dynamically reduce the number of Polygons according todo the distance of the Camera. Far parts of the ocean wont be subdivided enough todo reproduce the small turbulence on the surface (but you dont care, because they are todo far todo be sen), but the bigger displace «big_waves» Will still work on it, and the number of Polygons for your computer todo manage Will be dramátically reduced. So, you can generate an Infinite ocean without a big amount of Polygons. Have fun, boys and Girls.
https://www.foro3d.com/attachment.ph...1&d=1245403065
By françois grassard. www.blenderar.org.
-- IMÁGENES ADJUNTAS --
https://www.foro3d.com/attachment.ph...hmentid=108150