# Probably Color Shader Issue In Cinema 4D R14.034

This is what I found when I applied a color shader with the index ratio channel to a cloner object. The gradient is shifted, there is not correspondence between the index value and the colour that should be set.

There is something wrong: my expectation or the result?

Here you can see the simple project so you can try if you want.

This is the material:

The strange result:

# Sculpting with Cinema 4D

I just finished the sculpting tutorial from the help.
This is my result from scratch after a little bit of post production (reproduction of the moonface by Dimitris Katsafouros):

If you would like to have the 1920×1080 version for your desktop, let me know.

# Is it time to Blender?

I know that probably all of you are aware of this software and I wondering why this FREE software has not had much success yet. I’m new to the 3D world (less of 2 years of spare time and other time subtracted to the study for my next university degree) and, sure, I have a lot to learn if I want to stay in it and probably the answer is simple. I read that Blender is hard to learn, but is it so hard that fails to compensate the high cost of other software like Cinema 4D?

However, I have download and install it some days ago, you can find it here.
And now I’m starting to learn the bases of Blender from these free tutorials.

I would appreciate if someone wants leave a comment to explain his position and to suggest some way to learn better.

# Popup Book – Mathematical Solution

If you have seen the Popup Book tutorial for Cinema 4D by Robert Leger and want to know how to solve the problem in the mathematical way read below.
Here is the Robert’s tutorial:

This is my result:

I know that the following symbolism is not simple to read because I chose one that is ready to be transferred to COFFEE code and simple to write in this blog.
First of all, I want to fix my axes to take advantage of symmetry.

The origin is fixed on the point O. When the book is closing the two pages rotate together alpha degrees. I choose alpha as variable for the animation.
Now I want to have free choose of points: A and B.
The point A’ is symmetric respect to the ZY-plane by point A.
The point B stays on the plane x=0.
Now, with the book opened (alpha=0), I set the point A and B that I call _A and _B. In this manner I have set the distances OA,OB,AB that must be the same at any angle.

A(alpha=0)=_A=(X_A, Z_A, 0)
B(alpha=0)=_B=(0, Z_B, Y_B)

It is obvious that Y_A=X_B=0

Then X_A, Z_A,Z_B, Y_B are all set.

I’m searching a solution for points A and B:
A=A(alpha)=(XA,,ZA,YA)=(X_A*cos(alpha), Z_A, X_A*sin(alpha))
A is solved. Note that XA^2+YA^2=X_A^2
B=(0, ZB, YB)

Now I’m searching a solution for B.

The equations:

1) The point B describes a circumference with radius R equal to length OB.
ZB^2+YB^2=R^2 (note that also R^2=Z_B^2+Y_B^2)

2) The distance AB= constant
at any alpha:
AB^2=(XA-XB)^2+(ZA-ZB)^2+(YA-YB)^2
at alpha=0:
AB^2=(X_A-X_B)^2+(Z_A-Z_B)^2+(Y_A-Y_B)^2
=>
XA^2+(Z_A-ZB)^2+(YA-YB)^2=X_A^2+(Z_A-Z_B)^2+Y_B^2
XA^2+Z_A^2-2*Z_A*ZB+ZB^2+YA^2-2*YA*YB+YB^2=X_A^2+Z_A^2-2*Z_A*Z_B+Z_B^2+Y_B^2
after some steps, I found:
YA*YB+Z_A*ZB=Z_A*Z_B
when alpha is fixed (YA fixed) this is an equation of a line (r):
YB=(Z_A*Z_B-Z_A*ZB)/YA

The intersection of the two equations gives two solutions. I”ll choose the solution with YB>0.

Now let’s go on with the calculations.
For semplicity: K=Z_A*Z_B
Intersect of:
1) YA*YB+Z_A*ZB=K => ZB=(K-YA*YB)/Z_A
2) ZB^2+YB^2=R^2

Raplacing ZB of equation 1) in equation 2):
(K-YA*YB)/Z_A+YB^2=R^2 =>

The positive solution is:

YB=[K*YA+Z_A*sqrt(YA^2*R^2+Z_A^2*R^2-K^2)]/(YA^2+Z_A^2)
Now I can Calculate ZB:
ZB=(K-YA*YB)/Z_A

The problem is solved!

Now I can write a COFFEE node for the algorithm:

main()
{
var Z_B,Y_B,X_A,Z_A,Z_B2,Y_B2,Z_A2,YA2,alpha,K,K2,R2;

X_A=Input1;
Z_A=Input2;
Z_B=Input3;
Y_B=Input4;
alpha=Input5;

Z_A2=Z_A*Z_A;
Z_B2=Z_B*Z_B;
Y_B2=Y_B*Y_B;
YA=X_A*sin(alpha);
YA2=YA*YA;
XA=X_A*cos(alpha);

R2=Z_B2+Y_B2;
K=Z_A*Z_B;
K2=K*K;
YB=(K*YA+Z_A*sqrt(YA2*R2+Z_A2*R2-K2))/(YA2+Z_A2);
ZB=(K-YA*YB)/Z_A;
}

I hope this tutorial can be useful also just like a mathematic exercise.

Here is the file

# Industrial Robot

Fascinated by the ABB industrial robots demo, which you can see in the link below, I could not resist to play an animation similar with my model of industrial robot (realized with Cinema 4D).

ABB Robot Demo:

Model: Gianni Lorusso
Animation: Gianni Lorusso

Music: Mindwatcher – Robots Rule the World  V.2K7
http://www.jamendo.com/it/track/18266/robots-rule-the-world