-
Posts
1,683 -
Joined
-
Last visited
Single Status Update
See all updates by The White Guardian
-
Heads-up for all planet makers following me: I have created a new PQSMod that will be released separately from my KLE project named MapArray.
MapArray allows you to compile three heightmaps into a single color image, one map per color channel.
The result is that you can greatly reduce memory usage and mod size.
Let's make an example. For Stock Planet Expansion I made a set of heightmaps, and noticed that each L8 DDS heightmap with a 1K resolution was 513 KB of data per map.
Then, after compiling them to work with MapArray, the resulting texture was only 474 KB!
After some testing, MapArray will be made publicly available. The source code will also be published (including my notes among the code) so that we can all learn from it.
-
As for how MapArray works: it's exactly the same as VertexHeightMap, but swap out 'VertexHeightMap' for 'MapArray' in your config.
Next, swap out 'map' for 'array' and link to your MapArray texture.Then, add another line of code reading 'channel = x', where x is either 0, 1 or 2. That depends on the color channel you want to take data from.
0 = Red, 1 = Green, 0 = Blue
-
@UranianBlue It would be exactly the same. Only 3 heightmaps are stored in the same space as one. However I imagine with the wrong format (I'm looking at .DDS files) heightmaps can be 'contaminated' across all channels.
So for 3 planets you can use the MapArray to target 1 file and separate the heightmaps based on their colour values.
-