Interactive Graphics course at "La Sapienza University of Rome"
In homework1 1 I obtained the following effects:
- A complex and irregular geometry. Each vertex have associated a normal and a texture coordinate.
- The object rotates via buttons along the three axes around the center of gravity. Again with buttons, the rotation can be reversed, stopped, and started.
- With sliders, the view can be modified.
- A cylindrical neon light with 3 light sources inside of it and emissive properties of the cylinder. The cylinder is approximated by triangles.
- Both per-vertex and per-fragment shading models with a button to switch between them.
- A procedural normal map that gives the appearance of a very rough surface. The bump texture to the geometry of the point 1. A button activates/deactivates the texture.
In homework1 2 I obtained the following effects:
-
A hierarchical model of a (simplified) sheep https://en.wikipedia.org/wiki/Sheep, composed of the following parts; a. body b. 4 legs, each one composed of 2 independent components (upper and lower leg) c. head d. tail All components are cubes. The sheep has a white/light grey color.
-
A surface on which the sheep is positioned that corresponds to a grass field. Attached to it there is a texture to give the appearance of a grass field.
-
Two textures: A color texture attached to the front face of the head and a bump texture applied to the sides of the body to give the “wool effect”.
-
A (very simplified) model of a fence positioned on the surface and near the sheep.
-
A button that starts an animation of the sheep, it start from an initial position where it is in a walking mode, it walks on the surface towards the fence by moving (alternatively back and forth) the legs, then jumps over the fence and lands on the surface on the other side of the fence.
-
The user can move the camera before and during the animation.
The project was realized using the library three.js. The goal was to make a 3D game. In the game, we will play the role of Steve a raccoon runner. The user will have the ability to move Steve through the keys A and D also balloons will appear on the screen, if we click them, they will burst and provide a speed boost to Steve. In the main scene, there are various trees, a track and a model for the finish line has been created. There is also a tribune on which there are various animals, each with a different model and a different animation, that will cheer for Steve and the other raccoons in the race. The aim of the game is very simple, we should win the race.
- Three.js;
- Tween.js.
Press the A and D keys alternately to make Steve run, the faster you are the faster Steve will be too. If you don't click the keys alternately Steve will slow down.
LEFT CLICK MOUSE to pop balloons.
https://threejs.org/
https://threejsfundamentals.org/
https://github.com/tweenjs/tween.js/blob/master/docs/user_guide.md
https://get.webgl.org/
https://www.w3schools.com/