Bug in der Camera behoben, was nahgelegene Objekte anbelangt, weitere Modelle hochgeladen

This commit is contained in:
2026-07-22 21:39:36 +02:00
parent 032345b2bc
commit 9ebde59d40
43 changed files with 309 additions and 16 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@@ -0,0 +1,28 @@
#Wed Jul 22 21:34:49 CEST 2026
attachedEmitters.count=0
attachedLights.count=0
castShadow=true
category=
cullDistance=120.0
footstepSurface=
interactableOffsetX=0.0
interactableOffsetY=0.5
interactableOffsetZ=0.0
interactableRotY=0.0
interactableType=NONE
lod1Distance=30.0
lod1Path=
lod2Distance=80.0
lod2Path=
name=ausdauertrank
pivotOffsetY=0.0
placementOffsetY=0.0
randomScaleMax=1.0
randomScaleMin=1.0
receiveShadow=true
scaleX=1.0
scaleY=1.0
scaleZ=1.0
solid=false
tags=
uniformScale=true

View File

@@ -0,0 +1,28 @@
#Wed Jul 22 21:34:54 CEST 2026
attachedEmitters.count=0
attachedLights.count=0
castShadow=true
category=
cullDistance=120.0
footstepSurface=
interactableOffsetX=0.0
interactableOffsetY=0.5
interactableOffsetZ=0.0
interactableRotY=0.0
interactableType=NONE
lod1Distance=30.0
lod1Path=
lod2Distance=80.0
lod2Path=
name=flasche
pivotOffsetY=0.0
placementOffsetY=0.0
randomScaleMax=1.0
randomScaleMin=1.0
receiveShadow=true
scaleX=1.0
scaleY=1.0
scaleZ=1.0
solid=false
tags=
uniformScale=true

View File

@@ -0,0 +1,28 @@
#Wed Jul 22 21:34:58 CEST 2026
attachedEmitters.count=0
attachedLights.count=0
castShadow=true
category=
cullDistance=120.0
footstepSurface=
interactableOffsetX=0.0
interactableOffsetY=0.5
interactableOffsetZ=0.0
interactableRotY=0.0
interactableType=NONE
lod1Distance=30.0
lod1Path=
lod2Distance=80.0
lod2Path=
name=heiltrank
pivotOffsetY=0.0
placementOffsetY=0.0
randomScaleMax=1.0
randomScaleMin=1.0
receiveShadow=true
scaleX=1.0
scaleY=1.0
scaleZ=1.0
solid=false
tags=
uniformScale=true

View File

@@ -0,0 +1,28 @@
#Wed Jul 22 21:35:03 CEST 2026
attachedEmitters.count=0
attachedLights.count=0
castShadow=true
category=
cullDistance=120.0
footstepSurface=
interactableOffsetX=0.0
interactableOffsetY=0.5
interactableOffsetZ=0.0
interactableRotY=0.0
interactableType=NONE
lod1Distance=30.0
lod1Path=
lod2Distance=80.0
lod2Path=
name=manatrank
pivotOffsetY=0.0
placementOffsetY=0.0
randomScaleMax=1.0
randomScaleMin=1.0
receiveShadow=true
scaleX=1.0
scaleY=1.0
scaleZ=1.0
solid=false
tags=
uniformScale=true

View File

@@ -0,0 +1,28 @@
#Wed Jul 22 21:35:07 CEST 2026
attachedEmitters.count=0
attachedLights.count=0
castShadow=true
category=
cullDistance=120.0
footstepSurface=
interactableOffsetX=0.0
interactableOffsetY=0.5
interactableOffsetZ=0.0
interactableRotY=0.0
interactableType=NONE
lod1Distance=30.0
lod1Path=
lod2Distance=80.0
lod2Path=
name=schwacherausdauertrank
pivotOffsetY=0.0
placementOffsetY=0.0
randomScaleMax=1.0
randomScaleMin=1.0
receiveShadow=true
scaleX=1.0
scaleY=1.0
scaleZ=1.0
solid=false
tags=
uniformScale=true

View File

@@ -0,0 +1,28 @@
#Wed Jul 22 21:35:11 CEST 2026
attachedEmitters.count=0
attachedLights.count=0
castShadow=true
category=
cullDistance=120.0
footstepSurface=
interactableOffsetX=0.0
interactableOffsetY=0.5
interactableOffsetZ=0.0
interactableRotY=0.0
interactableType=NONE
lod1Distance=30.0
lod1Path=
lod2Distance=80.0
lod2Path=
name=schwacherheiltrank
pivotOffsetY=0.0
placementOffsetY=0.0
randomScaleMax=1.0
randomScaleMin=1.0
receiveShadow=true
scaleX=1.0
scaleY=1.0
scaleZ=1.0
solid=false
tags=
uniformScale=true

View File

@@ -0,0 +1,28 @@
#Wed Jul 22 21:35:15 CEST 2026
attachedEmitters.count=0
attachedLights.count=0
castShadow=true
category=
cullDistance=120.0
footstepSurface=
interactableOffsetX=0.0
interactableOffsetY=0.5
interactableOffsetZ=0.0
interactableRotY=0.0
interactableType=NONE
lod1Distance=30.0
lod1Path=
lod2Distance=80.0
lod2Path=
name=schwachermanatrank
pivotOffsetY=0.0
placementOffsetY=0.0
randomScaleMax=1.0
randomScaleMin=1.0
receiveShadow=true
scaleX=1.0
scaleY=1.0
scaleZ=1.0
solid=false
tags=
uniformScale=true

View File

@@ -0,0 +1,28 @@
#Wed Jul 22 21:35:19 CEST 2026
attachedEmitters.count=0
attachedLights.count=0
castShadow=true
category=
cullDistance=120.0
footstepSurface=
interactableOffsetX=0.0
interactableOffsetY=0.5
interactableOffsetZ=0.0
interactableRotY=0.0
interactableType=NONE
lod1Distance=30.0
lod1Path=
lod2Distance=80.0
lod2Path=
name=starkerausdauertrank
pivotOffsetY=0.0
placementOffsetY=0.0
randomScaleMax=1.0
randomScaleMin=1.0
receiveShadow=true
scaleX=1.0
scaleY=1.0
scaleZ=1.0
solid=false
tags=
uniformScale=true

View File

@@ -0,0 +1,28 @@
#Wed Jul 22 21:35:23 CEST 2026
attachedEmitters.count=0
attachedLights.count=0
castShadow=true
category=
cullDistance=120.0
footstepSurface=
interactableOffsetX=0.0
interactableOffsetY=0.5
interactableOffsetZ=0.0
interactableRotY=0.0
interactableType=NONE
lod1Distance=30.0
lod1Path=
lod2Distance=80.0
lod2Path=
name=starkerheiltrank
pivotOffsetY=0.0
placementOffsetY=0.0
randomScaleMax=1.0
randomScaleMin=1.0
receiveShadow=true
scaleX=1.0
scaleY=1.0
scaleZ=1.0
solid=false
tags=
uniformScale=true

View File

@@ -0,0 +1,28 @@
#Wed Jul 22 21:35:26 CEST 2026
attachedEmitters.count=0
attachedLights.count=0
castShadow=true
category=
cullDistance=120.0
footstepSurface=
interactableOffsetX=0.0
interactableOffsetY=0.5
interactableOffsetZ=0.0
interactableRotY=0.0
interactableType=NONE
lod1Distance=30.0
lod1Path=
lod2Distance=80.0
lod2Path=
name=starkermanatrank
pivotOffsetY=0.0
placementOffsetY=0.0
randomScaleMax=1.0
randomScaleMin=1.0
receiveShadow=true
scaleX=1.0
scaleY=1.0
scaleZ=1.0
solid=false
tags=
uniformScale=true

View File

@@ -164,6 +164,7 @@ public class JmeEditorApp extends SimpleApplication {
@Override @Override
public void simpleInitApp() { public void simpleInitApp() {
flyCam.setEnabled(false); flyCam.setEnabled(false);
cam.setFrustumPerspective(45f, (float) vpWidth / vpHeight, 0.05f, 4000f);
input.loadingStatus = "Registriere Asset-Loader..."; input.loadingStatus = "Registriere Asset-Loader...";
assetManager.registerLoader(com.jme3.scene.plugins.gltf.GltfLoader.class, "gltf"); assetManager.registerLoader(com.jme3.scene.plugins.gltf.GltfLoader.class, "gltf");

View File

@@ -237,7 +237,9 @@ public class WorldScene extends BaseAppState {
com.jme3.asset.plugins.FileLocator.class); com.jme3.asset.plugins.FileLocator.class);
} catch (Exception ignored) {} } catch (Exception ignored) {}
app.getCamera().setFrustumFar(4000f); app.getCamera().setFrustumPerspective(45f,
(float) app.getCamera().getWidth() / app.getCamera().getHeight(),
0.05f, 4000f);
BlightGame.status("Baue Beleuchtung und Himmel..."); BlightGame.status("Baue Beleuchtung und Himmel...");
buildLighting(); buildLighting();

View File

@@ -271,9 +271,13 @@ public class WorldObjectsState extends BaseAppState {
initImpostor(lod2Node); initImpostor(lod2Node);
} }
} }
// ModelLodControl nur wenn tatsächliche LOD-Varianten vorhanden — sonst
// würde das Objekt ab lod1Distance komplett ausgeblendet (targetSlot=-1).
if (lod1 != null || lod2 != null) {
treeNode.addControl(new ModelLodControl( treeNode.addControl(new ModelLodControl(
app.getCamera(), lod0, lod1, lod2, app.getCamera(), lod0, lod1, lod2,
m.lod1Distance() * lodFactor, m.lod2Distance() * lodFactor)); m.lod1Distance() * lodFactor, m.lod2Distance() * lodFactor));
}
return treeNode; return treeNode;
} }
@@ -321,11 +325,16 @@ public class WorldObjectsState extends BaseAppState {
} }
// Fallback: externe LOD-Dateien (lod1Path / lod2Path) // Fallback: externe LOD-Dateien (lod1Path / lod2Path)
// Nur wenn mindestens eine Datei tatsächlich angegeben ist — ohne Dateien würde
// ModelLodControl das Objekt ab lod1Distance komplett ausblenden (targetSlot=-1).
String lp1 = m.lod1Path() != null && !m.lod1Path().isBlank() ? m.lod1Path() : null;
String lp2 = m.lod2Path() != null && !m.lod2Path().isBlank() ? m.lod2Path() : null;
if (lp1 != null || lp2 != null) {
Node lodRoot = new Node("lodRoot_" + path); Node lodRoot = new Node("lodRoot_" + path);
lodRoot.attachChild(spatial); lodRoot.attachChild(spatial);
ModelLodControl ctrl = new ModelLodControl( ModelLodControl ctrl = new ModelLodControl(
assets, app.getCamera(), assets, app.getCamera(),
m.lod1Path(), m.lod2Path(), lp1, lp2,
m.lod1Distance() * lodFactor, m.lod2Distance() * lodFactor); m.lod1Distance() * lodFactor, m.lod2Distance() * lodFactor);
ctrl.setLodLoadCallback(lod -> { ctrl.setLodLoadCallback(lod -> {
convertUnshadedToPbr(lod); convertUnshadedToPbr(lod);
@@ -334,6 +343,7 @@ public class WorldObjectsState extends BaseAppState {
lodRoot.addControl(ctrl); lodRoot.addControl(ctrl);
return lodRoot; return lodRoot;
} }
}
return spatial; return spatial;
} }