Render Layers?

Out of curiosity (it would be very helpful, at least), can I manipulate render layers like so:
Screenshot%20from%202018-08-07%2016-19-35
(stolen from random youtube video)
Or will I need to implement my own holdout “shader”?
My goal is to overlay a lamp onto a mesh to fake emission without voxel GI/AO. (Probably not the most scalable of use cases unless working with a sphere, but who knows.)
It’s important to have the z depth right, so I’m considerably reluctant to cheat it by simply having a haxe script move the lamp in front.
Any experience/ideas?

Don’t completely get what you are looking for from the description.
But judging from the image you want to implement kind of a mirror?
If yes this could help:
https://github.com/armory3d/armory_examples/tree/master/camera_texture

1 Like

I’m afraid not. Render Layers are a cycles feature that allows one to overlay images from different layers. This is very useful with the transparent background, and/or holdout shader. For an example of what I mean, sinply see the image above - it’s made by having a figure of a human and a doorway in one layer, and the room’s inside in another layer. Then, in the first layer, a plane is created inside the doorway that utilizes the holdout shader to create a “window” to the next render layer. When the scene is rendered, both layers are rendered and can be manipulated with compositing/post-processing nodes (whatever you’d like to call them). The end result is that the figure’s foot cannot be seen because the other layer was drawn over it.
If I still don’t make any sense, let me know before I start to ramble. Thanks for the response.

Ok - but couldn’t you use the “camera texture” feature Lubo implemented in the example above (in another way but to reach a similar effect)?

One camera would be pointed at the room we see inside the door, writing to a texture.
And the other camera would be pointed at the character and the door. The door then uses the non-transparent texture generated by the first “room” camera, so it can easily occlude part of the character.

Wouldn’t this lead to the desired effect?

1 Like

I could try that, thanks… However it will be a while before I can, latest the 15th. Tell you if it works then.

one issue… If I move the camera in the example to another layer the script for the camera texture crashes with a null complaint about the camera. I tried moving the scene to layer 3 and leaving “CameraView” in layer 2, in hopes it would render first, but to no avail.