Building scenes in the SceneComposer

Okay, so some quick background info. In our game, there are going to be a large number of custom made stages. Each of these stages will have a spawn point for the player, ledge nodes at the ends of the stage, and some blast barriers. I was thinking that each of these scenes should be built in the SceneComposer.

Now, my question is this–is it only possible to place Nodes and imported models/terrains in the SceneComposer? Is it not possible to add a simple Ghost Control to a node in the sceneComposer, or just add basic geometry (say, a cube)? Must that be done through code? Most of the tutorials on the SceneComposer only deal with imported model or adding a custom control to an object, when all I really want to test is adding a pre-defined ghost control to a cube.

One last inquiry about scenes from the SceneComposer. If I load the scene in and cast it as a Node, will I be able to traverse it the same way I can traverse the SceneGraph as in THIS article? What happens if I cast it as just a Spatial?

Okay, my bad. I’m an idiot. I was just looking over the “Traversing the SceneGraph” that I just linked to, and Example Case 2 talks about loading in a static scene made in the SDK and loaded as a j3o and traversing it. Don’t let my stupidity catch on…

1 Like

Your post didn’t sound stupid at all I have to say :slight_smile: You can “only” add other j3o files, models and everything you can add via the SceneExplorer right-click, so RigidBodies, SkyBoxes, Terrain etc., yes. Its true that you cannot e.g. attach primitive meshes in the SDK and save them in a j3o atm without extending the SDK yourself (which is pretty easy)…

BUT! In nightly you now can without that :slight_smile: You can use the brand new custom AppState feature to attach an AppState to an empty j3o scene in the SDK and then have some code in its initialize() method which will be executed. Then you can save the scene again as j3o, saving everything you did as well :slight_smile: http://hub.jmonkeyengine.org/forum/topic/custom-appstates-in-the-sdk-please-test/

1 Like

I see. So the latest nightly (which is mighty convenient) can attach AppStates and basically create the scene with an initialized say, little blue box with some ghost controls. And saving the scene and importing it essentially will build the scene with the stuff from the AppState’s initialize stuff. While I’m not quite sure I’ll update to the nightly yet, might I ask if this feature will be ready for the new stable which was hinted for this year? XD

@machspeeds said: I see. So the latest nightly (which is mighty convenient) can attach AppStates and basically create the scene with an initialized say, little blue box with some ghost controls. And saving the scene and importing it essentially will build the scene with the stuff from the AppState's initialize stuff. While I'm not quite sure I'll update to the nightly yet, might I ask if this feature will be ready for the *new stable* which was *hinted* for this year? XD

Spoken like a true developer :slight_smile: The manual contains a step by step guide that allows you to set up a “safe” application to setup with nightly without breaking your “real” SDK if you want that.

Yes, you can do exactly that, then load the j3o with the blue box. As its a very early version of the feature, the save button might not light up right away and you might have to change a detail in the scene via the “normal” tools to be able to actually save it atm.

We are atm continuously hit by issues with external things like lwjgl and java as well as OS updates that change java behavior, the whole java ecosystem seems to change to something slightly different but we are prepared and actually embracing that. Thats why our projected (imagined?) timeline is severely hit, yes. :frowning: Nevertheless we try to provide a reasonably stable application an engine that is successfully used for distributed games already and yes, we also try and keep it up to date as soon as a feature set or change set has been applied completely and usably :slight_smile:

I hope to get this to stable soon as its quite a big feature as well as possibility to make jME3 much more accessible, still also one that could trigger a lot of edge case issues / usability problems I guess.

1 Like

Thanks for the tip. And keep up the hard work. The newbie dev community (like me) needs you 8)

2 Likes