Box2d Lights really low resolution

Anything about development not directly related to libgdx, e.g. OpenGL, Android APIs etc.

Box2d Lights really low resolution

Postby zipper9998 » Sat Oct 07, 2017 3:44 pm

I have tried using box2d lights but it seems to render really low resolution, inaccurate, laggy lights for no apparent reason....The shadows barely follow the bodies and are very low resolution and laggy...This is on a relatively good PC as well. Any help would be much appreciated :)
zipper9998
 
Posts: 65
Joined: Tue Oct 25, 2016 2:05 pm

Re: Box2d Lights really low resolution

Postby evilentity » Sat Oct 07, 2017 5:10 pm

How they look depends on how you setup them, not on the device you run them on.
Looking for a freelancer? PM me!
evilentity
 
Posts: 4020
Joined: Wed Aug 24, 2011 11:37 am

Re: Box2d Lights really low resolution

Postby zipper9998 » Sat Oct 07, 2017 9:47 pm

yeah I know, but I was wondering what the correct setup is, I haven't changed any values from the defaults so...
zipper9998
 
Posts: 65
Joined: Tue Oct 25, 2016 2:05 pm

Re: Box2d Lights really low resolution

Postby evilentity » Sat Oct 07, 2017 11:11 pm

Then read the wiki, docs, examples.
Looking for a freelancer? PM me!
evilentity
 
Posts: 4020
Joined: Wed Aug 24, 2011 11:37 am

Re: Box2d Lights really low resolution

Postby zipper9998 » Sun Oct 08, 2017 7:24 am

I have done, I just set up the ray handler and add a directional light and its super low resolution, are there any common reasons for this issue?
Attachments
box2dlightserror.png
This is what it looks like.
box2dlightserror.png (8.71 KiB) Viewed 512 times
zipper9998
 
Posts: 65
Joined: Tue Oct 25, 2016 2:05 pm

Re: Box2d Lights really low resolution

Postby evilentity » Sun Oct 08, 2017 9:12 am

Yes, not setting the resolution to one you want.
Looking for a freelancer? PM me!
evilentity
 
Posts: 4020
Joined: Wed Aug 24, 2011 11:37 am

Re: Box2d Lights really low resolution

Postby zipper9998 » Sun Oct 08, 2017 6:20 pm

no offense bro, but you're not being that helpful, all you have done is merely restate my problem without actually helping me out! If you know so much why can't you help me :P ??
zipper9998
 
Posts: 65
Joined: Tue Oct 25, 2016 2:05 pm

Re: Box2d Lights really low resolution

Postby RafaSKB » Sun Oct 08, 2017 10:41 pm

When you create a RayHandler instance passing just the Box2d World as argument, the FBO size used is 1/4 of the screen. See here https://github.com/libgdx/box2dlights/b ... #L117-L120

That might cause low resolution lights and shadows, but on the other hand its less performance intensive. Play with that value to see if it helps.

Another thing to try is to increase the amount of blur passes.

TL;DR: what evilentity said, you have to properly configure box2dlights to do what you want
Junk E.T. - A garbage-themed roguelike where you travel through the galaxy to collect mankind's waste and turn into a profit.
- http://www.junketgame.com
RafaSKB
 
Posts: 90
Joined: Sat Aug 01, 2015 5:14 am
Location: São Paulo, Brazil

Re: Box2d Lights really low resolution

Postby zipper9998 » Mon Oct 09, 2017 6:34 pm

Ok thanks a lot I will try that :)
zipper9998
 
Posts: 65
Joined: Tue Oct 25, 2016 2:05 pm

Re: Box2d Lights really low resolution

Postby aliceta » Wed Nov 15, 2017 2:47 am

I have an issue on mobile devices with higher resolution. I am creating a game using LibGDX. I am also using Box2d and Box2dLights. When game is used on mobile phone with higher resolution, FPS would drop bellow 60fps. Not right away, but after 20-30 seconds. Example would be LG G3 where FPS always drops bellow 60fps after some time
aliceta
 
Posts: 8
Joined: Tue Nov 14, 2017 4:12 am


Return to General Development

Who is online

Users browsing this forum: No registered users and 4 guests