non-Lsystem pine tree
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2024-10-16 15:57:32 -04:00
parent 11fdc690da
commit 6409d752de
7 changed files with 37 additions and 2 deletions

View File

@ -160,6 +160,18 @@
}
}
}
},
{
"id" : "pine2",
"tokens" : [
"TREE",
"FLAMMABLE"
],
"graphicsTemplate": {
"model": {
"path" : "Models/foliage/tree4.glb"
}
}
}
]

View File

@ -0,0 +1,16 @@
{
"textureMap": {
"Models/foliage/tree4.glb": [
{
"meshName" : "trunk",
"diffuse" : "/Textures/Bark_NormalTree.png",
"isDefault" : true
},
{
"meshName" : "leaves",
"diffuse" : "/Textures/Leaf_Pine_C.png",
"isDefault" : false
}
]
}
}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

View File

@ -867,6 +867,7 @@ Work on separating procedural tree generation steps
(10/16/2024)
Camera offset definitions in entity files
Non-Lsystem pine tree
# TODO

View File

@ -35,7 +35,10 @@ public class FoliageUtils {
public static Entity clientSpawnBasicFoliage(String type, long seed){
FoliageType rawType = Globals.gameConfigCurrent.getFoliageMap().getFoliage(type);
Entity rVal;
if(rawType.getGraphicsTemplate().getProceduralModel().getTreeModel()!=null){
if(
rawType.getGraphicsTemplate().getProceduralModel() != null &&
rawType.getGraphicsTemplate().getProceduralModel().getTreeModel()!=null
){
rVal = ProceduralTree.clientGenerateProceduralTree(type, 0);
} else {
rVal = EntityCreationUtils.createClientSpatialEntity();
@ -77,7 +80,10 @@ public class FoliageUtils {
public static Entity serverSpawnTreeFoliage(Realm realm, Vector3d position, String type, long seed){
FoliageType rawType = Globals.gameConfigCurrent.getFoliageMap().getFoliage(type);
Entity rVal;
if(rawType.getGraphicsTemplate().getProceduralModel().getTreeModel()!=null){
if(
rawType.getGraphicsTemplate().getProceduralModel() != null &&
rawType.getGraphicsTemplate().getProceduralModel().getTreeModel()!=null
){
rVal = ProceduralTree.serverGenerateProceduralTree(realm, position, rawType, seed);
} else {
rVal = EntityCreationUtils.createServerEntity(realm, position);