View Full Version : Reprojection node for interiors

05-23-2018, 03:51 PM
i'm investigating the possibility of building a reprojection node setup to have real interiors behind windows in a building.
We have solutions like VirtualRoom, which is very nice in a distance, but for closeups we need to have furnished 3d apartments or the fake is evident.
Now we use instancing, but it means building accurate placers and make a lof of tweaks before it's everything ok, since instances may go out of walls, compenetrate and whatever.
I.e we did this image instancing interiors, but we had to build a lot of custom interiors in order to fit the shape of the building, and in some cases we had to put some interiors manually.


Now, see this:


There's a pre-baked lo-poly apartment, and then a node setup Lino Grandi made time ago shows the interiors on a simple planar window.
The node simply gathers the interior and then reprojects it on the windows. At frame 0 window object is in front of the apartment, in order to get the data, then at frame 1 i can move the window wherever i need and it will show a correctly projected interior behind.
Problem comes when i have hundred windows, in this case putting each one in place is too time consuming.
So i wonder if someone is able to find a setup which gathers raytrace info from interior object and reprojects it on a lot of windows with no need to move them.
I attach original Lino's scene in case someone wants to give it a try.



05-23-2018, 04:36 PM
Just in case, you might be interested in these other threads as well:



05-23-2018, 05:56 PM
Thanks Gerardo, yes i know these threads, I banged my head on these already.
Quite frankly i' m too weak at vector stuff to fully understand these setups and update them to 2018 (some nodes are even lacking).
I hoped to revamp the argument and draw the attention of some vector-savvy guys ;)


05-23-2018, 08:18 PM
Guess you only need to look for an Object Spot replacement in Medi8or setup :)


p.s. Looks also that the _02 setup is implementable in v2018 by replacing RaySource by RayPosition.

05-23-2018, 08:51 PM
Heya Pavlov and Gerardo,

I'm far from vector-node savvy but will give this a shot.

I think it's kind of similar approach to the way I did this ...


Not promising any results tho :D

05-24-2018, 05:28 AM
interesting, i missed it. Let's see, i tried a bit but i'm too ignorant about vector stuff and this is way beyond my knowledges.
BTW, is there a good tut about vector stuff, in case i want to dig it ?


05-24-2018, 11:13 AM
adk, indeed, awesome stuff! Thanks for sharing!


05-24-2018, 12:55 PM
Just thinking out loud before I head to a meeting. Why not just make a morph on the object where you move all the windows to the projection. Then use that morph on 0 and not 1 so the windows go back in place.

05-24-2018, 12:58 PM
Hi Paolo,
Did you try out the new rendering engine ?

05-24-2018, 03:06 PM
Cloned the room, made another window object, offset the rendering of the 2nd window with and vector add in Y. (in 2015 no less)

05-25-2018, 04:39 PM
I thought about morphing but it seems too much a workaround. Again, the window object cannot be rotated or you get an error, I think a more evoluted solution would be needed.

Best Paolo

05-26-2018, 08:35 AM
You might have some luck using the technique I posted back in January in this thread:


The description / scenes there use TrueArt's Extended Ray Trace node, but that can be substituted directly with LW2015 (and LW2018) native RayTrace node.

I've attached the LW2015 scene using the native RayTrace. Note that I cannot include the Images folder due to the size of the 360-images used, but they can be downloaded from the site I referenced (not for commercial work!), or replaced with your own generated in LW.


In that example, I used 360-degree images downloaded from the web, but those can certainly be substituted with ones generated in LW (the technique is described later in the thread). It uses a Gradient switch on a random number to choose a random room for each "spot" on the base 1x1m cube. The 1x1m cube can then be sized up to the size required by the scene, or multiple cubes can be used.

I can also propose a couple of modifications / enhancements: first, encapsulating the nodes for the multiple "Window Boxes" into a Compound node might allow many different rooms to be randomly chosen. Second, it would be feasible IMO to have the calculated perspective on the Window Box rotate 90, 180 and 270 degrees around the Window Box center to provide four different views of each room, quadrupling the randomness. Finally, and I'm not sure how well this would work, it may be feasible to "jitter" the X and Z location of the calculated perspective to have minor variations on each room. I think in an apartment / office building, though, rooms may be configured exactly the same or very similarly, so the repetition may not need to be avoided.

Good luck!

05-28-2018, 03:17 PM
it seems really interesting indeed ! Pretty similar to Vroom/VirtualRoom method.
I was looking for a full 3d reprojection method, since i need to see real 3d stuff inside rooms (not just mapped walls). but i'll give this one a deeper look for sure since it may replace both mentioned plugins.


05-29-2018, 05:14 PM
The same method will work on the low-poly room you posted originally, with a couple of modifications. A sample scene is attached.

141883 141884
141885 141886


The uploaded room won't work as is, the following modifications were made to it for this scene:

You can't have glass in front of the room, or RayTrace sees the glass but not the contents of the room. To fix this, I create a separate object with the building fascade and window glass in it which are placed on top of the "WindowBox_Output" object.
For whatever reason, the RayTrace method prevented the Color from being applied to the overhead Lux area 300% luminescent polygon. I had to just set the Color, removing the ray-based input for it.
The geometry should be centered *approximately* around 0,0,0 especially in X and Y, so I did a Center All on the geometry.

The uploaded low-poly apt is 10m wide x 2.8m high x 5.6m deep. For this scene, I scaled up the 1x1m Window Box to fit an even number of these - making sure the X Units, Floors and Z Units in the node graph were set accordingly (specifically 4 across, 20 floors, 5 deep). The ScaledViewpointDistance has to be determined through experimenting - it needs to be large enough so each quantized spot on the WindowBox object is filled without showing a background border around the room, but not so large as to make the perspective on the room seem "zoomed in".

I think some work needs to be done on the technique to get the size of the WindowBox object to match the size of the room(s) to be recast. You'll note that in this scene the floor seems to extend into the lower apartment, etc.

In order to use many different low-poly rooms, you could probably use an LScript to load random rooms from a base set, offset them to fixed, known locations (e.g. 1,000,000 meters in Y, the next at 1,000,020, 1,000,040, etc.) and then the node graph wouldn't need either the Item Info nodes or the Gradient. The known locations would be randomized and added to the calculated perspective vector from the Camera to produce a view of random rooms. The room(s) would need to be "self-sufficient" in terms of lighting, perhaps using Luxigons or luminous surfaces or setting up per-room lights (as I did with a Point light). The X scale could be set to -1 sometimes to flip some of the rooms (like innumerable motel / apartments are configured), or write the LScript to intentionally do so.

If you can upload a few more low-poly rooms, I'll try to demonstrate the (hypothetical) technique. Attached is the single-room variation on the low-poly apt you posted earlier.


05-30-2018, 05:26 PM
Looks very good MonroePoteet and I'll definitely check this out as soon as my box finishes a render.
I did fluff around a little with the original setup yesterday, setting up three individual apartments and moving multiple facade elements to 0.0.0, but not had much luck as I'm not a 100% sure how the result from frame zero effectively gets baked in ?
My nodal experiments are usually so scattered/infrequent that much of the effort is about re-learning and remembering what I did previously as it is about new ways of doing stuff :D Think I need to set aside way more dedicated time for nodes in general within all these various apps.

Thanks for posting the original files Pavlov - makes testing a lot easier.

06-08-2018, 02:13 AM
hi, just saw MonroePoet answer, really promising !
I'll upload another interior so we can test better, in meantime i got the scene and ill check it asap.