ShinyHobo / BG3-Modders-Multitool

Utility for quickly generating Baldur's Gate 3 mod packs from an unpacked workspace (among other things). This project is not open source; read the license.
Other
294 stars 38 forks source link

Enhance Atlas Converter Utility #218

Open ShinyHobo opened 1 year ago

ShinyHobo commented 1 year ago
Padme4000 commented 10 months ago

okay now I've made 3 custom atlases. this helped a ton, this is what I found:

edit: for clarity this is the size of the atlas

            <node id="TextureAtlasIconSize">
                <attribute id="Height" type="int32" value="150"/>
                <attribute id="Width" type="int32" value="150"/>

            <node id="TextureAtlasTextureSize">
                <attribute id="Height" type="int32" value="2048"/>
                <attribute id="Width" type="int32" value="2048"/>

like the example in the spreadsheet so 13 icons across.

for top left icon it was correct as:

                <attribute id="U1" type="float" value="0.0"/>     
                <attribute id="U2" type="float" value="0.0732421875"/>       
                <attribute id="V1" type="float" value="0.0"/>    
                <attribute id="V2" type="float" value="0.0732421875"/>

for second icon on top row

                <attribute id="U1" type="float" value="0.0732421875"/>        
                <attribute id="U2" type="float" value="0.146484375"/>    
                <attribute id="V1" type="float" value="0.0"/>    
                <attribute id="V2" type="float" value="0.0732421875"/>    

V1 and V2 should always remain the same for its row. But U1 and U2 should always increase by the first value you have in U2. So each move to the right adds 0.0732421875 to U1 and U2.

Still need to test for row two you but going by this I think it would add 0.0732421875 to V1 and V2 and then follow same pattern as Row 1 for U1 and U2

Padme4000 commented 5 months ago

because I forgot to add my findings for Row 2:

For doing down a row 0.0732421875 was added to V1 + V2

Row 2 Image 1

                <attribute id="U1" type="float" value="0.0"/>     
                <attribute id="U2" type="float" value="0.0732421875"/>       
                <attribute id="V1" type="float" value="0.0732421875"/>       
                <attribute id="V2" type="float" value="0.146484375"/>

Row 2 Image 2 and once a new row repeats the each move to the right adds 0.0732421875 to U1 and U2

                <attribute id="U1" type="float" value="0.0732421875"/>        
                <attribute id="U2" type="float" value="0.146484375"/>    
                <attribute id="V1" type="float" value="0.0732421875"/>       
                <attribute id="V2" type="float" value="0.146484375"/>