Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public void simpleInitApp() {
}

private void buildPlayer() {
spaceCraft = assetManager.loadModel("Models/HoverTank/Tank2.mesh.xml");
spaceCraft = assetManager.loadModel("Models/HoverTank/Tank2.gltf");
CollisionShape colShape = CollisionShapeFactory.createDynamicMeshShape(spaceCraft);
spaceCraft.setShadowMode(ShadowMode.CastAndReceive);
spaceCraft.setLocalTranslation(startLocation);
Expand All @@ -164,7 +164,7 @@ public void makeMissile() {
Quaternion rot = spaceCraft.getWorldRotation();
Vector3f dir = rot.getRotationColumn(2);

Spatial missile = assetManager.loadModel("Models/SpaceCraft/Rocket.mesh.xml");
Spatial missile = assetManager.loadModel("Models/SpaceCraft/Rocket.gltf");
missile.scale(0.5f);
missile.rotate(0, FastMath.PI, 0);
missile.updateGeometricState();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void simpleInitApp() {
stateManager.attach(bulletAppState);
initCrossHair();

Spatial s = assetManager.loadModel("Models/Elephant/Elephant.mesh.xml");
Spatial s = assetManager.loadModel("Models/Elephant/Elephant.gltf");
s.setLocalScale(0.1f);

CollisionShape collisionShape = CollisionShapeFactory.createMeshShape(s);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,19 +262,19 @@ private void dropTest2(Vector3f offset) {
}

private void dropPot(Vector3f offset) {
drop(offset.add(-12, 7, 15), "Models/Teapot/Teapot.mesh.xml", 1.0f, 2);
drop(offset.add(-12, 7, 15), "Models/Teapot/Teapot.gltf", 1.0f, 2);
}

private void dropSword(Vector3f offset) {
drop(offset.add(-10, 5, 3), "Models/Sinbad/Sword.mesh.xml", 1.0f, 2);
drop(offset.add(-10, 5, 3), "Models/Sinbad/Sword.gltf", 1.0f, 2);
}

private void dropSign(Vector3f offset) {
drop(offset.add(9, 15, 5), "Models/Sign Post/Sign Post.mesh.xml", 1.0f, 1);
drop(offset.add(9, 15, 5), "Models/Sign Post/Sign Post.gltf", 1.0f, 1);
}

private void dropRocket(Vector3f offset) {
RigidBodyControl c = drop(offset.add(26, 4, 7), "Models/SpaceCraft/Rocket.mesh.xml", 4.0f, 3);
RigidBodyControl c = drop(offset.add(26, 4, 7), "Models/SpaceCraft/Rocket.gltf", 4.0f, 3);
c.setAngularDamping(0.5f);
c.setLinearDamping(0.5f);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void simpleInitApp() {
q.updateBound();
// Geometry teapot = new Geometry("MyGeom", q);

teapot = assetManager.loadModel("Models/Teapot/Teapot.mesh.xml");
teapot = assetManager.loadModel("Models/Teapot/Teapot.gltf");
// teapot.scale(2f, 2f, 2f);
// teapot.move(2f, 2f, -.5f);
teapot.rotate(FastMath.HALF_PI, FastMath.HALF_PI, FastMath.HALF_PI);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public void setupRobotGuy(){
}

public void setupSignpost(){
Spatial signpost = assetManager.loadModel("Models/Sign Post/Sign Post.mesh.xml");
Spatial signpost = assetManager.loadModel("Models/Sign Post/Sign Post.gltf");
Material mat = assetManager.loadMaterial("Models/Sign Post/Sign Post.j3m");
signpost.setMaterial(mat);
signpost.rotate(0, FastMath.HALF_PI, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static void main(String[] args){
@Override
public void simpleInitApp() {
AssetLinkNode loaderNode=new AssetLinkNode();
loaderNode.addLinkedChild(new ModelKey("Models/MonkeyHead/MonkeyHead.mesh.xml"));
loaderNode.addLinkedChild(new ModelKey("Models/MonkeyHead/MonkeyHead.gltf"));
//load/attach the children (happens automatically on load)
// loaderNode.attachLinkedChildren(assetManager);
// rootNode.attachChild(loaderNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ public void simpleInitApp() {
helloText.setLocalTranslation(300, helloText.getLineHeight(), 0);
guiNode.attachChild(helloText);

/* Load a Ninja model (OgreXML + material + texture from test_data) */
Spatial ninja = assetManager.loadModel("Models/Ninja/Ninja.mesh.xml");
/* Load a Ninja model (glTF format from test_data) */
Spatial ninja = assetManager.loadModel("Models/Ninja/Ninja.gltf");
Comment thread
NwosuTy marked this conversation as resolved.
ninja.scale(0.05f, 0.05f, 0.05f);
ninja.rotate(0.0f, -3.0f, 0.0f);
ninja.setLocalTranslation(0.0f, -5.0f, -2.0f);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public void setupFloor(){


public void setupSignpost(){
Spatial signpost = assetManager.loadModel("Models/Sign Post/Sign Post.mesh.xml");
Spatial signpost = assetManager.loadModel("Models/Sign Post/Sign Post.gltf");
Material mat = assetManager.loadMaterial("Models/Sign Post/Sign Post.j3m");
// mat.setBoolean("VertexLighting", true);
signpost.setMaterial(mat);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public void setupFloor() {
}

public void setupSignpost() {
Spatial signpost = assetManager.loadModel("Models/Sign Post/Sign Post.mesh.xml");
Spatial signpost = assetManager.loadModel("Models/Sign Post/Sign Post.gltf");
Material mat = assetManager.loadMaterial("Models/Sign Post/Sign Post.j3m");
// mat.setBoolean("VertexLighting", true);
signpost.setMaterial(mat);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static void main(String[] args){

@Override
public void simpleInitApp() {
Spatial signpost = assetManager.loadAsset(new OgreMeshKey("Models/Sign Post/Sign Post.mesh.xml"));
Spatial signpost = assetManager.loadModel("Models/Sign Post/Sign Post.gltf");
signpost.setMaterial(assetManager.loadMaterial("Models/Sign Post/Sign Post.j3m"));
MikktspaceTangentGenerator.generate(signpost);
rootNode.attachChild(signpost);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void setupFloor() {
}

public void setupSignpost() {
Spatial signpost = assetManager.loadModel("Models/Sign Post/Sign Post.mesh.xml");
Spatial signpost = assetManager.loadModel("Models/Sign Post/Sign Post.gltf");
Material matSp = assetManager.loadMaterial("Models/Sign Post/Sign Post.j3m");
MikktspaceTangentGenerator.generate(signpost);
signpost.setMaterial(matSp);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void setupFloor() {
}

public void setupSignpost() {
Spatial signpost = assetManager.loadModel("Models/Sign Post/Sign Post.mesh.xml");
Spatial signpost = assetManager.loadModel("Models/Sign Post/Sign Post.gltf");
Material mat = assetManager.loadMaterial("Models/Sign Post/Sign Post.j3m");
MikktspaceTangentGenerator.generate(signpost);
signpost.setMaterial(mat);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static void main(String[] args) {

@Override
public void simpleInitApp() {
Node tank = (Node) assetManager.loadModel("Models/HoverTank/Tank2.mesh.xml");
Node tank = (Node) assetManager.loadModel("Models/HoverTank/Tank2.gltf");
Comment thread
NwosuTy marked this conversation as resolved.

flyCam.setEnabled(false);
ChaseCamera chaseCam = new ChaseCamera(cam, tank, inputManager);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static void main(String[] args){
public void simpleInitApp() {
viewPort.setBackgroundColor(ColorRGBA.DarkGray);

Spatial bumpy = assetManager.loadModel("Models/MonkeyHead/MonkeyHead.mesh.xml");
Spatial bumpy = assetManager.loadModel("Models/MonkeyHead/MonkeyHead.gltf");
rootNode.attachChild(bumpy);

lightMdl = new Geometry("Light", new Sphere(10, 10, 0.1f));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void setupLighting(){
}

public void setupModel(){
Spatial model = assetManager.loadModel("Models/MonkeyHead/MonkeyHead.mesh.xml");
Spatial model = assetManager.loadModel("Models/MonkeyHead/MonkeyHead.gltf");
makeToonish(model);
model.rotate(0, FastMath.PI, 0);
// signpost.setLocalTranslation(12, 3.5f, 30);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private void setupLighting() {
}

private void setupModel() {
Spatial model = assetManager.loadModel("Models/MonkeyHead/MonkeyHead.mesh.xml");
Spatial model = assetManager.loadModel("Models/MonkeyHead/MonkeyHead.gltf");
makeToonish(model);
rootNode.attachChild(model);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void simpleInitApp() {
//cam.setFrustumFar(1000);
flyCam.setMoveSpeed(10);
Material mat = assetManager.loadMaterial("Textures/Terrain/Rocky/Rocky.j3m");
Spatial scene = assetManager.loadModel("Models/Terrain/Terrain.mesh.xml");
Spatial scene = assetManager.loadModel("Models/Terrain/Terrain.gltf");
MikktspaceTangentGenerator.generate(((Geometry) ((Node) scene).getChild(0)).getMesh());
Comment thread
NwosuTy marked this conversation as resolved.
Outdated
scene.setMaterial(mat);
scene.setShadowMode(ShadowMode.CastAndReceive);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void setupFloor() {
}

public void setupSignpost() {
Spatial signpost = assetManager.loadModel("Models/Sign Post/Sign Post.mesh.xml");
Spatial signpost = assetManager.loadModel("Models/Sign Post/Sign Post.gltf");
Material mat = assetManager.loadMaterial("Models/Sign Post/Sign Post.j3m");
signpost.setMaterial(mat);
signpost.rotate(0, FastMath.HALF_PI, 0);
Expand Down
2 changes: 1 addition & 1 deletion jme3-examples/src/main/java/jme3test/post/TestSSAO2.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void simpleInitApp() {
floor.setMaterial(mat);
rootNode.attachChild(floor);

Node teapotNode = (Node) assetManager.loadModel("Models/Teapot/Teapot.mesh.xml");
Node teapotNode = (Node) assetManager.loadModel("Models/Teapot/Teapot.gltf");
Geometry teapot = (Geometry) teapotNode.getChild(0);
Comment thread
NwosuTy marked this conversation as resolved.
Outdated
teapot.setMaterial(mat);
// Sphere sph = new Sphere(16, 16, 4);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void simpleInitApp() {
tankMat.setFloat("EmissivePower", emissionPower);
tankMat.setFloat("EmissiveIntensity", 50);
tankMat.setFloat("Metallic", .5f);
Spatial tank = assetManager.loadModel("Models/HoverTank/Tank2.mesh.xml");
Spatial tank = assetManager.loadModel("Models/HoverTank/Tank2.gltf");
tank.setLocalTranslation(-10, 5, -10);
tank.setMaterial(tankMat);
rootNode.attachChild(tank);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void simpleInitApp() {
dl.setDirection(new Vector3f(-1, -1, -1).normalizeLocal());
rootNode.addLight(dl);

Node teapotNode = (Node) assetManager.loadModel("Models/Teapot/Teapot.mesh.xml");
Node teapotNode = (Node) assetManager.loadModel("Models/Teapot/Teapot.gltf");
Geometry teapot = (Geometry) teapotNode.getChild(0);
Comment thread
NwosuTy marked this conversation as resolved.
Outdated

Material mat = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void simpleInitApp() {
dl.setDirection(new Vector3f(-1,-1,-1).normalizeLocal());
rootNode.addLight(dl);

Node teapotNode = (Node) assetManager.loadModel("Models/Teapot/Teapot.mesh.xml");
Node teapotNode = (Node) assetManager.loadModel("Models/Teapot/Teapot.gltf");
Comment thread
NwosuTy marked this conversation as resolved.
Geometry teapot = (Geometry) teapotNode.getChild(0);
Comment thread
NwosuTy marked this conversation as resolved.
Outdated

// Sphere sph = new Sphere(16, 16, 4);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void simpleInitApp() {
obj1.setLocalTranslation(-4, 0, 0);
Spatial obj2 = assetManager.loadModel("Models/Oto/Oto.mesh.xml");
obj2.setLocalTranslation(-2, 0, 0);
Spatial obj3 = assetManager.loadModel("Models/Ninja/Ninja.mesh.xml");
Spatial obj3 = assetManager.loadModel("Models/Ninja/Ninja.gltf");
obj3.setLocalTranslation(-0, 0, 0);
Spatial obj4 = assetManager.loadModel("Models/Sinbad/Sinbad.mesh.xml");
Comment thread
NwosuTy marked this conversation as resolved.
Outdated
obj4.setLocalTranslation(2, 0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void simpleInitApp() {

//create water quad
//waterPlane = waterProcessor.createWaterGeometry(100, 100);
waterPlane = assetManager.loadModel("Models/WaterTest/WaterTest.mesh.xml");
waterPlane = assetManager.loadModel("Models/WaterTest/WaterTest.gltf");
waterPlane.setMaterial(waterProcessor.getMaterial());
waterPlane.setLocalScale(40);
waterPlane.setLocalTranslation(-5, 0, 5);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@
import java.util.logging.Level;
import java.util.logging.Logger;

/**
* Loads Ogre3D .material material files into jMonkey.
*
* @deprecated The Ogre format is outdated and no longer maintained.
* Use glTF (.gltf/.glb) or J3O format instead.
* See the <a href="https://jmonkeyengine.org/wiki/">jMonkeyEngine Wiki</a>
* for migration guidance.
*/
@Deprecated
public class MaterialLoader implements AssetLoader {

private static final Logger logger = Logger.getLogger(MaterialLoader.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@

/**
* Utility class used by OgreLoader to load poses and mesh animations.
*
* @deprecated The Ogre format is outdated and no longer maintained.
* Use glTF (.gltf/.glb) or J3O format instead.
* See the <a href="https://jmonkeyengine.org/wiki/">jMonkeyEngine Wiki</a>
* for migration guidance.
*/
@Deprecated
public class MeshAnimationLoader {

// public static void loadMeshAnimations(Node animationsNode, List<Pose> poseList, OgreMesh sharedgeom, List<OgreMesh> submeshes, Map<String, Animation> animations){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,13 @@

/**
* Loads Ogre3D mesh.xml files.
*
* @deprecated The Ogre format is outdated and no longer maintained.
* Use glTF (.gltf/.glb) or J3O format instead.
* See the <a href="https://jmonkeyengine.org/wiki/">jMonkeyEngine Wiki</a>
* for migration guidance.
*/
@Deprecated
public class MeshLoader extends DefaultHandler implements AssetLoader {

private static final Logger logger = Logger.getLogger(MeshLoader.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,14 @@
* are retrieved, instead of loading the material file as the same
* name as the model (the default).
*
* @deprecated The Ogre format is outdated and no longer maintained.
* Use glTF (.gltf/.glb) or J3O format instead.
* See the <a href="https://jmonkeyengine.org/wiki/">jMonkeyEngine Wiki</a>
* for migration guidance.
*
* @author Kirill Vainer
*/
@Deprecated
public class OgreMeshKey extends ModelKey {

private MaterialList materialList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.DefaultHandler;

/**
* Loads Ogre3D .scene.xml scene files into jMonkey.
*
* @deprecated The Ogre format is outdated and no longer maintained.
* Use glTF (.gltf/.glb) or J3O format instead.
* See the <a href="https://jmonkeyengine.org/wiki/">jMonkeyEngine Wiki</a>
* for migration guidance.
*/
@Deprecated
public class SceneLoader extends DefaultHandler implements AssetLoader {

private static final int DEFAULT_CAM_WIDTH = 640;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,14 @@
* used by the SceneLoader doesn't support reading bottom XML nodes
* before reading the top nodes.
*
* @deprecated The Ogre format is outdated and no longer maintained.
* Use glTF (.gltf/.glb) or J3O format instead.
* See the <a href="https://jmonkeyengine.org/wiki/">jMonkeyEngine Wiki</a>
* for migration guidance.
*
* @author Kirill Vainer
*/
@Deprecated
class SceneMaterialLoader extends DefaultHandler {

private static final Logger logger = Logger.getLogger(SceneMaterialLoader.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@
import com.jme3.asset.AssetKey;
import com.jme3.scene.Spatial;

/**
* Caches loaded Ogre scene mesh data to avoid re-parsing.
*
* @deprecated The Ogre format is outdated and no longer maintained.
* Use glTF (.gltf/.glb) or J3O format instead.
* See the <a href="https://jmonkeyengine.org/wiki/">jMonkeyEngine Wiki</a>
* for migration guidance.
*/
@Deprecated
public class SceneMeshLoader extends MeshLoader{
private Map<AssetKey,Spatial> cache=new HashMap<>();
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@
import java.util.*;
import java.util.logging.Logger;

/**
* Loads Ogre3D .skeleton.xml skeleton animations into jMonkey.
*
* @deprecated The Ogre format is outdated and no longer maintained.
* Use glTF (.gltf/.glb) or J3O format instead.
* See the <a href="https://jmonkeyengine.org/wiki/">jMonkeyEngine Wiki</a>
* for migration guidance.
*/
@Deprecated
public class SkeletonLoader extends DefaultHandler implements AssetLoader {

private static final Logger logger = Logger.getLogger(SceneLoader.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,14 @@

/**
* <code>OgreMaterialKey</code> allows specifying material extensions, which map
* from Ogre3D base materials to jME3 materials
* from Ogre3D base materials to jME3 materials.
*
* @deprecated The Ogre format is outdated and no longer maintained.
* Use glTF (.gltf/.glb) or J3O format instead.
* See the <a href="https://jmonkeyengine.org/wiki/">jMonkeyEngine Wiki</a>
* for migration guidance.
*/
@Deprecated
public class OgreMaterialKey extends AssetKey<MaterialList> {

private MaterialExtensionSet matExts;
Expand Down
Binary file not shown.
Loading
Loading