2D Toolkit Forum

2D Toolkit => Support => Topic started by: RCBricker on October 11, 2014, 09:28:28 pm

Title: Pre Rendered Lights on a Tiled Sprite
Post by: RCBricker on October 11, 2014, 09:28:28 pm
Hello Unikron and fellow forum folk, I have been trying to bake lights (just the light no shadows required) from a point light to a tiled sprite to reduce  memory usage in my game, I have seen several tuts on lightmapping, basically I check the object as static, place all the lights I want to bake, select baking options and bake, from what Ive seen the only component required to do this is that the objects to bake have mesh renderers,  and my tiled sprite does, but when I set the lights, set the tiled sprite as static and bake the tiled sprite goes black and if I disable the lights there is no pre  light on the tiled sprite, my sprite collection generate normals, my sprite collections material is the tk2dlitvertexcolor and the recive lights, what am I missing here?

Thanks.
Title: Re: Pre Rendered Lights on a Tiled Sprite
Post by: unikronsoftware on October 12, 2014, 03:35:48 pm
You can't bake lightmaps on tilemaps or sprites - these are classed as dynamic geometry. Secondly they dont have a 2nd uv channel that lightmapping requires so it won't really work. Have you tried painting in vcolors to simulate light? That could work I guess. Alternatively if you need more detail you can use a custom shader which uses scaled world unit as uv2, you will then be able to paint in lighting from within photoshop...
Title: Re: Pre Rendered Lights on a Tiled Sprite
Post by: RCBricker on October 12, 2014, 05:00:36 pm
I see then, is it posible to paint on some sprites al tiled sprites as I paint on a TileMap?
Title: Re: Pre Rendered Lights on a Tiled Sprite
Post by: MoopadPicKang on October 13, 2014, 11:13:57 am

nice touch there. Looks really good.