source
source copied to clipboard
Add support for UV coordinates in Raysect
A number of use cases have now emerged which would benefit from the feature of UV coordinates, basically coordinates on primitive surfaces (https://en.wikipedia.org/wiki/UV_mapping). Primary use cases could include:
- Getting the surface coordinate of a ray intersection with a primitive (#323).
- Applying surface varying material properties (i.e. textures, coatings, etc).
Overall, this is quite a massive feature and should be done in phases.
- Define an interface for UV coordinates at the primitive and material level.
- Contribute UV mapping classes on a primitive by primitive basis. Allowing gradual build up towards the feature.
- Add UV coordinates and primitive identification to the Intersection() object.
Completing this issue would enable new classes of physically realistic materials as well as open up many useful utilities.