About Store Forum Documentation Contact



Post Reply 
mipmaps
Author Message
Pixel Perfect Offline
Member

Post: #1
mipmaps
A noob question I know, but how do I perserve mipmaps when importing textures for my terrain?

I created a new material and dragged my DDS DXT5 texture with mipmaps onto the color (diffuse) panel of the material editor but mipmaps do not appear to be active in the editor when it's painted on the terrain.

Is there a setting that needs adjusting to display mipmaps or have they been lost in the conversion process somehow?
03-14-2013 08:01 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: mipmaps
Hello,

Sorry that's not currently supported. Only the first mip is imported and from it, all others are created automatically by downsampling.

What operations are you performing on subsequent mip-maps? Do you blur or sharpen them?
Is the trouble of doing that really worth it? (what's the visual difference between custom mip maps and automatic ones?)
03-15-2013 02:00 PM
Find all posts by this user Quote this message in a reply
Pixel Perfect Offline
Member

Post: #3
RE: mipmaps
Ah, OK. Thanks for letting me know, I wasn't aware it didn't support full mipmaping from the original texture.

The operations I tend to perform for terrain based textures are a blur and gradual averaging of the color which is very effective in removing texture pattern repetitions, especially at distance. The difference I am seeing is quite noticeable but if it's not supported then it's not supported, I'll have to live with that.
03-15-2013 02:44 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: mipmaps
You can try using the Macro texture slot, it will get activated for terrain materials at certain distance (around 100-300 meters), it's a secondary texture that will be used with different scale.
03-15-2013 04:28 PM
Find all posts by this user Quote this message in a reply
Pixel Perfect Offline
Member

Post: #5
RE: mipmaps
Excellent, that might be a workable solution. I'll give it a try.
03-15-2013 04:57 PM
Find all posts by this user Quote this message in a reply
para Offline
Member

Post: #6
RE: mipmaps
I used this technique also in the past, but so far I haven't had that much trouble with ground textures, but still I thought I'd give it a try.. so after a quick search I found Image.injectMipMap() ? .. can that be used to manually replace mip maps? If yes, can the results also be saved in a .gfx? I tried doing something along the lines:

Code:
Image img, mip;
img.Import( "test.dds", -1 , IMAGE_2D, 12 ); // 2048x2048 DTX5
mip.Import( "smiley.png" ); // 256x256 RGBA
img.lock ( LOCK_READ_WRITE, 3 ); // assuming 4-th mipmap is 256x256 in size
img.injectMipMap( mip, 3 ); //not sure about 2nd param, miplevel is read from or  written to?
img.unlock();
img.save( "mipinject.gfx" );
img.ExportDDS( "mipinject.dds");
But the results aren't what I expected.. I tried various combinations but the exported .dds doesn't have any mip maps while the .gfx has all of them, but I can't see the injected one
(This post was last modified: 03-15-2013 05:22 PM by para.)
03-15-2013 05:18 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #7
RE: mipmaps
ExportDDS saves only first mip map.
This code won't do much good, because we're talking about EE 2.0 Editor which automatically manages textures generation.
03-16-2013 12:04 AM
Find all posts by this user Quote this message in a reply
Post Reply