Thursday, December 6, 2012

Area Autodesk feature.......

We got mentioned on autodesk \:D/

Autodesk link

I did a brief Tutorial on the setup of feathers we used in Khumba, this is still very much a work in progress :D

hardware render of that setup ......

If you want to download these nodes to try them out, go to Triggerfish and click on the feather icon on the page.

Monday, December 3, 2012

Triangle Area...

Continuing on with the calculating of area... lets look at triangles.
 There are tons of ways to get the area of a triangle so.....

Here is a link to wikipedia's section on Triangles .

I went with Heron's Formula, simply because I had all the edge/side lengths worked out already. Here is what my scene looks like...

Heron's formula in softimage ICE
*click to make bigger*

I drew a linear curve with three points for my triangle.

The black value(area=√( s(s-a)(s-b)(s-c) )) is the area of the triangle, the orange value(cos C = (a^2 + b^2 - c^2)/2ab) is the corner angle of Point_02_Null. The light green value(s = (a+b+c)/2) is half the length of the perimeter of the triangle.

Lets go look at all this in ICE.

To start I made a little cluster to null constraint so I could move the triangle points around freely. I named them Point_01_Null, Point_02_Null and Point_03_Null. *something to keep in mind is that one of your points will be numbered 0, and be on 0,0,0. I just moved mine off the origin. In the wikipedia they go into a whole section on this.*

Null Constraint In ICE Softimage

Point Nulls 01,02,03

Here's what that constraint looked like in ICE.

Cluster to Null ICE/Softimage

Then I worked out the length and center of the three sides.

Edges of a triangle in Softimage

Side A, B and C letters where stuck too the curve by a standard Softimage constrain between two points.

Center of side

Using a linear blend between the two nulls was the fastest why to get the center point on the curves

Linear Blend Between two nulls in ICE

Using the distance between node, I got all three sides lengths and then added them together to get the perimeter of the whole triangle.

Length of three sides of a triangle in softimage/ice

curve length of a triangle

Here's what the inside of the compound "length of C" looks like....

Length of three sides of a triangle in ICE

Next I tested the side lengths with the curve length to see if the perimeters matched up.

perimeter length of a triangle

Now I could work out the angles of the triangle using the law of cosin:

cos C = (a^2 + b^2 - c^2)/2ab

the law of cosin in Softimage

Here's what the ICE tree looks like...
 *note I had the to use ArcCos to get the right answer*

law of cosin in ICE

Last I worked out the Area of my triangle using Herons Formula.

Herons formula for area in softimage

This formula has two parts to it, the first being:
(s = (a+b+c)/2   which gets half of the perimeter, and then
 area=√( s(s-a)(s-b)(s-c) ) which uses the value s to work out the area.

Herons formula for area in ICE

Here's what those two sums look like....


Taking the ready made side lengths(A, B and C) and subtract the value s from them. Multiply those answers with the value s. Then all thats left is to get the square root of that and you have the area of the triangle.

the area of a triangle in softimage


Thursday, November 22, 2012

Square Area....

*click to make bigger*


 A Square is a flat shape with 4 equal sides and every angle is a right angle (90°) and opposite sides are parallel.


A square has two diagonals, they are equal in length and intersect at the middle point.

Diagonal square

The Diagonal is the side length(a) times the square root of 2:
*side length = a = the length between A and D* (see image at top)

Diagonal "d" = a × √2


The Perimeter is 4 times the side length:
Perimeter Square

Perimeter "p" = 4a


The Area is the side length squared:

Area Square
Area = a2 = a × a

....or half of the diagonal squared:

Area Square 
Area = d2/2

What this looks like in ICE ....

Side length

To work out the side length of the square shown below.....

square side length in softimage ICE

..... Subtract the corner point (-1,-1,0) with corner point (-1,1,0). Then simply get the length of the vector between the them.

side lentgh of a square softimage



The light green perimeter value is worked out with the math sum shown below, while the darker green value shows the curve length attribute in ICE, they are both the same.

p = 4.a

calculate perimeter of a square in ICE


The diagonal length as shown by the blue value below was got by....

Daigonal of a square in softimage ICE

d = a .  √2

calculate diagonal of a square in ICE


 Area can be calculated two ways, by multiplying the side lengths or by the diagonal....

Area of a square in ICE

..... here are what those calculations look like in ICE.

Calculate area of a square in ICE

The end :D

Wednesday, November 14, 2012

Underwater fur . . .

First step find reference of animals underwater

Never underestimate the power of reference, here is some I used...

UnderWater Fur
Fur Under the water

Here is some video reference of a tiger underwater.....

.....I also looked at Ink in water.

After watching the reference many times, I decided to break up the "underwater effect" into five different areas....

  1. Force of movement from the object
  2. Wave motion through hair when the object moves
  3.  Water movement and direction
  4.  Other objects making the water move for example the paw of the tiger
  5.  Over all Puff

    Demo Scene

    In my little demo scene for this blog post I'm going to touch on some of the ways I got around these problems. Obviously it includes tons of things I learned from tutorials and other resources. I'm not going to go into to much detail. Honestly I don't know if this is the best way to make under water fur effects, lets just say it worked for me :D Here's a Capture of the demo scene....

    Break down of Scene

    There is an over all modulate by null in this scene - Box null - , so that it looks like the sphere is entering the water, and leaving it again. Also all the effects are in the modeling stack in ICE. None of the effects are in the "Simulation stack".

    Step One: "Force of movement" made with the following ICE Trees

    Create an none simulated ICE tree in the modeling stack. Then get the point velocity from the emitter using the get closest location node, then apply that point velocity value to all the points in the strand. This way we get a strand velocity value for each point on the strand.

    Then I apply the Velocity as a "force", and vary it with the mass of the strands.

    Step two: I made the following ICE trees for the wake.

     The wake was just added to the "force" of the velocity.

    The wake is a simple sin function that takes the global position into account. I added a random around value to the amplitude to get it to be less repetitive.

    Step three: The following ICE Trees are for water direction and movement.

    To start off, watch this tutorial by Paul Smith
    Vector Flow

    So now that you have a feel for vector flow, I used the vector flow of a bunch of curves the represented the "waters" flow direction. This is all still in the modeling stack.

    Here are the curves I made for this scene.... to create variation of motion in the water I just animated the curves to rotate around their local orientation.

    Step Four: Other objects making the water move

    Here I have the strands push away from a Null object. I modified the modulate by null to take into account the strand position of the strands.

    Step Five: Puff

    The puff is just a simple push along the Y axis of the strands to add the illusion of weightlessness.

    Nice thing about doing the "under water effect" in the modelling stack is... I could step through my scene without having to wait for a simulation bar to calculate. And because of the curves I could change the way the water effected the fur on frame 60 but have frame 5 be uneffected. Which is really nice and flexible and feels more like animating then simulating. :D

    Monday, November 12, 2012

    Circle Area


    hula hoop
    Hula Hoop

    The definition of a circle is:

    The set of all points on a plane that are a fixed distance from a center.

    Circle terms
    *click too make bigger*

    The Radius is the distance from the center to the edge.
    The Diameter starts at one side of the circle, goes through the center and ends on the other side.
    The Circumference is the distance around the edge of the circle.
    The Chord is a line segment whose endpoints lie on the circle. 
    The Tangent is a straight line that touches the circle at a single point.

    When you divide the circumference by the diameter you get 3.141592654...
    which is the irrational number π (Pi) 

    thus :
    Circumference = π × Diameter
    Diameter π × Circumference

    To get the area of a circle you need either the radius or the diameter and π .

    The area of a circle is π times the radius squared, which is written:
    A = π × r2
    Or, in terms of the Diameter :
    A = (π/4) × D2

    A circle has about 80% of the area of a similar-width square.
    The actual value is (π/4) = 0.785398... = 78.5398...%

    Lets look at this in ICE 

    I created a normal circle in Softimage with a radius of 1, and a subdivision count of 16.

    *click too make bigger*
     The ICE attributes on a circle are quite limited, it pretty much only gives you the curve length. So if you want to know say... the area of the circle you will have to work it out for yourself. Here is how I got some of the values I wanted to know.

     π (Pi)

    To get π I used the attribute curvelength (circumference) divided with the diameter (Got the distance between two opposite points on the circle).

    Pi Ice Tree
    *click too make bigger* can see from the image below that got me the right value.

    Pi in Softimage ICE
    *click too make bigger*


    R = Diameter/2

    Radius Ice Tree
    *click too make bigger* 
    Radius of circle in softimage
    *click too make bigger* 



    The Blue value is area worked out with diameter and the Green value is area worked out with the radius.
    Area ICE tree
    *click too make bigger*
     They both get the same result.....

    Area of a circle in Ice
    *click too make bigger*


    The Purple value is worked out with the Math in the ICE tree below, where as the green value is the curve length given by the ICE attribute in Softimage.

    Circumference Ice Tree
    *click too make bigger*
     They are both the same...

    Circumference of a circle with Ice
    *click too make bigger*


    Calculating Diameter using the math sum :
    D = r . 2

    Diameter Ice Tree
    *click too make bigger*

    Diameter of a circle in ICE
    *click too make bigger*

    Unit Circle

     .....this is a really fun way tho see how a circle is a set of points that are a fixed distance from a center.