microsoft / DirectXTex

DirectXTex texture processing library
https://walbourn.github.io/directxtex/
MIT License
1.83k stars 450 forks source link

DirectXTex Environment Map command-line tool (texenvmap) #509

Open walbourn opened 2 months ago

walbourn commented 2 months ago

The texassemble tool is designed to take inputs and produce various complex forms of DDS files including cubemaps. It can also convert cubemaps to various 'cross' form images.

The idea of a new texenvmap tool is to support generating environment maps (cubemaps, spherical env maps, dual-parabola env maps, and octaheadral maps) using Direct3D 11 render-to-texture based borrowing from the functionality in the legacy Direct3D9 ID3DXRenderToEnvMap. helper.

The MVP version should take six images and produce a cubemap or a spherical environment via equirectangular projection.

walbourn commented 2 months ago

Here are a bunch of related links for research:

https://gamedev.stackexchange.com/questions/32415/how-do-i-convert-a-cube-map-to-an-equirectangular-projection

http://alexcpeterson.com/2015/08/25/converting-a-cube-map-to-a-sphericalequirectangular-map/

https://graphicsrunner.blogspot.com/2008/07/dual-paraboloid-reflections.html

https://cgvr.cs.uni-bremen.de/teaching/cg_literatur/Spherical,%20Cubic,%20and%20Parabolic%20Environment%20Mappings.pdf

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7339655/