Inner and outer environment? How to best integrate

I have an issue and I’m looking for the best way to solve it.
My ‘spaghetti art’ project Space Museum :grin: is mostly made from just metal and glass-like objects in space. Until today I was using just a dummy environment and didn’t really bother thinking about the final result.
This morning I made my first attempt at creating an environment from my ‘spacebox’ and this is where it striked me. Sure the view from the outside looks good (wip) but the interior environment cannot work with this. I can (and I will) use a different env for my closed spaces inside but what about those made from glass that can be seen from in and out. How am I supposed to combine those?

Should I use a different env on these glass parts when inside or outside? Sounds a bit weird and if so how could I make the transition? Here some SS of the ‘spaghetti art’ in progress:

screenshot 1: dummy env for the inside (roughly what it should look like inside)

screenshot 2: new skybox env view from the inside (not what it should look like when inside)

screenshot 3: a closed space on which I will set the appropriate env - but you can see how the skybox env clearly does not work here)

screenshots 4 & 5: outside view with the skybox env. Wip but roughly (very roughly) what it should look like.

Edit: For those who wonder what ‘spaghetti art’ is… it’s basically like the favorite expression from jcpalmer for ‘macaroni art’. Only thing is that ‘spaghetti art’ is somewhat more intricated and less easy to keep on the fork without the sauce falling off :joy:

Well if “spaghetti code” is a thing then “spaghetti art” has to exist too :rofl:
The main problem with the skybox in internal scenes is that it is too dark? And that also, if you have a glass window, you have to both reflect the internal environment a bit and also refract the external one. I had never thought of this before :thinking:

@PatrickRyan is certainly the best person for us to consult here as I myself am very much a spaghetti artist :rofl:

@mawa, ideally, if you are creating custom environments with windows to the outside in them, you would set up the same scene/materials in a ray tracer and bake your environment from the actual asset. I had to do this recently as I was creating a custom skybox and environment and set up the scene in Maya to bake out the HDR file. I then converted the HDR image to LDR for the skybox so I had a matching environment and skybox.

The challenge you face is that you would need a copy of the environment assets - at least the main silhouette shapes and anything that shapes light - in your ray tracer to render with. It’s also worth looking at the materials in your scene and determining how much you need to recreate for your render. By this I mean if you don’t have any materials on your assets that is chrome or completely reflective, you can get away with hand waving the environment render. All materials are reflective, and it is the surface roughness that determines how sharp the reflections are. If your materials are all fairly rough, or at least rough enough to not be able to distinguish details, then you can get away with some really rough environments.

It could be simply placing some quads in place for windows that have your skybox textures in it as IBL and some extra punctual lights for the render inside a box with a general wall color. Or if you have colors that need to bounce around from a saturated material inside the space, you could also include some colored primitives in your render. For rough materials, just bouncing color onto them is enough to sell being part of this environment.

If you do have more reflective materials, you will want to split the difference between how much you recreate in the ray tracer and how close the camera gets to these objects. If you can’t get close enough for sharp reflections to render from being too small on screen, you can likely hand wave the environment a little more.

You could also use reflection probes for your reflections, but the issue there is performance because you are rendering them in real time. Even with a slow update or even rendering them only once, you have to render the scene into the six cubemap faces which will increase your load time in your scene.

For the most part, you can probably get away with an environment texture that does not match your scene 1:1 if your materials aren’t very smooth. It’s only when you have a lot of chrome-like materials - think the armor from the Mandalorian show on set that reflects everything around it making green screen FX very difficult - that you need to make sure your environment lighting replicates what you see in your scene to high fidelity.

I’m not sure if this is enough to help you decide on next steps, but feel free to ping back with more questions.


Thanks for the reply. I got some ideas and will definitely not reproduce the entire env nor use probes.
The issue I have is that the scene does not exist in a 3D app. 70% of the scene objects are instances created straight in BJS. So I will need to work from there.

I haven’t done this, but you might be able to export the scene to a glTF and open it in Blender to use for an environment bake. It’s hard to predict the level of success here based on the glTF spec. But it may be possible.

I will mark the above as a solution (since it is one and there’s no single solution to it). I will however try a different approach. Fact is my scene is not final and won’t be before a while. I can’t imagine going through the process of exporting to GLTF (if it works at all with my peculiar assembly of obj sources and heavy reworking in BJS), open in blender, bake the env…
As you say, I do not need a 1:1 and no, I have no chrome-like materials or mirror-like materials so, yes, shapes, colors and sources of light are basically what counts.
So, I’m gonna take a much more ‘graphic designer’ orientated route for this. I will simply create a camera (likely orthographic) and take shots of the 6 tiles to create a skybox. Once with a dummy env. and once with the external skybox env. Blend both in PSD, make some mask painting and create a new env from there. And will see how this goes… I will post the results here. Hopefully, it will do the trick. Else, making this attempt will by any means not take me all too much time. And repeating the process following an update should be quite fast. So, we’ll see…
In any case, thanks a lot for sharing your invaluable expertise again.

1 Like