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.

DarkBASIC Professional Discussion / DBO and Mipmapping

Author
Message
Sph!nx
17
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 18th Sep 2014 16:24
Hey all,

I'm trying to load a dbo map (made in an editor with many textures). When I load it up in the game (dbp), the textures are blurred. I would like to have all pixels as sharp as possible to make pixel-art textures. This is called mipmapping, right?

Tried all the expected object and filter commands, been fiddling with the video commands and searched this forum but I still haven't fixed it.

Any help is much appreciated. Thanks!

Regards Sph!nx
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 18th Sep 2014 20:46
Quote: "This is called mipmapping, right?"


Depends what "this" is. The default amount of mipmapping isn't suitable for modern displays in my opinion and it might be possible to control it using mipmap bias. Not sure if DBPro has a command for that - but I know it can be controlled in a shader.

If you disable mipmapping you get an annoying shimmering effect as you move around the scene - one of the aims of mipmapping is to eliminate that. But if you get the mipmap bias wrong then you'll get noticeable blurring. I had a simple shader demo somewhere, I'll see if I can find it.



Powered by Free Banners
Sph!nx
17
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 18th Sep 2014 21:01
Thank Green Gandalf, but after reading your post, I think I need something else...

The problem is, the textures are made with crispy-sharp pixels, but DBP will render the textures on the DBO objects kinda blurry.

Regards Sph!nx
Derek Darkly
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 18th Sep 2014 21:07
You could try to reload your texture with LOAD IMAGE and use texture flag 0 for perfect pixel quality, but like GG mentioned this usually isn't a desired effect.

Sph!nx
17
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 18th Sep 2014 21:59
Fixed. Changed from *.dbo to *.x

Thanks for the replies mates!

Regards Sph!nx
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 18th Sep 2014 22:00
Quote: "The problem is, the textures are made with crispy-sharp pixels, but DBP will render the textures on the DBO objects kinda blurry."


That is exactly what I mean. Have a look at the attached demo. The scene shows three cubes, the left hand cube has default shader mipmapping, the middle one has default DBPro mipmapping, and the right hand one has a large negative mipmap bias applied to the texture read which effectively turns off mipmapping. The left hand and middle cubes look somewhat blurred compared to the right hand one.

However if you rotate the cubes by pressing r you'll see the shimmering effect on the right hand cube.

Now try increasing the bias to an acceptable level by pressing a. On my machine, and with my eyesight, the shimmering effect is lost somewhere around bias = -0.8 - and the texture looks sharper than on the other two cubes.

These things are all about making the best compromises and I guess display resolution is a factor to consider as well - I'm using a display of 1600x900.



Powered by Free Banners
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 18th Sep 2014 22:03
Quote: "Fixed. Changed from *.dbo to *.x"


Weird. Why on earth should that matter? Perhaps your dbo object was created using the wrong mipmap/filter setting (DBPro saves these in a dbo file whereas x files don't).

Glad you found a simple solution though.



Powered by Free Banners
Sph!nx
17
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 18th Sep 2014 23:26 Edited at: 18th Sep 2014 23:27
Yeah, indeed strange. Somehow DBP handles the textures differently. Both my example objects are made the same way, same editor but simply exported to different file types.

Regards Sph!nx

Login to post a reply

Server time is: 2026-07-18 09:25:00
Your offset time is: 2026-07-18 09:25:00