Jump to content


Photo

Tlighting[2.4] Gm: Studio


  • Please log in to reply
148 replies to this topic

#141 tizzio

tizzio

    GMC Member

  • GMC Member
  • 59 posts
  • Version:GM:Studio

Posted 24 April 2013 - 09:41 PM


Spoiler

nikurizo: Really strange, tl_free() should remove all the lighting system. 

 

Could you add a function to clear all the lights of the system? I hate to use tl_free() and tl_init() every room change.

There is tl_light_delete_all() !  
download the latest version  :thumbsup:
 
TehWave You can draw on the light surface, if you want.
You can retrive the id using tl_get_surface() 
 


Edited by tizzio, 24 April 2013 - 09:54 PM.

  • 1

#142 SEnergy

SEnergy

    GMC Member

  • GMC Member
  • 188 posts
  • Version:GM:Studio

Posted 24 April 2013 - 09:44 PM

Is it at all possible to use this lighting engine in unity with a fog of war system? 

 

I don't want to see the lighting that's behind the wall when I'm on the other side.

 

Could I use a tile-based fog of war system if a surface-based fog of war system isn't possible?

 

Thanks in advance.

 

just hide other lights when they are not in collision with player's light, simple...


  • 1

#143 SEnergy

SEnergy

    GMC Member

  • GMC Member
  • 188 posts
  • Version:GM:Studio

Posted 01 May 2013 - 03:06 PM

@tizzio

 

could you create function that will make light ignore specified object and provide light normally ? like it's on top of something and walls doesn't bloc kit


  • 0

#144 TehWave

TehWave

    GMC Member

  • GMC Member
  • 9 posts
  • Version:GM:Studio

Posted 03 May 2013 - 04:58 PM

@tizzio

 

could you create function that will make light ignore specified object and provide light normally ? like it's on top of something and walls doesn't bloc kit

 

You want it to cast no shadows for that specific object?


  • 0

#145 SEnergy

SEnergy

    GMC Member

  • GMC Member
  • 188 posts
  • Version:GM:Studio

Posted 03 May 2013 - 09:17 PM

@tizzio

 

could you create function that will make light ignore specified object and provide light normally ? like it's on top of something and walls doesn't bloc kit

 

You want it to cast no shadows for that specific object?

yes, or just to cast shadows for instances that are higher/lower depth, I want to create some kind of "lamps" on spots, for example on the keg and it's projecting light to everything but the things that are higher than the lamp, just like in real life, I hope u understand :P


  • 0

#146 TehWave

TehWave

    GMC Member

  • GMC Member
  • 9 posts
  • Version:GM:Studio

Posted 03 May 2013 - 10:44 PM

It could be done by saying

 

if place_meeting(x, y, o_player) {
     with (o_player) {
          tl_shadowsprite(id)
          tl_shadowsprite_intensity(id,0)
     }
}
else {
     with (o_player) {
          tl_shadowsprite(id)
          tl_shadowsprite_intensity(id,0.1)
     }
}
 

 

However, this would only remove the shadow if the object(o_player) is in collision with the object with the light.

 

Alternatively, you could try collision lines or circles, but I sincerely doubt this is anything but an crappy workaround.


  • 2

#147 SEnergy

SEnergy

    GMC Member

  • GMC Member
  • 188 posts
  • Version:GM:Studio

Posted 04 May 2013 - 08:17 PM

It could be done by saying

if place_meeting(x, y, o_player) {
     with (o_player) {
          tl_shadowsprite(id)
          tl_shadowsprite_intensity(id,0)
     }
}
else {
     with (o_player) {
          tl_shadowsprite(id)
          tl_shadowsprite_intensity(id,0.1)
     }
}
 
 
However, this would only remove the shadow if the object(o_player) is in collision with the object with the light.
 
Alternatively, you could try collision lines or circles, but I sincerely doubt this is anything but an crappy workaround.


 
thanks! I will try it after I'll be done with networking

edit: actually I need specific light that will ignore the objects and just project the light as it was in empty room

Edited by SEnergy, 04 May 2013 - 09:59 PM.

  • 1

#148 tizzio

tizzio

    GMC Member

  • GMC Member
  • 59 posts
  • Version:GM:Studio

Posted 11 May 2013 - 04:33 PM

I added another tutorial for poligonal shadows right now!
 
 

actually I need specific light that will ignore the objects and just project the light as it was in empty room

Sorry, i haven't so much time to update the engine yet!

Edited by tizzio, 11 May 2013 - 04:33 PM.

  • 1

#149 SEnergy

SEnergy

    GMC Member

  • GMC Member
  • 188 posts
  • Version:GM:Studio

Posted 11 May 2013 - 10:18 PM

I added another tutorial for poligonal shadows right now!
 
 

actually I need specific light that will ignore the objects and just project the light as it was in empty room

Sorry, i haven't so much time to update the engine yet!


well I hope to see that soon!
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users