Scene composer for creating scene?

Hi, I have question how do you people create scene. I started to learn scene composer, and honestly I think it is not good documented as far as shortcuts are concerned. Also there is the problem with character controls - if I add it through scene composer then I cannot move the model that I attached it to anymore and I have read that this is normal, but I don’t like the idea of having some controls added inside scene composer, and some through the code. How do I snap one model to the ground like in blender? Maybe should I create a scene in blender? Or do you know other tools?

Sadly JMonkey doesn’t have a fully fledged scene builder as you’d find in other engines, like Unity or Unreal. jMonkeyBuilder might be close to what you’re looking for but more likely you’ll end up writing your own for what you are doing or just get comfortable with laying out scenes programmically.
The scene composer is useful for setting up individual models or layout out a scene, but it still relies on doing alot of stuff in code.
The blender importer can also do alot but in the end you’ll still need to set controls and such programmically.

if you need something specific, you anyway need write own editor or extend existing. like i did myself.

Well, you can always go Blender way, and write own importer that manage all data.(i belive Ricc FPS demo had this way)

Note: it is possible with some forethought to use Blender with user added attributes, export to gltf, and then use JMEC to add your controls and stuff during the gltf->j3o conversion.

It’s even possible to set that up in such a way during development that the scene in your JME app automatically refreshes when a new version of the gltf file is exported.

It’s not ideal from a “I’m making a game” perspective but you do get access to all the tools in blender.

1 Like

Thanks guys, now I have a better overview of different ways to approach the problem.

2 Likes

Also keep in mind that the SceneComposer is mostly meant for exactly that: Placing a few objects into a scene to test/see.
It would be a foolish approach to compete with blender

Oh I see. But I’m afraid that with large scenes blender will take a lot of time to export gltf. Earlier I was using an old laptop with old amd card and 4gb ram and with ~100k vertices it would take around 10 seconds to export to ogrexml. Now I have 16gb and nvidia card, so Im using blender 2.8. Is it safe to create a whole scene in blender?

if you want have Very Big Scene, you will anyway need Chunk Scene(Terrains/Space/Whatever) and Physics.

Because open-world games need care about float precision and not only. If you would play Fallout76, there is visible gap in physics between chunks.

So if you would want use Blender here, you would anyway need split it into multiple files for each chunk.(or at least as sub-nodes)

If you want Medium or Lower scene you can use Blender with no worry at all.

Still, in both cases Game should not have high poly scenes. You need read about LOD systems and how to manage them. Close models should be high-poly, while far models low-poly. It also depends on game, if you are doing isometric camera based game, then no need worry about it too.

Still, if its not gonna be simple game, i would advice using ECS and special editor that work with it.
if its gonna be small/medium game, you can use Blender 2.8+ GLTF, place Lowpoly models there and just on-load add controls to manage where to change to highpoly.

What I use is the “linking” feature of blender, or you can use UserData/CustomProperties, you want multiple files, because

  • One giant scene would mean duplicate objects are duplicate and not reused
  • Loading is slower than if you load multiple files at once
  • Reusing/Changing/Updating say one “lamp” without having to redo all the maps it’s been used in.

Supposedly, linking has even been fixed in the more recent gltf exports but I haven’t tried it.

It’s high on my list, though.

It would even be possible to add a (really) simple script to the JMEC command line to detect these and break them out into separate j3os on conversion.

so “linking feature” of Blender works in JMEC? it will load single model and reuse in links?

No, the gltf export plugin had issues exporting them correctly, I think.
And paul talks about automatically detecting those subparts and create different j3os.

The problem there though is: The linkings are typically just links to blender files (at least in the blender plugin I wrote), so you still need a way for the exporter to run for every linked model, or as I did, just rely on those having the same name but j3o as ending, so I can manually control exporting and converting.

1 Like

When blender exports a gltf with linked nodes it will include them once and link to them. All of the data is in the gltf.

When I tested this before, the ‘links’ didn’t include proper transforms. So all of the linked objects would end up in the same place… and sometimes they would refer to the wrong mesh.

The data is in the gltf, it just wasn’t referenced correctly and didn’t have the transforms.

Once those are there, a simple JMEC groovy script could find them (they are named pretty obviously) and set an asset key to them. This will prompt JMEC to automatically split them out into separate j3os and link them using AssetLink nodes.

1 Like

ok, so generally it would work if GLTF would not have issue with saving transforms for links.(and sometimes wrong mesh)

would need to check if they fixed it.

The issue tracker seems to say so but I also saw comments that some things were still broken.

This was one of the ones I was watching:

1 Like