This commit is contained in:
parent
28735cea4e
commit
a005e067fe
@ -3,6 +3,8 @@
|
|||||||
Automatically transition between instanced actors and non-instanced actors for non-animated models
|
Automatically transition between instanced actors and non-instanced actors for non-animated models
|
||||||
- Need to keep track of number of entities drawing a model, once that total passes a threshold convert them all to instanced actors
|
- Need to keep track of number of entities drawing a model, once that total passes a threshold convert them all to instanced actors
|
||||||
- name it something fun like "HybridActor" or "ShapeshiftActor"
|
- name it something fun like "HybridActor" or "ShapeshiftActor"
|
||||||
|
- Have a plane-based SUPER LOD version of models (like trees)
|
||||||
|
- Actor transitions to just plane when far enough away
|
||||||
|
|
||||||
Merge all kinematic bodies in a scene into one
|
Merge all kinematic bodies in a scene into one
|
||||||
- Need to keep track of individual entities' shapes after the merge
|
- Need to keep track of individual entities' shapes after the merge
|
||||||
|
|||||||
@ -1399,6 +1399,14 @@ Hills generator work
|
|||||||
Fix foliage manager and cells confusing worldpos and absolutevoxelpos
|
Fix foliage manager and cells confusing worldpos and absolutevoxelpos
|
||||||
Farther draw radius
|
Farther draw radius
|
||||||
|
|
||||||
|
(03/31/2025)
|
||||||
|
HillsGen visuals work
|
||||||
|
|
||||||
|
(04/01/2025)
|
||||||
|
Falling min frames to activate increased
|
||||||
|
Reorganizing world creation ui file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import electrosphere.auth.AuthenticationManager;
|
|||||||
import electrosphere.client.ui.components.CharacterCustomizer;
|
import electrosphere.client.ui.components.CharacterCustomizer;
|
||||||
import electrosphere.client.ui.components.InputMacros;
|
import electrosphere.client.ui.components.InputMacros;
|
||||||
import electrosphere.client.ui.menu.WindowUtils;
|
import electrosphere.client.ui.menu.WindowUtils;
|
||||||
|
import electrosphere.client.ui.menu.mainmenu.worldgen.MenuWorldSelect;
|
||||||
import electrosphere.engine.Globals;
|
import electrosphere.engine.Globals;
|
||||||
import electrosphere.engine.loadingthreads.LoadingThread;
|
import electrosphere.engine.loadingthreads.LoadingThread;
|
||||||
import electrosphere.engine.loadingthreads.LoadingThread.LoadingThreadType;
|
import electrosphere.engine.loadingthreads.LoadingThread.LoadingThreadType;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package electrosphere.client.ui.menu.mainmenu;
|
package electrosphere.client.ui.menu.mainmenu;
|
||||||
|
|
||||||
import electrosphere.client.ui.menu.WindowUtils;
|
import electrosphere.client.ui.menu.WindowUtils;
|
||||||
|
import electrosphere.client.ui.menu.mainmenu.worldgen.MenuWorldSelect;
|
||||||
import electrosphere.engine.Globals;
|
import electrosphere.engine.Globals;
|
||||||
import electrosphere.engine.assetmanager.AssetDataStrings;
|
import electrosphere.engine.assetmanager.AssetDataStrings;
|
||||||
import electrosphere.engine.loadingthreads.LoadingThread;
|
import electrosphere.engine.loadingthreads.LoadingThread;
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
package electrosphere.client.ui.menu.mainmenu;
|
package electrosphere.client.ui.menu.mainmenu.worldgen;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import electrosphere.auth.AuthenticationManager;
|
import electrosphere.auth.AuthenticationManager;
|
||||||
import electrosphere.client.ui.menu.WindowUtils;
|
import electrosphere.client.ui.menu.WindowUtils;
|
||||||
|
import electrosphere.client.ui.menu.mainmenu.MenuGeneratorsTitleMenu;
|
||||||
import electrosphere.engine.Globals;
|
import electrosphere.engine.Globals;
|
||||||
import electrosphere.engine.loadingthreads.LoadingThread;
|
import electrosphere.engine.loadingthreads.LoadingThread;
|
||||||
import electrosphere.engine.loadingthreads.LoadingThread.LoadingThreadType;
|
import electrosphere.engine.loadingthreads.LoadingThread.LoadingThreadType;
|
||||||
@ -44,7 +44,7 @@ public class ServerFallTree implements BehaviorTree {
|
|||||||
/**
|
/**
|
||||||
* The minimum frames to wait before playing landing animation on fall
|
* The minimum frames to wait before playing landing animation on fall
|
||||||
*/
|
*/
|
||||||
public static final int MIN_FRAMES_BEFORE_LANDING_ANIM = 3;
|
public static final int MIN_FRAMES_BEFORE_LANDING_ANIM = 10;
|
||||||
|
|
||||||
public ServerFallTree(Entity parent, FallMovementSystem fallMovementSystem){
|
public ServerFallTree(Entity parent, FallMovementSystem fallMovementSystem){
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
|
|||||||
@ -34,10 +34,14 @@ public class HillsGen implements HeightmapGenerator {
|
|||||||
{0.3, 1.0},
|
{0.3, 1.0},
|
||||||
};
|
};
|
||||||
|
|
||||||
//distance from origin to sample for gradient calculation
|
/**
|
||||||
|
* Distance from origin to sample for gradient calculation
|
||||||
|
*/
|
||||||
public static float GRADIENT_DIST = 0.01f;
|
public static float GRADIENT_DIST = 0.01f;
|
||||||
|
|
||||||
//param for controlling how pointer the initial layers are
|
/**
|
||||||
|
* Param for controlling how pointer the initial layers are
|
||||||
|
*/
|
||||||
public static float GRAD_INFLUENCE_DROPOFF = 0.35f;
|
public static float GRAD_INFLUENCE_DROPOFF = 0.35f;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,11 +79,13 @@ public class HillsGen implements HeightmapGenerator {
|
|||||||
|
|
||||||
float gradXAccum = 0;
|
float gradXAccum = 0;
|
||||||
float gradYAccum = 0;
|
float gradYAccum = 0;
|
||||||
|
float warpX = (float)OpenSimplex2S.noise3_ImproveXY(SEED, x, y, 0);
|
||||||
|
float warpY = (float)OpenSimplex2S.noise3_ImproveXY(SEED, x, y, 1);
|
||||||
for(int n = 0; n < GRAD_NOISE.length; n++){
|
for(int n = 0; n < GRAD_NOISE.length; n++){
|
||||||
//get noise samples
|
//get noise samples
|
||||||
float noiseOrigin = (float)(OpenSimplex2S.noise2_ImproveX(SEED, x * GRAD_NOISE[n][0], y * GRAD_NOISE[n][0]) * GRAD_NOISE[n][1]);
|
float noiseOrigin = (float)(OpenSimplex2S.noise2_ImproveX(SEED, (x + warpX) * GRAD_NOISE[n][0], (y + warpY) * GRAD_NOISE[n][0]) * GRAD_NOISE[n][1]);
|
||||||
float noiseX = (float)(OpenSimplex2S.noise2_ImproveX(SEED, x * GRAD_NOISE[n][0] + GRADIENT_DIST, y * GRAD_NOISE[n][0]) * GRAD_NOISE[n][1]);
|
float noiseX = (float)(OpenSimplex2S.noise2_ImproveX(SEED, (x + warpX) * GRAD_NOISE[n][0] + GRADIENT_DIST, (y + warpY) * GRAD_NOISE[n][0]) * GRAD_NOISE[n][1]);
|
||||||
float noiseY = (float)(OpenSimplex2S.noise2_ImproveX(SEED, x * GRAD_NOISE[n][0], y * GRAD_NOISE[n][0] + GRADIENT_DIST) * GRAD_NOISE[n][1]);
|
float noiseY = (float)(OpenSimplex2S.noise2_ImproveX(SEED, (x + warpX) * GRAD_NOISE[n][0], (y + warpY) * GRAD_NOISE[n][0] + GRADIENT_DIST) * GRAD_NOISE[n][1]);
|
||||||
//calculate gradient accumulation
|
//calculate gradient accumulation
|
||||||
float gradX = (noiseX - noiseOrigin) / GRADIENT_DIST;
|
float gradX = (noiseX - noiseOrigin) / GRADIENT_DIST;
|
||||||
float gradY = (noiseY - noiseOrigin) / GRADIENT_DIST;
|
float gradY = (noiseY - noiseOrigin) / GRADIENT_DIST;
|
||||||
@ -90,7 +96,8 @@ public class HillsGen implements HeightmapGenerator {
|
|||||||
float influence = 1.0f / (1.0f + gradientMagnitude * GRAD_INFLUENCE_DROPOFF);
|
float influence = 1.0f / (1.0f + gradientMagnitude * GRAD_INFLUENCE_DROPOFF);
|
||||||
|
|
||||||
//add to height
|
//add to height
|
||||||
rVal = rVal + (float)(OpenSimplex2S.noise2_ImproveX(SEED, x * GRAD_NOISE[n][0], y * GRAD_NOISE[n][0]) * GRAD_NOISE[n][1]) * influence;
|
float noiseValue = (float)(OpenSimplex2S.noise2_ImproveX(SEED, (x + warpX) * GRAD_NOISE[n][0], (y + warpY) * GRAD_NOISE[n][0]) * GRAD_NOISE[n][1]);
|
||||||
|
rVal = rVal + (noiseValue * noiseValue) * influence;
|
||||||
}
|
}
|
||||||
return rVal;
|
return rVal;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,7 +37,9 @@ public class MountainGen implements HeightmapGenerator {
|
|||||||
*/
|
*/
|
||||||
static final float GEN_SCALE = 1.0f / HORIZONTAL_SCALE;
|
static final float GEN_SCALE = 1.0f / HORIZONTAL_SCALE;
|
||||||
|
|
||||||
//the different scales of noise to sample from
|
/**
|
||||||
|
* The different scales of noise to sample from
|
||||||
|
*/
|
||||||
static final double[][] NOISE_SCALES = new double[][]{
|
static final double[][] NOISE_SCALES = new double[][]{
|
||||||
{0.01, 3.0},
|
{0.01, 3.0},
|
||||||
{0.02, 2.0},
|
{0.02, 2.0},
|
||||||
|
|||||||
@ -22,7 +22,9 @@ public class PlainsGen implements HeightmapGenerator {
|
|||||||
*/
|
*/
|
||||||
long seed = 0;
|
long seed = 0;
|
||||||
|
|
||||||
//the different scales of noise to sample from
|
/**
|
||||||
|
* The different scales of noise to sample from
|
||||||
|
*/
|
||||||
static final double[][] NOISE_SCALES = new double[][]{
|
static final double[][] NOISE_SCALES = new double[][]{
|
||||||
{0.01, 3.0},
|
{0.01, 3.0},
|
||||||
{0.02, 2.0},
|
{0.02, 2.0},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user