GBear Posted July 5, 2016 Share Posted July 5, 2016 hi everybody.. could you give me tips to create fake light? i draw fake light like following image with blendMode..(i don't use shader here because it's slow on mobile). it will be drawn on maps.. i wanna add good simple animation like intensity of light or glittering i need good formula or function to draw good.. thx.. Quote Link to comment Share on other sites More sharing options...
GBear Posted July 5, 2016 Author Share Posted July 5, 2016 i set 'sine wave spectrum' first var value = (Math.sin(this.frequency) + center)/(center+1)/this.amplitude + noise; if center is 0 this formula range have -1 ~ 1 if center is 1 this formula range have 0 ~ 1 if center is 2 this formula range have 0.3 ~ 1 if center is 3 this formula range have 0.4 ~ 1 and frequency is like velocity; you can control speed noise is noise noise = (Math.random()+Math.random()-1)/10; it's looks better.. but not perfect.. i will do more.. thx. Kyros2000GameDev 1 Quote Link to comment Share on other sites More sharing options...
GBear Posted July 6, 2016 Author Share Posted July 6, 2016 Not Using Noisenot_using_noise.avi Using Noiseusing_noise.avi Quote Link to comment Share on other sites More sharing options...
mattstyles Posted July 6, 2016 Share Posted July 6, 2016 The noisy one looks great, I think it works really well. If anything, it could do with a little smoothing between frames, some of the jumps are quite extreme but fire is a little like that sometimes anyway. Quote Link to comment Share on other sites More sharing options...
GBear Posted July 11, 2016 Author Share Posted July 11, 2016 @mattstyles thx.. matt~~ can you know about this issue? Quote Link to comment Share on other sites More sharing options...
mattstyles Posted July 11, 2016 Share Posted July 11, 2016 @GBear I had a stab at the other question, not sure how much help my comment is though. Quote Link to comment Share on other sites More sharing options...
GBear Posted July 12, 2016 Author Share Posted July 12, 2016 @mattstyles hi matt.. thx.. i red it..^^/ and replied Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.