From f2f83d90abd7daecb8bde594e935dfdad0487103 Mon Sep 17 00:00:00 2001 From: Dan Royer Date: Sat, 16 Dec 2023 21:15:44 -0800 Subject: [PATCH] added Mesh smoothing --- src/main/java/com/marginallyclever/ro3/Registry.java | 4 ++-- .../robotoverlord/systems/render/mesh/MeshSmoother.java | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/marginallyclever/ro3/Registry.java b/src/main/java/com/marginallyclever/ro3/Registry.java index 931296f25..b8fb0b251 100644 --- a/src/main/java/com/marginallyclever/ro3/Registry.java +++ b/src/main/java/com/marginallyclever/ro3/Registry.java @@ -6,7 +6,7 @@ import com.marginallyclever.ro3.render.RenderPass; import com.marginallyclever.ro3.render.renderpasses.DrawBackground; import com.marginallyclever.ro3.render.renderpasses.DrawMeshes; -import com.marginallyclever.ro3.render.renderpasses.DrawPose; +import com.marginallyclever.ro3.render.renderpasses.DrawPoses; import com.marginallyclever.ro3.texture.TextureFactory; /** @@ -34,6 +34,6 @@ public static void start() { renderPasses.add(new DrawBackground()); renderPasses.add(new DrawMeshes()); - renderPasses.add(new DrawPose()); + renderPasses.add(new DrawPoses()); } } diff --git a/src/main/java/com/marginallyclever/robotoverlord/systems/render/mesh/MeshSmoother.java b/src/main/java/com/marginallyclever/robotoverlord/systems/render/mesh/MeshSmoother.java index 690bc1a07..7036989ad 100644 --- a/src/main/java/com/marginallyclever/robotoverlord/systems/render/mesh/MeshSmoother.java +++ b/src/main/java/com/marginallyclever/robotoverlord/systems/render/mesh/MeshSmoother.java @@ -51,7 +51,7 @@ public static void smoothModel(String inName,String outName,float vertexEpsilon, * @param vertexEpsilon how close should points be to be considered one and the same. typically ~0.001 * @param normalEpsilon how close should normals be to be merged. 0...2 larger values more smoothing. */ - private static void smoothNormals(Mesh model,float vertexEpsilon,float normalEpsilon) { + public static void smoothNormals(Mesh model,float vertexEpsilon,float normalEpsilon) { float vertexEpsilonSquared = vertexEpsilon * vertexEpsilon; float normalEpsilonSquared = normalEpsilon * normalEpsilon; @@ -63,8 +63,7 @@ private static void smoothNormals(Mesh model,float vertexEpsilon,float normalEps for(i=0;i