Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Point Light Clarification?

Author
Message
Golelorn
8
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 20th Jul 2019 04:54 Edited at: 20th Jul 2019 04:55
I have two lights set up, but I am only seeing one have any impact on the scene. I found a thread by Green Gandalf, and looking at it it seems we have to write our own shader for the lights? Is that accurate?

Thanks.


I have a light on the "character" that is showing up, and another on the torch, but its not showing.

Attachments

Login to view attachments
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 20th Jul 2019 05:02 Edited at: 20th Jul 2019 05:07
I found the limit on point lights was more the capabilities of your processor
I have two point lights in pixelated labrynth at the beginning and ending of
each level and that works well with older android phones. But I used a shader
through out the game for a light effect around signs
fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Rick Nasher
7
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 21st Jul 2019 04:27
Yeah, I found that if the lights are too close and both using vertex or pixel mode you might run into problems.

The manual says:
Quote: "SetPointLightMode

Sets the point light to vertex or pixel mode. Vertex mode is faster but pixel mode has better quality. By default lights are created in vertex mode. A mesh can be lit by up to 8 vertex lights and 4 pixel lights at a time,
if you add more lights than this then the closest lights will be used by the mesh. "


Perhaps splitting up your target objects makes a difference?
Golelorn
8
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 21st Jul 2019 16:47 Edited at: 21st Jul 2019 16:50
Thanks, guys. I found out it was because I was exporting the torch at its scene location in Blender, and I forgot when you place the object in AppGameKit 0,0,0 is "object" position. So, my light was being placed at 0,0,0 instead of being placed on the object.

Attachments

Login to view attachments
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 21st Jul 2019 17:02
looks great Golelorn
fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk

Login to post a reply

Server time is: 2024-11-22 15:58:20
Your offset time is: 2024-11-22 15:58:20