Announcement

Collapse
No announcement yet.

Mobile lighting

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Mobile lighting

    HI

    Not entirely sure where to start with this question, I realise mobile lighting support is limited, but it's not entirely clear to me "how much
    it's limited - is there a definitive list somewhere of what is & isn't supported on mobile lighting wise?

    Ex: In MobilePlaceablePawn there is code like this:

    Code:
    var() const editconst LightEnvironmentComponent LightEnvironment;
    
    
    defaultproperties
    {
     	Begin Object Class=DynamicLightEnvironmentComponent Name=MyLightEnvironment
    		bSynthesizeSHLight=TRUE
    		bUseBooleanEnvironmentShadowing=FALSE
    		ModShadowFadeoutTime=0.75f
    		bIsCharacterLightEnvironment=TRUE
    		bAllowDynamicShadowsOnTranslucency=TRUE
     	End Object
     	Components.Add(MyLightEnvironment)
    	LightEnvironment=MyLightEnvironment
    
     	Begin Object Class=SkeletalMeshComponent Name=PawnMesh
    		LightEnvironment=MyLightEnvironment
     	End Object
     	Mesh=PawnMesh
     	Components.Add(PawnMesh)
    }
    Which seems to indicate you can set a DynamicLightEnvironmentComponent per mobile pawn? (Is the dynamic aspect cast out in some nefarious way?)
    This component contains AmbientGlow which can set an RGBA ambient level.
    I've gotten this to work changing the color on static mesh components & pawns (previewer and device)
    However, it's incredibly flaky, crashes, frequently doesn't work on multiple instances.
    Is it supported? Is it supported on only some component types? Can I only have one of them active at a time?
    Am I doing something wrong? Anyone gotten this to work?

    If I ignore the AmbientGlow - I can get the lighting environment to work - but everything seems to then just use some kind of default.
    Where is this default defined? How do I get access to the light that is being used? Can I change it dynamically - even if say only 1 light is supported?
    Is it pulling in lights from the level map?
    Should I be creating just one of these things globally & then pointing everything to it?

    I've successfully created dynamic lights as well via UDKExplosionLight for muzzle flashes, etc - which properly interact with the above (when it works).

    Yet again, I seem to be spending days mucking about with something that doesn't seem to properly work, when the solution should be trivial.

    Any help on this would be greatly appreciated - it's driving me nuts.

    Cheers
    William

    #2
    I haven't done what you are doing. So take my words with a grain of salt. Mobile only allows one light for now. So all lighting is faked/baked but one. I would then create a material change that when you fired your weapon the material would look like it received light but it really was a triggered event. Have the muzzle flash, flash back down the gun and out the sides.

    Comment

    Working...
    X