Posts Tagged 'tips'

How to animate a 360° rotation of an armature bone

Have you ever tried to animate a bone making a complete turn in a regular rotations?
I recently had to model and animate a watch for a real-time experience using the GameEngine and came up with not being instantly able to animate a bone 360° rotation correctly over one minute (using Z-axis and keyframing). My lack of quaternions knowledge made me do a quick  google-search for an easy answer to “how to animate a bone rotation in blender?”. I had no success, so i investigated myself and after few minutes came with understanding a bit how quaternion rotation works, and here is what i wish i had found on google :
This is the curves of a bone rotating 360° during 20 frames.

fig 1. ipo curves of QuatRot for a full 360° rotation

First of all Quaterions always are beetween -1 and 1. Frame 0 would be my bone completely up at 0°. At frame 10, the break you can see is actually when it reaches 180° and needs to go back up, but continue turning, otherwise you would have the bone going backward to angle 0° instead of angle 360°

Below is a visualization of the curves of a bone going from 0 to 180° and back to 0°:

fig 2. 0° to 180° and back curve

 

And here would be a graph showing how to animate many turns, it is just a repetition of fig 1.

fig 3. Continuous bone rotations

Voila. I do hope it can help someone one day. It is a simple thing, but good to know, as sometimes bone rotations can be confusing. I might also have missed a great tutorial, i would be happy to add it here.
And let me know if it not very clear.

Advertisements

2.5 render times: sometimes faster, sometimes slower (+tips)

Recently i have been testing the renderings between both 2.5 and 2.49 and i have to say my feelings were mixed at the beginning. I have been opening some recent or older project files/images and just comparing the render times. Some of the scenes rendered faster in 2.5 (in fact most of them), but at the same time some were just slower! I have been testing with different settings and after a while i found out that the building of the raytree seems to take a lot on the some scenes that 2.5 renders slower.
So how can you improve that ?
Hum i was thinking to myself, strange that the raytree building takes lot of time. So i found the Raytrace Acceleration Structure in the performance tab in the Scene setting properties, and this is where everything happens. Basically the Auto setting work fine for most cases, except when there are a lot of instances/array of a same object and raytracing enabled like mirrors. In that case i found out the BLI BVH method works faster.
So whenever you have lots of faces and raytracing, don’t forget to try from Auto to some more adequate Acceleration Structure. I hope it can help someone in the future.

Rendering on an 8-core with 2 blenders is faster

Today i am going to share some “trick” that i discovered on recent productions. First let me explain that I set up a small render farm environment (based on personal php/mysql system) in our studio.

brender renderfarming system

brender renderfarming system

the basic
Our fastest machine is an 8-core mac. By checking the CPU usage during renders it clearly came out that there were times when the system was not using all cpus at max (either when transfering files, talking with server, getting the blend files, building shadow maps or other maybe non multi-threaded tasks). So the solution was to actually launch 2 instances of the render client script on the same machine and thus having 2 blenders rendering simulteanously . And now i can hear you …you are going to tell me “but hey it drops down your per-frame render time!!”:-) And yes sir you are perfectly correct! it slows down the per-frame rendering…but not enough down.
The numbers talk for themself :
One instance of blender rendering i get an average render time per frame : 38sec
With 2 instances the average per frame is not 1min16 as one would expect but 43sec.

 

A rapid useless but fun calculation tell us that for a 100 frames anim, i get 64mins of rendering (38sec*100frames/60) and with a “dual-blender” i get 36mins (80sec*50frames/60). Voila!
This scene (scene03 from current project) indeed includes quiet a good amount of compositing, which i do believe is not multithreaded yet.

Other tests : scene 04_office
2 blend 37 sec
1 blend 23 sec

And with the blender benchmark file from eofw.org _
2 blend average 31sec.
1 blend 17 secs. ( yes its slower from other mac pro results , but i renderer slightly bigger and OSA 8)

The .exr temp files problem
So we already used this “trick” on the H7 robot movie. But at that time we did not use full sample FSA. This is were we got the temp files problem. I do not really understand how blender works for saving the sample passes in an .exr temporary files, but it seemed that by launching the render client in a same user session, it got access both time on same destination. This made blender not able to either overwrite or simply write, and thus crashing or exiting without rendering.
I tried different solutions like having a separate blender installation for the second render client instance, as well as running the client script in different user in the terminal… strangely it did not affect anything.
The workaround solution we found (thanks to a patagonian yogi guru) was to start an other session on the same computer to run the render client.
I am suspecting my lame render farm settings to be the only mistake in that 🙂 but at least in the end it worked.

So a tip to all people with a 8-core machine, or even 4-core i am sure u might get results, when rendering a long heavy animation: launch 2 instances of blender and use Touch Overwrite 🙂
for more infos on TouchOverwrite : http://www.blender.org/development/release-logs/blender-246/distributed-rendering-new-render-options/

please let me know if you do get some rendering speed improvement.


Categories

Flickr Photos

@oenvoyage latest Twitter


%d bloggers like this: