The idea behind the technique is that we have a triangle which fits inside a unit circle, we know that each vertex of the triangle is exactly one unit away from the centre. We then find the midpoints of each line in the triangle and use the points to subdivide the individual lines and then push the midpoints out so they are unit length from the centre and continue this approach until we get a sphere.
The first time i tried this, i managed to mess up how i was pushing back the normals but this actually created some nice effects on the sphere.
At 6 divisions, it starts to look a little like a basketball.
With the normals being pushed back correctly we get a nice smooth sphere.
I also added some more types of lighting to the framework we are creating.
Point Light
The point light is coming from the small sphere and you can see how the big spheres closest are the ones which are lit the most.
Spot Light
The spot light is similar to the point light but it also take into account the direction the light is facing, this makes it appear more focused than the point light does.
Emissive Light
An emissive light allows objects in the scenes to emit light of there own. below is an example of a cylinder which emits are green light every second.
Light off |
Light on |
Thanks for reading!
Email: 10004794@napier.ac.uk - Please put blog in the subject.
Xbox Gamertag: craigmcmillan01
Twitter:
steam: craigmcmillan01
add or follow and we can game!
No comments:
Post a Comment