Page 1 of 1

How to setup the object(mesh) that visible for one Camera, but not visible for second Camera component?

Posted: Fri Oct 12, 2018 1:02 pm
by MoonBeam
Do not know how this feature named in Cryengine, but i suppose it's must named like so: VisibleMasks or VisibleLayers... ect
Well, how to achive similar effect on cryengine? Do not know even where I need to start looking

Re: How to setup the object(mesh) that visible for one Camera, but not visible for second Camera component?

Posted: Fri Oct 12, 2018 5:59 pm
by MoonBeam
Well I have some kinda a progress with visible / unviseble set
I made two layers on level ("Main" and "CAM2Layer")

I tried to hide all object except objects on layer "CAM2Layer",
With this code:
//gEnv->pEntitySystem->EnableDefaultLayers(true);
//gEnv->pEntitySystem->EnableLayer("CAM2Layer", false, true);

IEntityLayer* layer = gEnv->pEntitySystem->FindLayer("CAM2Layer");
if (layer)
{
layer->Enable(true);
}

layer = gEnv->pEntitySystem->FindLayer("Main");
if (layer)
{
layer->Enable(false);
}
It's works and hides all kind of components based on IEntiesComponent on "Main" layer, but "Brushes" or how it's called ? they are still visible from main layer (
how to hide all on "Main" layer? even brushes objects ?
and additional questing those hided entities are still gotting ProcessEvent within or not (mb they sleeping, till they not visible) ?