Homeโ€บ Technical Talk

Xoliul's 3DS Max and Maya Viewport Shader

1468910

Replies

  • BradMyers82
    Options
    Offline / Send Message
    BradMyers82 interpolator
    Just tried to uncomment it to see if it works at all (the glow technique) It doesn't. :(
    But still have the post glow, so that's pretty awesome!
  • kodde
    Options
    Offline / Send Message
    kodde polycounter lvl 18
    Xoliul> Nice work on your website and shaderupdates. Loving those informative feature images and descriptive text. Keep it up.
  • Xoliul
    Options
    Offline / Send Message
    Xoliul polycounter lvl 14
    Hey Brad, nice to read you comment man. I really wanted to fill the gap for good post effects since the standard ones are all very bad, or completely not working.

    regarding the glow:
    i wanted it in there, but i couldn't figure it out (as you can see in my commented code). I'll try to explain a bit:
    Shaders sort of work in two ways in terms of how they present the final result. One is the standard "draw geometry" method, where it just outputs the geometry to the buffer, and can't touch any pixels outside of the model. The other method is where your shader draws to a quad (using rendertargets) that covers the entire screen, having access to all pixels. Post-shaders work exclusively like this.
    Now, for this glow effect, I need to:
    -draw standard geometry like it is now. rendertarget or standard method, i don't even know yet (problems start here already)
    -draw glowmask to rendertarget without showing it
    -blur glowmask
    -do final comp and overlay blurred glow over final image

    So i'm supposed to blend the two methods together here, which is a bit unknown for me. i have some examples that do this, but even at their core they work very different compared to my shader, i need to be able to port the functionality to my existing shader. also these examples don't tend to work in max, so they're just theoretical.
    also, there is NO documentation at all about this. No standard HLSL docs, and especially no Max specific implementation docs. Even the HLSL scripting (which is a strange requirement for rendertargets in Max) is barely documented.

    And you know, to top it all, if I switch my code to use rendertargets instead of standard drawing (which is what the commented code does), the very first step to getting this effect, things go wrong already. The reflections are only blended at half strength, for no apparent reason. Just goes to show it's a bit finnicky...

    anyway i typed a lot here, just wanted to give you some insight as to why I didn't include the feature yet. But yeah, you can use the bloom instead, it could look very similar if you tweak it right.

    edit: oh kodde, thanks man!
  • BradMyers82
    Options
    Offline / Send Message
    BradMyers82 interpolator
    Xoliul: Thanks for the info. Your explanation of there being two ways to handle shaders sort of explains (at least in my mind) why the glow material is so different than the other materials in shaderfx.

    The only shader I have ever used that supports most maps types and gives nice results is the shader by RT Shaders. If you haven't seen it before check this out: http://rtshaders.deviantart.com/art/Imrod-Shader-Demo-Shadowmap-112736816

    Now, granted the only thing I think I like about it better than yours is the use of real-time glow. I was thinking that possibly you could learn how to create real-time glow from looking at this shader. Anyways, I have very limited knowlege with code, especially this shader code, so it all doesn't make much sense to me. But perhaps it will make perfect sense to you.

    Anyways, thanks for your huge contribution to the art community with this awesome shader!
  • cw
    Options
    Offline / Send Message
    cw polycounter lvl 17
    I just got a link to your shader from Nysuatro and I really like it!

    One thing that just came up is that when you copy the material it makes a duplicate that takes over the settings, but it doesnt copy the maps that I loaded into the material. I guess that if you want to copy the material you also want to keep the maps, instead of having to reasign them all over again :)

    other than that, I really like it!

    There was a bug in max 2010 which was subsequently fixed in a service pack AFAIK, have a look if you are up to date. All shader materials lost their maps when dragged to a new slot for quit ea while :( It's not the shader's fault! :D
  • MR_Verkerk
    Options
    Offline / Send Message
    Oops, it seems I accidentally posted twice, the first one was my very first post on the forum, but I thought it didnt came through when I looked for it yesterday, I guess I still have to get used to my new nickname:D

    anyway, if the duplicating shader thing is a 3dsmax issue, I really have nothing else to say besides, Its Kickass! great job on the shader

    cw: thanks for the intel, im going to find myself a service pack!
  • Ruz
    Options
    Offline / Send Message
    Ruz polycount lvl 666
    Xoliul - jsut curious about texture sizes. does max display the maximum texture size ie if you have a 2048x2048 will that show up as such. I get the feeling that my spec map looks more like a 512.
    You used to be able to change this stuff in some kind of ini file in max, but I don't reallly know how this works anymore.
    When was using max 8, my spec maps looked fairly sharp, but max 2010 seems to be messed up. max 2011 looks ok again. Why do autodesk keep on breaking stuff:)
  • Xoliul
    Options
    Offline / Send Message
    Xoliul polycounter lvl 14
    I think Max controls that by itself. In this newest version I did do some code changes to get the best Mip sizes out of the textures, but some stuff might still be up to Max/graphics card drivers. Overriding your texture filtering in the drivers could help for example (to anisotropic).
  • beancube
    Options
    Offline / Send Message
    beancube polycounter lvl 17
    Xoliul is the mayn!
    use it on a daily basis, thanks dude.
  • Ruz
    Options
    Offline / Send Message
    Ruz polycount lvl 666
    cheers for that Xoliul . I will check it out thanks
  • BradMyers82
    Options
    Offline / Send Message
    BradMyers82 interpolator
    I ran a little comparison of Xoliul's shader vs. RT_Shader today and thought I would share the results.
    Like I said before I much prefer Xoluil's, and I think this pretty much proves my point.
    (Note: that the same lighting setup Model and Textures where used to compare both of these shaders. I did my best to get them both looking as good as possible.)

    Anyways, the cool thing about RT_Shader is the real-time bloom, But after playing around a bit with Xoliul's post processing bloom and sharpen, I was actually able to simulate this pretty well I think (real-time bloom that is).

    The only thing I might comment about the post processing bloom, is it would be cool if you could control it a bit more, and really blur the bloom far off the model if you wanted to. It seems when you blur the post processing bloom currently, there is a sweet spot and if you go too high or low, it doesn't look so good. I'm not sure what is going on in the code, so I'm not sure if that is possible, but just a suggestion I figured I would throw out there.

    Yeah, so I bloomed it up pretty good, then photoshoped out the areas that I didn't like. Mainly the skin areas got too much bloom and I had to mask that out. But It was pretty easy, And I think it's a nice solution for the time being.

    I'm interested to hear what you guys think about the comparison.

    CompareXoluilShader_RT_Shader.jpg
  • Xoliul
    Options
    Offline / Send Message
    Xoliul polycounter lvl 14
    Hey Brad, love it that you're doing this sort of research!
    Did you try the Color_correct post effect on it as well? That one's my favorite. I do agree it wouldn't be a fair comparision anymore with it though.

    Regarding the blur: blurring in realtime is kinda simple, it's just brute forced. You take a number of samples around a point, average the values, and that's it. The control you have over it is how far it picks the other samples from the centrepoint. The number of samples is hardcoded. I could try upping the sample amount, or doing a 4- instead of 2-pass blur.
  • BradMyers82
    Options
    Offline / Send Message
    BradMyers82 interpolator
    Xoliul: Upping the blur samples and doing a 4 pass blur might work great! I think you could have just your standard bloom, which you already made, then add a super bloom if you really want to get crazy. :)

    I took a look at the code myself, and while I get the gist of a lot of it, I am unsure how to edit the values like you mentioned. I just don't understand it well enough I am afraid.

    Anyways, thanks a lot man, this is all really exciting for me. In my opinion, setting up a shader properly is almost as important as the entire texture phase itself. Therefore as an artist, its definitely worth taking the time to figure out the best methods.

    Oh yeah, and I did give the color_correct post a look. I didn't really find any major advantages to it when rendering this particular image, but I'll have to give it another try since you mentioned it.

    Thanks again man!
  • Xoliul
    Options
    Offline / Send Message
    Xoliul polycounter lvl 14
    I posted this in Boyluya's topic, but it belongs here too:
    I did a video recording me setting up the shader with boyluya's Driller thing. Thanks Boyluya!

    Boyluya-driller-shot1-700x351.jpg

    Click to go to video page.
  • Kilkus
    Options
    Offline / Send Message
    Kilkus polycounter lvl 15
    Cracking shader Xoliul, Definately gonna try and put it to use on my next character, would be nice to see more organic models using your shader as most of examples i've seen of its use have been mechanical barring the goat fella.
  • Xoliul
    Options
    Offline / Send Message
    Xoliul polycounter lvl 14
    Yes I know, but I try to put the good ones on there whenever I find one (there's about 4 in the gallery). I think zxcman's current "ugly dude" WIP uses my shader too, great example that it works fine there too.
  • kodde
    Options
    Offline / Send Message
    kodde polycounter lvl 18
    I love that Hue-shift in darker areas. Must try this as well.
  • BradMyers82
    Options
    Offline / Send Message
    BradMyers82 interpolator
    What a great tutorial man! I was taking notes when I watched it. :)

    Def. Learned a lot from it. Looks like I won't be using Marmoset much any more. Heh. Thanks Dude!
  • tda
    Options
    Offline / Send Message
    tda polycounter lvl 16
    Yo Xoliul! Your shader totally rocks but im having an issue with alpha channels, i'll let a picture do the explaining -

    2lw3of5.jpg
    Sometimes when an alpha mapped area occludes an object i get this oddity. Only sometimes though, which is odd? It happens both when 2 seperate objects using the same material occlude oneanother, 2 objects using different materials, and also when 1 object occludes itself sometimes. Stuff just dissapears underneath the alpha'd area. The only thing i've been able to notice is that newly copied polygons with the alpha don't make the original polys dissapear when they are occluded, but the alpha area on the original polys make the newer polys dissapear, if that makes sense.

    I've tried everything i can think of to fix it, different texture filetypes (dds/tga), toggled every setting in object properties/viewport properties/driver setup, changing graphic drivers. It happens in max 2008,9 and 10 too. Nothing i do seems to help, any ideas? :c
  • rasmus
    Options
    Offline / Send Message
    Nice work on the tut Xoliul, show 'em how it's done :)
  • boyluya
    Options
    Offline / Send Message
    boyluya polycounter lvl 10
    Just finished watching the tut and you did great man. I'm starting to love your shader.

    Btw, thanks for using my model for the tut. Maybe next time I can give you a better model. :poly121:
  • BradMyers82
    Options
    Offline / Send Message
    BradMyers82 interpolator
    tda: That's how max sorts alphas, by which was created most recently. Your issue has nothing to do with the shader, rather with 3ds max. Unfortunately this means, if you don't carefully plan out how and when you make various alpha objects, then it will make a mess of things. Basically, you want to work from the inside of an object out. Where the closer planes are the most recently created ones. This way the alphas will be sorted properly.

    If you make a mistake, one trick to get them sorting properly is to detach the plane in question, then reattach it appropriately. This works because when you detach an object, its treated as the most recently created object. As far as I know, there is no better way to handle this issue. Good luck man, I feel your pain. :(
  • tda
    Options
    Offline / Send Message
    tda polycounter lvl 16
    Ah my bad, i thought it might be the shader as max's default materials weren't producing this error. Thanks for the heads up dude, i'll do what you suggested.
  • Wahlgren
    Options
    Offline / Send Message
    Wahlgren polycounter lvl 17
    Loved the video xoliul. Never thought about doing some of the stuff you did... like using the posteffects for presentation. Will look through it once more when I do my next presentation.
  • zxcman
    Options
    Offline / Send Message
    zxcman polycounter lvl 10
    Loved your shader!
    here is my model render with your shader
    93094039.jpg
    wall2ra.jpg
  • Xoliul
    Options
    Offline / Send Message
    Xoliul polycounter lvl 14
    Very badass, man. Are you using the post-shaders too ?
    Can I put this in my gallery? Tell me what name and site to credit and link if you agree!
  • zxcman
    Options
    Offline / Send Message
    zxcman polycounter lvl 10
    Thank, man.I used bloom and abberation for the scene and added abberation for the background in PS.
    Ofcouse you can put this piece into your gallery.
    Unfortunatly i still haven't any personal web page, so you can post only my mail in your gallery.
    Btw, here is link to my wip thread
    http://www.gamedev.ru/art/forum/?id=81365&page=25
    and here is my another shot without abberation effect.
    noabber.jpg
  • benclark
    Options
    Offline / Send Message
    great tutorial video, thanks! Its really cool to have the shader explained like that
  • Xoliul
    Options
    Offline / Send Message
    Xoliul polycounter lvl 14
    Thanks ZXC! Will do!
    Cheers Ben, I figured I needed to do that, since I got the impression people frequently don't understand features they would find very helpful.
  • downarmy
    Options
    Offline / Send Message
    downarmy polycounter lvl 7
    Thanks xoliul

    here is a render whit max 09 whit no shadow i got the ati bug and cant get rid of it...
    also i tried it in max 2011 it loaded a few times but everything was too dark and now the shader wont load i dont know why.... error loading file?

    VPGRAB_T34FinalV2FX02_Camera01_351.png

    EDIT: I got it too work in 2011 but ass soon as i enable hardware shading the viewport goes black...
  • downarmy
    Options
    Offline / Send Message
    downarmy polycounter lvl 7
    sorry to spam the thread but i got everything working number 1 thank you xoliul you are my new best friend!

    BLOOM AND SHADOW!

    tankweb.jpg
  • Xoliul
    Options
    Offline / Send Message
    Xoliul polycounter lvl 14
    Probably just ATi-grief. not much you can do but buy an Nvidia...

    edit: oh haha cool. What fixed it for you ?
  • downarmy
    Options
    Offline / Send Message
    downarmy polycounter lvl 7
    for some reason max switched from directx9 to directx10

    so i reseted the parameters for directx9 and it works like a charm in max 2011
  • Mime
    Options
    Offline / Send Message
    Mime polycounter lvl 14
    As posted in my baking lightmaps thread, i love your shader.

    I do however have one problem with it.

    Using 30 + materials with your shader , i found it REALLY annoying that it seams to "forget" the lights i have selected.
    By this i mean , merging one scene with another or opening the scene on another computer the shader loses the lights it had attributed to it. This is fine when you have 2-3 objects , but it gets tedious for more.

    Plus if you have to send the scene to someone else, you have to explain to them how to connect the lights with the shader.

    Other than that , it's just AWESOME.
  • BradMyers82
    Options
    Offline / Send Message
    BradMyers82 interpolator
    Mime: yeah, I think the light issue was discussed a page or two ago in this thread. Basically, its 3ds max fault, and it has been fixed in 3ds max 2011. Which is great, because that really bugged me as well with 3ds max 2010.
  • downarmy
    Options
    Offline / Send Message
    downarmy polycounter lvl 7
    Anyone know how to make your wireframe ticker in the viewport?
  • Xoliul
    Options
    Offline / Send Message
    Xoliul polycounter lvl 14
    Mime: if you use lightmaps you shouldn't really be using dynamic lights. Also, getting the latest Max 2010 updates fixes it too.

    downarmy: you're gonna have to render for that.
  • BradMyers82
    Options
    Offline / Send Message
    BradMyers82 interpolator
    Don't wanna Hijack this thread, but just figured I would mention I have been using Xoluil shader like crazy lately. It's def. helping my art a lot with understanding how the texture maps interact, and how to make things look... well... Better.

    Anyways, I'm going to re-render my entire portfolio with Xoluil shader and fix a bunch of stuff up. For now, my latest and top two models on my site are done with Xoluil. :)
  • rasmus
    Options
    Offline / Send Message
    Brad: Those dogs look great :) Maybe Xoliul should pimp them on his site? *wink wink*
  • Xoliul
    Options
    Offline / Send Message
    Xoliul polycounter lvl 14
    Hey Brad, cool stuff dude. It sounds like you fully got the hang of all the shader settings! It's interesting, i think there's a bit of a learning curve to it, but once it makes sense you get a huge amount of control over your images.
    And yeah those dogs are awesome. How did you get the hair so comvincingly in the normalmap? I remember when I did a cat, I had to use projection painting, it was impossible otherwise. Love the zombie-pug also, it doesn't happen much that people can create a model that looksactually looks funny, you pulled it off nicely!
    Do you have images of them without any extra info (like the wireframe images and text)? I definitely want to use these as examples.
  • Ged
    Options
    Offline / Send Message
    Ged interpolator
    awesome dogs! they could do with a little alpha hair cards here and there but they are pretty much amazing. gotta try this shader again sometime too
  • BradMyers82
    Options
    Offline / Send Message
    BradMyers82 interpolator
    Thanks guys!

    Xoluil: I sent you a P.M.

    But yeah, there IS a learning curve with this shader; which I think a lot of people couldn't grasp before you made those tutorials. Myself included. But now that you have taken the time to make those tutorials, there is no reason people can't take advantage of this awesome shader.
    I still have to try this shader with a human skin texture. I have plans to texture that Morgan freeman sculpt (make a low poly also). So, I'll def. let you know how that works!
  • Nibelheim
    Options
    Offline / Send Message
    Does this shader support vertex colors?
  • Will Faucher
    Options
    Offline / Send Message
    Will Faucher polycounter lvl 12
    So I tried out your shader for the first time today. I was amazing, and I mean absolutely impressed by the fact that it was remarkably simple to use. Of course, I haven't tried anything complex yet, only played around with showing off my normal, diffuse and spec maps. But dang, I can't get over how easy it was to get everything set up!

    Kudos to you! Thank you so much for this shader! Words cannot express the sheer awesomeness of this!
  • Tom Ellis
    Options
    Offline / Send Message
    Kudos to you! Thank you so much for this shader! Words cannot express the sheer awesomeness of this!

    +1

    When you watch the video and know how to set everything up / what everything does, the results are so incredible.

    Cubemap reflections/lighting along with a subtle fresnel is like an 'instant-awesome' switch.
  • felipefrango
    Options
    Offline / Send Message
    felipefrango polycounter lvl 9
    I've been wondering...any chance you could do a DOF post effect shader?
  • Xoliul
    Options
    Offline / Send Message
    Xoliul polycounter lvl 14
    Hey dudes, thanks for the kind words, glad to see my efforts are making a difference;

    No vertex colors, sorry. It's sorta beyond the shader's scope, plus I don't really wanna use that terrible vertex color system in Max, I hate it.

    DoF, well, I mention it on the FAQ page; http://www.laurenscorijn.com/postshadersfaq
  • felipefrango
    Options
    Offline / Send Message
    felipefrango polycounter lvl 9
    Oh, thanks man. I actually read that a while ago, but totally forgot about it. It's a shame, but it's not like your shader doesn't make things instantly awesome already as it is, so it's all good. :p
  • rasmus
    Options
    Offline / Send Message
    felipefrango: You could place a camera and enable the DOF preview - it won't continually update, but for still shots from the viewport it does the job.
  • 00Zero
    Options
    Offline / Send Message
    just tried out the shader for the first time last night. its super great, thanks laurens. I can finally get stuff to look close to how our assets look at work. thanks for all the effort, the video tutorial helped a lot.
1468910
Sign In or Register to comment.