I'm not sure what is causing this, generally it's a texture issue, either it's saved in a lossy format or something like that, or the shader it having issues in working with the given texture properly.
Any information you can give us on your end? I could speculate it's a Max/Maya limitation to display the texture with banding, since I noticed this happening alot in the shadows, but not to the extent you're experiencing.
Anything you need as far as specifics I'd need to be guided cause I have no clue what to supply to prevent these issues. Format is .tga all maps accounted for same result.
^Yes It's the shadowing and the display inside of the 3dsmax2011x64 viewport, I thought it might be my settings and I guess I just don't know how to set up the viewport display settings so it doesn't degrade the quality of the textures being displayed.
I checked it out in game and it seems fine their so I guess I could ignore it, since your saying you see this in the shadows on your end as well, i thought it was just my end.
So yea the shader for me anyway inside of 3dsmax doesn't play nice with dark values as I see this same degradation with the default DOTA2 supplied materials + assets for custom item creation.
Just thought I could do something within max to change this, I can still work on items so it's not that big of a deal if it can be ignored.
Thanks for the clarification, glad to know It is not just me.
Hey, Ace-angel, I appreciate this I fully understand the whole material system now and wow, it can really be stretched quite far, incredible. Much more feature rich than blender's. so, I was using your example folder to give your shader a try and I think, i've been using the texture files correctly, however...there is a strange graphical error i'm getting with both models. They appear somewhat...ghost-like...translucent and when you have them viewed in the main viewport with front-view, the models seem to show only their backs, even through your looking at their fronts. it's weird. here's a screenshot to better describe what's happening. maybe we'll find a solution? Thanks again!
Not sure what this means?...
so, yeah, I've actually tried other models directly from VALVe's dota workshop site, like an Axe model and I still get the same problems.
I'm using a student version of 3DS Max 2012 64bit.
Hey everyone! Here's an update for y'all! Version 2.1
I addressed some issues regarding specular intensity, and rim light! Rim is now masked by a skylight, and specular and rim have a Fresnel term applied to them.
Changes in Version 2.1
-Changes: Specular and diffuse calculation completely re-structured and re-organized
-Changes: Rim Light method is masked by a 'sky light' or a light pointing straight down
-Changes: New robust Fresnel term, with custom Fresnel ranges
-Changes: Specular lighting and rim lighting now respect the Fresnel ranges, so you get a much more accurate and correct match to the engine
-Changes: Diffuse and specular calculation functions are now smaller and masks are moved out of those functions to entry point
-Changes: Diffuse warp and Fresnel color warp now corrected for ambient and half-lambert
-Fixes/Changes: Maya users now have working self-illumination
Can't seem to get this to work for the life of me. Spent a day on it. Tried it in max2012, 2009, maya2013. 32 or 64 doesn't seem to matter on the max 2012.
Can't get the normal to show in maya. Lina in particular seems to have some problem with the rim light in max.
which software versions are you getting success with?
I might be mistaken, but the Alpha/Opacity should be already there?
It should be the called "Alpha Test", IIRC, and you need to have your Alpha Map in your Diffuse texture, since that's how Valve rolls.
If you're asking for 'more option' for Opacity settings, I'm afraid that won't be a good idea, since Applications like Maya and Max sorting aren't too hot, and Valve themselves try at avoid any type of Translucent type opacity.
Hopefully, this clears up, tell me if I misunderstood something :P
Would it be at all possible to add opacity to this shader? I'm sorry but I'm not very clued up on CGFX shaders.
Ace is correct! Just click the alpha test button, and that should work. According to the mask document, it should be stored inside the diffuse alpha. That's how it is in my shader anyways
Some models might have it in the normal map alpha... if that's the case, move it to the diffuse.
Okay so I've tried but I must be doing something wrong because I can't seem to go the opacity/Alpha channel to work. I've tried a few different ways, one with my texture as it should be for submission, this seems to make no difference if the alpha test button is on or off. Two with the alpha channel cut out out of the texture as you would with a png. This shows the alpha up in white but still does nothing for the opacity of the model in the view port. Am I doing something wrong?
@Gareth: What texture format are you using? I think you mentioned PNG, in which case, I suggest TGA, and save it as a 32 bit texture. I don't think PNG can be used for the Alpha if you're saving it out from Photoshop. Will take a look and see if there is any issue, since on my end, Max worked fine with the Alpha.
@K-Pax: Will look into it, but that is honestly a Max issue, since this happens to me all the time with even Xouli's shader and other ones that have a reset/reload button. Try restarting Max every couple of hours if possible, or only enable the texture you working on.
Make a copy of you material in a different slot with a different name also works, again will try but cannot guarantee anything, sorry.
@ Ace. Ya I'm working with 32bit tga's. I'm using tga files that I know work for submitting in dota2. It's just the I can't seem to get the transparency to work in my Maya view port with this cgfx Hero Shader. I have tried it with Skeleton King's default cloak textures too and I still didn't have any luck.
Would it be at all possible for someone else to see if they can get it working in Maya, then at least I'll know whether or not the problem is on my side?
Your source file has transparent pixels along with having an alpha channel. Photoshop should be auto-filling transparent pixels in the RGB channels as white for a .tga. It's not a big issue with the files but you'll get color bleeding when in lower mips. It's a good practice to keep a bottom layer with a color fill or something so you don't have nasty surprises later.
Ok, just tried alpha testing in Maya and it doesn't work for me either, also used targa. The material preview flips a color from black to grey when I toggle this, but nothing changes in the scene. Also, "Use Diffuse Map" does nothing.
So I'm trying to figure out how to use the light position slot for this shader in maya... It doesn't respond at all after I drag and drop a point light into the light position slot. Is there a trick to using this feature?
Ok, just tried alpha testing in Maya and it doesn't work for me either, also used targa. The material preview flips a color from black to grey when I toggle this, but nothing changes in the scene. Also, "Use Diffuse Map" does nothing.
I'll look into it. I'm fairly certain it's an error from the compiler profile.
So I'm trying to figure out how to use the light position slot for this shader in maya... It doesn't respond at all after I drag and drop a point light into the light position slot. Is there a trick to using this feature?
Just right click and select your point light that you've placed in the scene.
I'll look into it. I'm fairly certain it's an error from the compiler profile.
Just right click and select your point light that you've placed in the scene.
Thanks, It worked! Also, I was wondering, are some of the settings meant to be matched to the valve shader values?(Things like specular scale for instance.) or is it meant to generally be left at 1.0?
Thanks, It worked! Also, I was wondering, are some of the settings meant to be matched to the valve shader values?(Things like specular scale for instance.) or is it meant to generally be left at 1.0?
Specular scale is defined in several VMTs, and from what I can tell it's just a specular multiplier! It just boosts the specular highlight. It's a multiplier, so the default value of 1.0 has no effect
Hiya,
Thanks for another updated shader! The specular and rim lighting seems to act nicer now. Here's beastmaster with the vmt values copied over.
I still can't find where lightwarp textures are defined per/character so in this case I left that box un-checked. Is there someplace we can look to see what lightwarp file a particular character is using?
Thanks!
Lighwarps should be either in the Model/Hero/Character root or Material/Hero/Character one.
Either way, I can't promise if they will found/there, since I noticed alot of the model seem to using 'standard' warps (EI: unchecked box as you have).
And nice, that's exactly how BM looks like ingame in the viewport with all the bells and whistles enabled
EDIT:
OMG, nevermind! They just have unreseted xform in example scene, so it was the normal direction problem:/
sorry guys for this post:)
After loading mask2, front of the model gets lot of white color,
and the power of this whites depends of rim light scale.
I have this effect on Riki and Lina models, Sven is looking good I suppose.
Sven's rim light seems to be looking good, but 2 other model are not.
Why is that?
I would like to throw it out there that I think the valve documentation for the tint specular by base color(and this shader) is backwards. When I import my models to the game black seems to mean fully tinted and white no tint. Can anyone else confirm?
I would like to throw it out there that I think the valve documentation for the tint specular by base color(and this shader) is backwards. When I import my models to the game black seems to mean fully tinted and white no tint. Can anyone else confirm?
Hey, guys. First I'd like to say great work on the shader as it's really useful.
I've been having a problem with it though were the specularity strength doesn't seem to be the same for all the different assets even though I use shaders with the same setting and the same values in the mask files.I find myself having to adjust each shader's specular scale but I shouldn't have to do this, right? Has anyone else been having this problem?
Hey, guys. First I'd like to say great work on the shader as it's really useful.
I've been having a problem with it though were the specularity strength doesn't seem to be the same for all the different assets even though I use shaders with the same setting and the same values in the mask files.I find myself having to adjust each shader's specular scale but I shouldn't have to do this, right? Has anyone else been having this problem?
This could be due to the Fresnel terms... I'll look into this!
Blender should be able to load the shaders, I'm not sure what you need to thinker with, but I would be shocked if blender didn't allow you load FX and CGFX files.
As to how, sorry, no idea, haven't used Blender in a while.
Gimp has nothing to do with shaders, it's just a texturing program like Photoshop, and as far as I am aware, it's perfectly capable of channel painting (RGB for masks) just like Photoshop, which is what you need for many of the masks.
So you should be OK, but if you have any problems, then I'm pretty sure a question thread here in Technical questions regarding how to get stuff running will be better for PC'ers to help you
hey guys. abit of a noob question but when ever i use this in 3ds max all my characters polygons look backwards. am i missing a tick box to change this?
hi! did anyone know if someone (me xd) can use this shader for another proposes??
Because i was thinking in use it for my final exam in my institute...
Hi, thanks for this shader. I want to create stuff for Dota2 but I can't make it work in my Maya 2012 (I've checked in 2013 too, same results).
Maybe it's because I'm a totally noob in 3D stuff, but all I can get is a green mesh:
I'm pretty sure I'm doing something wrong. Also, I'm working on a Mac, and my graphic card is an ATI Radeon HD 5670 512 MB (Some CGFX shaders don't work on ATI, so maybe that's the problem...)
Hi, thanks for this shader. I want to create stuff for Dota2 but I can't make it work in my Maya 2012 (I've checked in 2013 too, same results).
Maybe it's because I'm a totally noob in 3D stuff, but all I can get is a green mesh:
I'm pretty sure I'm doing something wrong. Also, I'm working on a Mac, and my graphic card is an ATI Radeon HD 5670 512 MB (Some CGFX shaders don't work on ATI, so maybe that's the problem...)
Thanks again
This compiles with an OpenGL profile so you should be good with ATI and OS X, but I'm thinking it's your viewport. I'm not sure but "Viewport 2.0" might work but will have bugs. Try "High Quality" too.
-Maybe some people more familiar with Maya can help out!
hi! did anyone know if someone (me xd) can use this shader for another proposes??
Because i was thinking in use it for my final exam in my institute...
You can use it for anything honestly, it's just that I'm not sure this shader is as flexible as you would hope with the entire Channel Mask textures thing, maybe Xiouli's shader would be more up your alley if it's just for showcase? Although it would be still cool to see other peeps use it outside of DOTA stuff :P
i find this shader work incorrect in max orthographic view. but correct in maya orthographic. i think it's a bug.
Kinda, it's a Max bug, no matter what RT shader you use, it will warp and distort in Ortho. mode, I'm surprised it's not the same issue in Maya (since ortho's are flattening the camera) :0
I need help, I linked all the textures accordingly but my rim light and the normal map on the model doesn't appear to be working. Can someone please help? I'm desperateeeeee!!
I need help, I linked all the textures accordingly but my rim light and the normal map on the model doesn't appear to be working. Can someone please help? I'm desperateeeeee!!
Make sure you have the masks applied. Rim light is affected by metalness, which uses the blue channel in mask 1.
It DID happened! lol I asked Ace-angel and EtotheRic the same question thru PM, Ace said it might be a bug? EtotheRic said some of my links are wrong. I'll try linking them according to his method later when I'm back home. Tho I'm pretty sure normal map is at the correct place but it's totally flat as if there's no normal map at all.
E:\DOTA2\memory(454,18): warning X3206: implicit truncation of vector type
E:\DOTA2\memory(455,19): warning X3206: implicit truncation of vector type
E:\DOTA2\memory(456,20): warning X3206: implicit truncation of vector type
E:\DOTA2\memory(464,15): warning X3206: implicit truncation of vector type
E:\DOTA2\memory(470,19): warning X3206: implicit truncation of vector type
E:\DOTA2\memory(479,2): error X3000: syntax error: unexpected token ';'
Replies
Anything you need as far as specifics I'd need to be guided cause I have no clue what to supply to prevent these issues. Format is .tga all maps accounted for same result.
^Yes It's the shadowing and the display inside of the 3dsmax2011x64 viewport, I thought it might be my settings and I guess I just don't know how to set up the viewport display settings so it doesn't degrade the quality of the textures being displayed.
I checked it out in game and it seems fine their so I guess I could ignore it, since your saying you see this in the shadows on your end as well, i thought it was just my end.
So yea the shader for me anyway inside of 3dsmax doesn't play nice with dark values as I see this same degradation with the default DOTA2 supplied materials + assets for custom item creation.
Just thought I could do something within max to change this, I can still work on items so it's not that big of a deal if it can be ignored.
Thanks for the clarification, glad to know It is not just me.
Not sure what this means?...
so, yeah, I've actually tried other models directly from VALVe's dota workshop site, like an Axe model and I still get the same problems.
I'm using a student version of 3DS Max 2012 64bit.
YES! got it sorted! thanks so much and now I can move forward with my work, I'll be posting some WIPs soon.
I addressed some issues regarding specular intensity, and rim light! Rim is now masked by a skylight, and specular and rim have a Fresnel term applied to them.
Changes in Version 2.1
-Changes: Specular and diffuse calculation completely re-structured and re-organized
-Changes: Rim Light method is masked by a 'sky light' or a light pointing straight down
-Changes: New robust Fresnel term, with custom Fresnel ranges
-Changes: Specular lighting and rim lighting now respect the Fresnel ranges, so you get a much more accurate and correct match to the engine
-Changes: Diffuse and specular calculation functions are now smaller and masks are moved out of those functions to entry point
-Changes: Diffuse warp and Fresnel color warp now corrected for ambient and half-lambert
-Fixes/Changes: Maya users now have working self-illumination
Get the files here
https://dl.dropbox.com/u/8510078/Dota2/Dota2Hero_Shader_2.1.zip
-or download the shader individually
3DS Max FX:
https://dl.dropbox.com/u/8510078/Dota2/Dota2Hero_Shader_2.1/Dota2Hero_Shader_2.1_Max.fx
Maya CgFX:
https://dl.dropbox.com/u/8510078/Dota2/Dota2Hero_Shader_2.1/Dota2Hero_Shader_2.1_Maya.cgfx
Please post here in this thread with any shader specific problems!
Enjoy!
Thanks a bunch! Was waiting for that self-illumination fix in maya, and the new rim lighting is much better.
awesome update guys,the shader is amazing and i like how your handle the lights position now (i didnt see on that the update log)
Can't get the normal to show in maya. Lina in particular seems to have some problem with the rim light in max.
which software versions are you getting success with?
Looks nice, was really hoping to get it to work.
@Pseudo: I'm not sure, did you check the last few images I posted? They explain how to get the shader working.
It should be the called "Alpha Test", IIRC, and you need to have your Alpha Map in your Diffuse texture, since that's how Valve rolls.
If you're asking for 'more option' for Opacity settings, I'm afraid that won't be a good idea, since Applications like Maya and Max sorting aren't too hot, and Valve themselves try at avoid any type of Translucent type opacity.
Hopefully, this clears up, tell me if I misunderstood something :P
Ace is correct! Just click the alpha test button, and that should work. According to the mask document, it should be stored inside the diffuse alpha. That's how it is in my shader anyways
Some models might have it in the normal map alpha... if that's the case, move it to the diffuse.
Okay so I've tried but I must be doing something wrong because I can't seem to go the opacity/Alpha channel to work. I've tried a few different ways, one with my texture as it should be for submission, this seems to make no difference if the alpha test button is on or off. Two with the alpha channel cut out out of the texture as you would with a png. This shows the alpha up in white but still does nothing for the opacity of the model in the view port. Am I doing something wrong?
another problem is the reload button have not effect.it can't reload any map.please check it.
btw this shader is realy amazing !!
http://wiki.polycount.com/CategoryShaders
@K-Pax: Will look into it, but that is honestly a Max issue, since this happens to me all the time with even Xouli's shader and other ones that have a reset/reload button. Try restarting Max every couple of hours if possible, or only enable the texture you working on.
Make a copy of you material in a different slot with a different name also works, again will try but cannot guarantee anything, sorry.
@Eric: You awesome monster
Would it be at all possible for someone else to see if they can get it working in Maya, then at least I'll know whether or not the problem is on my side?
I'll look into it. I'm fairly certain it's an error from the compiler profile.
Just right click and select your point light that you've placed in the scene.
Thanks, It worked! Also, I was wondering, are some of the settings meant to be matched to the valve shader values?(Things like specular scale for instance.) or is it meant to generally be left at 1.0?
Specular scale is defined in several VMTs, and from what I can tell it's just a specular multiplier! It just boosts the specular highlight. It's a multiplier, so the default value of 1.0 has no effect
Thanks for another updated shader! The specular and rim lighting seems to act nicer now. Here's beastmaster with the vmt values copied over.
I still can't find where lightwarp textures are defined per/character so in this case I left that box un-checked. Is there someplace we can look to see what lightwarp file a particular character is using?
Thanks!
Lighwarps should be either in the Model/Hero/Character root or Material/Hero/Character one.
Either way, I can't promise if they will found/there, since I noticed alot of the model seem to using 'standard' warps (EI: unchecked box as you have).
And nice, that's exactly how BM looks like ingame in the viewport with all the bells and whistles enabled
EDIT:
OMG, nevermind! They just have unreseted xform in example scene, so it was the normal direction problem:/
sorry guys for this post:)
After loading mask2, front of the model gets lot of white color,
and the power of this whites depends of rim light scale.
I have this effect on Riki and Lina models, Sven is looking good I suppose.
Sven's rim light seems to be looking good, but 2 other model are not.
Why is that?
You're right... It should be this! but instead I had this for some stupid reason.
Can't believe I missed that! xD
Fixed it though!
3DS Max: https://dl.dropbox.com/u/8510078/Dota2/Dota2Hero_Shader_2.1/Dota2Hero_Shader_2.1_Max.fx
Maya: https://dl.dropbox.com/u/8510078/Dota2/Dota2Hero_Shader_2.1/Dota2Hero_Shader_2.1_Maya.cgfx
Download with sample warps:
https://dl.dropbox.com/u/8510078/Dota2/Dota2Hero_Shader_2.1/Dota2HeroShader_2.1.zip
thx for point out this.it's Confused me for a long time.
omg really????
Alphatest is on, it works both in-game and with a standard lambert, but not with the CgFX shader in maya.
I've been having a problem with it though were the specularity strength doesn't seem to be the same for all the different assets even though I use shaders with the same setting and the same values in the mask files.I find myself having to adjust each shader's specular scale but I shouldn't have to do this, right? Has anyone else been having this problem?
This could be due to the Fresnel terms... I'll look into this!
if i want to utilize the shaders should i download maya and 3ds student packages and suck it up?
As to how, sorry, no idea, haven't used Blender in a while.
Gimp has nothing to do with shaders, it's just a texturing program like Photoshop, and as far as I am aware, it's perfectly capable of channel painting (RGB for masks) just like Photoshop, which is what you need for many of the masks.
So you should be OK, but if you have any problems, then I'm pretty sure a question thread here in Technical questions regarding how to get stuff running will be better for PC'ers to help you
Because i was thinking in use it for my final exam in my institute...
Maybe it's because I'm a totally noob in 3D stuff, but all I can get is a green mesh:
I'm pretty sure I'm doing something wrong. Also, I'm working on a Mac, and my graphic card is an ATI Radeon HD 5670 512 MB (Some CGFX shaders don't work on ATI, so maybe that's the problem...)
Thanks again
This compiles with an OpenGL profile so you should be good with ATI and OS X, but I'm thinking it's your viewport. I'm not sure but "Viewport 2.0" might work but will have bugs. Try "High Quality" too.
-Maybe some people more familiar with Maya can help out!
Kinda, it's a Max bug, no matter what RT shader you use, it will warp and distort in Ortho. mode, I'm surprised it's not the same issue in Maya (since ortho's are flattening the camera) :0
I guess 1:0 for Maya and Max on Ortho.
(Read: Need more info)
Make sure you have the masks applied. Rim light is affected by metalness, which uses the blue channel in mask 1.
But yeah, pictures would be super helpful
Please tell me what went wrong!!