Pages: [1]
  Print  
Author Topic: Shader help  (Read 8278 times)
JoeSox
Half-Nub


Cakes 1
Posts: 51


« on: May 30, 2011, 09:42:20 AM »

Can someone tell me what is wrong with my current haybale shader? I can't get the edges to look proper. I have attached the model files also.
This is what is currently looks like in world.


Code:
mtl_haybale_
{
qer_editorimage models\mapobjects\haybale\_haybale_side_nrml-gggr.tga
qer_editorimage models\mapobjects\haybale\haybale_side.tga
q3map_forcemeta
q3map_nonplanar
  cull none //disabling culling (show back and front)
nopicmip //The image will always be high resolution.
{
map $lightmap
rgbGen identity
}
{
map models\mapobjects\haybale\_haybale_side_nrml-gggr.tga
blendFunc filter
rgbGen identity
}
{
map models\mapobjects\haybale\haybale_side.tga
blendFunc filter
rgbGen identity
}
}

Thanks!!
Logged
Udi
Member


Cakes 25
Posts: 536


i do my own stunts


WWW
« Reply #1 on: May 30, 2011, 04:40:36 PM »

Try "alphaFunc GE128" for transparent TGAs. If you could attach the compiled map, I could test it and post the exact solution, but now I'm just guessing.
Logged

http://udionline.hu/en/projektek/openarena/
Todo list: 1. q3dm17 textures replacement (95% done)
JoeSox
Half-Nub


Cakes 1
Posts: 51


« Reply #2 on: May 30, 2011, 05:14:40 PM »

Try "alphaFunc GE128" for transparent TGAs. If you could attach the compiled map, I could test it and post the exact solution, but now I'm just guessing.

Thanks, I really need second eyes on this one. I have tried a couple of combinations but I'm not getting the results.
I am just using a simple map so it compiles fast so I can view the rendering. I have tried the "alphaFunc GE128"  but not looking right.
attached are all the files.
Logged
Udi
Member


Cakes 25
Posts: 536


i do my own stunts


WWW
« Reply #3 on: May 31, 2011, 06:33:10 AM »

Here's the best result I could get with modifying the shaders:


Some sides are perfect, like the top, but some sides have dark parts. There are less dark parts if only the front sides are drawn, so I guess the 3D model has some overlapping polygons. I don't really know, I'm a noob at modelling.

Here's the shader definition:
Code:
mtl_haybale_
{
        qer_editorimage models\mapobjects\haybale\haybale_side.tga
        q3map_forcemeta
        q3map_nonplanar
        cull front
                {
                        map models\mapobjects\haybale\haybale_side.tga
                        rgbGen identity
                        alphaFunc GE128
                        depthWrite
                }
                {
                        map models\mapobjects\haybale\_haybale_side_nrml-gggr.tga
                        rgbGen identity
                        blendFunc filter
                        depthFunc equal
                }
                {
                        map $lightmap
                        rgbGen identity
                        blendFunc filter
                        depthFunc equal
                }
}
Logged

http://udionline.hu/en/projektek/openarena/
Todo list: 1. q3dm17 textures replacement (95% done)
JoeSox
Half-Nub


Cakes 1
Posts: 51


« Reply #4 on: May 31, 2011, 07:41:20 AM »

Here's the best result I could get with modifying the shaders:

Udi,
Thanks. Awesome job. That will have to do; much better then it was.
I appreciate the help, I was worn out trying to figure that out.
Logged
Pages: [1]
  Print  
 
Jump to: