Jump to content

Transparent shader for crystals- taking shadows and lightning but transparent


Recommended Posts

Posted (edited)

I want to do these crystals

tumblr_ny869sqSHA1rt4i77o1_1280.jpg

but i took the shaders from glass.. and it looks crappy.. it doesnt give a damn about lightning, fog and any shadows.. How to make normal texture that is just a little transparent?..

EDIT"

NVM I managed to do something cool :) :

models/map_objects/cave/crystals1
{
    qer_editorimage    models/map_objects/cave/crystals1
    q3map_tesssize    48
    qer_trans    0.5
    surfaceparm    nonopaque
    surfaceparm    trans
    q3map_material    Glass
    q3map_nolightmap
    {
        map models/map_objects/cave/crystals1
        blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
    }
{
map models/map_objects/cave/crystals1_glow
blendFunc GL_ONE GL_ONE
glow
rgbGen identity
}
    {
        map models/map_objects/cave/crystals1_spec
        blendFunc GL_SRC_ALPHA GL_ONE
        detail
        alphaGen lightingSpecular
    }
}

And final product

2u2xziN.jpg

Edited by Langerd
Smoo likes this
Posted

Looks good, but imo you should use an environment stage for some stronger highlight. Right now it looks pretty dull. Also, the scratches along the edges are to continuous and repetitive for my taste.

Langerd and Tempust85 like this
Posted

Are there any sorting issues? That shader looks like it would lead to distant surfaces sometimes being rendered in front of nearby ones...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...