Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Realtime shadow test
Started by rakoonic Jan 30 2017 08:20 PM

5 replies to this topic
lighting shadow
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

rakoonic

[GLOBAL: userInfoPane.html]
rakoonic
  • Contributor

  • 112 posts
  • Corona SDK

https://youtu.be/CR-65hHAcmc

Not much more to be said, really, apart from the fact that as I updated the code from a hacky-mess to something not quite as hacky with error checks etc, speed did drop sufficiently that I think soft-edge shadows probably isn't the way to go. Hard-edges though are still nicely fast  :)



[TOPIC: post.html]
#2

Coder101

[GLOBAL: userInfoPane.html]
Coder101
  • Contributor

  • 104 posts
  • Corona SDK

How'd you do that?

[TOPIC: post.html]
#3

rakoonic

[GLOBAL: userInfoPane.html]
rakoonic
  • Contributor

  • 112 posts
  • Corona SDK

The tile layer data lets you know if there's a tile there or not, so you can find edges that face away from the light source. Shadow edges are just a line from the wall's corner away from the light. So to answer your question, mostly it is just maths :)



[TOPIC: post.html]
#4

horacebury

[GLOBAL: userInfoPane.html]
horacebury
  • Corona Geek

  • 2,820 posts
  • Corona SDK

Very cool.



[TOPIC: post.html]
#5

sporkfin

[GLOBAL: userInfoPane.html]
sporkfin
  • Contributor

  • 240 posts
  • Corona SDK

rakoonic,

 

Thanks for all the demos and inspiration over the years.  Any chance some of your experiments might end up as a plugin in the Corona Marketplace?

 

-Jonathan



[TOPIC: post.html]
#6

rakoonic

[GLOBAL: userInfoPane.html]
rakoonic
  • Contributor

  • 112 posts
  • Corona SDK

Possibly.

At the moment this is just a proof of concept test, it would need a fair amount of work to be useable which requires time. Time which I hope to have in the next few weeks or so :)




[topic_controls]
[/topic_controls]