Improvements to Dynamic Scene visuals

Hi guys, :smile:

Ill keep this short and sweet.

Essentially, I am attempting to add visual improvements to a Room Planner tool. The ‘Room’ is planned by the user in HTML canvas (a 2d view from the top) and required data passed through using json. This json tells the csharp code where particular items are placed and so on. The problem when wanting to add any sort of Light Mapping etc is that each scene is unique and built up on the fly using dynamic mesh generation for the Room Walls, and the rest of the scene uses FBX files brought from Maya (Asset bundled in Unity and placed onto a server a few hundred miles away.) The only instance of the scene fully composed is when the user/client views the scene and walks around it. Basically, once planned the user hits ‘View 3D’ and the 2d json data is injected into the 3d side of things where it is picked up by the cs codebase. From this it takes a few seconds for the assets to populate the scene as the user watches as their planned room pieces itself together bit by bit.

Unlike other Unity projects, where a particular level or scene is fully composed within Unity locally allowing light to be baked in etc, the scenes in the Room Planner are unknown as each user shall naturally plan a room differently dependent upon the clients requirements.

So far, I have added in Real Time shadows produced by the dynamically positioned lighting dependent on room size and shape, a bunch of post effects such as Contrast Enhance, Anti Aliasing, SSAO (naturally at a cost) Ideally, the scenes geometry would be baked and resulting lightmap slotted into a secondary UVW Map slot in each of the asset bundles. Additionally, the builds quality settings are at Beautiful.

Im just curious if there are any quick wins in Unity with regards to visual impact.

Naturally, if this isnt possible I shall have to explore something along the lines of composing the scene in something like Maya or Max, baking it in there along with textures and importing this as a whole into Unity.

I have attempted to export the Rooms assets as an OBJ which worked a treat, however hooking the scenes materials back up in an external 3D package is a nightmare due to obvious ‘shader’ and ‘shader network’ differences. This was in an attempt to render a scene composed in Unity, within Cinema 4D with Vray.

Maybe Unity isnt the correct tool for this application? :face_with_spiral_eyes:

Cheers Guys! :slight_smile:

If your scenes are going to be 2.5D (ie one floor at a time) you may be able to use some of the volume rendering techniques used in LBP2 to approximate GI. Paper here:

Alternatively you could atlas each individual element of your scene into a lightmap chart. On startup you can then pack the charts into a lightmap and render it out. When packing the charts you can use the chart bounding boxes rather than the triangles to make the job easier. You will need to write some fancy shaders to generate the lightmap but they only run once so it should be efficient.

Hi Gibbonator,

Many thanks for the reply. The ‘Fast Approximations for lighting dynamic scenes’ is a very useful read.

Placing each individual component of the scene would be a bit of a nightmare due to the number of assets held (4,000+) which are called for at run time depending on what the user has selected to appear in the scene. Naturally however if the Repo of assets was smaller and more compact id certainly opt for that. Additionally, Each mesh is left as Unity’s default diffuse until a ‘colour’ for example is selected. Materials are applied as the scene builds on the fly, making grabbing the whole scene and composing an atlas difficult. This is just to reduce the number of assets held on the server and additionally, make it very easy to add another ‘door colour’ for example, as using this method makes that +1 material asset (applied to 150 meshes) rather than + 150 meshes with an alternative door colour applied also giving us a reduce file size per scene/room plan.

Again, many thanks for the response and I shall see about implementing some form of volume rendering.

I just realised I sent a link to the older volume rendering article. Here is the newer one, it has more useful details I think:

Great stuff, thanks for that! :slight_smile:

Ill have a read through.