| Name | Number | |
|---|---|---|
| João Brandão Alves | 202108670 | up202108670@up.pt |
| José Francisco Reis Pedreiras Neves Veiga | 202108753 | up202108753@up.pt |
This project is a 3D graphics application built using Three.js and a custom scene description format called YASF (Yet Another Scene Format). The application dynamically generates 3D scenes from a JSON file that follows the YASF specification, enabling a robust and hierarchical approach to building 3D environments.
-
Scene Graph Implementation:
- The application parses a hierarchical JSON structure to create 3D scenes.
- Supports nodes with inheritance for transformations, materials, and shadows.
-
Lighting:
- Directional, Point, and Spotlights are supported.
- Lights can cast shadows based on their configuration in the JSON.
-
Primitives:
- Supports basic primitives like rectangles, triangles, spheres, cylinders, polygons, and NURBS surfaces.
- NURBS surfaces are dynamically generated using control points defined in the JSON.
-
Skybox:
- Includes support for textured skyboxes with user-defined dimensions and positions.
-
Level of Detail (LOD):
- Nodes can have LOD configurations for efficient rendering based on the camera's distance.
-
Advanced Textures:
- Includes support for mipmaps, bump maps, and video textures.
- Materials can be customized with emissive, specular, and diffuse properties.
-
Interactive Controls:
- Toggle between wireframe and solid rendering modes.
- Change light states (on/off) and shadow settings dynamically.
- Make objects appear/disappear.
Below are some screenshots of the implemented features:
During the development of the project, the following issues were encountered:
-
NURBS Parsing:
- Problem: Setting
degree_uordegree_vto1caused runtime errors. - Solution: Adjusted the NURBS builder to handle edge cases for low-degree surfaces and ensure proper knot vector calculations.
- Problem: Setting
-
Some Performance Optimization:
- Problem: Rendering large scenes with multiple lights and high-polygon objects caused performance drops.
- Solution: Implemented LOD for distant objects and used mipmap textures for better performance.




