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 / Mipmapping Levels

Author
Message
Hamish McHaggis
22
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 11th Oct 2004 02:37
I have noticed that that default DBPro mipmapping seems to make objects overly blurry, by replacing the original texture too soon (imo). Does anyone know any way that the mipmapping levels can be adjusted?

Isn't it? Wasn't it? Marvellous!
Get Involved With The DBPro Community FPS
Lost in Thought
21
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 11th Oct 2004 03:46
I haven't found a way but using .dds textures seems to be alot clearer.

Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 7th Feb 2005 07:08 Edited at: 7th Feb 2005 07:25
Dredging up a bit of an old thread, here, but I've spent the last couple of hours experimenting with 'manual' mipmapping, for the same reason stated above - crisp textures appear washed out and overly blurry when they are only a small distance away from the camera. It does seem that the mipmaps created in DBP are a bit extreme. Although I haven't really discovered anything that hasn't been said before, I think I can clarify a couple of points, and give some pointers to people that haven't come across this stuff yet:

Firstly, there is no difference between the way bmp's, jpg's, png,s or dds's are mipmapped within DBP, as far as I've been able to tell. Just changing a file from bmp to dds using the load and save image commands in DBP does not appear to make any difference in the comparisons I've done.

However, because a dds contains mipmap data before it is loaded into DBP, it is possible to manually alter the level of blurring of each mipmap (there are 12 of them in addition to the original image).

To do this you need the dds tools from the nvidia website (http://developer.nvidia.com/object/nv_texture_tools.html which will enable you to generate and manipulate mipmaps within Photoshop or PaintshopPro for example. Then you can load up a bmp, save it as a dds and control how much blurring/fading/sharpening is applied to each mipmap level.

Here is a comparison to show the difference between a dds created in this way, and a bmp mipmapped automatically in DBP:



The one on the left is a dds mipmapped manually, and faded to a blue colour to give a fog effect, whereas the one on the right is a plain old bmp. It's subtle, but notice that the detail in the dds is sharper in the middle to far distance, even with the fog effect, than the blurry bmp.


<edit>

Just realised that the pictures are not a great comparison, as one has fog and the other doesn't - but I've just ditched the test program without saving anything, so take my word for it - the dds with manual mipmapping is noticeably sharper than the bmp.


Attachments

Login to view attachments
Mobiius
Valued Member
22
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 7th Feb 2005 07:56
Well there you go. DDS's rule!

1800+ XP - GeforceFX 5600 - 256MbDDR - 60Gb Hdd - XP Pro (SP2)
re faze
20
Years of Service
User Offline
Joined: 24th Sep 2004
Location: The shores of hell.
Posted: 7th Feb 2005 12:33
how can i use this with the csm importer?
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 7th Feb 2005 20:38
I think you'd probably have to hack the .csm files to specify different texture - might be a simple case of looking for .BMP or whatever extension, and changing it to .DDS - then with dupe copies of the textures in .DDS format it should be able to load them. .DDS textures should work in any DX environment.

One thing you can also do with .DDS is fade out the alpha channel with the mip map, so usefull for grass if want the further away detail to fade out - haven't tried this though as transparency is still a little strange in DBPro.


Van-B


It's c**p being the only coder in the village.
2kilo
21
Years of Service
User Offline
Joined: 26th Jul 2003
Location: London
Posted: 8th Feb 2005 01:51
@ Hamish McHaggis

I remember mucking about with different scales/units ages ago, this [logically] seemed to effect the mipmapping, ie if a texture is replaced too soon it could be that your game's scale is too big...? dunno? [anyone?]

People seem to use different scales/units etc, and so far in DBP and Gile[s] I have had different results or querks from each...? [eg sudden mipmapping or offset shadowmaps].

Anyone got any info on DBP's defaults, how they behave or optimal settings/scales? Or maybe things to avoid?
Lost in Thought
21
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 8th Feb 2005 20:39
Quote: "how can i use this with the csm importer? "
I haven't tested it but I could easily write you a program to convert all .bmp extension textures to .dds however, I am not sure if the importer is programmed to accept .dds textures and even more is that CShop doesn't support them. So you will have to manually make .bmp copies of all the .dds textures to texture the .csm with.

Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 8th Feb 2005 21:01
I must be being stupid.. What is DDS and why is it better than PNG & BMP?
I've seen it mentioned loads, but never really found out what it is..

My Website:
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 8th Feb 2005 22:18
.DDS is a custom image format for DX engines, it is usually compressed, and supports alpha channels (unlike BMP). There are several options with .DDS images though, like compression methods, mipmapping levels, dithering methods, more options than any other image format.

.DDS images have several benefits:

* They're far smaller than .bmp
* They can hold mipmapped variations as well in a single file
* Their mipmapping is better than DBPro's
* They load directly into graphics memory, so they don't take any more space than they start out with (unlike other formats), they stay inside graphics memory and are therefor faster to load and access.
* They offer reasonable media protection (most people have never heard of .DDS images so they can't mess around with your graphics)
* They can be faded on alpha or colour through their mipmaps.

I strongly suggest the import/export plugin from the nVidia website for PaintShopPro6+ or Photoshop.


Van-B


It's c**p being the only coder in the village.
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 8th Feb 2005 22:55
would that PSP plugin work with PSP9?

Cheers Van, I'll look into that tonigh.. Would be MASSIVELY usefull

My Website:
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 9th Feb 2005 00:26
Yeah, PSP6+ was stated because version 6 was the start of PS plugin support, any version after 5 should be fine (I'm still using v6 myself). I prefer Photoshop for it's alpha support though.


Van-B


It's c**p being the only coder in the village.

Login to post a reply

Server time is: 2025-06-02 14:03:01
Your offset time is: 2025-06-02 14:03:01