While waiting for renders and caches I looked at my blog and thought to myself, it needs to be simplified a bit :D And now it is.... hopefully it looks better. Atlest I think it does
Thursday, September 20, 2012
Tuesday, September 18, 2012
Vector's and ICE
When I started this post I was only going to do an example of Dot Product in ICE, but it got a bit abstract and hard to follow. So ....
....in this post. So lets get cracking :D
A Vector
Vectors are use to represent physical quantities which have length(magnitude) and direction, like wind or gravity.
![]() |
| *click to make bigger* |
A vector has direction and magnitude(length)
Add Vectors
A + B = B + A
When Adding Vectors imagine you are joining them head to tail, then getting the long side of the triangle they make. This new vector is also known as the resultant vector. *You can add as many vectors as you want together, it will always have a "straight arrow" resultant vector answer.*![]() |
| *click to make bigger* |
When adding vectors it doesn't matter which vector gets added first you will always get the same result.
In the Image below I show -the dark yellow arrow is the resultant vector, between the blue arrow vector and the green arrow vector- how this looks in ICE.
| *click to make bigger* |
To get the Inverse of A+B(resultant vector) all you need to do is : (-A) - B = Inverse of A + B
In other words get the negative value of blue vector, then subtract that from the green vector and you will get the inverse of A + B(resultant vector*purple arrow*).
Here's what the ICE nodes look like...
| *click to make bigger* |
Subtract Vectors
C = B + (-A)
When we are subtracting vectors you have to invert the vector(green arrow vector) you want to subtract from the blue arrow vector, then add the two vectors together like normal.The order you subtract in matters, meaning if you subtract them in the wrong order you will get a different answer to what you expect.
![]() |
| *click to make bigger* |
In ICE you can subtract vectors by just using the subtract node, or you can do it with the proper vector math I showed above, both get the same result as you can see with the two purple values in the image below.
To get the inverse of B + (-A) you have to do the following (-B) - (-A) = C
The light green arrow in the image below shows the inverse value of B + (-A)
| *click to make bigger* |
Here's what it looks like in the ICE tree...
| *click to make bigger* |
Multiply by Scalar
C = 2(A)
When you multiply a vector by a scalar its called "scaling", because you don't affect the direction but only the magnitude(length) of the vector. This makes the length "bigger" or "smaller", more "speed" or "less speed".| *click to make bigger* |
In the images below and above, the light blue arrow and values represent the green arrow vector if scaled by the value 2.
| *click to make bigger* |
Cross Product
A · B = |a| × |b| × sin(θ) n
*|a| means the magnitude (length) of vector A**|b| means the magnitude (length) of vector B*
Cross product is a method of multiplying two vectors in 3d space, producing a vector that is perpendicular to both initial vectors. In physics it can be used to work out the torque of a force. You can also get the magnitude between two vectors this way :D
![]() |
| *click to make bigger* |
![]() |
| *click to make bigger* |
In ICE you get a ready made node to help you work out cross product(shown by the red vector arrow in the images below). I show what it would look like if we didn't have the ready made node with the light blue Value and the light Red value.
| *click to make bigger* |
As you can see from the image below the Yellow values is the normal cross product node. The Red value is from A · B. And the light Blue Value is from the |a| × |b| × sin(θ) n. Which all results in the same answer.
*On a side note if the angle between two vectors are 180 degrees the cross product will be zero*
| *click to make bigger* |
Scalar Product a.k.a Dot Product
A scalar product is an operation that combines two vectors(A.B) to create a scalar, a number with no direction.
![]() |
| *click to make bigger* |
You can calculate the Dot Product of two vectors this way:
A · B = |a| × |b| × cos(θ)
*|a| means the magnitude (length) of vector A*
*|b| means the magnitude (length) of vector B*
**You can only multiply vectors when they point in the same direction, to get A and B to point in the same direction we multiply by the cos(θ)**
(multiply the length of |a| times the length of |b|, then multiply by the cosine of the angle between(θ) A and B)
Here's a fun Calculator I found that shows what the Vectors are doing when we multiply :D I played with it quite a bit.
Vector Calculator
In the images below, although we are multiplying two vectors we end up with a scalar value of -1. This is because we as getting the dot product, not the cross product.
The Purple value shows the dot product nodes result in ICE, where as the light green value shows |a| × |b| × cos(θ) and the yellow value shows A · B. As you can see the answers are the same.
*On a side note when two vectors are at right angles to each other the dot product is zero.*
Unit Vector
A unit vector is a vector with a magnitude of one. It is also known as a normalized vector.
The pink Value shows how the normalize node makes the dark green vector value normalized, where the light green value shows how to normalize the dark green value using U = U / ||u||
Vectors get used for all kinds of things in ICE so get to know them as much as you can.
THE END
Thursday, September 13, 2012
Backface Culling/Clipping of ICE Strands
Backface Culling
In computer graphics backface culling determines whether something is "visible" in the camera's field of view. This process makes rendering fur a lot quicker as you only render the fur that is "seen" instead of rendering the fur that is hidden from the camera.
Image U is what the Camera sees.....
Image U
*click on image to make it bigger*
If there was no backface culling there would be a lot of fur in the scene to calculate. Like in the Image F....
Image F
*click on image to make it bigger* But if you use ICE to create backface culling you can reduce the amount of fur that the renderer needs to calculate by quite a lot, as you can see from Image Y...
Image Y
*click on image to make it bigger*
So how do we do Backface Culling and Clipping in ICE?
The most common way of calculating "backface culling", would be to use a "dot product" to determine the normals of the mesh the fur is grown from then delete the fur that is not "seen" by the camera.
As you can see from the image below named "Clipping" we can see that Clipping deletes the fur that is outside the F.O.V of the camera, shown by the blue lines. For the actual "Culling" I used a similar approach to the dot product, but ignore the edge of the cameras F.O.V. Instead we focus on the side of the object that faces away from the camera, illustrated by the red line in the image called "Culling".
"Clipping"
*click on image to make it bigger*
"Culling"
*click on image to make it bigger*
When you combine the two you get Image Y, shown earlier.
Lets take a look at ICE and see how this all gets done. Here in Image Q is the node we used on Khumba to Cull the fur.When you combine the two you get Image Y, shown earlier.
Image Q
*click on image to make it bigger*
The Red Square is a scalar that makes it possible for us to adjust the Culling after we added the original values from the camera, just like a fall off.
The Blue Square is exactly the same except it gives us a fall off for the Clipping.
So within ICE
we can adjust the Field Of View(F.O.V) as we need it. Without having
to touch the camera settings/setup's. The Blue lines in Images H,J and I represent the
actual camera F.O.V, while the Red lines shows how ICE adjusts the F.O.V.
*click on image to make it bigger*
Image J
*click on image to make it bigger*
Image I
*click on image to make it bigger*
Image A
*click on image to make it bigger*
Image B deals with the clipping of the fur. Here we use a standard node in ICE called "Test Visibility From Camera", we have modified it a bit to work for our needs. We obviously don't just want to test visibility from the camera when it comes to culling fur. It works out the length of the four sides of the camera view (inside the Red square) -- making a square in space -- using a dot product sum between the fur (inside the Blue square) and the camera (inside the Green square), then we just say delete everything outside of that square (inside the Yellow square). To do this we need the cameras position in space (inside the Green square) and the F.O.V and aspect ratio of the camera (inside the Purple square).
Image B
Image C brings the Culling and the Clipping together with an IF statement. If there is fur inside the clipping square that is behind the character then that fur will also get deleted.
Image C
*click on image to make it bigger*
And that is culling fur in a nut shell. There are tons of Clipping Algorithms
that you can go look at here
:D
Tuesday, September 11, 2012
Monday, September 10, 2012
Random commecial.....
the Khumba fur nodes where used by Luma for a really funny add by Cadbury...
Its nice seeing other people using our ICE nodes to make cool stuff
:D
Friday, September 7, 2012
Tuesday, September 4, 2012
Boolean...
Boolean is a data type in ICE, having two values(normally being true or false) 0 or 1. They are intended to be used as truth values *hit or miss* and so on.
Here's what they look like in ICE...
| *click to make bigger* |
The top Boolean is a true, false node. The ports are Orange, I often use this node in connection with a if statement. For example, if the Camera sees the fur, it will display, if not it should be deleted.
You also get : Exclusive Or,Or,Not, And nodes, which look like .....
| *click to make bigger* |
To understand the And, Or, Not nodes is easy enough...
![]() |
| *click to make bigger* |
But when you working in ICE with a million strands, it is easy to forget even how Boolean works. >_<
Randomness for the day ^-^
Friday, August 31, 2012
Integer.....
Integers
| *click to make bigger* |
Are equally spaced points along a number line, like the one above.
They are considered natural numbers(positive and negative ones), which means they can't be 0.321, or -0.6123.
In math their symbol looks like ---->
which stands for Zahlen, a German word which means Numbers. O_O
Now in ICE, an Integer looks like:
| *click to make bigger* |
Its Ports are dark green, and it can only put out "whole numbers", 1, -1, 0 ect.
A really good way to keep NaNs. and Inf. out of your ICE trees is to try and round all the Scalar values you can to Integers. Or so I've found.
Integers are our friends, Yeah!
Monday, August 27, 2012
Vector and his little brother Scalar
So to understand Vectors and Scalars all you need is some....
AND some...
I'm just KIDDING :D *but you do need physics*
Vector - Magnitude and direction
Scalar - Magnitude
NASA, sums it up like this...
In ICE as in physic's this is probably one of the most basic, and the most important concepts to understand,- or at least I believe it is - there are many data types in ICE(integers, Boolean etc.) But these two are my favorites.
In ICE Vectors get used for push, direction change, forces and motion blur.
This is what some of the math involved looks like...
*click on image to in large*
Scalars on the other hand get used for scaling values, speed,mass and so on. *On a side note the word scalar comes from the Latin word ladder, and the English word scale.*
So what do these guys look like in ICE,
the scalar....
has green ports and can accept any real numbers. (eg. 0.88 or -11.234)
and the vector....
has yellow ports and can either be a 2D vector, 3D vector or 4D vector depending on what you choose,
these are point positions in Euclidean space.
![]() |
| *click on image to make bigger* |
In ICE as in physic's this is probably one of the most basic, and the most important concepts to understand,- or at least I believe it is - there are many data types in ICE(integers, Boolean etc.) But these two are my favorites.
In ICE Vectors get used for push, direction change, forces and motion blur.
This is what some of the math involved looks like...
*click on image to in large*
Scalars on the other hand get used for scaling values, speed,mass and so on. *On a side note the word scalar comes from the Latin word ladder, and the English word scale.*
So what do these guys look like in ICE,
the scalar....
| *click on image to make bigger* |
has green ports and can accept any real numbers. (eg. 0.88 or -11.234)
and the vector....
| *click on image to make bigger* |
has yellow ports and can either be a 2D vector, 3D vector or 4D vector depending on what you choose,
these are point positions in Euclidean space.
Just a random thought
Thursday, July 5, 2012
Velocity....
While busy at work, I noticed that my understanding of Velocity when compared to other people, wasn't the same. So, I'm going to do a little simple tutorial on Velocity soon, just to see how the math/physic's look in ICE.
I will be updating this post over the weekend or so.
:D
SO what is Velocity?
Velocity: the speed and direction of an object, or its rate of change in position. This is a vector.
http://download.autodesk.com/global/docs/softimage2013/en_us/userguide/index.html
SO according to ICE, Velocity has to do with . . . "position", "direction" , and "change in position which = speed/rate"
And the formula for Velocity looks like this :
or.....
which basically means Velocity = Displacement( "position", "direction") divided by change in time("change in position which = speed/rate")
a.k.a change in position over a change in time
Finding the rate or speed:
You might be thinking how can I find out what the rate or speed of said strand/particle/point is? Speed is a Scalar value, this means it has direction over time but not a position as with velocity/vectors.
Here is the formula for speed/rate:
Some cool Tutorials on Velocity\speed and acceleration can be found here:
http://www.khanacademy.org/science/physics
too be continued..... :D
Subscribe to:
Posts (Atom)

















