Test with new technique texturing
This commit is contained in:
parent
bb723036c0
commit
3a7d169b30
8 changed files with 125 additions and 61 deletions
|
|
@ -5,6 +5,7 @@ using System.Numerics;
|
|||
|
||||
namespace LandblockExtraction.AtlasMaker;
|
||||
public class TerrainAtlasManager {
|
||||
private readonly string PATHTERRAINIMG = @".\terrains";
|
||||
private PortalEngine portalEngine;
|
||||
|
||||
public Dictionary<int, Vector2> textureCoord;
|
||||
|
|
@ -51,6 +52,17 @@ public class TerrainAtlasManager {
|
|||
}
|
||||
}
|
||||
}
|
||||
public void SaveAllTerrain() {
|
||||
if (!Directory.Exists(PATHTERRAINIMG)) {
|
||||
Directory.CreateDirectory(PATHTERRAINIMG);
|
||||
}
|
||||
|
||||
foreach(var img in terrainTexture) {
|
||||
var path = Path.Combine(PATHTERRAINIMG, img.Key.ToString());
|
||||
|
||||
img.Value.Write(path + ".jpg");
|
||||
}
|
||||
}
|
||||
private int? GetIndexBySurface(uint surfaceIndex) {
|
||||
foreach(var terrain in portalEngine.cTerrainDesc.terrains) {
|
||||
if (terrain.surfaceInfo == surfaceIndex)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue