Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Normal mapping (normalMapWith1PointLight)
Started by hgbrian Apr 19 2014 07:00 PM

No replies to this topic
[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

hgbrian

[GLOBAL: userInfoPane.html]
hgbrian
  • Contributor

  • 103 posts
  • Corona SDK

I've been experimenting with composite.normalMapWith1PointLight. It looks great in general, but I have not been able to get it to do what I want. The documentation is also rather incomplete (for example, which is which in the tuple of attenuationFactors?) could be more complete...

 

The effect I am trying to create is a red light on top of a white stone. So far, I have only been able to have a white light on a white stone. The ambient lighting of the stone apparently has to match the point light, so if I make the point light red, the whole stone becomes red (or black if there is no light). 

 

I tried to fake the effect by having two layers: the underlying white stone layer, and the red light layer on top, but the red light layer is black wherever there is no light, not transparent.

 

Hopefully this explanation makes some sense.... Has anyone solved for anything like this? Thanks!




[topic_controls]
[/topic_controls]