Does JME have the ability to group small objects into on renderable object?

Nyphur said:

I wonder, if you could detect the areas inside the model at runtime (the internal overlap caused by two models intersecting) and remove them, then attach adjoining points together to create a single model, that would be pretty neat. And if you can do additive grouping, why not subtractive grouping where overlapping areas are destroyed. That might be handy to, for example, modify a cliff-face to contain a cave by putting an invisible model of the cave where you want it and then substracting it from the cliff-face. You could possibly use this to modify generated terrain rather than tacking a ready-made cliff-face-with-cave model onto it. That would save a lot of effort. Just a thought.



:-o


:D

Bad news I guess - it works on Linux but not on Windows. My GeometryBatch example causes a hard VM crash:


Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J  org.lwjgl.opengl.GL11.nglDrawElements(IIILjava/nio/Buffer;IJ)V
J  org.lwjgl.opengl.GL11.glDrawElements(ILjava/nio/IntBuffer;)V
J  com.jme.renderer.lwjgl.LWJGLRenderer.draw(Lcom/jme/scene/TriMesh;)V
J  com.jme.scene.TriMesh.draw(Lcom/jme/renderer/Renderer;)V
J  com.jme.renderer.RenderQueue.renderOpaqueBucket()V
J  com.jme.renderer.Renderer.renderQueue()V
J  com.jme.renderer.lwjgl.LWJGLRenderer.displayBackBuffer()V
j  com.jme.app.BaseGame.start()V+63
j  OldLevelLoader.main([Ljava/lang/String;)V+14
v  ~StubRoutines::call_stub



Back to the testing board!

I moved to using the nightly snapshot of JME, thinking it would fix my crash. I found the post relating to similar crashes for NVIDIA users. So if I can find somewhere to host my example, could someone try it on Windows please?



Thanks

I'm sure there are plenty of people that would give it a try if you just post a webstart link here.



darkfrog

I it's webstart, only the essential jars please, on dial up  :frowning: thanks

But that implies I have web hosting for you to webstart from, which I don't.

Any webhosting provider (free and not) should support JNLP files.  There are few exceptions to this but, for the most part this should be true.



If all else fails set something up with Yahoo webhosting.  It's free and you'll need something eventually to post information about your games on anyway.



darkfrog

Ok the source and binary are here:



http://www.drunkentechie.net/files

If you try the app let me know.

Ok I got it - replace the colour allocation with this:


       
        // Append the colour.
        FloatBuffer color = null;
        if (this.getColorBuffer() != null && mesh.getColorBuffer() == null)
        {
            color = BufferUtils.clone(this.getColorBuffer());
        }
        else if (mesh.getColorBuffer() != null && this.getColorBuffer() == null)
        {
            color = BufferUtils.clone(mesh.getColorBuffer());
        }
        else if (mesh.getColorBuffer() != null && this.getColorBuffer() != null)
        {
           total = this.getColorBuffer().capacity() + mesh.getColorBuffer().capacity();
           color = BufferUtils.createColorBuffer(total);
           buff2 = this.getColorBuffer();
           buff2.rewind();
           color.put(buff2);
          
           buff2 = mesh.getColorBuffer();
           buff2.rewind();
           color.put(buff2);
        }