Interior mapping shader

I wonder if it’s possible with OSL to code a complex shader that can build interiors of buildings at render time ?

This is a technique that’s been used for years now in video games and movies to quickly generate interiors for scenes with lots of buildings.
The idea is simple : the shader is assigned to glass surfaces (windows) it then extrudes these polygons and assigns textures to the new faces depending if they are ceiling or walls.

I first discovered this technique through a Lightwave plugin, VRoom, that sadly was never ported to any other 3d package.

More info here :

http://www.euriskostudios.com/es/plugin\_pages/vRoom.php

Yes, I’ve seen it done in OSL, however all the links seem to be dead now, search for ‘interior mapping osl blender’.

i had an idea like this years ago.. if you remember those awful RPC people.. a plane that would load a different view of a person depending on the viewing angle.

i wanted something similar for windows. . a plane you put behind the window, and a library of pre-rendered (or photographed) interiors, captured from multiple angles (think qtvr) mapped onto the planes, so the perspective would be correct wherever you looked at the building from, but the rendertimes would be minimal.

probably still an idea with legs, but back then with hardly any processing power or ram, it would have been a godsend.

Yes, I seen references to this in many places but the original post vanished.

edit : found this : https://github.com/sambler/osl-shaders/blob/master/combine-multiple/FBinterior\_mapping.osl
It loads fine but does nothing when I render :slight_smile:

yeah it would be awesome. VrayPattern appears to do this but it’s more of a hybrid solution.

If you click here

Then go to gallery, there are a number of images (images 16-22) showing the plugin doing exactly what you describe. I haven’t tried it myself…

Yes, I know that plugin. I would have bought it if it was not made by R&D Group :slight_smile: I bought Splineland a few years ago from them and was very dissatisfied. The plugin doesn’t seem to be given any attention apart from making it compatible with new versions of max. Also their licensing system is awful.

I think the OSL needs some inputs, I remember seeing some blender setup screenshots showing the node graph and the required inputs.

Seems to be the story with all their products.

The internet archive may come to the rescue again. : )

https://dl.dropbox.com/u/64799016/BlogFiles/cg/blender/interior\_mapping/interior\_shader.tar.gz

There’s a blend file in there that might give some clues.

Thank you Rens, will have a look at this.

Hi.

I adjusted a OSL file for Vray.
I can render it but a result is something wrong.

I do not yet understand all of a OSL source.
I hope to cooperate, if possible.
interior_shader.zip (306 KB)

Thank you !
How do you use those 3 osl ? I tried loading each of them successefully but none gives any result.

I’d love something like V-Room.

V-Room generates geometry at render time to create the rooms. Is this something possible with an OSL shader ?

This looks nice, I didn’t even know that was possible… If the chaosgroup guys could do a proper implementation of that in one of the next servicepacks that’d be cool :slight_smile: ALthough this might not be very high on the priority list.

I presume the ranking in the priority list is also determined to some extent by the amount of voices asking for a particular feature. So if we push hard enough… :slight_smile:

That’s true though I would voter for other stuff right now but I don’t do much buildings :slight_smile:

+1 This would be very handy :smile:

Yep would love to have something like this,

For the moment we build our own planes from 7 different angles based on interiors that we modeled and rendered.
Now we multi sub them according to the angle of view from the camera.
A bit of manual work but works great.
If Vray does something similar out of the box, I’d love it.

Stan

Hey all,

I’ve got this working in max now, maya should be the same, I will tweak it some more this evening and I’ll post the OSL and some pics!