53
Issue 31 | Dec 2010 Blender learning made easy COVERART Virus -by Adam Auksel Physics of Circular Motion A World of Rotations BioBlender: Blender for Biologists Computer Simulation and Modeling of Liquid Droplets

BlenderArt Magazine Issue 31 Under The Microscope

Embed Size (px)

DESCRIPTION

Blender provides an excellent tool set for producing simulations, visualizations and walk-throughs, as well as educational videos based on the various research projects. In this issue we take a look at some of the exciting ways that Blender is being used for research and education.

Citation preview

Page 1: BlenderArt Magazine Issue 31 Under The Microscope

Issue 31 | Dec 2010

Blender learning made easy

COVERART Virus -by Adam Auksel

Physics of Circular Motion

A World of Rotations

BioBlender: Blender for Biologists

Computer Simulation and Modeling of Liquid Droplets

Page 2: BlenderArt Magazine Issue 31 Under The Microscope

EDITORGaurav Nawani [email protected]

MANAGING EDITORSandra Gilbert [email protected]

WEBSITENam Pham [email protected]

DESIGNER/LAYOUTINGGaurav Nawani/Nikhil Rawat

PROOFERSBrian C. TreacyBruce WestfallDaniel HandDaniel MateHenriël VeldtmannJoshua LeungJoshua ScottonKevin BraunMark WarrenNoah SummersPatrick ODonnellPhillipRonan PosnicScott HillWade BickValérie Hambert

WRITERSRobert TEnrique_Sahagundi misticPep RibalFrancisco M. Gomez-CamposJamie TicaRichard CharvátAdam KaliszEnrique_SahagunRaluca Mihaela AndreiMike PanMonica ZoppèRod Cockcroft

COVER ARTVirus -by Adam Auksel

CONTENTS 2

Physics of Circular Motion 5

A World of Rotations 7

BioBlender: Blender for Biologists 27

Educational Science and Engineering videos 33

Computer Sim. and Modeling of Liquid Droplets 36

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

The Transporters 24

Microorganismal Worlds 22

Page 3: BlenderArt Magazine Issue 31 Under The Microscope

The greater majority of Blender users focuson the modeling and animation aspects ofBlender. And with good reason. Blender hassteadily grown and improved its toolsetover the years, giving both hobbyists and pro-fessionals alike a powerful 3D program.

Not surprisingly, Blender's growth has alsodrawn a new user base from the scientificcommunity. This year alone the annualBlender Conference saw a number of excitingscientific/educational presentations. Severalfactors make Blender ideal for scientificprojects.

As much as we would all like to pretend oth-erwise, cost is a factor. Since Blender is free,precious research funds can remain focusedon the research itself.

Blender provides an excellent tool set for pro-ducing simulations, visualizations and walk-throughs, as well as educational videos basedon the various research projects.

The open nature of Blender, as well as theease of creating python add-ons allows forcomplete customization of Blender to theneeds of the project (e.g. Bio-Blender).

Community support is a huge draw for manynew users, and in my opinion, one of thegreatest advantages to choosing Blender. TheBlender community has always excelled athelping new and existing users solve prob-lems.

Fast development also makes Blender an at-tractive option. It is not an uncommon occur-rence to notice a bug/problem and seeminglyovernight the solution has been coded anduploaded. Many times, I no sooner think,"Gee, "X" feature would be so helpful". Then Igo to research if there is a work around, onlyto discover that someone has anticipated mywish and it is already coded. Now that is"CUSTOMER SERVICE".

As you might have guessed, in this issue wedelve "Under the Microscope" as we exploresome of the exciting ways Blender is beingused to further education and research. Sograb a hot beverage of choice and settle infor an enlightening experience

Sandra GilbertManaging Editor

EDITORIAL 3

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 4: BlenderArt Magazine Issue 31 Under The Microscope

Ihave always been fascinated byelectron microscope style im-ages. They often display a frag-

ile almost magical quality that isjust beautiful. Over the years,blender users have come up witha number of creative methods forproducing these lovely images.

Blender 2.5 of course, has broughtnew tools and techniques to theelection microscope look. Here's acouple of tutorials that I have runacross just in the last few monthsby very talented Blender users thatmake excellent use of Blender 2.5to created truely beautiful"Electron Microscope" style imag-es.

Creating a Microscopic VirusEffect

Blendercookie.com has become amajor educational resource sinceit's launch. Among the numerousvideo tutorials covering a dizzyingarray of topics, there is a beautifultutorial by Jonathan Williamsonon creating a Microscopic Virus.

In addition to showing how toquickly and easily model a “virus”,he shows the viewer how toachieve that lovely electron micro-scope look. The end result is beau-tiful and easy enough for even abeginner to accomplish in little tono time.

Construct a 'Microcosm' Us-ing Blender 2.5

This is a 4 part in depth video tu-torial series by Frederik Steinmetzon how to create a Microcosm.Each video covers a different partof the process, leading to an abso-lutely beautiful end result.

From cg.tuts.com

In the first part of this brand-new,advanced Blender 2.5 tutorial, Fre-derik Steinmetz walks us throughhow he modeled and rigged his‘Microcosm’ creation! The full tu-torial will go on to discuss com-plex particle & hair simulation,how to add materials, texture andlight the scene, and finally how touse nodes for depth of field.

In the second part of his brand-new, advanced Blender 2.5 tutori-al, Frederik Steinmetz continues towalk us through how he createdhis ‘Microcosm’ scene! After mod-eling the scene in part 1, today’stutorial deals with particle andhair simulation, whilst later partsgo on to cover adding materials,how to texture and light thescene, and finally how to usenodes for depth of field.

In the third part of his brand-new,advanced Blender 2.5 tutorial, Fre-derik Steinmetz continues to walk

us through how he created his‘Microcosm’ scene!

After modeling the scene in part 1,and dealing with the particle andhair simulations in part two,today’s part starts looking at howto texture and light the scene!

In the forth and final part of hisbrand-new, advanced Blender 2.5tutorial, Frederik Steinmetz contin-ues to walk us through how he cre-ated his ‘Microcosm’ scene! Aftermodeling the scene in part 1, deal-ing with the particle and hair simu-lations in part two and texturingand lighting the scene in partthree, today it’s all about finalisingthe scene, rendering and puttingtogether the final composite! It’stime to wrap up this awesome se-ries.

After learning how to create yourown lovely new artworks, youmight want to kick it up a notchand get a little motion going. Re-cently Dimistic sent me a fun littleblend file for you to play with, thatshows his method for creating anelectron in motion, as well as thesettings he used to create a rathernice glow/glare effect. The blendfile is included in this issue's blendzip download. You can see a shortanimation of his electron motionon youtube

IZZY SPEAKS - Magical Electron Microscopes

“After learning how to createyour own lovely new art-works, you might want to

kick it up a notch and get alittle motion going.”

4

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 5: BlenderArt Magazine Issue 31 Under The Microscope

IntroductionThe first moment I heard about the new topicfor the current #31 BlenderArt Magazine, Iwas like 'Cool, I have to participate!' Unfortu-nately I didn't know how to contribute some-thing. But since currently I'm attending avocational school in Nuremberg, Germany,finding a suitable topic was not such a bigdeal. Furthermore, I think that I will deeplybenefit from this. On the one hand I can im-prove my physics skills and on the other handmy English skills. Ah, and of course my

Blender skills as well! ;)

Approaching the animation

So I sat down and thought about my animation con-cept. Since we were dealing with circular motion inphysics and I knew that my classmates and I hadseveral problems with applying the correspondinglaws, I decided to stick to that topic. With the for-mulas lying in front of me, I started to write thescript. I had to think about a didactical (teaching)structure and at the same time how to visualize it inBlender.

In the end, the speaker text took up a whole pageand after the first audio recording I was able to startthe realisation in Blender. The cool thing with theseprojects is that Blender has an internal video se-quencer, where you can just put all of your audiofiles and play them back in real time. Because ofthat, there weren't any synchronisation problemsand the animation process was very comfortable.

I wanted to keep everything as dynamic as possible,so I looked for constraints to help with the anima-

tion. Finally I useda 'Follow Path'constraint andtook the opportu-nity to keyframethe offset parame-ter. To scale thevectors against theradius of the circle,the 'Copy Scale' constraint did a great job. But I hadto set keyframes for the influence to stay put at 0until the respective vectors are mentioned, becauseotherwise they would scale up too early, e.g. whenscaling up the radius of the circle when the radialacceleration has not been mentioned yet.

The rest was madeby creating key-frames to animatethe vectors andusing shape keysfor the Pythago-rean theorem. Itturned out that Ihad forgotten tochange the frame rate to the European standard of25 frames per second. Because of that I had to read-just all of the keyframes. That's why it's essentialyou set up your render settings before you begin ani-mating. This brings us to the problems I had to facein the animation process.

Problems

Fortunately, since Blender can save the sound intothe final video due to its sequencer, there was onlyone big problem: The text animation.

3D WORKSHOP - Physics of Circular Motion 5

by- Adam Kalisz

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 6: BlenderArt Magazine Issue 31 Under The Microscope

I decided to do it in After Effects, which turned out tobe a very time-consuming process.

After Effectsdoesn't supportthe audio play-back in realtime, at leastnot until CS3. SoI had to switchon the displayof seconds inthe timeline inBlender andtweak all of thefade in and fadeout animations in After Effects synchronously whilescrubbing through the animation in Blender. Hopefullyin future, Blender will get a sophisticated tool to addsome text in the compositor to avoid third party soft-ware, which brings more trouble than it actually helps,at least as far as synchronisation is concerned.

Conclusion

To conclude, the development of this video was arather simple task. Blender was a great aid with itsbuilt-in animation features allowing for a dynamic, cus-tomisable animation process. I really appreciateBlender’s big arsenal of tools and the organised graphi-cal user interface. It's an indispensable Open Sourcegraphics suite that everybody should use and support.I'm very enthusiastic about it and founded the firstBlender user group in Nuremberg with some otherguys and I'm trying to establish a quality German videotutorial website to increase the number of Blender us-ers in Germany. Thanks to the Blender Foundation andall of the developers!!!

You can watchthe animationhere:

63D WORKSHOP - Physics of Circular Motion

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 7: BlenderArt Magazine Issue 31 Under The Microscope

IntroductionWhat is it with rotations that makes them sofrightening?

Actually rotations are very useful, and some-times absolutely necessary. Imagine a worldwithout rotations... Tire manufacturers willagree with me... Indeed, of the three kinds oftransformations (translation, rotation andscaling), rotations are by far the most com-plex. Let's see why.

Take the Blender default scene. Activate theTransform panel (hotkey N). Make sure the Translatemanipulator is on, and Transform Orientation is setto Global. Now move the default cube along the Xaxis using the manipulator (red arrow). Take a lookat the Transform panel as you drag the cube. You'llsee the Location X value change as you do, while theother values remain unchanged. OK, drop the cubewhere you wish. Now do the same along the Y axis,and you'll see Location Y change as you drag. Oncemore, the rest of the values remain unchanged. Fi-nally, you can see the same thing happens with Zaxis.

Then you can change the 3D manipulator to Scale.Keep trying with the three axes, and you'll realizethat each modification affects only its own axisvalue (Scale values). It also changes the Dimensionsvalues, but these are not relevant, as they refer tothe final dimensions of the mesh, not to the trans-form properties of the object.

Rotating an object

First of all, a brief description of the Transform Ori-entations available for the 3D manipulators in Blend-

er. View has a set of axes aligned with the viewportdirection, Normal is aligned with the normal of theactual object data selection (like mesh faces) in EditMode, and it's equivalent to Local orientation in Ob-ject Mode, Local is aligned with the object local co-ordinate system, and Global is aligned to the worldcoordinate system. We will see later what Gimbalmeans.

Once that’s said, let's start the show. First make sureXYZ Euler is selected in the Transform panel. Trynow with the Rotate manipulator, with Global orien-tation. Drag around the Z axis (blue ring). You canalso use hotkey R, and then Z for rotation aroundthe Z global axis. You can see the Rotation Z valuechange as you rotate. Drop it at will. Now rotatearound any of the other two axes... What happens?All three rotation values (X, Y and Z) change as youdrag...

We have justdiscoveredthat rotationaround oneaxis affectsthe value ofthe othertwo. Let's godeeper intothis. Openthe providedfile'RotationsWorld.blend'. There you have three simpleairplanes (fig 1).

We will use the Rotate manipulator to perform threerotations on them: 120º around the X global axis, 60ºaround Y, and 45º around Z. But we will change theorder of those rotations in each object.

3D WORKSHOP - A world of rotations 7

by- Pep Ribal

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Figure 1. Initial state

Page 8: BlenderArt Magazine Issue 31 Under The Microscope

Bear in mind that positive angles mean counterclock-wise rotations.

Start with 'PlaneA'. Use the manipulator to rotate X axisfirst. Check the amount of rotation in the 3D viewheader, not in the Transform panel. Use the Ctrl key toround up the rotated value to 120º as you drag. If youuse hotkeys R and then X, you can also enter 120 withthe keyboard. Next, rotate 60º around Y axis and finally45º around Z axis.

Now perform the same rotations on 'PlaneB' but in thisorder: first 60º around Y, then 120º around X, and last,45º around Z. When done, go for 'Plane C', using a neworder: 45º around Z, 120º around X, and 60º around Y(figure 2). Remember to always check the rotationamount in the 3D view header only.

OK, what do we have now? Three airplanes with a com-pletely different orientation in space. If you take a lookat the rotation values of the three planes, only 'PlaneA'keeps the values of the applied rotation (X=120º, Y=60º,Z=45º), while the others hold very strange numbers.You can see that the order of rotation is important.Even if we use Local mode for rotation manipulators,the problem doesn't improve (figure 3). For rotation

around X local axis for instance, you can also press R, X,X.

In translation and scaling we can just enter the valueswe wish into the Transform panel manually, as there isonly one way to interpret their meanings. But as wehave just seen, with rotations, entering the valuesX=120º, Y=60º, Z=45º in the slider controls might notyield the desired result. If we were looking for the ori-entation of 'PlaneA', that would have been OK. But ifwe wanted for instance, the rotation of any of theother two, that wouldn't have done the trick.

We need a rotation system with a special set of axesthat lets us forget about the order, so that we can typethe three rotation angles directly in the Transform pan-el, or use a manipulator so that each ring affects onlyone axis value. And that's exactly what Blender does.It's not using the global or local axes, as you have seenby the strange numbers you got in the rotation valuesof the objects. So what is that wonderful system thatBlender uses internally?

83D WORKSHOP - A world of rotations

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Figure 2. After rotations around global axes.

Figure 3. After rotations around local axes.

Page 9: BlenderArt Magazine Issue 31 Under The Microscope

Euler rotations

We have previously setrotation mode to XYZEuler. That is exactlywhat Blender is usinginternally. The bestway to see these typeof rotations in action isto set the TransformOrientation of the 3Dmanipulator to Gimbal.This widget lets yousee the current state ofthe Euler rotationtransform.

A gimbal is a circulargadget that spinsaround an axis thatgoes through one of itsdiameters. If youmount three of theseone inside the other,you have a 3-axes gim-bal (figure 4). This kindof device is used in gy-roscopes, for instance.

The Blender Gimbalrotation manipulatorclosely resembles oneof these gadgets, as ina 3-axes gimbal thesemove in relation to theothers. However,Blender gimbal is a bitdifferent from that, themain difference being the axis of rotation of the rings

as you can seein figures 5and 6. Whilethe physicalgimbal rotatesaround one ofits diameters(figure 5),each ring ofthe Blendergimbal rotatesaround an axisthat goesthrough the centre of the ring and is perpendicular toall of its diameters (figure 6).

So, let's start playing with the gimbal. Take any objectwith 0 rotation. Now activate the Gimbal manipulator.Set the rotation mode to XYZ Euler (though it wouldwork with any other Euler type). And now start rotat-ing the axes individually. You can repeat the experimentof the three airplanes, and you'll get the results of fig-ure 7. See what happens in the Transform panel.

Now, each gimbal axis is directly related to the corre-sponding rotation value of the object. What does itmean? That order of rotation doesn't matter. Maybeyou have realized that all three airplanes end up in thesame position using the Euler gimbal. If so, you willhave seen that all three airplanes have the same rota-tion values in the Transform panel. In other words, youcan enter the desired rotation angles numerically in theslider controls.

So, what's the difference between a local or global rota-tion system and the gimbal system? And why are theresix different types of Eulers? And why am I asking allthis if I know the answer...?

93D WORKSHOP - A world of rotations

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Figure 4. A gimbal gadget.

Figure 5. Physical gimbal rotation.

Figure 6. Blender gimbal rotation.

Figure 7. After Euler rotations.

Page 10: BlenderArt Magazine Issue 31 Under The Microscope

As you can see in a physical 3-axis gimbal gadget, thereare three axes configured in such a way that they forma hierarchy. When we rotate the outermost ring, theone on top of the hierarchy, we are actually rotatingthe entire system around the axis of that ring.

Rotating the middle ring, we can see the innermostring rotate as well. If we rotate the innermost ring,only that ring moves.

With Blender gimbals the same thing happens. So wemust choose one axis to be on top of the hierarchy, oneto be in the middle, and the last one to be at the bot-tom.

Let's say we want the Z axis to be on top; the X axis tobe its child; and finally Y to be at the bottom. In otherwords, Z axis will be the parent of X, and X the parentof Y. In order from bottom to top, we have Y, X, and Z.That forms a YXZ gimbal, used for YXZ Euler rotations.

There are six different combinations of hierarchies withthe three axis X, Y and Z, and therefore, six differentkinds of gimbals, each one of which is associated to itscorresponding Euler rotation system. With Eulers, it'simportant to remember that the axis written first is theone at the bottom of the hierarchy, while the last oneon the right is the one on top of it. Thus, in a XYZ Euler,the Z axis in on top, while X is at the bottom.

Blender uses two things to calculate the Euler rotationof an object. First, the values of the three rotationsaround each of the three axes (X,Y and Z); and second,what type of Euler hierarchy are these values based on.For instance it's not the same to use a XYZ or a ZXY hi-erarchy. You can check this by taking the rotated air-plane. Don't change the rotation values, just change toany of the other five Euler modes. You will immediatelysee the final rotation changes.

When Blender has calculated the rotation of the object(using the Eulers), it stores that rotation in the objectmatrix, which is basically a 4x4 matrix of numbers thatkeep track of the full transformation state of the ob-ject: its location, rotation and size. When you are justmodelling (not animating), it doesn't make any differ-ence which rotation mode you are using, as they willall end up in the same place internally, i.e. the matrix.No use will be made of the Euler values. However whenanimating, Blender actually uses those Euler values tointerpolate rotations, as we will see later.

Any of the Euler types has the advantages of isolatingthe effect of each axis, though they yield different rota-tions. Not a big deal. It's just a question of experiment-ing with them, and see how each type of gimbalbehaves. OK, now we have found a magical rotationsystem that will make this world a better place for youand me... So, why do we need other rotation systems?

Euler rotation problems

If we want to define any orientation, or we want torotate a face or a group of vertices, we can get them torotate wherever we want to use any of the Eulermodes. But when it comes to animation, we can runinto some trouble in certain circumstances.When youwant to animate a rotating object you have to use thesame system from one keyframe to the other. You can-not start defining a XYZ Euler orientation for one key-frame, and then a YZX Euler for the next one. Why?

Because Blender interpolates between two rotationsusing the values of the specific system used (Euler orany other); it doesn't use the rotation stored in the ob-ject matrix. So if you use a different system in two con-secutive keyframes, there is no way to calculate theinterpolation values between them.

103D WORKSHOP - A world of rotations

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 11: BlenderArt Magazine Issue 31 Under The Microscope

Let's go for another experiment. Open the file'RotationsWorld.blend'. Make sure that the airplanesdon't have any rotation applied, then go to frame 1 andselect ZXY Euler rotation mode. We will focus on one ofthe airplanes as we are going to make it do some aero-batics. You can delete the other two if you want.

The first thing to do will be to set the Transform Orien-tation to Local, so that we can manipulate our airplaneeasily. Bear in mind however, that even if the manipula-tor is set to Local, Blender is using ZXY Euler internallyto compute ro-tations and tointerpolatean-gles, so whatBlender is actu-ally using is theZXY gimbal.Now insert arotation key-frame in frame1, with the air-plane in restposition (no rotations at all) as shown in figure 8.

Now let's moveto frame 25 us-ing the arrowkeys. In thisframe, the pilothas astonishedthe audience ofthe airshow bysetting the air-plane in verticalposition. Rotate90º around theX local axis (remember that positive angles mean coun-terclockwise rotations), and set a new rotation key-

frame (figure 9). Now the nose of the plane is pointingup. You can switch from Local to Global mode to seehow the local axis has change. The "up" side of theplane is not the same as the "up" side of the world.

OK. But the pilot, who is a really bold guy, hasn't hadenough. Hewants to makea nice turn tohis right whilekeeping the air-craft nose up.So now, getback to Localmode and go toframe 50. Thenuse the manipu-lator to rotatethe airplane 90ºaround the Ylocal axis. Set a new rotation keyframe (figure 10).

Now rewind to frame 1, and check the full animationusing the arrow keys back and forth. You'll see thatfrom keyframe 1 (frame 1) to keyframe 2 (frame 25) eve-rything works as expected. But something weird hap-pens between keyframe 2 and keyframe 3 (frame 50).We expect a right turn, but the airplane nose actuallymakes a weird movement.

To check what the problem was, set Gimbal orienta-tion, rewind to frame 1, and check the animation again.As you approach frame 25, the Z rotation axis of themanipulator gets closer and closer to Y axis. At frame25, the Z axis is completely aligned with the Y axis, asshown in figure 11.

113D WORKSHOP - A world of rotations

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Figure 8. Keyframe 1 (local axes shown).

Figure 9. Keyframe 2 (local axes shown).

Figure 10. Keyframe 3 (local axes shown).

Page 12: BlenderArt Magazine Issue 31 Under The Microscope

We have justlost one axis ofmovement. Thisphenomenon isknown as theGimbal lock,and it's a verytypical source ofheadache foranimators.

You may havefound that youranimated rota-tions behave ina weird manner (it has indeed happened to me), andthere is no way to fix them no matter what you do toavoid the problem. Well, it's more than likely that youhave been a victim of the hideous gimbal lock (ock...ock... ock...).

So, back to our airplane. We are nose up, and we havelost an axis to perform a right turn. For doing that kindof turn, we would need to get our Z axis back. Well, ifyou check the interpolation values of the animationbetween keys 2 and 3, you will realize that this is ex-actly what Blender does. While the Y axis rotates thecommanded 90º, it also undoes the initial 90º rotationin the X axis (which caused the gimbal lock), and ro-tates 90º around the Z axis so that the final positioncan be reached.

The end result is the weird movement of the airplane.Unfortunately, that caused the audience to go backhome, and the airshow resulted in a complete failure.Let's try to see when gimbal lock occurs, taking intoaccount the type of Euler rotation we choose, so thatwe can avoid it.

We know there are three rotation axes in a gimbal.When all three axes are perpendicular between them,all is fine. However, as one of the axes starts to movetowards another, they lose their relative perpendiculari-ty, meaning that we are starting to lose some degree offreedom of movement. The problem reaches its maxi-mum when two axes become completely aligned(parallel), that is, when we completely lose one of thethree axes.

Let's take for instance a XYZ Euler gimbal. What hap-pens when the axis at the bottom of the hierarchy (inthis case, X) rotates? Nothing important actually. Allthree axes keep perpendicular whatever rotation youapply to the X axis, which just keeps spinning arounditself.

What if we rotate the topmost axis in the hierarchy (Z)?Then all the axes in the system rotate with it, keepingtheir relative positions, without losing freedom ofmovement like before. The problem comes when werotate the axis in the middle (Y). Its effect is to get itschild axis (X) closer to its parent axis (Z). That said, oneimportant thing to remember is that the middle axis inthe Euler hierarchy is crucial, and we need to keep aneye on it most of all.

Now that we know when gimbal lock is reached, wecan see how to avoid it. So, if you need an object toperform an animation with a series of rotations inwhich its Z axis will reach angles close to 90º (or equiv-alent angles like -90º or 270º), we will avoid the use ofEuler rotation systems XZY and YZX, as in these, Z axislays in the middle of the hierarchy.

However, we could still use XZY Euler even if the Z axisreaches 90º, but only if in those particular moments wedon't need the X axis to rotate. We need to make surethat as soon as we need rotations around the X axis, Zrotation is far from 90º (and equivalents).

123D WORKSHOP - A world of rotations

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Figure 11. Keyframe 2 (gimbal shown)Where is the Z axis...? Perfect gimbal lock

Page 13: BlenderArt Magazine Issue 31 Under The Microscope

If you want to perform the former aerobatics, you canchoose a different Euler system. For instance, you canrepeat the ex-periment with aXYZ Euler sys-tem, and youwill see every-thing workingfine.

When you aredone with it,you can take alook at the re-sulting anima-tion curves inthe Graph editor(figure 12). See how intuitive those f-curves are. Youcan see a 90º rotation around the X axis take place be-tween frame 1 and 25, and another 90º rotation aroundthe Z axis between frames 25 and 50.

This is one of the big advantages of the Euler rotationsas you can directly manipulate the rotation f-curveseasily, knowing that the curves are independent be-tween them. Those three curves give you a clear pic-ture of what's going on, even if you don't see the actualobject.

In this case all you have to do is keep an eye on thegreen curve (Y axis) and make sure it doesn't approach90º when the red curve (X axis) is different than zero.

OK, but is there any rotation system which doesn't suf-fer from gimbal lock...?

Sure there is.

Axis Angle rotations

If you set the rotation mode to Axis Angle, you will no-tice that you now have 4 values for defining rotations:X, Y, Z and W.

With Euler we had 3values representing arotation anglearound each axis.With axis-angle wedefine two things:one axis and one an-gle. The axis is de-fined by X, Y and Z;the rotation angle, byW. You can see thatin figure 13.

The effective rotation is done around the axis (X,Y,Z).This axis is an infinite line that goes through the centreof the object and the point defined by (X,Y,Z) in the lo-cal coordinate system of the object. There are manyways to define the same axis. The most important thingis the ratio between these three values. Thus, (1,0.5,3) isthe same axis as (2,1,6).

So once we have this rotation axis, all we have to do isto make the object rotate around it by the amountgiven in the W value. So if W=0, no rotation is applied,regardless of the values in X, Y and Z. Conversely, if X, Yand Z equal 0, no axis is defined, so once more, therewill be no rotation regardless of the W value.

You can easily see that the most obvious advantage ofaxis-angle is rotation around an arbitrary axis. Thismakes axis-angle very suitable for objects that spin con-stantly around the same axis. The rotation of Eartharound its peculiar axis is a perfect example.

133D WORKSHOP - A world of rotations

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Figure 12. Euler rotations: animationcurves.

Figure 13. Axis-angle rotation.

Page 14: BlenderArt Magazine Issue 31 Under The Microscope

Bear in mind that negative values matter in the axisdefinition, as axes have a direction. Two axes definedwith opposite direction (simply changing the signs of X,Y, and Z) will have an opposite direction, and so, an in-verse rotation. So changing the sign of all four values(axis and angle) has no effect on the final orientation(except for animation purposes).

One thing to note is that angle values in W are ex-pressed in radians, not degrees. In that case, if youwant to perform a 90º turn, you must rotate /2 in theW slider control. It's possible to type pi directly in thesliders as Blender knows its value (around 3.141592).You just need to know that 360 degrees are equivalentto 2x radians, so that you can calculate other angles.You can directly enter values like pi/2, 3*pi/2, 2*pi, pi,etc. Anyway, manipulators and hotkey R always usedegrees.

OK, now that we know what axis-angle is, it's time toplay with it.

You can repeat the aerobatics experiment from scratch.Set rotation mode to Axis Angle, and redo the three key-frames using the 3D manipulator of choice, or hotkeyR. Play the animation back.

What happens? Nothing good really.

Axis-angle rotation problems

As mentioned before, axis-angle works well for rota-tions around a fixed axis. So our aerobatics is not thebest example to use. Let's see why it didn't work outsmoothly (by now the pilot is depressed and alreadythinking about retiring).

What happened here is that from keyframe 1 to key-frame 2, two things were interpolated. First we wentfrom axis (0,1,0) to axis (1,0,0). This axis movement is

quite big, as it's going from one line to a perpendicularone (90º away). And second, we went from angle 0 toangle /2 (90º). So two things were moving the sameamount: the axis and the angle.

Once again, let's go back to frame 1. Instead of axis(0,1,0), let's enter (1,0,0). It makes no difference, as therotation angle value W is 0. Now update the keyframeand see how it goes.

Everything runs quite fine now. The second half is notperfect, but quite acceptable. Why isn't it perfect? It'simportant that between two consecutive keyframesmost of the movement is taken by only one of the com-ponents: either the axis or the angle. In our initial air-plane movement, both components were moving thesame amount (90º), and that created a turbulent move-ment that made the pilot sick. Then we completelyfixed the problem by keeping the axis still between key-frames. In the second half of the animation, the anglemoves more than the axis, which is good, but both ofthem move.

If you want absolutely perfect movements, just moveonly one of the two components between two consecu-tive keyframes (usually the angle). Sometimes this isdifficult, so the best thing in those situations is to startconsidering any other rotation system.

In axis-angle, rotation manipulators have to be usedwith special care, as they can lead to unwanted results.A simple rotation using the manipulator can lead, forinstance, to the flipping (sign change) of the axis. If theinitial axis is (0,1,0) and the final one results in (0,-1,0),that will produce, most probably, undesired effects, aswe are changing its direction, which means a 180º rota-tion of the axis (not around the axis).

143D WORKSHOP - A world of rotations

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 15: BlenderArt Magazine Issue 31 Under The Microscope

Moreover, in axis-angle you can define axes and anglesusing any value, as big or small as you want. Rotationscan consist of several spins around the axis, that is,Nx2 , where N is any number of revolutions, positiveor negative. However, when using rotation manipula-tors you will always get axis values up to 1.0, and an-gles up to 2 .

This, along with the possible axis flip, are good reasonsto prefer editing rotation values directly on the Trans-form panel over using rotation manipulators or hotkeyR.

To summarize, axis-angle is good for rotations aroundan arbitrary axis, as long as that axis doesn't keep mov-ing, or at least its movement is really controlled. Re-member that you can quickly move the axis to anyvalue when rotation angle is 0 so that moment can beused to switch from one axis to another.

Now that youare done withthe new air-show animationusing axis-angle,take a look atthe resultinganimationcurves (figure14)... What canyou see?

Yeah, right. Justcurves. It's actu-ally very difficult to know how they translate visually.While with Eulers we could grasp the meaning of theF-curves, now it's difficult to tell how the object is ro-tated.

Wouldn't it be nice, however, to have a rotation systemwhich, while keeping its immunity to gimbal lock, atthe same time produced perfect and smooth rotationinterpolations, and not just fixed-axis ones?

Yeah, that would be awesome...!

Quaternion rotations

Quaternions were discovered by the Irish mathemati-cian Sir William Rowan Hamilton.

According to the Wikipedia, "the breakthrough finallycame on Monday 16 October 1843 in Dublin, whenHamilton was on his way to the Royal Irish Academywhere he was going to preside at a council meeting.While walking along the towpath of the Royal Canalwith his wife, the concept behind quaternions was tak-ing shape in his mind. Hamilton could not resist theimpulse to carve the formulae for the quaternions

i2 = j2 = k2 = ijk = - 1

into the stone of Brougham Bridge as he passed by it."

This reminds me of the day I was walking along thestreets of my home town, and it came to my mind arecipe of beans with mushroom sauce. Immediately Itook my chisel and hammer (I always bring them in mypockets, just in case). I couldn't resist carving the rec-ipe into a stone of my neighbour's wall... Surprisingly,Wikipedia didn't mention that. My neighbour however,did mention it to his lawyer (he is allergic to mush-rooms).

Back to quaternions, you can just forget about the for-mulae that Hamilton carved. Actually, you can forgetabout most of the maths around quaternions (unlessyou are a mathematician, a 3D software developer, orjust very interested in Algebra).

153D WORKSHOP - A world of rotations

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Figure 14. Axis-angle rotations: animationcurves.

Page 16: BlenderArt Magazine Issue 31 Under The Microscope

A quaternion is a vector, i. e. a set of numbers, in a spe-cific 4-dimensional space. In this case, this vector hasfour numbers. These four numbers are called X, Y, Z andW in Blender. Just check it in the Transform panel, set-ting Quaternion (WXYZ) rotation mode... Doesn't it re-mind you of something?

Of course, axis-angle has the same component names.So are these values related somehow to the corre-sponding axis-angle values? Absolutely. Let's see thedifferences, though.

In the first place, a quaternion can represent a rotationonly if it is normalized, which means that the length(or modulus) of the vector must be 1 (this is called aunit vector). What does it mean in practice? Mathemat-ically:

W2 + X2 + Y2 + Z2 = 1

This formula is not too useful for 3D artists. However itmight help to understand how these four values relateto each other. In the first place, none can have an abso-lute value greater than 1. Second, when one value in-creases (in absolute value), the rest decrease, and viceversa. Absolute value means to forget about the sign,i.e., the absolute value of -0.75 is 0.75. So, all four val-ues range from -1.0 to 1.0.

Now we know how quaternion values relate and affecteach other. But what do they actually mean? Do theyhave the same meaning as in axis-angle? Well, actuallythey do. In a quaternion, X, Y and Z are still defining thesame axis of rotation that axis-angle does, and W is de-fining an angle of rotation around that axis.

There is one unique (normalized) way to define a givenrotation using a quaternion. On the other hand, in axis-angle you could define the same axis using many differ-ent combination of values, as the vector representing

that axis didn't have to be normalized. Bear in mindthough, that even in Axis Angle mode the rotation ma-nipulator and the R hotkey also normalize the (X,Y,Z)vector.

Another question arises here; what units is W using todescribe an angle, as it can only range from -1.0 to 1.0?To understand the correspondence between the axis-angle W value and the quaternion W value, we will callthe first AW, and the second QW. Its relation is as fol-lows:

QW = cos (AW / 2)

If you know what a cosine function is, great. If not,don't worry the slightest bit. The only thing you shouldbe aware of is how quaternion W behaves in relation toaxis-angle W (the actual angle of rotation around theaxis). The following table has a few examples thatmight help you:

You could think after seeing this table, that if aquaternion with W=1 is equivalent to a 0º angle, andwith W=0 it represents 180º, then 90º should corre-spond to W=0.5. Actually it doesn't work like this, asyou can see in the table, as the cosine doesn't behavelike a linear function.

163D WORKSHOP - A world of rotations

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Quaternion W Angle in radians Angle in degrees

1.000 0 0

0.707 / 2 90

0.000 180

-0.707 3 x / 2 270

-1.000 2 x 360

Page 17: BlenderArt Magazine Issue 31 Under The Microscope

It actually behaves in a more "circular" way, which ismuch more suitable for rotations. Observing the table,you can think there is no way to use a quaternion todefine a rotation beyond 360º, or below 0º. You thinkwell. This is a small drawback of quaternions, but laterwe will see how to overcome it.

So let's try to see how a quaternion works. Open'RotationsWorld.blend' once more and select one of theairplanes. Set rotation mode to Quaternion (WXYZ). Ini-tially, W has value 1.0, which means a rotation of 0º, sowe don't need any rotation axis. It doesn't matter thenif X, Y and Z are all zero.

Now increase the value of X slightly, clicking on theright triangle in the X slider of the Transform panel. Seewhat happens. We have just defined an axis; a point inthe direction of the X axis defines the X axis itself. If wekeep increasing the X value, we are still defining thesame axis, however W decreases. The bigger the valueof X, the smaller the value of W. In other words, we arerotating around X axis, as W keeps decreasing towards0, i. e. towards 180º (see the table). When X reaches 1,W is 0, which means a rotation of 180º around the Xaxis.

So the effect of increasing the value of X is to bring theobject to this position; upside down around the X axis.Now clear the rotation. You can repeat the same exper-iment with Y and Z values. As you will see, all of themtry to bring the object upside down around their ownaxis.

On the other hand, what is the effect of making W big-ger? Obviously to take the object away from those up-side down positions, and preserve the original positionwith no rotations at all. The balance between the fourvalues is what defines the final rotation.

If you repeat the experiment using negative values, youwill see the same effect but in the opposite rotationdirection. Take for instance the experiment around theX axis, but this time taking it slowly towards -1.0. Weare defining the same rotation values (W is still posi-tive) but applied around an axis that runs along the Xaxis in the opposite direction. This is similar to whathappened with axis-angle. In this case also, changingthe sign of all four values has no effect on the final ro-tation. And with quaternions, it doesn't have an effecton animation interpolations either.

Even if in theory W cannot hold a number correspond-ing to a negative angle, changing its sign works in asimilar fashion. For instance, W=0.707 represents a 90ºrotation, while W=-0.707 is 270º, which is in fact equiv-alent to -90º (270º=360º-90º).

Now that we know what a quaternion is and how itworks, we are ready to repeat the airshow. Set thethree keyframes once more using Quaternion (WXYZ)mode. What happens now?

An incredible aerobatic manoeuvre. The audience isshouting, jumping, hugging, laughing...! The best showever! And all thanks to Sir Hamilton and his magic chis-el...

What about quaternion animation curves? Take a lookat them (figure 15)... What do you think? Yeah, awful.Forget about animating those evil f-curves... And thereis more. In quaternion f-curves, Linear Extrapolationdoesn't work well. Since the quaternion must be nor-malized, its values can't keep growing forever. The rela-tion between the four values ends up reaching anormalized balance, and so the rotation slowly stops atthat point.

You have seen the main advantage of quaternions: itsabsolute smoothness and perfection in interpolations,

173D WORKSHOP - A world of rotations

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 18: BlenderArt Magazine Issue 31 Under The Microscope

no gimbal lock, no weird movements, etc. However, wehave seen a drawback: the inability to define more thanone revolution, or negative angles. Let's see an exam-ple. Open a Blender scene and take any unrotated ob-ject (our good old airplane will do).

Choose Quaternion (WXYZ) rotation mode. Set a key-frame in frame 1, without rotation. Go to frame 25. Ro-tate it 200º counterclockwise around Z axis. Set therotation key. Check the animation. What happens?Blender actually interpolates using a clockwise rota-tion!

Blender has chosen the shortest path between 0º and200º, which is equivalent to -160º. Quaternions can'tdefine revolutions (successive spins around an axis).They just define orientations in space; from 0º to 360º,where 0º is equivalent to 360º (value 1 is equivalent to-1 for X, Y, Z and W parameters). Blender always per-forms the shortest path rotation between one orienta-tion and the next if you use the rotation manipulatorsor hotkey R. This means you can't rotate 180º or morebetween two keyframes using those. But you can getbigger angles by directly editing the Transform panelvalues. However you will never get a 360º or bigger ro-tation.

If you want to overcome this, and make the object spinseveral times, you have to set intermediate keyframesbetween the initial and final state, so that turns be-tween them are smaller than 360º (or -360º for clock-wise rotation). If you use manipulators, turns must beless than 180º (or -180º).

Gimbals and locks

No, we are not going to talk about gimbal lock any-more. Just about gimbals, and component locks in ei-ther quaternion and axis-angle rotations.

Provided that nei-ther of these twosystems use Eulergimbals, what isthe meaning ofthe Gimbal orien-tation of the 3Dmanipulators?

In Axis Angle, youwill see that Gim-bal aligns its Zcomponent withthe defined axis (X,Y,Z), so that if you rotate the manip-ulator blue ring (Z axis) you will be directly controllingthe W value, and just the W value. However, if youwant negative values, or values beyond 2 , you mustedit the W value in the Transform panel.

On the other hand, when using quaternions you cansee that Gimbal currently has no special meaning andis equivalent to the Local orientation. Perhaps futurereleases of Blender will give it a special use.

Regarding the lock buttons in the Transform panel,their use is to restrict rotations (and locations/scaling)to only the desired axes using the 3D manipulators orhotkey R. However, in the specific case of rotations, ifyou activate the 4L button, you can restrict rotations byaxis-angle or quaternion component instead of axis.

As they have 4 components (X, Y, Z, W), you get an extralock. However, in the specific case of quaternions, re-member that even changing just one of the compo-nents will affect the other three as the final vectormust be normalized.

183D WORKSHOP - A world of rotations

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Figure 15. Quaternion rotations: anima-tion curves.

Page 19: BlenderArt Magazine Issue 31 Under The Microscope

Summary

· Local or global rotation systems aren't valid forcomputing rotations as the order of rotation aroundthe three axes affects the final result.

· Euler rotation systems use a hierarchy of rotationaxes which is valid to compute rotations, as thethree rotation components are independent. How-ever they suffer from gimbal lock in certain circum-stances.

· Axis-angle doesn't suffer from gimbal lock, but itsuse is almost specific to revolving around a fixedaxis.

· Quaternion system doesn't suffer from gimbal lock,and interpolates perfectly any pair of orientations.However it can't define successive revolutions un-less we insert intermediate keyframes in between.As it's a perfect way to define orientations in space,it is very suitable for bones animation.

· Regarding animation curves, the Euler system is theonly one that provides an easy and intuitive way toedit them.

And finally...

There are a couple videos around there that might helpyou see rotations in action. Check the Guerrilla CGProject website (guerrillacg.org). Watch the followingvideos: The Rotation Problem, and Euler Rotations Ex-plained. One warning, though: in the first of these vid-eos there is a small mistake; whenever 'Quaternion' ismentioned, it should actually say 'Axis Angle'.

There are other 3D software packages out there thatuse other rotation systems, like the Heading/Pitch/Bank

(or Yaw/Pitch/Roll) angles, used with the so called Tait-Bryan or cardan angles, which are a different kind ofEuler rotations. But this stuff is out of the scope of thisarticle as Blender doesn't use them

I hope not to have made your head rotate too much.

Be good!

193D WORKSHOP - A world of rotations

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 20: BlenderArt Magazine Issue 31 Under The Microscope

IntroductionThe most advanced online 3D virtual worldto hit the market, Blue Mars features pho-to-realistic rendering with CryENGINE-2 byCryTek and motion-captured avatar anima-tions. Blue Mars launched in open beta toplayers and developers in September 2009.In about a year, the number of completelyterraformed Cities, Villages and Metropo-lises (the basic real-estate categories onBlue Mars), has increased tenfold and adedicated community of users and devel-

opers has been established.

As such, Blue Mars has a very attractive emergingeconomy. The BLU$, or Blue Dollar, is the Blue Marscurrency, and it is easily redeemable via each devel-opers’ PayPal account. I was drawn to Blue Mars bythe superior graphics, and most of all by the versatil-ity and realism of the mesh clothing, having previ-ously been a clothing designer in Second Life.

The good newsis that contentfor Blue Mars ismade in 3rdparty softwaresuch as Blender,which will giveexisting Blenderusers a fantastichead start intocreating con-tent for this platform. Content is imported into BlueMars using the Collada format. There is a freelyavailable Blender plug-in for Collada. The Collada fileis imported into the relevant Blue Mars editor

(editors exist forclothing, furniture,bodies, Cities etc)where textures,maps and special-ised shaders are ap-plied to the content,and it is packed foruploading to BlueMars.

Creators can registeras developers anddownload the devel-oper toolkit for freeatwww.bluemars.com.

Creators can sell content inrented “shops”, with the shopeditor enabling them to cus-tomise the shop interior totheir liking. Developers canalso rent vacant blocks in Cit-ies where they can create ex-ternal shop structures for theirown use.

These images depict the work-flow for a simple retro dressfrom Blender to Blue Mars.

For beginners, the Blue Marseditors include a number ofcloth templates to help get youstarted, though you can createany mesh from scratch. In this case I trimmed themesh to the desired shape, and sculpted it to fit theBlue Mars reference avatar better.

20MAKING OF - Blue Mars

by- Sally Olle(Estelle Parnell Designs)

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 21: BlenderArt Magazine Issue 31 Under The Microscope

I exportedthe meshfrom blenderas a Colladafile, and im-ported it intothe BlueMars clotheditor.

Here I ap-plied tex-tures andnormal mapsto the different linked ob-jects, and selected thecloth shader.

I then packed the objectfor uploading and went tothe developer web page toupload the packed file, andto set a description andprice for the object.

Once uploaded, the con-tent enters the Blue MarsQA Process.When it isreleased, thedesigner mayallocate thenew item toone of theirshop shelvesfor sale.

With a smallpopulation,the financial

rewards are not yet great, but there is a tangiblegrowth in the market and my personal enjoyment ofcreating cloth cannot be denied. I am sure there aregreat things to come for Blue Mars as it develops fromits beta status and I certainly want to be there towatch it grow.

Estelle Parnall is the avatar behind the Australian con-tent creator Sally Olle. She has been an active devel-oper in Blue Mars since April 2010 and owns the BlueMars city Fashion Esplanade where she sells a variety ofcontent. www.estelleparnall.com

21MAKING OF - Blue Mars

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 22: BlenderArt Magazine Issue 31 Under The Microscope

IntroductionBlender has a virtually limitless reservoirof untapped potential as either an artisticor technical tool. Many exciting possibili-ties can arise when you experiment withBlender's capabilities and try different ap-proaches to creating and renderingscenes.

Many of you might remember my"Astrobiology" series of images posted onBlenderArtists.org. Those works were ex-

citing and educational for me because they helpedme push both my artistic and technical skills furtherwhile reaffirming to me how incredibly flexibleBlender will always be as a tool for expression, imag-ination, and exploration.

For the images I submitted to this issue of Blender-Art Magazine, I wanted to do something different.Rather than tapping the techniques I developed forthose projects, my intent was to focus more on us-ing Blender's internal texturing system to achieveinteresting details and visual possibilities.

At first glance Blender's procedural texture set mightseem underwhelming and incapable of anythingcomplex or intriguing. I tended to think that way inmy earliest days learning Blender. Back then therewere no texture nodes, no render nodes, just textureslots in materials.

While the main mesh of this tutorial's image(Microlifeform 4) uses four texture slots, and whileit is true we can achieve more complex and interest-ing results by stacking textures, we are not limitingourselves to that very useful and flexible technique.We are also going to make use of the material's Al-

pha (transparency) setting and pursue more of a"volumetric" texture.

How will we do this? Nested meshes: severalmeshes, each inside the other.

· Step one is to place a mesh in the scene. In thisexample I have opted for a Sphere. I reshaped,resized, and rotated the sphere in my project(defined at 1024x1024 pixels).

· Next, I added an Empty object to the scene aswe are going to use this Empty to help us resizethe Sphere recursively (over a series of repeti-tions). We need to move the Empty to wherethe Sphere is. To do this we copy the Locationand Rotation of the Sphere by first selecting theEmpty, then SHIFT key + selecting the Sphere.

· Having selected both objects, I pressed the CTRLand C keys to make the Copy Attributes menuappear, selecting Location. CTRL and C keyswere pressed again to then copy the Rotation ofthe Sphere.

· Next, I selected the Sphere and added an Arraymodifier to it. We are going to use the Objectoffset and use the Empty as the object the modi-fier uses to generate successive meshes. Howmany? For this example I specified a FixedCount of 20 in the Array modifier.

· After doing this, I selected the Empty object andresized it (S key) by manually entering a value of.995. If all has gone well up to this point, youshould see multiple spheres within each other.

223D WORKSHOP - Microorganismal Worlds: A Quick Tutorial

By - Robert J. Tiess

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 23: BlenderArt Magazine Issue 31 Under The Microscope

The next phase involves material and textures. Withthe Sphere selected we add a material. The materialneeds ZTransp (transparency) activated. I selected anAlpha value of .500. I didn't want any specularity, sothose values are minimized.

In the texture slots are three Cloud textures. They haverelatively small Noise sizes (ranging .300 to .500). AStucci texture is also used in the second texture chan-nel. Together three of these four textures are set to af-fect the material's Alpha setting.

· Two textures use a Subtract blend mode, while oneblend mode is set to Add.

· Nor (bump) and Col (color) are also affected by thetextures in various ways.

· The scene is lit by three lamps: one Sun lamp (raytracing), one Hemi (hemispheric) lamp, and oneomnidirection Lamp.

· Three World texture settings also contributeslightly to the ambiance of the scene.

There is something else going on in the example: parti-cles. They serve to establish the surrounding "cilia" ofthis imaginary microscopic life form. For this we onlyneed a ring of vertices surrounding the sphere.

These vertices are assigned a simple Lambert / Blinnmaterial with a Blend texture used to fade out the tipsof the emitted hair particles.

The major particle settings are: Hair (particle systemtype), 222 particles, Normal value of .400, Randomvalue of .200, Brown (brownian motion) value of 8.00,Damp (dampening) value of .800, B-Spline interpola-tion, and Strand Render.

In the microlifeform4-example.blend file you will noticethere is in fact only half a sphere. This was done tospeed up render time. Textures and meshes used asthey are here result in very long renders, so this is oneway to achieve our desired result without forcingBlender to calculate mesh faces which would not, inthis project, make any difference in the final outcome.

You might also notice some Render Nodes. These helpus use Blender to maximize the potential of the finaloutput image. There's some defocusing for depth offield, RGB Curves, and some other nodes used to tweakthe final result all within Blender.

The example file is provided in hopes of encouragingyou to experiment with different settings (material, tex-tures, lighting, render nodes, etc.). Change values andsee what happens as a result.

In fact, I think it's not only useful but necessary to al-low yourself some time to use Blender in exploratoryand unpredictable ways. You can learn more aboutBlender's and your own creative capabilities and pleas-antly surprise yourself!

Technical notes

Although this project was created in Blender 2.49, it, aswell as the techniques referenced in the tutorial, workin the latest Blender 2.55 beta. Render times for theproject file will be lengthy even on fast computers, sopatience is a must

233D WORKSHOP - Microorganismal Worlds: A Quick Tutorial

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 24: BlenderArt Magazine Issue 31 Under The Microscope

IntroductionOne of the most amaz-ing stories I heard whenI studied biology wasabout the way the celldistributes materialwithin itself. The samenet of microtubules thatsustains the structure ofthe animal cell serves asa railroad to transportfood and building mate-

rials. But the best is yet to come.The ones responsible for this trans-port are a family of small, two-leg-ged, funny proteins called Kinesins[1]. Recent studies show that theyactually walk along the microtu-bules while carrying the materialsinside big vesicles located near thetop of the kinesin molecule.

First approach

The goal was to fake a video inwhich a kinesin could be seen car-rying a huge vesicle [2]. In principleI was concerned about the taste ofthe final images and not about be-ing precise in a biological sense(shame on me!). It is possible tomodel the kinesin using the datafrom the PDB (Protein Databank)[3] using a script by Michael Gan-tenbrinker [4]. Instead, I decided tomake a roughly similar model witha simple armature. The movements

of the kinesin were made slow tosimulate both the absence of grav-ity and the erratic flows of fluidswithin the cell.

The microtubule was modelled tobe a kind of organic pipe and isnot realistic either. The space wasfilled with a bunch of moving bub-bles to simulate the cell environ-ment which in reality happens tobe much denser. These bubbleswere animated using Blenderphysics. Finally, the camera wasanimated using a shaky effect [5].

The light is made of two sun lightswith no shadows. It is importantto realize that in micrographs,darker areas can be mistaken forshadows. Depending on the tech-nique, darkness depends on thedensity of materials, or on the an-gle the faces of the objects arepointing.

There are mainly two kinds of tex-tures in this project. The ones forthe kinesin and microtubules aresimple materials with no specularor mirror properties. Rememberthat at this scale, mirroring orspecularity makes no sense. Theirtextures are cloudy textures withslight normals. The bubbles thatsimulate the environment have atransparent texture with a highIOR.

Node editor

Once the kinesin was animated, itwas time to start working with thenode editor. First of all I set astrong defocus filter with a variabledepth of field. Then I added a noiselayer which was blurred with a blurfilter. To finish, something that inprinciple is not a typical micro-graph artifact but which works verywell in the final scene: a lens dis-tortion filter with variable disper-sion.

And that’s all. Although, as I havesaid, many elements in this con-struction are not realistic, the finalresults gives a nice feeling of a liv-ing micrograph [6].

[1] http://en.wikipedia.org/wiki

[2] http://valelab.ucsf.edu

[3] http://www.pdb.org/pdb/home

[4] http://wiki.blender.org/index.php

[5] http://mke3.net/projects/bpython

[6] http://vimeo.com/12486048

MAKING OF - Transporters 24

By - Enrique Sahagún

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 25: BlenderArt Magazine Issue 31 Under The Microscope

25

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Figure a) Kinesin model. b) Kinesins(the one shown is from PDB 3kin)

MAKING OF - Transporters

Page 26: BlenderArt Magazine Issue 31 Under The Microscope

Rod Cockcroft has extended the facili-ties at www.blendercomic.com(from a Blender comic directory) to

include graphic novels created with orpartially with Blender and has started anew Sintel story.

In the forums people can collaborate withothers to create or discuss stories. Linkscan be created from each scene in a storydirectly to the forum so each scene can bediscussed easily. If you think you can cre-ate a better storyline than one that hasalready been created, a fork can be in-

serted to create a new storyline.

There are three forums for writing and discussingstories:-

Creative commons stories

All the content in this section must be CreativeCommons

Mixed copyright stories

People can contribute to stories in this section andinclude copyright

restrictions on their work while including contentwith a Creative Commons

License.

Copyright protected stories

This section is for stories that are completely copy-right protected.

Anyone could include a story that they have com-pleted themselves or could develop a story in a pri-vate forum with only invited members in theirgroup.

Rod has put the new Sintel story in the Mixed Copy-right Stories section. If anyone would like to join inor start a new story visit www.blendercomic.com

26ARTICLE - www.blendercomic.com

By - Rod Cockcroft

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 27: BlenderArt Magazine Issue 31 Under The Microscope

IntroductionBiologists know that, if the information oflife is stored and transmitted through nu-cleic acids (DNA and RNA), the processesthat do the actual work are most of thetimes proteins. These are active in all as-pects of life, and in the latest years we arestarting to get a glimpse of how theywork. Proteins are machines composed ofamino acids, which are in turn smallgroups of atoms arranged in specificways[1]. Scientists are obtaining more and

more information on the 3D arrangement of suchatoms, and are starting to understand their activitythrough motion.

On the basis of information obtained by experi-ments of nuclear magnetic resonance (NMR), 3Dvisualization tools provided by BioBlender allow bi-ologists to build a reasonable sequence of move-ment for proteins. It also includes a dedicated visualcode to represent important features of their sur-face (Electric and lipophilic potential) on the proteinitself, using photo realistic rendering and specialeffects.

BioBlender is a software extension of Blender 2.5[2],an interface for biological visualization that allowsthe user to import and interactively view and ma-nipulate proteins. It was developed and is main-tained by the Scientific Visualization Unit of theCNR of Italy in Pisa, with the help and contributionof several members of the Blender community. Ma-terial, scenes, publications and other relevant infor-mation can be found at www.BioBlender.net and/orwww.scivis.ifc.cnr.it.

BioBlender for Windows is available fromwww.bioblender.net (on Linux machines it can beused with Wine). Because of its specialized nature,it requires the installation of PyMOL[3.4] , Python2.6 [5] and NumPy[6] , which are all provided in In-staller folder from the downloaded package.

Using BioBlender to build an animation

To start BioBlender, simply go to the Bin folder andlaunch blender.exe, then open the template.blendscene (stored in BioBlender folder).

Notice that the template file not only has an opti-mized user-interface layout for biologists, but thetemplate scene also contains lights, camera andworld settings that are ideal for visualizing mole-cules. This setup ensures that researchers who arenot familiar with the 3D software can still effec-tively use BioBlender. Each interface element(buttons, sliders, toggles) has help text associatedwith it. By placing the mouse over them a pop-uptext describes the function. Errors and progressesare displayed in the console. Critical errors will ap-pear in the main BioBlender as a pop-up under themouse. The atoms size is of order of Ångström (Å),therefore the scale used is 1 Blender Unit = 1 Å.

This tutorial assumes that you already have Bi-oBlender downloaded on your computer, with therequired programs installed.

1. Select and import a .pdb file

PDB files contain a description of one or multipleconformations (positions) of a single molecule. Dif-ferent conformations of the same protein are listedin one NMR file and are called MODEL 1, MODEL 2etc.

27ARTICLE - BioBlender: Blender for Biologists

By -Raluca Mihaela Andrei,

Mike Panand Monica Zoppè

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Raluca Mihaela Andrei1,2, MikePan1,* and Monica Zoppè1§

1 Scientific Visualization Unit, Insti-tute of Clinical Physiology, CNR ofItaly, Area della Ricerca, Pisa, Italy2 Scuola Normale Superiore, Pisa,Italy* Present address: University of Brit-ish Columbia, Vancouver, Canada§ Corresponding author

Page 28: BlenderArt Magazine Issue 31 Under The Microscope

In the BioBlender Select PDB File panel:

· Select the .pdb file by browsing from your data (1in figure). The file included in sampleData foldercontains the 25 models of Calmodulin [7]. Alterna-tively, simply type the 4-letter code for the .pdb fileto be fetched from www.pdb.org [8] (make sure topick an NMR file);

· Change the name of the protein (by default it isnamed “protein0”) in the field on the right (2 infigure). Naming the proteins is just a good habitthat will help keeping the scene organized. Once afile is selected, the number of models and thechains are detected and shown in the BioBlenderImport field (3 in figure);

· Choose 2 models to import in the scene (by defaultall models are listed) typing their number sepa-rated by comma;

· In the Keyframe Interval slider (4 in figure) set thenumber of frames between the protein conforma-tions (Min 1, Max 200).

A list of options are available to be con-sidered before importing the protein inthe Blender scene (5 in figure):

Verbose: enable to display in the con-sole extra information for debugging;

SpaceFill: enable or disable to displaythe atoms with Van der Waals or cova-lent radii in the 3D scene, respectively;

Hydrogen: enable to import Hydrogensif they are present in the .pdb file. Thisoption makes importing much slowerand it is important only for visualiza-

tion. If the .pdb file does not contain Hydrogens (or ifyou chose not to import them), they will be added dur-ing the Electrostatic Potential calculation using exter-nal software;

Make Bonds: enable it to have atoms connected bychemical bonds. Despite being time consuming thisoperation is very important in motion calculation;

High quality: displays high-quality atom and surfacegeometries; slow when enabled;

Single User: enable to use shared mesh for atoms inGame Engine; slow when enabled;

Upload Errors: enable to send us automatically andanonymously an email with the errors you generate.This makes us aware of the problems that arise andhelp us fix them.

Finally, press Import PDB button to import the proteinto the 3D scene of Blender. Blender displays the proteinin motion (by linear interpolation between atoms inthe conformations; Esc to stop the animation).

28ARTICLE - BioBlender: Blender for Biologists

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Raluca Mihaela Andrei1,2,Mike Pan1,* and MonicaZoppè1§

1 Scientific Visualization Unit,Institute of Clinical Physiology,CNR of Italy, Area della Ricer-ca, Pisa, Italy2 Scuola Normale Superiore,Pisa, Italy* Present address: Universityof British Columbia, Vancou-ver, Canada§ Corresponding author

Page 29: BlenderArt Magazine Issue 31 Under The Microscope

2. Visualization in the 3D viewport

Once imported, the protein is displayed with all atoms,Hydrogens included (if the Hydrogens check-box wasenabled). The first 4 buttons in the BioBlender Viewenable different views: only alpha Carbons, main chain(N, CA, C), main chain and side chains (no H), or allatoms.

If the Surface display mode is selected, BioBlender willcompute the surface of the protein by invoking PyMOLsoftware, an external application. It uses the SolventRadius set by the user and returns the Connolly mesh[9], displayed on the BioBlender 3D view. The defaultradius (1.4 Å) is the standard probe sphere, equivalentto water molecules.

To check the appearance of surface calculated with dif-ferent solvent radii, change the solvent radius valueand press refresh button. The current surface is deletedand a new one is created.

When atoms are displayed, by selecting one atom inthe 3D display, the protein information of the selectedatom is printed in the area outlined below; in the 3Dview the selection will extend to the other atoms of hecorresponding aminoacid.

3. Protein motion using the physic engine

To calculate the transition of the protein between the 2conformations the Blender Physics Engine is used. PressRun in Game Engine button to see the transition. PressEsc to leave GE and then 0 on Numerical Board to seefrom the camera point of view.

Hit Run in Game Engine button again for an interac-tively view. When inside the Game Engine, the mousecontrols the rotation of the protein, allowing to inspectthe protein from all angles. The also applies an ambi-ent occlusion filter to the scene, giving the viewer amuch better sense of depth.

Set the Collision mode to one of the following states: 0,1 or 2. When set to 0 the transition between the confor-mations is done using linear interpolation; the atomswill simply move from one position to the other. Whenset to 1 the collisions between atoms are considered,resulting in a more physico-chemical accuratesimulation[10].

When set to 2, the newly evaluated movement will berecord to F-Curves. Go to the Timeline panel on Blenderand see that the new conformations are recorded atdifferent time (200 frames away from the last modelimported) as shown in the figure below; in this wayboth sets of transitions are available for comparison.These conformations can be exported as described laterin section 6.

29ARTICLE - BioBlender: Blender for Biologists

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Raluca Mihaela Andrei1,2,Mike Pan1,* and MonicaZoppè1§

1 Scientific Visualization Unit,Institute of Clinical Physiology,CNR of Italy, Area della Ricer-ca, Pisa, Italy2 Scuola Normale Superiore,Pisa, Italy* Present address: Universityof British Columbia, Vancou-ver, Canada§ Corresponding author

Page 30: BlenderArt Magazine Issue 31 Under The Microscope

4. Molecular Lipophilic Potential Visualization

This visualization method is a novel way to see the MLPvalues of a protein onto the surface. Normally this is arelatively time consuming and tedious process involv-ing running different programs from the commandline, but BioBlender simplifies the entire process by al-lowing the user to do everything under one unified in-terface.

In BioBlender MLP Visualization section:

· Choose a Formula (1 in figure; Testa formula [11] isset by default);

· Set the Grid Spacing (2 in figure; expressed in Å,lower is more accurate but slower) for MLP calcula-tion;

· Press Show MLP on Surface. It may take some timeas the MLP is calculated in every point of the grid inthe protein space, then mapped on the surface ofthe protein and finally visualized as levels of grey(light areas for hydrophobic and dark areas for hy-drophilic [12]).

A typical protein has varying degrees of lipophilicitydistributed on its surface, as shown here for CaM.

Use Contrast and Brightness sliders to enhance theMLP representation of your protein. Once you are satis-fied with thegrey-levelsvisualizationhit RenderMLP to Sur-face buttonfor the pho-torealisticrender. This

process is alsotime consumingand it always re-fers to lastchanges in theMLP grey-levelsvisualization.When the calcula-tion is done (thebutton is re-leased) press F12on your keyboard.

Note:This is the MLPrepresentation usingour novel code: arange of visual fea-tures that goes fromshiny-smooth sur-faces for hydrophobicareas to dull-roughsurfaces for hy-drophilic ones. Thelevels of grey arebaked as image texture that is mapped on specular of the material.A second image is created by adding noise to the first one and mapit on bump. The light areas become shiny and smooth while thedark ones dull and rough as shown in the figure.

Press Esc to go back to the Blender scene.

5. Electrostatic Potential Visualization

EP is represented as a series of particles flowing alongfield lines calculated according to the potential fielddue to the charges on the protein surface. For this rea-son, it is necessary to perform a series of steps (as de-scribed in [12]), and to decide the physical parametersto be used in the calculation (2 in the figure).

30ARTICLE - BioBlender: Blender for Biologists

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Raluca Mihaela Andrei1,2,Mike Pan1,* and MonicaZoppè1§

1 Scientific Visualization Unit,Institute of Clinical Physiology,CNR of Italy, Area della Ricer-ca, Pisa, Italy2 Scuola Normale Superiore,Pisa, Italy* Present address: Universityof British Columbia, Vancou-ver, Canada§ Corresponding author

Page 31: BlenderArt Magazine Issue 31 Under The Microscope

In BioBlender EP Visualization section:

· Choose a ForceField (1 in figure; amber force field isset by default);

· Set the parameters for EP computation, using the op-tions shown in the figure below:

· Ion concentration – 0.15 Molar is the default, physio-logical value;

· Grid Spacing – in Å, lower is more accurate but slow-er;

· Minimum Potential – the minimum value for whichthe field lines are calculated – the default value is 0which impliescalculation of allpossible lines;increase it if youwant to enhancethe representa-tion of EP;

· n EP lines*eV/Å2– the number offield lines calcu-lated for eV/Å2.

Now press Show EP button. The process is time consum-ing as Show EP button invokes a custom software that cal-culates the field lines and exports them in the BioBlender3D scene as NURBS curves. The positive end of each curvebecomes an emitter. The particles flow along the curvesfrom positive to negative.

Change the Particle Density (3 in figure) to modify thenumber of the particles visualized in the scene. ClearEP to delete the curves and the emitters.

6. Output

To see the protein movement with the surface proper-ties you have to render a movie. Since the movementimplies a change of the atomic coordinates, the sur-face properties must be recalculated frame by frame.

In the BioBlender Output panel set the output file path(by default it is set to tmp folder); choose the kind ofrepresentation you prefer to render from the Visualizecurtain menu:

· Atom – render only atoms;

· Plain Surface – render only surface;

· MLP – render surface with MLP;

· EP + Plain Surface – render surface (no MLP) and EP;

· EP + MLP – render surface with MLP and EP;

set Start Frame – the first frame of the animation;

31ARTICLE - BioBlender: Blender for Biologists

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Raluca Mihaela Andrei1,2,Mike Pan1,* and MonicaZoppè1§

1 Scientific Visualization Unit,Institute of Clinical Physiology,CNR of Italy, Area della Ricer-ca, Pisa, Italy2 Scuola Normale Superiore,Pisa, Italy* Present address: Universityof British Columbia, Vancou-ver, Canada§ Corresponding author

Page 32: BlenderArt Magazine Issue 31 Under The Microscope

set End Frame – the last frame of the animation;

set Export Step – the number of frames to skip duringexport, mostly used for faster export of .pdb files; ena-ble InformationOverlay to printextra informationon the final im-age; enable Ambi-ent Light only forGE visualization;do not enable itfor MLP represen-tation as its effectis confusing forMLP visual code.

Hit Export Movie to render every frame of the anima-tion. The output is a sequence of still images, this en-sures that the rendering is resumed if the renderingprocess is disrupted. During section 3 Blender GE calcu-lated and recorded intermediate conformations as key-frames. To save these coordinates as .pdb files forfurther analysis using external software, press ExportPDB. A .pdb file is saved for each frame in the selectedoutput.

To obtain the movie follow standard Blender proce-dures: open the Video Se-quencer Editor: Add -> Image,select the sequence of images,go to Properties window andset the Output path and theFile Format to AVI JPEG in theOutput panel and Start andEnd frame in the Dimensionspanel. Now press Animationbutton in the Render panel.

Now you have your protein moving with the surfaceproperties visualized. An image of CaM with EP andMLP is shown in the image below

32ARTICLE - BioBlender: Blender for Biologists

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

References1 Zoppè, M; Porozov, Y; An-

drei, R M; Cianchetta, S; Zini,M F; Loni, T; Caudai, C; Calli-eri, M (2008) Using Blenderfor molecular animation andscientific representation. Pro-ceedings of the Blender Con-ference Blender

2 DeLano, WL, The PyMOL Mo-lecular Graphics System,2002

3 The PyMOL Molecular Graph-ics System, Version 1.2r3pre,Schrödinger, LLC

4 Python

5 NumPy

6 Kuboniwa H, Tjandra N,Grzesiek S, Ren H, Klee C B,Bax A (1995) Solution struc-ture of calcium-free calmod-ulin. Nat Struct Biol 2: 768-76

7 Berman, H M; Westbrook, J;Feng, Z; Gil-liland, G;Bhat, T N;Weissig, H;Shindyalov, IN; Bourne, PE (2000) TheProtein DataBank. Nu-cleic AcidsRes 28: 235-42

8 Connolly, M L (1983) Solvent-accessible surfaces of pro-teins and nucleic acids. Sci-ence 221: 709-13

9 Zini, M F; Porozov, Y; Andrei,R M; Loni, T; Caudai, C; Zop-pè, M (2010) Fast and Effi-cient All Atom Morphing ofProteins Using a Game En-gine. (under review)

10 Testa, B; Carrupt, PA; Gaillard, P; Billois, F; We-ber, P (1996) Lipophilicity inmolecular modeling. PharmRes 13: 335-43

11 Andrei R M, CallieriM, Zini M F, Loni T, MarazitiG, Pan M C, Zoppè, M (2010)A New Visual Code for Intui-tive Representation of Sur-face Properties ofBiomolecules. (under review)Raluca Mihaela Andrei1,2,Mike Pan1,* and MonicaZoppè1§

12 Scientific Visualiza-tion Unit, Institute of ClinicalPhysiology, CNR of Italy,Area della Ricerca,

13 Pisa, Italy

14 2Scuola NormaleSuperiore, Pisa, Italy

15 *Present address:University of British Colum-bia, Vancouver, Canada Cor-responding author

Raluca Mihaela Andrei1,2,Mike Pan1,* and MonicaZoppè1§

1 Scientific Visualization Unit,Institute of Clinical Physiology,CNR of Italy, Area della Ricer-ca, Pisa, Italy2 Scuola Normale Superiore,Pisa, Italy* Present address: Universityof British Columbia, Vancou-ver, Canada§ Corresponding author

Page 33: BlenderArt Magazine Issue 31 Under The Microscope

IntroductionThree-dimensional (3D) technologies havealways seemed to relate to futuristic ap-plications. However, 3D animation hasreached maturity in the last decade, 3Dmovies are in fashion in cinemas, 3D tele-vision is coming next … Let’s acknowledgeit: this is the present. So, why not try 3Dteaching? Today, educators in schools anduniversities can complement their teach-ing with 3D animation, going beyondchalk and blackboards, overhead projec-

tors and Power Point presentations.

This report is a summary of our developments inthe Department of Electronics at Universidad deGranada (University of Granada) in the south ofSpain. In the last few years we have produced edu-cational material using Blender to do animations, toshow our students some concepts in electronicphysics and to help them use laboratory instru-ments.

We briefly describehere some technicalissues regarding ourvideos, such as theprocedure we fol-lowed to representthree-dimensionalwave functions, avery important issuein Quantum Physics,and how we ap-proached the mode-

ling and depiction of the screen of an instrumentwidely used in the Electronics lab: the oscilloscope.

Teaching science is a hard task today. Nevertheless,Blender gave us the chance improve communica-tion with our students, to let them know howthings work in the depths of a silicon crystal… or inthe lab next to their classroom.

Blender in Quantum Physics:

It is said that Richard Feynman (1918-1988), one ofthe most important American physicists of the 20thcentury, summarized the complexity of the quan-tum world in a sentence: “I think I can safely saythat nobody understands quantum mechanics”.Nevertheless, sometimes university lecturers haveto teach… quantum mechanics. From Feynman’ssentence we can figure out the difficulties for stu-dents in learning something “impossible to under-stand”… Well, the point is that the mathematicalstructure describing very small things such as mole-cules or atoms is very complex, especially becauseparticles are not imagined as small dots, but assomething called “wave functions”. These wavefunctions give us the probability of finding the par-ticle at a certain point in the space. How could wedraw those probabilities on a blackboard, at eachpoint in the space? Anything that offers us supportin clarifying this concept is really useful. Blenderhelped us with this task.

First of all, we made a program to compute theseprobabilities for electrons in a piece of silicon andto record it in files. They were just clouds of points.After that, we wrote a very simple script in Pythonto create a mesh in Blender with the dots of thefiles. In this way we created something like inFigure1.Figure 1: The mesh of a wave function in a silicon crystal.

33ARTICLE - Educational Science and Engineering Videos

by- Francisco M. Gomez-Campos

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 34: BlenderArt Magazine Issue 31 Under The Microscope

In this representation we are “drawing” probabilities.Thus, in those places where there are more dots, it ismore likely the electron will be found. You can seethere are lobes in the wave function represented (thereare a huge number of different wave functions in apiece of silicon), sothere are some regionswhere the electron ismore likely to be ob-served. By making arotational movement,we can take a com-plete image of thispiece of semiconductorand see the three-di-mensional distributionof probabilities, andthis is where 3D teach-ing starts! At least thisis more enjoyable thana blackboard!

Blender in Electronics:

When you buy a TV or a DVD player you always have auser guide. You are supposed to learn how it works us-ing this guide, but you also have the device in front ofyou… Interaction with the instrument is crucial tolearn how it works but, what happens if you just havethe user guide and you can’t imagine the device? You’rein trouble.

The oscilloscope is a very useful instrument in electri-cal and electronic engineering labs. It consists of ascreen where you can monitor electrical signals in acircuit. Students normally have to learn how an oscillo-scope works before seeing it. This is complicated andthe practice sessions take time. With Blender, you canmodel an oscilloscope and show in a simple way how it

works. The advantage of 3D animation is that you areable to control everything in the scene, focusing theattention of the students during the explanation onthose details the teacher thinks are the most relevant.And, of course, this makes science seem more fun.

We modeled avirtual lab withan oscilloscope.We tried tomodel the envi-ronment in a re-alistic way togive the impres-sion of a seriousworkplace. Tex-tures and lightsresembled thosefound in mostreal laboratoriesin universities.

We alternated the 3D environment of the lab with the2D scene on the screen. To carry out the modeling ofthe latter, we set the camera for an orthographic view.In world proper-ties, we set ablank screen(with no signalon it) as the back-ground texture(see Figure 4) andwe added a mesh,this being the sig-nal on the screen.

Figure 2: Drawing of the scene.For the wave function object we

used a halo-type material. Figure 3: The virtual laboratory.

Figure 4: Blank screen of the oscilloscope

34ARTICLE - Educational Science and Engineering Videos

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 35: BlenderArt Magazine Issue 31 Under The Microscope

However, we wanted to let the signal appear gradually,so we used a plane with Z-transparency and moved itfrom one side of the screen to the other. Thus, thoseparts behind the plane appeared as the background im-age, and only part of the signal was visible. For the sig-nal we used a halotexture. Its appear-ance was very closeto the image on areal oscilloscope.

We thought thismight be useful forstudents in otheruniversities, so wedecided to broad-cast these videoson YouTube. Thenumber of viewsand the user com-ments are encour-aging; we found there was great interest, especiallyfrom Spanish-speaking countries (the videos are inSpanish). To watch our videos, just look for user fm-gomezcampos on YouTube. The core of the workingteam is composedof several profes-sors with wide ex-perience in bothresearch and uni-versity teaching: J.E. Carceller, J. A.Jiménez-Tejada, J. A.López-Villanueva, S.Rodríguez-Bolívar,A. Godoy and my-self.

We thought they might also be of interest to other sci-entists so we submit-ted our works tosome learning confer-ences, where theywere a great success.And now we think it’stime to let the Blendercommunity knowwhat we’re doing in3D teaching!

Acknowledgments:

Special thanks to Monica Zoppè and her great team atthe Scientific Visualization Unit in Pisa, Italy (Raluca,Stefano, Ilaria, Maria Antonietta, Claudia, Tiziana andothers I did not meet but who also worked on the sameproject). I enjoyed meeting these great professionalsand wonderful people

Figure 5: Diagram of the arrangementfor simulating a 2D oscilloscopescreen

Figure 6: View of the arrangementfrom the camera

Figure 7: Rendering of the oscilloscope screen. The blue dot actsas a tracer of the signal, and is a child of the plane. The dot isplaced on the edge of the plane.

- , Ph.D. inPhysics and lecturer in Universidad de Gra-nada, Spain, in the Department of Elec-tronics. He has managed several innovativelearning projects in the Universidad de Gra-nada.

Email: [email protected]

35ARTICLE - Educational Science and Engineering Videos

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 36: BlenderArt Magazine Issue 31 Under The Microscope

IntroductionA flow involving more than a single phaseis classified as multiphase or non-homo-geneous, such as liquid flows in porousfiber media. We are interested in the dy-namics of the evolving interface betweenthe distinct phases during such non-ho-mogeneous flows in a fiber mass. The dy-namics of such flow are dominated bysurface tensions, porous media anisotropyand non-homogenity, fiber volume frac-tion, and fiber wetting behaviors.

The uncertain structural conditions in fibrous me-dia, including the susceptibility to even small loads,as well as the tortuous connectivity of their openpores and poorly defined boundaries, result in com-plex local non-homogeneous flows and interfacialevolution. This complexity, in many cases, becomesprohibitive for the development of analytical theo-ries describing these phenomena. The wetting andwicking of fiber mass constitute a class of flowsthat have critical scientific and first of all practicalsignificance.

Idea

Adapt Monte-Carlo simulation based on the Isingmodel for a description of the wetting and wickingphenomena in fibrous media. We introduce here a3-D Ising model, incorporated with the stochasticdynamics and the method of importance sampling,which enables us to interpret the model outputs interms of wicking dynamics.

The essential principle of this model is based on thediscretion of the whole system of a fibrous mass, a

liquid source, and a wetting configuration at anygiven moment. The continuous media in the sys-tem, including the solid, liquid, and gas, are all di-vided as assemblies of individual cells occupied bythe respective medium so that such a discrete sys-tem of cells can be manipulated more easily in acomputer. The liquid wicking simulations are thenset up from the initial configuration of the liquidlayer into which the fiber mass with a predefinedfiber orientation is in part vertically dipped, absorb-ing the liquid.

Statistical physics in general deals with systemswith many degrees of freedom. These degrees offreedom, in our case, are represented by the socalled Ising variables. We assume that we know theHamiltonian (the total internal energy) of the sys-tem.

36ARTICLE - Computer Simulation and Modeling of Water Droplets Deposition on Nanofibres

By - Richard Charvat

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Richard CHARVÁT 1, Eva KO? TÁKOVÁand David LUKÁ? 2

1 Technical University of Liberec, Fac-ulty of Art and Architecture, Atelier ofVirtual Reality, Czech Republic2 Technical University of Liberec, Fac-ulty of Textile Engineering, Depart-ment of Nonwovens, Czech Republic

Figure 1. 2-D Ising basic ferromagnetic model vs 3-D Isingmodel for liquid-fiber mass interaction. A cell in the centerforms a supercube with its neighboring cells. On the front sur-face, we can see various kinds of media that occupy the cells.For example, the white color denotes the air, the grey colordenotes the liquid, and fiber cells are black.

Page 37: BlenderArt Magazine Issue 31 Under The Microscope

The problem is computing the average or equilibriummacroscopic parameters observable (energy and liquidmass uptake) for a given initial system configuration.Moreover, we will monitor the kinetics or even dynam-ics of the system so as to simulate the wicking behav-ior with time, for more detail see [3],[4].

Model

The auto-model (particularly so called Ising model) andMonte-Carlo method were used especially for simula-tion of a liquiddroplet in contactwith fibrous mate-rial. The mecha-nism of this kind ofsimulation is fullydescribed in [2].

Methodology

With the use of an optimized algorithm, the 3-D Isingmodel improves accuracy and efficiency in simulation.This approach is capable of realistically simulating thecomplicated mechanisms involved in the filtration andseparation processes. The fibrous material is repre-sented by non-woven textile material.

Figure 2. A simulation box with cells illustrate schematically a3-D Ising model of droplets on single fibre in various configura-tions. In this case it was used for procedural modeling of theRayleigh instability phenomena (top). Computer visualization ofRayleigh instability of liquid droplets on single fibre (bottom).

Figure 4. The result images present the equilibrium state of liq-uid droplet versus fibrous non-woven structure at the end ofthe simulation process in two ultimate states of the system:liquid with high contact angle (left) and or liquid with low con-tact angle (right) in contact with randomly oriented fibrous ma-terial.

Figure 3. An illustration of the initial state of a simulated sys-tem. A dropping ball is placed on top of non-woven textile witha particular fibre orientation. After the start of the simulationprocess, the ball infiltrates inside, then when we change angleof wetting = dropping ball does penetrate (0°) or dropping balldoesn’t penetrate (90°).

37ARTICLE - Computer Simulation and Modeling of Water Droplets Deposition on Nanofibres

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 38: BlenderArt Magazine Issue 31 Under The Microscope

Interface

Occupied elements of 3D model are imported in layersas vertices after which a volume effect is applied onthem (various color depending on fibre or liquid fluidelement). It is further possible to render or animatestructures made by fibres with liquid interaction oreven cut samples in desired positions with ortho-graphic camera point of view. This method works prop-erly even for very large data sets.

Eventually it will be possible to use textured slices in avoxel visualization manner, like a 3D virtual reconstruc-tion of human body from cuts obtained by medicinecomputer tomography devices.

Visualization

Furthermore it is also possible to present linear or evenreal time content in low cost anaglyph stereoscopy or

active virtual reality projection due to much better im-mersion.

Due to GLSL offering support for real time shaders, it ispossible to experiment with scientific computing andvisualization using the real time interactive game en-gine.

Figure 5. System of fibrous non-woven material in computerworkspace. Rendered image or linear sequence of images (topright). Figure 7. Perspective anaglyph of fibrous non-woven material

(left). Top view of complete fibrous system with an alpha chan-nel slice (right).

Figure 6. Reconstructed voxel slices (left) of fibrous non-wovenmaterial. Textured image slice of droplet with alpha channel(bottom right).

38ARTICLE - Computer Simulation and Modeling of Water Droplets Deposition on Nanofibres

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 39: BlenderArt Magazine Issue 31 Under The Microscope

Parallel computing architecture is a programming ap-proach for the performing of scientific calculations onthe GPU as a data parallel computing device. The pro-gramming interface allows us to implement algorithmsusing extensions to the standard Python language usedinside Blender [1].

Authors also thank the companies Elmarco and Cum-mins Filtration for their support and interest in thiswork

Figure 8. Real time interactive visualization via GPU. Perspec-tive camera view (top) and side view of fibrous system withdroplets (bottom).

39ARTICLE - Computer Simulation and Modeling of Water Droplets Deposition on Nanofibres

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

import GameLogiccont = GameLogic.getCurrentController()obj = cont.getOwner()

FragmentShader = """ uniform sampler2D color; varying vec3 light_vec; varying vec3 normal_vec; void main() { vec3 l = normalize(light_vec); vec3 n = normalize(normal_vec); float ndotl = dot(n,l); gl_FragColor = texture2D(color,gl_TexCoord[0].st)*ndotl; } """mesh_index = 0mesh = obj.getMesh(mesh_index)shader = mat.getShader()shader.setSource( FragmentShader,1)shader.setSampler('colorMap',0)

1. R. Charvat: Blender Like aNanoscope (procedural mode-ling), paper for 8th AnnualBlender Conference in Amster-dam, 25th October 2009.2. D. Lukas, N. Pan, A. Sarkar,M. Weng, J. Chaloupek, E. Kos-takova, L. Ocheretna, P. Mikes,M. Pociute and E. Amler: Auto-Model Based Computer Simu-lation of Plateau-Rayleigh In-stability, Physica A: StatisticalMechanics and its Applica-tions, Volume 389, Issue11, 1June2010, Pages 2164-2176.

3. D. Lukas, V. Soukupova, N.Pan and D. V. Parikh: Compu-ter Simulation of 3-D LiquidTransport in Fibrous Materials,Simulation, vol. 80, issue 11,pp. 547-557, DOI:10.1177/0037549704047307.

4. D. Lukas, E. Kostakova andA. Sakar: Computer Simulationof Moisture Transport in Fi-brous Materials, Thermal andMoisture Transport in FibrousMaterials, edited by N. Pan andP. Gibson, Woodhead Publish-ing Limited, Cambridge, pp.469-541, ISBN-13: 978-1-84569-057-1.

. A piece of code an in integrated interpreter to applyreal time pixel shader visualization via GPU.

Page 40: BlenderArt Magazine Issue 31 Under The Microscope

Its raining Blender books lately and Packetpublishing have been on the front of this lit-erary assault. Fortunately for us blender us-

ers it's nice time to fill up our book shelves sincefinal re-lease of Blender 2.5 is upon us soon.

Blender is a relatively new tool for most profes-sionals now that we have an excellent interfaceto begin with. We still need lots of informationabout crucial features of blender3d such as light-ing and the material system.

Blender 2.5 Lighting and Rendering book fillsthat slot nicely. Although it cannot be called acomplete beginners book, since you will mostlybe lost on various steps if you do not have atleast working knowledge of Blenders interface, itcan't be called an one stop extensive book forAdvance users.

So for an beginner to intermediate user, this book iseasy to pickup and allows you to quickly grow on to-wards much more advance usage, thus making it anexcellent learning companion.

The books starts off with the very basics on lightingterminologies such as color and a basic premise ofcolor theory then gradually moving on to understand-ing lighting in real world settings.

After the grounds up on real life knowledge, the readeris exposed to blender’s myriad controls and featuresavailable for various types of lighting solutions. FromAmbient Occlusion to Indirect Lighting, then on to out-door and Indoor-lighting solutions. The explanationseems justly nice for newbies, but the level of explana-tion at some points leaves more advance users wantingfor more, so clearly this book is not for experienced us-ers.

The book offers a nice portion to Materials in Blender.even better, UV Mapping which in my opinion is a goodmove as it brings the user right up there with the maintool-set's of Blenders Rendering pipeline. This is supple-mented with a pretty good from the grounds up of thematerial system and its various features namely, dif-fuse, spec mirrors, IOR etc.

Whats Good

· Explanations of most features, it covers almostevery part of lighting and rendering includingthe Material system.

· Very practical with excellent exercises forpractical understanding.

· Pretty straight forward and concise.

· Easy to Pick up and read.

Whats bad.

Not much really.

Seems like BA recommended buy ;)

40REVIEW - Blender 25 Lighting and Rendering

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Blender 2.5 Lighting and Rendering

Packt PublishingPages 252 Approx.

ISBN 978-1-847199-88-1www.packtpub.com

Page 41: BlenderArt Magazine Issue 31 Under The Microscope

Micro lifeform - by Robert J TiessGALLERIA

41www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 42: BlenderArt Magazine Issue 31 Under The Microscope

Micro lifeform - by Robert J TiessGALLERIA

42www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 43: BlenderArt Magazine Issue 31 Under The Microscope

Micro lifeform - by Robert J TiessGALLERIA

43www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 44: BlenderArt Magazine Issue 31 Under The Microscope

Quantum - by Sam BrubakerGALLERIA

44www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 45: BlenderArt Magazine Issue 31 Under The Microscope

EMBO_cove - by Hua WongGALLERIA

45www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 46: BlenderArt Magazine Issue 31 Under The Microscope

Centriole - by Leonard BosgraafGALLERIA

46www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 47: BlenderArt Magazine Issue 31 Under The Microscope

Cellulose Insect -by Antoni VillacrecesGALLERIA

47www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 48: BlenderArt Magazine Issue 31 Under The Microscope

Weapon Of Mass Creation -by Yo RoqueGALLERIA

48www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 49: BlenderArt Magazine Issue 31 Under The Microscope

WiBee - by Manuel GeissingerGALLERIA

49www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 50: BlenderArt Magazine Issue 31 Under The Microscope

Under The Microscope -by Grzegorz Wereszko and Adam AukselGALLERIA

50www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 51: BlenderArt Magazine Issue 31 Under The Microscope

BMW - by Pierlot DamienGALLERIA

51www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 52: BlenderArt Magazine Issue 31 Under The Microscope

1. We accept the following:

· Tutorials explaining new Blender features, 3dconcepts, techniques or articles based on current theme ofthe magazine.

· Reports on useful Blender events throughout the world.· Cartoons related to blender world.

2. Send submissions to [email protected]. Send us a notification on what youwant to write and we can follow up from there. (Some guidelines you must follow)

· Images are preferred in PNG but good quality JPG can also do. Images should be separate from the textdocument.

· Make sure that screenshots are clear and readable and the renders should be at least 800px, but notmore than 1600px at maximum.

· Sequential naming of images like, image 001.png... etc.· Text should be in either ODT, DOC, TXT or HTML.· Archive them using 7zip or RAR or less preferably zip.

3. Please include the following in your email:

· Name: This can be your full name or blenderartist avtar.· Photograph: As PNG and maximum width of 256Px. (Only if submitting the article for the first time )· About yourself: Max 25 words .· Website: (optional)

Note: All the approved submissions can be placed in the final issue or subsequent issue if deemed fit. All sub-missions will be cropped/modified if necessary. For more details see the blenderart website.

Want to write for BlenderArt Magazine?

Here is how!

52

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

Page 53: BlenderArt Magazine Issue 31 Under The Microscope

Upcoming Issue ‘Theme’

Issue 32

Disclaimer

www.blenderart.org Issue 31 | Dec 2010 - "Under the Microscope"

blenderart.org does not takes any responsibility both expressed or implied for the material andits nature or accuracy of the information which is published in this PDF magazine. All the ma-terials presented in this PDF magazine have been produced with the expressed permission oftheir respective authors/owners. blenderart.org and the contributors disclaim all warranties,expressed or implied, including, but not limited to implied warranties of merchantability orfitness for a particular purpose. All images and materials present in this document areprinted/re-printed with expressed permission from the authors/owners.

This PDF magazine is archived and available from the blenderart.org website. The blenderartmagazine is made available under Creative Commons‘ Attribution-NoDerivs 2.5’ license.

COPYRIGHT© 2005-2009 ‘BlenderArt Magazine’, ‘blenderart’ and BlenderArt logo are copyrightof Gaurav Nawani. ‘Izzy’ and ‘Izzy logo’ are copyright Sandra Gilbert. All products and com-pany names featured in the publication are trademark or registered trade marks of their re-spective owners.

“Spring is Sprung”· Modeling and texturing of plants, flowers, trees; can be realistic, toony, exotic, alien

or even steampunk

· Ant Landscape Add-On

· Ivy Generator or similar scripts

· Use of arrays, curves and other modifiers to create vegetation