ПрограммированиеФорумГрафика

Проблема с мипмапом в Ogre

#0
6:30, 15 июля 2011

Не могу избавится от мипмапинга - вот такая хренотень получается
Скрин | Проблема с мипмапом в Ogre

Код материала (точнее его часть)

    technique
    {
        scheme summer/day
        pass
        {
            texture_unit
            {
                texture sand.png 1
            }
        }
    }

Используется Ogre, в качестве рендера Dx9. Кто-нибудь знает как избавиться от этого?

#1
9:57, 15 июля 2011

Анизотропную фильтрацию попробуй поставить.

#2
17:43, 15 июля 2011
texture_unit
{
    filtering linear linear none
    texture sand.png 1
}


filtering
Sets the type of texture filtering used when magnifying or minifying a texture. There are 2 formats to this attribute, the simple format where you simply specify the name of a predefined set of filtering options, and the complex format, where you individually set the minification, magnification, and mip filters yourself.

Simple Format
Format: filtering <none|bilinear|trilinear|anisotropic>
Default: filtering bilinear

With this format, you only need to provide a single parameter which is one of the following:

none
No filtering or mipmapping is used. This is equivalent to the complex format 'filtering point point none'.

bilinear
2x2 box filtering is performed when magnifying or reducing a texture, and a mipmap is picked from the list but no filtering is done between the levels of the mipmaps. This is equivalent to the complex format 'filtering linear linear point'.

trilinear
2x2 box filtering is performed when magnifying and reducing a texture, and the closest 2 mipmaps are filtered together. This is equivalent to the complex format 'filtering linear linear linear'.

anisotropic
This is the same as 'trilinear', except the filtering algorithm takes account of the slope of the triangle in relation to the camera rather than simply doing a 2x2 pixel filter in all cases. This makes triangles at acute angles look less fuzzy. Equivalent to the complex format 'filtering anisotropic anisotropic linear'. Note that in order for this to make any difference, you must also set the max_anisotropy attribute too.


Complex Format
Format: filtering <minification> <magnification> <mip>
Default: filtering linear linear point

This format gives you complete control over the minification, magnification, and mip filters. Each parameter can be one of the following:

none
Nothing - only a valid option for the 'mip' filter , since this turns mipmapping off completely. The lowest setting for min and mag is 'point'.

point
Pick the closet pixel in min or mag modes. In mip mode, this picks the closet matching mipmap.

linear
Filter a 2x2 box of pixels around the closest one. In the 'mip' filter this enables filtering between mipmap levels.

anisotropic
Only valid for min and mag modes, makes the filter compensate for camera-space slope of the triangles. Note that in order for this to make any difference, you must also set the max_anisotropy attribute too.

#3
11:05, 16 июля 2011

cin
> texture_unit
> {
> filtering linear linear none
> texture sand.png 1
> }

Слишком зернисто получается. Анизотропная фильтрация самое то

#4
11:23, 16 июля 2011

NIXIUS
А как эта «песчанка» реализована? Группа треугольников, расположенных прямо над ландшафтом?
Вообще, нужно ведь завести вторую группу текстурных координат, и по ним «класть гравий».

#5
19:35, 16 июля 2011

mrt
> А как эта «песчанка» реализована? Группа треугольников, расположенных прямо над
> ландшафтом?

Нет - дорожно полотно, обочина и кювет плотно сшиты между собой. Микс текстур обочины подготовлен заранее

Выглядит сейчас вот так:
Днем:
Обочина днем | Проблема с мипмапом в Ogre

Ночью:
Обочина ночью | Проблема с мипмапом в Ogre

#6
19:47, 16 июля 2011

NIXIUS
> NIXIUS
так  и должно быть.
текстура обочины тайлиться? похоже да!

поставь режим GL_CLAMP_TO_EDGE  для одной из координат.

#7
19:58, 16 июля 2011

susageP
> текстура обочины тайлиться? похоже да!
Обочины или кювета? Просто у меня трасса генерится утилитой, и мне нужно знать где конкретно исправлять...

#8
21:18, 16 июля 2011

Обочены похоже.. ведь видно что там полоса это смесь правого последнего и левого первого..

ПрограммированиеФорумГрафика

Тема в архиве.