Ruxith Posted February 6, 2015 Posted February 6, 2015 So I tried my normal process for making an image RGB'd, which involves creating a mask for the RGB area and exporting as a png, however this time around i'm trying it with an image which has an area which needs to be transparent to begin with, so ontop of my normal RGB shader I added "alphaFunc GE192" so that it would allow the texture to be transparent, but instead it just makes the rgb area transparent too. I've also tried mapping the texture without rgb and having the transparent shader line, with the rgb textures mapped afterwards and it just shows the RGB in effect but without the transparency. Adding the transparency to the RGB mapped lines doesn't work either. Here's my 2 shaders, if someone could let me know what I need to do to get RGB working on a transparent texture i'd be very greatful.Thanks Shader with transparent texture, and rgb texture mapped inside the shader: models/players/jeslyn/amone/lower6{cull twosided{map models/players/jeslyn/amone/lower6blendFunc GL_ONE GL_ZEROalphaFunc GE128rgbGen lightingDiffuse}{map models/players/jeslyn/amone/lower6rblendFunc GL_ONE GL_ZEROrgbGen lightingDiffuseEntity}{ map models/players/jeslyn/amone/lower6rblendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA rgbGen lightingDiffuse}{map gfx/models/jeslyn/lower6_specblendFunc GL_SRC_ALPHA GL_ONEdetailalphaGen lightingSpecular}} Shader with one texture, transparent and an rgb mask: models/players/jeslyn/amone/lower6{cull twosided{map models/players/jeslyn/amone/lower6blendFunc GL_ONE GL_ZEROalphaFunc GE128rgbGen lightingDiffuseEntity}{ map models/players/jeslyn/amone/lower6blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHAalphaFunc GE128 rgbGen lightingDiffuse}{map gfx/models/jeslyn/lower6_specblendFunc GL_SRC_ALPHA GL_ONEdetailalphaGen lightingSpecular}} I don't know enough about shader properties to know the solution.This is what the texture looks like, the greyish area needs to be RGB'd:
Xycaleth Posted February 6, 2015 Posted February 6, 2015 You should very rarely need to use alphaFunc, especially for player models. It's also bad for performance. This should work: models/players/jeslyn/amone/lower6 { cull twosided { map models/players/jeslyn/amone/lower6 blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA rgbGen lightingDiffuseEntity } { map gfx/models/jeslyn/lower6_spec blendFunc GL_SRC_ALPHA GL_ONE detail alphaGen lightingSpecular } }
Solution Ruxith Posted February 6, 2015 Author Solution Posted February 6, 2015 Ah I didn't know that, worth noting thanks. I presumed the alphaFunc was how chewbacca's shader looked, I don't know why I assumed that but I just checked and I was wrong I tried your suggestion but it didn't help, here's an image reel of the shader outcomes, i'm almost there with using the shader for the chewbacca (just a change in the blendFunc's in comparison to your shader suggestion) except it RGBs the whole visible area of the texture: The image used was the same one I posted above, when I add a layer transparency mask to the RGB area of the image, it simply reverts to the first result, where the RGB area is transparent.(sorry for spelling your name wrong I rushed the pic!) Edit:Fixed it, although your shader didn't fix it, it put me in the right direction, thanks man. For anyone else who wants to look into making a model part that has transparency and making it RGB'd, here's my shader file: models/players/jeslyn/amone/lower6 { cull twosided { map models/players/jeslyn/amone/lower6 blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA rgbGen lightingDiffuse } { map models/players/jeslyn/amone/lower6b blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA rgbGen lightingDiffuseEntity } { map gfx/models/jeslyn/lower6_spec blendFunc GL_SRC_ALPHA GL_ONE detail alphaGen lightingSpecular } } Basically you need your transparent image as the main texture, then you map your RGB file (only your RGB area visible in the image) and that's where the "lower6b" will go in the shader file. No fancy pngs with layer transparency masks are needed. Psyk0Sith likes this
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now