content work
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2025-04-29 18:12:20 -04:00
parent 388f622c9b
commit 32d9725f1e
13 changed files with 341 additions and 4 deletions

View File

@ -5,6 +5,7 @@
"Data/entity/foliage/grass.json",
"Data/entity/foliage/trees.json",
"Data/entity/foliage/bushes.json",
"Data/entity/foliage/rocks.json"
"Data/entity/foliage/rocks.json",
"Data/entity/foliage/flowers.json"
]
}

View File

@ -0,0 +1,28 @@
{
"foliageList" : [
{
"id" : "flower1",
"tokens" : [
"FLAMMABLE"
],
"hitboxes" : [
{
"type": "hurt",
"offset": [0, 0.6, 0],
"radius": 0.35
}
],
"healthSystem" : {
"maxHealth" : 5,
"onDamageIFrames" : 0
},
"graphicsTemplate": {
"model": {
"path" : "Models/foliage/flowers/Flower_3_Group.gltf"
}
}
}
],
"files" : [
]
}

View File

@ -7,6 +7,11 @@
"x" : 100,
"y" : 100,
"z" : 100
},
"placementOffset" : {
"x" : 0,
"y" : -1,
"z" : 0
}
}
],

Binary file not shown.

View File

@ -0,0 +1,254 @@
{
"asset":{
"generator":"Khronos glTF Blender I/O v4.0.44",
"version":"2.0"
},
"scene":0,
"scenes":[
{
"name":"Scene",
"nodes":[
0
]
}
],
"nodes":[
{
"mesh":0,
"name":"Flower_3_Group"
}
],
"materials":[
{
"alphaCutoff":0.20000000298023224,
"alphaMode":"MASK",
"doubleSided":true,
"name":"Leaves",
"pbrMetallicRoughness":{
"baseColorTexture":{
"index":0
},
"metallicFactor":0
}
},
{
"alphaCutoff":0.20000000298023224,
"alphaMode":"MASK",
"doubleSided":true,
"name":"Flowers",
"pbrMetallicRoughness":{
"baseColorTexture":{
"index":1
},
"metallicFactor":0
}
}
],
"meshes":[
{
"name":"Plane.021",
"primitives":[
{
"attributes":{
"COLOR_0":0,
"POSITION":1,
"NORMAL":2,
"TEXCOORD_0":3
},
"indices":4,
"material":0
},
{
"attributes":{
"COLOR_0":5,
"POSITION":6,
"NORMAL":7,
"TEXCOORD_0":8
},
"indices":9,
"material":1
}
]
}
],
"textures":[
{
"sampler":0,
"source":0
},
{
"sampler":0,
"source":1
}
],
"images":[
{
"mimeType":"image/png",
"name":"Leaves",
"uri":"Leaves.png"
},
{
"mimeType":"image/png",
"name":"Flowers",
"uri":"Flowers.png"
}
],
"accessors":[
{
"bufferView":0,
"componentType":5123,
"count":533,
"normalized":true,
"type":"VEC4"
},
{
"bufferView":1,
"componentType":5126,
"count":533,
"max":[
0.7883017063140869,
1.7742599248886108,
0.7045559287071228
],
"min":[
-0.568230926990509,
-0.03458359092473984,
-0.5427353382110596
],
"type":"VEC3"
},
{
"bufferView":2,
"componentType":5126,
"count":533,
"type":"VEC3"
},
{
"bufferView":3,
"componentType":5126,
"count":533,
"type":"VEC2"
},
{
"bufferView":4,
"componentType":5123,
"count":2130,
"type":"SCALAR"
},
{
"bufferView":5,
"componentType":5123,
"count":48,
"normalized":true,
"type":"VEC4"
},
{
"bufferView":6,
"componentType":5126,
"count":48,
"max":[
0.8748752474784851,
2.020251512527466,
0.789365291595459
],
"min":[
-0.6136013269424438,
1.4516462087631226,
-0.8017617464065552
],
"type":"VEC3"
},
{
"bufferView":7,
"componentType":5126,
"count":48,
"type":"VEC3"
},
{
"bufferView":8,
"componentType":5126,
"count":48,
"type":"VEC2"
},
{
"bufferView":9,
"componentType":5123,
"count":135,
"type":"SCALAR"
}
],
"bufferViews":[
{
"buffer":0,
"byteLength":4264,
"byteOffset":0,
"target":34962
},
{
"buffer":0,
"byteLength":6396,
"byteOffset":4264,
"target":34962
},
{
"buffer":0,
"byteLength":6396,
"byteOffset":10660,
"target":34962
},
{
"buffer":0,
"byteLength":4264,
"byteOffset":17056,
"target":34962
},
{
"buffer":0,
"byteLength":4260,
"byteOffset":21320,
"target":34963
},
{
"buffer":0,
"byteLength":384,
"byteOffset":25580,
"target":34962
},
{
"buffer":0,
"byteLength":576,
"byteOffset":25964,
"target":34962
},
{
"buffer":0,
"byteLength":576,
"byteOffset":26540,
"target":34962
},
{
"buffer":0,
"byteLength":384,
"byteOffset":27116,
"target":34962
},
{
"buffer":0,
"byteLength":270,
"byteOffset":27500,
"target":34963
}
],
"samplers":[
{
"magFilter":9729,
"minFilter":9987
}
],
"buffers":[
{
"byteLength":27772,
"uri":"Flower_3_Group.bin"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

View File

@ -8,8 +8,11 @@
+ feedback driven requirements
Spawn a town in macro data
- Place a building
- Elevation calls give you the ACTUAL elevation
- Ability to modify elevation data to facilitate structure placement
Improve voxel editing tools
- Fix cursor alignment for fabs
- Fix weirdness with placing fabs near edges of previous voxels
- Fix cursor alignment generally
Crouching
Model clothing, hair for the human
particles, light on sword collision

View File

@ -1597,6 +1597,8 @@ Fix server loading full res chunks from disk as strided chunks
Debugging tooling for foliage manager
Refactor ProceduralChunkGenerator
NoiseVoxelGen work to make elevation values align with voxel values that are generated
Non-procedural voxel generation fix
Flower foliage item

View File

@ -162,7 +162,7 @@ public class CommonEntityUtils {
if(graphicsTemplate.getModel() != null && graphicsTemplate.getModel().getPath() != null && EntityUtils.getActor(entity) == null && generateDrawable == true){
EntityCreationUtils.makeEntityDrawable(entity, graphicsTemplate.getModel().getPath());
}
//idle tree & generic stuff all creatures have
//idle tree & generic stuff all entities have
if(graphicsTemplate.getModel() != null && graphicsTemplate.getModel().getIdleData() != null){
ClientIdleTree.attachTree(entity, graphicsTemplate.getModel().getIdleData());
}

View File

@ -22,6 +22,11 @@ public class StructureData {
*/
Vector3d dimensions;
/**
* Offset when placing the structure (ie to place a foundation underneath the terrain)
*/
Vector3d placementOffset;
/**
* Sets the id of the structure
* @return The id
@ -62,6 +67,21 @@ public class StructureData {
this.dimensions = dimensions;
}
/**
* Gets the placement offset
* @return The placemeng offset
*/
public Vector3d getPlacementOffset() {
return placementOffset;
}
/**
* Sets the placement offset
* @param placementOffset The placement offset
*/
public void setPlacementOffset(Vector3d placementOffset) {
this.placementOffset = placementOffset;
}
}

View File

@ -97,6 +97,11 @@ public class Actor {
* Stores the rotations of bones as they are updated
*/
Map<String,Quaterniond> boneRotationMap = new HashMap<String,Quaterniond>();
/**
* Sets scaling applied at the actor level
*/
float scale = 1.0f;
/**
* Creates an achor
@ -754,5 +759,20 @@ public class Actor {
return check;
}
/**
* Gets the scaling applied by the actor
* @return The scaling
*/
public float getScale() {
return scale;
}
/**
* Sets the scaling applied by the actor
* @param scale The scaling
*/
public void setScale(float scale) {
this.scale = scale;
}
}

View File

@ -159,6 +159,10 @@ public class ServerBlockChunkGenerationThread implements Runnable {
* @param worldZ The world z coordinate
*/
protected static void generate(BlockChunkData chunk, MacroData macroData, int worldX, int worldY, int worldZ){
if(macroData == null){
chunk.setHomogenousValue(0);
return;
}
//check if this chunk intersects any macro data
AABBd localAABB = new AABBd(ServerWorldData.convertChunkToRealSpace(worldX,worldY,worldZ),ServerWorldData.convertChunkToRealSpace(worldX+1,worldY+1,worldZ+1));
List<Structure> filtered = macroData.getStructures().stream().filter((Structure struct) -> {return struct.getAABB().testAABB(localAABB);}).collect(Collectors.toList());