Home Technical Talk

DOTA2 Hero Shader - 3DS Shader Material - RELEASED!

245

Replies

  • JauntyTunes
    Offline / Send Message
    JauntyTunes polycounter lvl 8
    You all are beautiful human beings
  • EtotheRic
    Offline / Send Message
    EtotheRic polycounter lvl 20
    Wow, thanks for all the info!

    Once you showed the Fresnel map stuff I recalled seeing it in the mask guide. They say it’s used pretty infrequently. That’s good to know how to create one. I went ahead and disconnected and turned off that slot. Is the diffuse warp texture easy to extract per/character? I’m wondering if that is something I can just grab somehow as needed.
    The reason I asked about the rim positioning is in-game it should be in a pretty fixed position on the character since the camera is relatively fixed. Right now in maya it is hitting the character from –y –z somewhere Here is what it looks like from the front game perspective in maya. (I plugged in Drew's latest version of the shader). You can see it a little bit hitting the bottom of the feet.
    cgfx_rim_persp.jpg
    This is what happens when I rotate the model.
    cgfx_rim_modelRotate.jpg
    This is what happens when I rotate the camera.
    cgfx_rim_cameraRotate.jpg
    I did try freezing and resetting transforms. At the moment I’d probably disable the rim light for most working purposes since it tends to get in the way. I guess what would make sense is if the rim effect remain constant if you rotate the model since the scene lights would remain fixed.

    Thanks again, this shader will be a great help.
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Hmm, I starting to wonder if maybe it's a model issue, since some of the latest models are also displaying said issue, I can't say but will need to look into it, also, about extracting the Light-warps, yes it is. Just download CGFScape here: http://nemesis.thewavelength.net/index.php?p=26

    Start the program and navigate to Steam\steamapps\common\dota 2 beta\dota, in there you will see a pak01_dir.vpk file, open it with CGF and extract folder you need under materials/heroes/

    You then can use VTFedit to convert any file that has the name Fresnel or Lightwrap in it. It should get you what you need.
  • Drew++
    Offline / Send Message
    Drew++ polycounter lvl 14
    EtotheRic wrote: »
    Wow, thanks for all the info!

    Once you showed the Fresnel map stuff I recalled seeing it in the mask guide. They say it’s used pretty infrequently. That’s good to know how to create one. I went ahead and disconnected and turned off that slot. Is the diffuse warp texture easy to extract per/character? I’m wondering if that is something I can just grab somehow as needed.
    The reason I asked about the rim positioning is in-game it should be in a pretty fixed position on the character since the camera is relatively fixed. Right now in maya it is hitting the character from –y –z somewhere Here is what it looks like from the front game perspective in maya. (I plugged in Drew's latest version of the shader). You can see it a little bit hitting the bottom of the feet.

    This is what happens when I rotate the model.

    This is what happens when I rotate the camera.

    I did try freezing and resetting transforms. At the moment I’d probably disable the rim light for most working purposes since it tends to get in the way. I guess what would make sense is if the rim effect remain constant if you rotate the model since the scene lights would remain fixed.

    Thanks again, this shader will be a great help.

    Wow thats strange! Definitely a Maya error... Make sure you're not displaying in Viewport 2.0... There's some issues with that, almost exactly like what you're showing.
  • EtotheRic
    Offline / Send Message
    EtotheRic polycounter lvl 20
    Actually, what I thought was the rim light was light 2. I will see how the rim light looks without light 2. Sorry for the confusion. Also, it looks like it works without scene lights now as well. Yay! So with scene lights linked and multiple lights enabled I think my first test was all bungled up. I'm putting together a new batch of screengrabs.
  • Drew++
    Offline / Send Message
    Drew++ polycounter lvl 14
    The rim light is masked by the first light, which is the skylight... So it should be coming from the sky. But I wonder if it's getting masked by the last light you assigned ( which might not be the skylight ) I'll have to test that out!

    That "error" is actually just a warning. It basically just didn't save the light in the proper slot.

    I'm working on fixing all of this as soon as possible and adding new features! Btw, do you have an AMD/ATI or Nvidia GPU?
  • EtotheRic
    Offline / Send Message
    EtotheRic polycounter lvl 20
    Cool. So I am still experiencing the same issues but it's a bit clearer now that I removed the scene lights. Here's a sample with 6 rim light scenarios.
    cgfx_rimComparison.jpg
  • IEatApples
    Had a bit of time to play around with the shader last night in maya. It's looking good, I did have a problem getting the rim lighting to work though. Not all of my objects have their masks set-up yet so things like the skull are over shiney!

    Anyway thought I'd show my results here:

    dota2ShaderTest.jpg
  • D4V1DC
    Offline / Send Message
    D4V1DC polycounter lvl 18
    Thank god for people like you gents :) like it has been said you lovely human beings.
    If I could afford drinks I'd buy one for each of you, Thanks again.
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Cheers Etho, will look into what Valve did for their solution.

    Kudos Apples, nice model you got going there :D

    Aye !nz, in the mean-time, you can send us an E-Cookie :P
  • DashXero
    Offline / Send Message
    DashXero polycounter lvl 12
    Ace, Drew, I freakin' love this thing! If I ever meet you guys, I'm buying you a coke.
  • ENODMI
    Offline / Send Message
    ENODMI polycounter lvl 14
    I will buy you a Pepsi:) Thanks guys, will be very useful this weekend!
  • FicWill
    Offline / Send Message
    FicWill polycounter lvl 17
    You could also make the no-scene-lights option use the camera position itself as an assumed light source, that way you always get a view-aligned effect without having to manage lights in your scene.
  • OpethRockr55
    I can't get the shader to acknowledge Mask 2's blue channel (tint spec by base) in Max 2010, 2011 or 2012. There's no change in the specular color at all.

    DotaShaderBug.jpg

    And a pic from the example scene:
    ExampleExample.jpg

    Tested on nVidia 460 SE and nVidia 680 GTX, 310.64 drivers.
  • Drew++
  • OpethRockr55
    Awesome, looks much better. Thank you and keep up the good work!
  • SoundStage
    This is great! Keep up the good work!! <3
  • EtotheRic
    Offline / Send Message
    EtotheRic polycounter lvl 20
    Ace-Angel wrote: »
    Hmm, I starting to wonder if maybe it's a model issue, since some of the latest models are also displaying said issue, I can't say but will need to look into it, also, about extracting the Light-warps, yes it is. Just download CGFScape here: http://nemesis.thewavelength.net/index.php?p=26

    Start the program and navigate to Steam\steamapps\common\dota 2 beta\dota, in there you will see a pak01_dir.vpk file, open it with CGF and extract folder you need under materials/heroes/

    You then can use VTFedit to convert any file that has the name Fresnel or Lightwrap in it. It should get you what you need.

    So I tried this out today. I did a search for all the lightwarp textures, and attempted to run vtf edit on them but was getting this error:
    "Error loading witchdoctor_lightwarp.vtf.Error: File version 7.5 does not match 7.0 to 7.4." on all but one of them.

    I noticed that there are only lightwarps for a handful of heroes though and there was one called default_lightwarp.vtf I'm guessing that is the one used for any characters that don't have a custom texture lightwarp if anyone has better luck converting it to a tga.
  • shriker
    I used Cannonfodder's Studio Compiler with Alien Swarm SDK to convert to tga.
  • System
    Offline / Send Message
    System admin
    ace can i have 10% of your shader knowledge please.
  • fellon
    First of all:
    Thank you for all the work and effort. =)
    Great job.


    Anyone else getting large black areas?
    isswqiso.jpg

    My settings:
    72tmlk7l.jpg
    More lights even result in larger black areas.

    Maya 2012. Latest cgfx. Viewport Renderer. Clean history and scene before rendering.
    What am I doing wrong?
  • Drew++
    Offline / Send Message
    Drew++ polycounter lvl 14
    Yeah that's an error for Maya... I'm not sure why it shows up, it does it in every single profile. It's like a texture loader issue. Hopefully I can find a work-around.

    But for now, disable Fresnel warp, and diffuse warp. :3
    fellon wrote: »
    First of all:
    Thank you for all the work and effort. =)
    Great job.


    Anyone else getting large black areas?
    isswqiso.jpg

    My settings:
    72tmlk7l.jpg
    More lights even result in larger black areas.

    Maya 2012. Latest cgfx. Viewport Renderer. Clean history and scene before rendering.
    What am I doing wrong?
  • D4V1DC
    Offline / Send Message
    D4V1DC polycounter lvl 18
    Not a big deal but the reload texture options don't work for me in max. :(
    Not a big deal because I can just re-select It, just a heads up. ;)
  • Spudnik
    Offline / Send Message
    Spudnik polycounter lvl 11
    Same bug even with diffuse and fresnel warp off.

    ZOFKK.jpg
  • Drew++
    Offline / Send Message
    Drew++ polycounter lvl 14
    Max Specific issue... I get the same errors every now and then! Even with a Standard material.
    $!nz wrote: »
    Not a big deal but the reload texture options don't work for me in max. :(
    Not a big deal because I can just re-select It, just a heads up. ;)


    @Spudnik, Make sure you have the proper masks setup! Specifically Mask 1. I can't think of why it would be doing that :o Also assign a normal map too.
    Spudnik wrote: »
    Same bug even with diffuse and fresnel warp off.

    Also everyone using this shader: Do you use an AMD/ATI or Nvidia gpu?
  • EtotheRic
    Offline / Send Message
    EtotheRic polycounter lvl 20
    I'm using an Nvidia card.

    I was able to convert the lightwarp texturs with StudioCompiler. After checking out default_lightwarp, it looks on the dark side so I'm not sure if that is supposed to be used for everyone. I set up all the shaders for both characters here using earthshaker's lightwarp and 2 lights (no scene lights). It looks like metal parts are being displayed too dark or not using the masks the same way they are in-game.
    cgfx_v3.jpg
    Thanks
  • D4V1DC
    Offline / Send Message
    D4V1DC polycounter lvl 18
    ATI Radeon HD 5770x2, thanks for the details.
  • Drew++
    Offline / Send Message
    Drew++ polycounter lvl 14
    EtotheRic wrote: »
    I'm using an Nvidia card.

    I was able to convert the lightwarp texturs with StudioCompiler. After checking out default_lightwarp, it looks on the dark side so I'm not sure if that is supposed to be used for everyone. I set up all the shaders for both characters here using earthshaker's lightwarp and 2 lights (no scene lights). It looks like metal parts are being displayed too dark or not using the masks the same way they are in-game.
    cgfx_v3.jpg
    Thanks

    Which metal looks too dark? The stuff from Phantom Assassin? Not sure if you know this already, but it looks like that model uses the "diffusewarp" texture from Drow, a specular exponent of 15, a specular scale of 10, a rim light color of "0.5, 0.6, 0.4", and a rim light scale of 10. Maybe that will brighten things up a bit :)

    -Feel free to add me on Steam. My user is: drewwatts
  • fellon
    Drew++ wrote: »
    [...]

    Also everyone using this shader: Do you use an AMD/ATI or Nvidia gpu?
    Nvidia 260 GTX
  • Spudnik
    Offline / Send Message
    Spudnik polycounter lvl 11
    Nvidia 560 GTX

    The maps work fine in game, so I don't think it's a mask problem. It even works in one instance in Maya, that's what makes it extra weird. The shader works fine for my bracers but produces these weird shadowed areas for my cloak and shoulders. I'll post another pic tonight.
  • shriker
    We used the shader for our final presentation, big thanks to you guys :)

    You can check a video here.
  • EtotheRic
    Offline / Send Message
    EtotheRic polycounter lvl 20
    Drew++ wrote: »
    Which metal looks too dark? The stuff from Phantom Assassin? Not sure if you know this already, but it looks like that model uses the "diffusewarp" texture from Drow, a specular exponent of 15, a specular scale of 10, a rim light color of "0.5, 0.6, 0.4", and a rim light scale of 10. Maybe that will brighten things up a bit :)

    -Feel free to add me on Steam. My user is: drewwatts

    Thanks! I've only started playing around with all the tools and compiling stuff. Are the shader settings for each character something I can dig up from the in-game materials? I'm kind of wondering if the settings are different per/slot item.

    These are the results of plugging in the settings. In the middle are the settings you listed, which give a pretty blown out specular hightlight. I adjusted them by eye to match a bit more closely to the in-game on the right but some subtlety is still missing like specular on the hair and pants. The default torso on the stomach is really dark as well. Maybe these are just maya display bugginess. I'll be trying the max version soon.
    cgfx_v4.jpg
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    IIRC, you need to open these files: https://developer.valvesoftware.com/wiki/Material

    VMT files will contain your Gloss number, color, etc. just open them with a Text Editor.

    I know at one point Valve mentioned you could make and modify your own VMT files, but not sure if they still put in support for that.
  • Tvidotto
    Offline / Send Message
    Tvidotto polycounter lvl 9
    guys, i passed here to say:

    "HUGE THANKS!!!"

    that shader is awesome and helped a lot =] great work
  • Spudnik
    Offline / Send Message
    Spudnik polycounter lvl 11
    Ace-Angel wrote: »
    I know at one point Valve mentioned you could make and modify your own VMT files, but not sure if they still put in support for that.

    They said that they would not support alphas for items for heroes that don't natively support it so we might conclude that they wont let us write our own VMTs. It's a bit of a leap, I admit but there it is.

    What kind of image do you need for the Ambient IBL? I tried a regular .tga an HDRI and both were giving me errors
  • Farfarer
    Spudnik wrote: »
    They said that they would not support alphas for items for heroes that don't natively support it so we might conclude that they wont let us write our own VMTs. It's a bit of a leap, I admit but there it is.

    What kind of image do you need for the Ambient IBL? I tried a regular .tga an HDRI and both were giving me errors
    Actually, Jokermax mentioned we can use alpha, they'll add it to the heroes that need it.

    I guess if they like a set enough, they'll enable it so the set can be put on the store?

    (Which is a little annoying as I could have really used alphatest in my submission).

    I doubt the VMTs will be editable as, as I understand it, the textures for each hero and their items are automatically atlased together into one texture page per player character - so they'll use the hero's base texture VMT settings.
  • Spudnik
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Correct, they did say that, but at the same time, I know based from some info for the previous Beta versions that Valve did quietly add Alpha's for certain models that didn't have them in the first place.

    As to if they will keep on changing that or not...we'll have to wait and see I guess? I mean those two posts are almost 10 days apart from one to another, especially when you consider people must have butted Valve to no end about such silly decisions, such as the lack of Alpha for cloth-heavy characters, like Drow-Ranger and Warlock.

    Also, the IBL is an ambient cubemap, just go to the Source wiki and it will show you what it look like, it also needs to be in DDS format.

    Please note as Drew previously showed, anything that is a Cubemap kind of map (Color Warp as example) cannot be exported from the game since VTFedit, cannot export DDS Cubemap files properly. You will need to make your own, which isn't too hard.

    Also, when I mentioned about changing VMT files, I mean more hard values like the Gloss value, Fresnel, etc, since a few random comments here and there indicate you should be able to do that. As to if Valve allows that or not, again, time will tell.
  • fellon
    So is there a solution for the heavy black areas yet?
  • Spudnik
    Offline / Send Message
    Spudnik polycounter lvl 11
    Shriker sent me a PM suggesting this:
    Check if your uv texture set is called the default map1.
    I found dota doesn't load textures if uv set isn't called texture and cgfx shader doesn't work if uv set isn't called map1, so pretty much it.

    If I'm understanding that correctly, he's saying that the UV set should be named "map1". I tried renaming my UVset but after I did, the 'UV Sets' dropdown menu in the UV editor still shows the old name...

    Also, might it have something to do with whether or not your scene is set up for Y-axis up vs. Z-axis up?
  • shriker
    Ugh yeah my bad! Maya has some problems renaming the default set for some reason, i managed to rename it but can't remember exactly how. But anyways, easiest way: UV editor window> polygons menu> Copy UVs to UV set> Copy to new uv set optionbox> name it map1 . That worked for me.

    Also i have 1 other issue, only 1 light affects the shader and if i add more nothing happens.
    Any ideas?

    edit: also i'm using Nvidia gtx260 if that is of any help
  • Drew++
    Offline / Send Message
    Drew++ polycounter lvl 14
    shriker wrote: »
    Ugh yeah my bad! Maya has some problems renaming the default set for some reason, i managed to rename it but can't remember exactly how. But anyways, easiest way: UV editor window> polygons menu> Copy UVs to UV set> Copy to new uv set optionbox> name it map1 . That worked for me.

    Also i have 1 other issue, only 1 light affects the shader and if i add more nothing happens.
    Any ideas?

    edit: also i'm using Nvidia gtx260 if that is of any help

    Yeah that's uv stuff is problem with Maya CgFX plugin :V I can't do anything about that.

    And make sure you have the active lights set at two, or three!
  • shriker
    Here's a screengrab. It seems only Light position1 input works for me. That's for maya 2011x64.

    SQltD.jpg
  • Drew++
    Offline / Send Message
    Drew++ polycounter lvl 14
    Change this slider to 2 or 3 :V

    activeLights.png
  • shriker
    Oh man i must be tripping how could i've miss that :D
    thanx a lot!
  • D4V1DC
    Offline / Send Message
    D4V1DC polycounter lvl 18
    97465682.jpg

    What's this called? It looks like image degradation or something, these are the 1024.
    What can I do in max to fix this? I'm trying to use the shader to work with stuff and I see this and can't put details on the sides that show this, also lights don't help the situation.

    :( me still love you long time..
  • fellon
    Well I don't know if the "map1" UV name is adressed towards the blackness.
    If yes, then I have to say all my maps are namend properly and the only UV map I have is called map1. Just as required.
    If this is not meant for me, well...
  • BravoJr
    Whoa that shader looks awesome!

    Sadly I can not get it to work.. For some reason it wont recognize and use my normal maps. It just slightly lights up the model, but Its not giving the mesh any detail at all from the normal map.

    Also, the rim lights wont display either. I must be doing something terribly wrong. :(

    I've tried pretty much everything. Parameters look ok according to what I see everyone else using. I've tried with using point light and directional light setups. Not previewing in renderer 2.0, and Im using maya 2013.

    Any hints? :)

    Edit: Yeah nope tried with multiple files, no history, nada niet nothing. It wont apply my normal maps. :(
  • regnirvth
    Hi, I'm kinda new here and I must say this is absolutley amazing to see, I'm glad i can finally use something to preview how my work will look before I send it off to the workshop. However, I come from using blender almost exclusively (my personal preference of tools)...so, I decided to grab a student version of 3DS max and give this a shot. Although, i'm kind of at a loss for how to set this up EXACTLY in 3ds max. Sorry, I haven't used 3dsmax/Gmax in many years and while i've gotten to know the program again, but the material system is VERY different since the last time i used it. So when i'm using this shader for the model, how do i make sure the shader is loaded and assigned to the model? Maybe I missed someone explain this somewhere in this thread, if not...it would be great if some of you could enlighten my on the correct process?
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    $!nz wrote: »
    97465682.jpg

    What's this called? It looks like image degradation or something, these are the 1024.
    What can I do in max to fix this? I'm trying to use the shader to work with stuff and I see this and can't put details on the sides that show this, also lights don't help the situation.

    :( me still love you long time..
    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.
    fellon wrote: »
    Well I don't know if the "map1" UV name is adressed towards the blackness.
    If yes, then I have to say all my maps are namend properly and the only UV map I have is called map1. Just as required.
    If this is not meant for me, well...
    Honestly, I have no idea again what is happening here, did you try and see if Light 2 and 3 as Drew mentioned is working or changes anything?

    Also, what happens if you just apply the material as is, without any textures, are there still these issues? Does it display the mesh as should be, or does it darken for no reason?
    BravoJr wrote: »
    Whoa that shader looks awesome!

    Sadly I can not get it to work.. For some reason it wont recognize and use my normal maps. It just slightly lights up the model, but Its not giving the mesh any detail at all from the normal map.

    Also, the rim lights wont display either. I must be doing something terribly wrong. :(

    I've tried pretty much everything. Parameters look ok according to what I see everyone else using. I've tried with using point light and directional light setups. Not previewing in renderer 2.0, and Im using maya 2013.

    Any hints? :)

    Edit: Yeah nope tried with multiple files, no history, nada niet nothing. It wont apply my normal maps. :(

    I can't confirm if the latest version works with Maya 2013 or not, do you have access to earlier versions of Maya? Even 2012 would be a good test (I can confirm it works in Maya 2011 for example).

    Also, screenshot on how you setup the material? Maybe a switch somewhere was skipped on.
    regnirvth wrote: »
    Hi, I'm kinda new here and I must say this is absolutley amazing to see, I'm glad i can finally use something to preview how my work will look before I send it off to the workshop. However, I come from using blender almost exclusively (my personal preference of tools)...so, I decided to grab a student version of 3DS max and give this a shot. Although, i'm kind of at a loss for how to set this up EXACTLY in 3ds max. Sorry, I haven't used 3dsmax/Gmax in many years and while i've gotten to know the program again, but the material system is VERY different since the last time i used it. So when i'm using this shader for the model, how do i make sure the shader is loaded and assigned to the model? Maybe I missed someone explain this somewhere in this thread, if not...it would be great if some of you could enlighten my on the correct process?

    Here you go:
    rz8b1.png
245
Sign In or Register to comment.