-
-
Notifications
You must be signed in to change notification settings - Fork 96
Open
Description
Currently, rendy::mesh::obj::load_from_obj() does not generate vertex tangents when loading OBJ files. This prevents OBJ files from being used with Amethyst's RenderBundle's RenderPbr3D plugin, which needs vertex tangents.
I can implement this, but I want to determine if this is a desired feature, and if so, what tradeoffs are preferred before I start. There are 3 ways I see to implement this:
- Just generate the tangents all the time
- + Just works
- - Wastes CPU cycles if tangents aren't needed
- Add a boolean parameter to specify if tangents are desired
- - Breaks API
- - Inflexible; tangents treated as more special than other vertex attributes
- Make
load_from_objgeneric over a new trait and implement the trait forVec<A> where A: AsVertexand tuples of those types
- + Leaves room for future extension
- - Breaks API
- - Adds type complexity
My intuition is that 1 is the best option if OBJ loading time is considered negligible, and 3 is the best option otherwise.
Metadata
Metadata
Assignees
Labels
No labels