I am currently developing a program where I'd like to apply a material to a 3D model without using something like 3ds Max. But I am working with .fbx files, so I'd like the calculations to be the exact same as in 3ds Max. Essentially, I have a texture sheet as follows:
And I want to be able to just take this texture sheet and properly draw it onto the 3D model from whence it came, that model being the following:
I can't, however, find how this would be calculated for the life of me. It would be ideal if the calculation would be done based off the model's vertices, as that's how other things in my program are being calculated. Does anyone know how I could calculate drawing a texture sheet to a 3D model in the same way 3ds Max does? Thanks in advance for your answers!
I think you might be interested in doing some reading on UV mapping. https://en.wikipedia.org/wiki/UV_mapping
There is an example in the FBX documentation on how to get UV data here: https://help.autodesk.com/view/FBX/2020/ENU/?guid=FBX_Developer_Help_cpp_ref_u_v_sample_2main_8cxx_example_html