[java] J3D Program-created models?
How do I Generate a model programattically in Java3D? Like write to a bunch of vertex arrays and stuff; the J3D equivalent of Locking a VertexBuffer. What class would I use for this and what methods would I call? Thanks.
I want to make a landscape based on a heightmap.
Quote:Original post by Super Llama
Nobody cares? Wow. Please someone help...
Nobody uses J3D anymore, it's old, creaky and slow.
That said, J3d is a scene graph, not a rendering API, so you work on a higher level and don't deal with locking of vertex buffers. Instead you'll want to put your raw coords into a GeometryArray object, and attach that to a Shape3D node in your scene graph.
If you're looking for a more up to date scene graph then consider JMonkey, or use LWJGL and write your own renderer on top of OpenGL directly.
Quote:Original post by OrangyTang
Nobody uses J3D anymore, it's old, creaky and slow.
I'm trying to make a webgame, is J3D still too old for that?
Quote:Original post by OrangyTang
Instead you'll want to put your raw coords into a GeometryArray object, and attach that to a Shape3D node in your scene graph.
Thanks, that's what I was looking for :D
EDIT: Downloaded jMonkey, it looks really cool and I don't mind putting a splash screen in the game for it; thanks for the link, I think jME is what I was looking for.
[Edited by - Super Llama on November 30, 2008 8:28:53 AM]
Quote:Original post by Super LlamaQuote:Original post by OrangyTang
Nobody uses J3D anymore, it's old, creaky and slow.
I'm trying to make a webgame, is J3D still too old for that?
One of the major problems (IMHO) of J3D is that it requires the user to manually download and run the J3D installer. That's not too bad if your game already has an installer (although it'll bump the size up a lot) but for a web game your users probably won't have it installed, so they'll probably just be greated with a broken applet.
If you go with LWJGL or JME (which is built on LWJGL) then you can distribute everything behind the scenes and you don't need the user to manually install anything.
OK I have jME running on the java virtual machine inside NetBeans, but when I embed the applet-based launcher in an html page, I get this:
java.lang.NoClassDefFoundError: com/jme/app/SimpleGame
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at myGame.Main.init(Main.java:18)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.jme.app.SimpleGame
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 11 more
Is there any sort of setup I need to do to get jME/lwjgl to install itself for users, or do the users need to setup something in order to play it through the browser? I'm using NetBeans 6.5, is there anything I have to change in the project properties? Thanks.
Btw, jMonkey is one of the best open-source engines I've ever seen. It runs at 200 fps, it has physics, parallax occlusion mapping, normal maps, terrain, texture blending, and photorealistic water and particle systems. When I look at the samples, I'm utterly amazed that an interpreted language running a library based on OpenGL is making something that looks like DirectX 10, and yet is running 20 times faster than DirectX, and its all free.
[Edited by - Super Llama on December 1, 2008 9:17:45 PM]
java.lang.NoClassDefFoundError: com/jme/app/SimpleGame
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at myGame.Main.init(Main.java:18)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.jme.app.SimpleGame
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 11 more
Is there any sort of setup I need to do to get jME/lwjgl to install itself for users, or do the users need to setup something in order to play it through the browser? I'm using NetBeans 6.5, is there anything I have to change in the project properties? Thanks.
Btw, jMonkey is one of the best open-source engines I've ever seen. It runs at 200 fps, it has physics, parallax occlusion mapping, normal maps, terrain, texture blending, and photorealistic water and particle systems. When I look at the samples, I'm utterly amazed that an interpreted language running a library based on OpenGL is making something that looks like DirectX 10, and yet is running 20 times faster than DirectX, and its all free.
[Edited by - Super Llama on December 1, 2008 9:17:45 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement