Possible to make objects affect lightmass (block light) but not render?

I have been working on some realistic lighting for my quadcopter trainer game and I have run into situations where the light would bleed through walls at times and the best fix I have come up with that works just fine is to create thick cubes positioned around the walls where I need to stop the bleeding. This is acceptable except where I can see out a window or something and the block is visible. I need to find a setting similar to Maya where the block doesn’t render but it does cast shadows and affect the global illumination calculations.
Did I just not dig enough into the details… or does it need to be set up in blueprints… or?

(Oh and just a quick aside… there was a thread I stumbled on that was flaming the engine for not having the perfect one button click lightmapping tool. Wow. I have plenty of students in my classes that are on the hunt for the “Pixar button” but this person took it to another level. When my students complain that this stuff is hard I always tell them to appreciate that… it means job security if they actually graduate and get a job. And in my experience I have yet to see any engine that can read a person’s mind and come up with the ideal solution to any given lighting situation with perfect results. Even the automatic solutions that are out there will at best produce mediocre results. That’s why machines have not yet replaced human beings and skynet hasn’t won.)

But yeah… anybody know how to keep an object from rendering but allow it to cast shadows/affect lighting calculations?

I haven’t tested this in a while but try bVisible unchecked, but CastShadow and CastHiddenShadow (under Lighting->advanced section) checked. That works for dynamic shadowing (object still casts shadows while hidden).

2 Likes

Thanks. :slight_smile: I may answer my own question in a moment… but is that in the object properties? A material property?

This is located in the details panel for the mesh via the viewport.

Yeah I can’t find anything that looks like your bVisible setting. I looked in the details of the object and of the material.

Oh wait nevermind… it just occurred to me to check on a different mesh. The meshes I was using to block light were the box brush things. I guess those don’t have the same properties. Thanks for your help. I will just convert these box brushes or make new cubes.

Oh wait… nevermind again. The mouseover tip says it won’t cast a shadow if visibility is turned off. :frowning: Back to the drawing board.

Hi,

Can you post a screenshot of the bleeds?
Im more a visual person :stuck_out_tongue:

Cheers,
Klaus

5b0ef21135aee20dd2a25ef60a868f23a9b26f67.jpeg
Sure why not. This example is a corner of the front room. Outdoor light is bleeding through the outer walls in the corners. Theoretically I could crank the hell out of the lightmap resolutions… but who wants to do that?! So my solution of staging shadow casting light blockers has been working just fine but if you get certain angles of view out the windows you can see them and that’s not ideal. In Maya I would just turn off the primary visibilty and they would affect everything I need them to and yet not actually render. I am just not sure how to achieve that in UE4.

Ok… I just tried turning off the “render in main pass” checkbox. I think it may actually be doing what I want. It seems to have cast the shadows I need and the objects appear to be invisible. Anyone else ever used this checkbox for this? Anything I am missing?

In case the current solution has some drawbacks what you could do is make these meshes a new blueprint actor that destroys or hides itself in the begin play event. This should remove all the blockers before you get a chance to see them in game.

There are two things you have to check.

For visibility > uncheck this.
Under Lighting Tab > Check box for Cast Hidden Shadow.