Hi guys. I've got my own flashlight system but sometimes it become a real problem because of player's shadow. I'd like to ignore player's shadow only for my own flashlight. How to do that?
Any help'd be appreciated.
Re: Filter shadow
#2i'm kind interested too in that, because i have some sort of problem with a custom flashlight walking back flashlight produce shadowsHi guys. I've got my own flashlight system but sometimes it become a real problem because of player's shadow. I'd like to ignore player's shadow only for my own flashlight. How to do that?
Any help'd be appreciated.
Re: Filter shadow
#3Hi I think the engine not supported LightMasks at all for all kind of the Lights, this feature allows manipulating light's affection on object in scene in per-object basis. Mb I'm wrong about that...
But you still may fully disable all shadows for some object by using m_pEntity->SetSlotFlags()
But you still may fully disable all shadows for some object by using m_pEntity->SetSlotFlags()
Code: Select all
m_pEntity->LoadGeometry(0, "Assets\\Objects\\someobject.cgf");
//uint32 flags = GetEntity()->GetFlags();
uint32 flags = ENTITY_SLOT_RENDER & ~ENTITY_SLOT_CAST_SHADOW;
GetEntity()->SetSlotFlags(0, flags);
Last edited by MoonBeam on Fri Oct 19, 2018 2:19 pm, edited 1 time in total.
Re: Filter shadow
#4You are wrongHi I think the engine not supported LightMasks at all for all kind of the Lights, this feature allows manipulating light's affection on object in scene in per-object basis. Mb I'm wrong about that...
But you still may fully disable all shadows for some object by using m_pEntity->SetSlotFlags()Code: Select all
m_pEntity->LoadGeometry(0, "Assets\\Objects\\someobject.cgf");
uint32 flags = GetEntity()->GetFlags();
uint32 flags = ENTITY_SLOT_RENDER & ~ENTITY_SLOT_CAST_SHADOW;
GetEntity()->SetSlotFlags(0, flags);

ILightSource interface has this function:
Code: Select all
virtual void SetCastingException(IRenderNode* pNotCaster) = 0;
Re: Filter shadow
#5as far as i know it is a problem between first-person and third person shadow rendering wich are in some way in conflict and produce that issue, if i'm not wrong they fixed that with 5.4/5.5 i will ask is there is any solution before release my project during optimization
Re: Filter shadow
#6That's great! Perhaps then I need test this feature someday, but the main question is - why this abbility of the ILightsSource not part of standart user's interface for LightComponent's in sandbox property panel ? It should be in properties, that user can tweak.You are wrong
Re: Filter shadow
#7Yeh. I totally agree. Cryengine is a very capable engine but some capabilities like this one are not easily accessible. It should be in the properties but it's not. Maybe in the futureThat's great! Perhaps then I need test this feature someday, but the main question is - why this abbility of the ILightsSource not part of standart user's interface for LightComponent's in sandbox property panel ? It should be in properties, that user can tweak.You are wrong

Re: Filter shadow
#8Guys, thanks for the effort you showed.Yeh. I totally agree. Cryengine is a very capable engine but some capabilities like this one are not easily accessible. It should be in the properties but it's not. Maybe in the futureThat's great! Perhaps then I need test this feature someday, but the main question is - why this abbility of the ILightsSource not part of standart user's interface for LightComponent's in sandbox property panel ? It should be in properties, that user can tweak.You are wrong![]()
Ghost, could you please give me a tip about to express an entity as a light source if you know? I've just simply spawned an entity(light) and as you know, I can't make ILightSource equal to IEntity. They are completely different things.
Re: Filter shadow
#9I think you need write code something like this, but I'am not for surecould you please give me a tip about to express an entity as a light source if you know?
Code: Select all
SEntitySlotInfo slotLightInfo;
m_pEntity->GetSlotInfo(nLightSlot, slotLightInfo);
ILightSource* pLightSource = slotLightInfo.pLight;
Re: Filter shadow
#10I'll try it. Thank you, though.I think you need write code something like this, but I'am not for surecould you please give me a tip about to express an entity as a light source if you know?
Code: Select all
SEntitySlotInfo slotLightInfo;
m_pEntity->GetSlotInfo(nLightSlot, slotLightInfo);
ILightSource* pLightSource = slotLightInfo.pLight;