debug rendering paths
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
0cbec44ab5
commit
661300297c
@ -2102,7 +2102,6 @@ ServerGroundMovementTree supports collidable entities
|
|||||||
ServerGroundMovementTree geom work
|
ServerGroundMovementTree geom work
|
||||||
ServerLODComponent replaces bodies with geometries instead of just destroying the geometries
|
ServerLODComponent replaces bodies with geometries instead of just destroying the geometries
|
||||||
|
|
||||||
|
|
||||||
(06/01/2025 - 06/04/2025)
|
(06/01/2025 - 06/04/2025)
|
||||||
Fix rebase world origin routine
|
Fix rebase world origin routine
|
||||||
Non-rigid-body collidables behave as expected
|
Non-rigid-body collidables behave as expected
|
||||||
@ -2112,6 +2111,8 @@ Fix physics performance issues
|
|||||||
ServerGroundMovementTree actually moves collidable-based entities
|
ServerGroundMovementTree actually moves collidable-based entities
|
||||||
Client uses non-rigid-body collidables for farther away entities (via client LOD tree)
|
Client uses non-rigid-body collidables for farther away entities (via client LOD tree)
|
||||||
Reorder main content draw calls to support non-OIT transparencies better
|
Reorder main content draw calls to support non-OIT transparencies better
|
||||||
|
Content debug supports rendering paths
|
||||||
|
Rendering ai pathfinding paths
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,7 @@ import electrosphere.renderer.actor.mask.ActorTextureMask;
|
|||||||
import electrosphere.renderer.ui.imgui.ImGuiWindow;
|
import electrosphere.renderer.ui.imgui.ImGuiWindow;
|
||||||
import electrosphere.renderer.ui.imgui.ImGuiWindow.ImGuiWindowCallback;
|
import electrosphere.renderer.ui.imgui.ImGuiWindow.ImGuiWindowCallback;
|
||||||
import electrosphere.server.ai.AI;
|
import electrosphere.server.ai.AI;
|
||||||
|
import electrosphere.server.ai.blackboard.Blackboard;
|
||||||
import electrosphere.server.ai.nodes.plan.PathfindingNode;
|
import electrosphere.server.ai.nodes.plan.PathfindingNode;
|
||||||
import electrosphere.server.datacell.Realm;
|
import electrosphere.server.datacell.Realm;
|
||||||
import electrosphere.server.datacell.gridded.GriddedDataCellManager;
|
import electrosphere.server.datacell.gridded.GriddedDataCellManager;
|
||||||
@ -28,6 +29,7 @@ import electrosphere.server.macro.character.Character;
|
|||||||
import electrosphere.server.macro.character.CharacterUtils;
|
import electrosphere.server.macro.character.CharacterUtils;
|
||||||
import electrosphere.server.macro.character.goal.CharacterGoal;
|
import electrosphere.server.macro.character.goal.CharacterGoal;
|
||||||
import electrosphere.server.macro.character.goal.CharacterGoal.CharacterGoalType;
|
import electrosphere.server.macro.character.goal.CharacterGoal.CharacterGoalType;
|
||||||
|
import electrosphere.server.pathfinding.recast.PathingProgressiveData;
|
||||||
import electrosphere.server.pathfinding.voxel.VoxelPathfinder;
|
import electrosphere.server.pathfinding.voxel.VoxelPathfinder;
|
||||||
import electrosphere.server.pathfinding.voxel.VoxelPathfinder.PathfinderNode;
|
import electrosphere.server.pathfinding.voxel.VoxelPathfinder.PathfinderNode;
|
||||||
import imgui.ImGui;
|
import imgui.ImGui;
|
||||||
@ -80,7 +82,12 @@ public class ImGuiAI {
|
|||||||
ImGui.indent();
|
ImGui.indent();
|
||||||
if(ImGui.collapsingHeader(ai.getParent().getId() + " - " + ai.getStatus())){
|
if(ImGui.collapsingHeader(ai.getParent().getId() + " - " + ai.getStatus())){
|
||||||
if(ImGui.button("Draw current pathing")){
|
if(ImGui.button("Draw current pathing")){
|
||||||
throw new Error("Unsupported currently!");
|
Blackboard blackboard = ai.getBlackboard();
|
||||||
|
PathingProgressiveData pathData = PathfindingNode.getPathfindingData(blackboard);
|
||||||
|
if(pathData != null){
|
||||||
|
List<Vector3d> points = pathData.getPoints();
|
||||||
|
Globals.renderingEngine.getDebugContentPipeline().setPathPoints(points);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(ImGui.button("Send off map")){
|
if(ImGui.button("Send off map")){
|
||||||
Entity entity = ai.getParent();
|
Entity entity = ai.getParent();
|
||||||
|
|||||||
@ -354,7 +354,7 @@ public class Actor {
|
|||||||
* @param frustumCull Controls whether the frustum cull should actually be executed or not
|
* @param frustumCull Controls whether the frustum cull should actually be executed or not
|
||||||
* @return true if it is within the box, false otherwise
|
* @return true if it is within the box, false otherwise
|
||||||
*/
|
*/
|
||||||
static boolean isWithinFrustumBox(RenderPipelineState renderPipelineState, Model model, boolean frustumCull){
|
private static boolean isWithinFrustumBox(RenderPipelineState renderPipelineState, Model model, boolean frustumCull){
|
||||||
if(!frustumCull){
|
if(!frustumCull){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -375,7 +375,7 @@ public class Actor {
|
|||||||
* @param frustumCull Controls whether the frustum cull should actually be executed or not
|
* @param frustumCull Controls whether the frustum cull should actually be executed or not
|
||||||
* @return true if it is within the box, false otherwise
|
* @return true if it is within the box, false otherwise
|
||||||
*/
|
*/
|
||||||
static boolean isWithinFrustumBox(RenderPipelineState renderPipelineState, Model model, Vector3d position, boolean frustumCull){
|
private static boolean isWithinFrustumBox(RenderPipelineState renderPipelineState, Model model, Vector3d position, boolean frustumCull){
|
||||||
if(!frustumCull){
|
if(!frustumCull){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,6 +74,11 @@ public class DebugContentPipeline implements RenderPipeline {
|
|||||||
*/
|
*/
|
||||||
private List<Entity> macroNavEntities = new LinkedList<Entity>();
|
private List<Entity> macroNavEntities = new LinkedList<Entity>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The set of points to visualize a path along
|
||||||
|
*/
|
||||||
|
private List<Vector3d> pathPoints = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render(OpenGLState openGLState, RenderPipelineState renderPipelineState) {
|
public void render(OpenGLState openGLState, RenderPipelineState renderPipelineState) {
|
||||||
Globals.profiler.beginCpuSample("DebugContentPipeline.render");
|
Globals.profiler.beginCpuSample("DebugContentPipeline.render");
|
||||||
@ -298,6 +303,14 @@ public class DebugContentPipeline implements RenderPipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
//Path points rendering
|
||||||
|
if(this.pathPoints != null && pathPoints.size() > 1){
|
||||||
|
for(int i = 0; i < pathPoints.size() - 1; i++){
|
||||||
|
DebugContentPipeline.renderTube(openGLState, renderPipelineState, modelTransformMatrix, pathPoints.get(i), pathPoints.get(i+1), 1, AssetDataStrings.TEXTURE_RED_TRANSPARENT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
//Draw cell colliders data
|
//Draw cell colliders data
|
||||||
if(Globals.gameConfigCurrent.getSettings().getGraphicsDebugDrawClientCellColliders()){
|
if(Globals.gameConfigCurrent.getSettings().getGraphicsDebugDrawClientCellColliders()){
|
||||||
@ -617,6 +630,14 @@ public class DebugContentPipeline implements RenderPipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the path points to render
|
||||||
|
* @param pathPoints The set of points to render a path along
|
||||||
|
*/
|
||||||
|
public void setPathPoints(List<Vector3d> pathPoints){
|
||||||
|
this.pathPoints = pathPoints;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the bone debugging pipeline
|
* Gets the bone debugging pipeline
|
||||||
* @return The bone debugging pipeline
|
* @return The bone debugging pipeline
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user