Creating a room environment – texturing/geometry queries

I’m seeking some advice on ‘best practice’ for creating a general ‘room’ environment for my game. I have consulted all of the pertinent tutorials and examples and am still a little bit unsure of a couple of things.

The physics based game I am creating essentially takes place in a single (rectangular) room which resembles an office space. Each end of the room has a set of windows, with walls along each side of the room containing some modelled shelves etc. plus some paintings which I render onto the walls as simple textures. I would therefore like some advice on what I have done and what am still trying to do.

  • I have rendered the paintings on one of the side walls as separate materials/textures projected onto a Quad which I then place over the large Quad representing the wall which in turn has its own material. Is this a recommended approach or should I be trying to create a Texture Atlas to achieve this effect instead, even though it is essentially a 2D surface?

  • I wish to create slight rectangular indents on both end walls in which to place the windows. Is it wise to utilise several Box/Quad shapes joined together to build this (then merged as one geometry) or should I really be looking to create a custom mesh in Blender or suchlike?

  • I orginally rendered all 4 room surfaces as Boxes, then, for the sake of optimisation, changed these to Quads which then caused *some* objects to fall through the floor. Changing the floor back to a Box solved this issue. Should I really have created the floor with multiple smaller Quad 'tiles' instead of one large Quad to stop this from happening? (and should I also maybe do this for the walls/ceiling?

I have completed most of the physics/modelling work for other items in the room (furniture etc.) relatively easily so it is just the abovewalls I am having some doubt over in my current implemented solution. Any comments/advice are greatly appreciated.

I suggest doing the parts of the room in blender with all models using one texture atlas (that you create beforehand or bake from blender). This way you can put all the objects together in the SceneComposer and then “optimize” (batch) the static objects. Since they all use one texture they will work as a batch and you have only one geometry for your room in-game then (lots of geometries are not efficient). For the physics just use the a mesh shape then, basically attaching a RigidBody with mass=0 to the created geometry will automatically create that shape and your room will make other physics objects collide.

Thanks for the advice normen. I’ve gone down a somewhat inbetween route at the moment where I’ve modelled the room environs (walls, windows, ceiling, floor) and UV mapped the associated textures. I then create some of the furtniture in JME itself and apply their textures individually within JME. This was due to some work I has already done to this effect.

I may revist the main room blender model, pull in the furniture pieces and create a separate UV map for those items as an optimisation as per your guidance. I think I can use multiple UV maps baked into the model and still batch the geometry as described as it would essentially be one texture in blender, although feel free to correct me if I am wrong! I already had the pyhsics aspect sorted.