Using jME Modelloaders in my own Jogl application

Hey guys…

i just want to use the jME Milkshapeloader in my own Jogl applet. so what's the best approach without using the entire framework? is there an approach present at all?

i was checking the tutorials how the loader works and as i noticed, the loader creates an object of the class "Node" wich offers a draw-function for the loaded model. this node needs to be added to the root node of the jME scenegraph…

so how do i connect the frameworks renderer with my current Jogl thread so i just can call f.i. the draw-function of the node? is there a way or do i need to create my applet using the jME framework from scratch?

The simplest way by far would be to use JME from the start - other than that, you have a fair bit of work to do.



If you really don't want to use jme, then take the loader source, and modify it to generate a model using your own object datatypes - geometry / textures etc.

Most of the JME loaders I have looked at are pretty simple to follow so you can easily see where geometry is created, but I have never looked at the milkshape loader so don't know what functionality it offers in the way of textures / materials / animation etc - but assuming its all of these -  I expect the converter creates a node at the top level, under that will be geometry objects and possibly other nodes, and each of them will have texturestates/materialstates applied to them - all of which are tightly integral to JME's way of working.



So no, just calling draw without a substantial amount of the rest of the framework will not work - sorry.

hey there…

thx for your advice…

i bet you're right that it's easier to use jME from the start, but i already have a working application where i just need to add milkshape model loading. so that's why i was looking for a milkshape loader that is free to use and/or opensource.

so now i checked the loader source file… and you're right… it's easy to understand so i modified it to fit into my application. that was the easiest way for me…



thx again ^^