Xonotic Forums
[SOLVED] misc_model : Support for specular and relief mapping? - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Creating & Contributing (https://forums.xonotic.org/forumdisplay.php?fid=10)
+--- Forum: Xonotic - Development (https://forums.xonotic.org/forumdisplay.php?fid=12)
+--- Thread: [SOLVED] misc_model : Support for specular and relief mapping? (/showthread.php?tid=4597)



misc_model : Support for specular and relief mapping? - Maddin - 11-08-2013

Apparently misc_models don´t seem to support specular and relief mapping nor is the dot2product shader effect properly working. Is there any way to implement this? Misc_gamemodel does support these but is not meant for baking into the bsp as the regular misc_model is.

EDIT: Sorry for the trouble. It´s fixed. Please delete this post!


RE: misc_model : Support for specular and relief mapping? - Mr. Bougo - 11-08-2013

Don't delete this post! I can lock it and it'll get off the first page eventually.

Unless you really insist that it has to be removed. PM me then.


RE: misc_model : Support for specular and relief mapping? - Mirio - 11-08-2013

Could not he delete it himself anyway?


RE: misc_model : Support for specular and relief mapping? - tZork - 11-09-2013

better yet, do tell how it was fixed.


RE: misc_model : Support for specular and relief mapping? - Mr. Bougo - 11-09-2013

I didn't realize it wasn't explained. Topic re-opened!


RE: misc_model : Support for specular and relief mapping? - Maddin - 11-10-2013

Ok, so to clear things up, this is what happened:

I´ve had a model which used a terrain blending texture (a shader including the dotproduct2 property). Though this model didn´t make any use of specular- and reliefmapping. See the terrain models in the map Warfare for this, they exactly represent this issue. But this issue is not model specific. It´s related to the dotproduct2 or the blending property. One more oddity shows up when using these shader properties is that BSP structure then supports reliefmapping but not specularmapping.

So misc_models do support specular and reliefmapping but shaders using a blending technique don´t.

Maybe some of you may try this out and we´ll see whether this behaviour can´t be confirmed?

By the way this is the shader I wrote:
Code:
textures/map_warfare/blends_earth_rock01_sand01
{
    qer_editorimage textures/map_warfare/blends_earth_rock01_sand01.tga
    
    q3map_bounceScale  0.5
    dpoffsetmapping - 9 match8 168

    q3map_lightmapSampleOffset 8
    q3map_nonplanar
    q3map_shadeangle 95

    q3map_alphaMod dotproduct2 ( 0 0 1 )

    {
        map textures/phillipk2x/natural/pk02_rock01.tga // Primary
    }

    {
        map textures/phillipk2x/natural/pk02_sand01.tga // Secondary
        blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA        
        alphaGen vertex
    }

    {
        map $lightmap
        blendFunc GL_DST_COLOR GL_ZERO
    }
}