Homeโ€บ Technical Talk

Xoliul's 3DS Max and Maya Viewport Shader

1456810

Replies

  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
  • Baaaah!
    Offline / Send Message
    Baaaah! polycounter lvl 10
    Hey Xoliul. Just wanted to say thanks for the shader, I've been playing around with it quite a bit in Max. I've included a link to the thread where I've been posting images if you're interested - I realize brick walls aren't the most exciting objects :)

    http://www.polycount.com/forum/showthread.php?t=75767
  • willy-wilson
    Offline / Send Message
    willy-wilson polycounter lvl 8
    yes in maya i was testing a plant i did a while ago and, i kept checking to see if i had an alpha map for the diffuse because in the other shader i was using it used another texture, there was an alpha cannel but i couldn't get it working.
  • haiddasalami
    Offline / Send Message
    haiddasalami polycounter lvl 14
    yes in maya i was testing a plant i did a while ago and, i kept checking to see if i had an alpha map for the diffuse because in the other shader i was using it used another texture, there was an alpha cannel but i couldn't get it working.

    just as a note, maya doesnt render alphas/transparency properly. haven't tried it on 2011 but 2009 it couldnt render alphas properly.
  • willy-wilson
    Offline / Send Message
    willy-wilson polycounter lvl 8
    no no i dont mean sorting although i got that working with bryces shader, just alpha in general.

    edit: and this is in maya 2009

    bryces shader
    Capture-64.png

    xoliuls shader
    Capture1-7.png
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    Alright, I'ma look into that. Should be fixable. I'll admit, I forgot to test alpha in Maya ;)
  • gibson543
    Offline / Send Message
    gibson543 polycounter lvl 13
    Hey whats up, whenever I load up the shader, the diffuse map and the normal map both work fine, but the specular map doesnt, I'm using max 2011 shadows version, because the no shadows version puts on red spec color that I can't turn off. Any ideas?
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    I've never heard of that happening. Specular should just be load map, mark checkbox and done. And default spec is grey not red, while shadows have nothing to do with the specular calcluation.
    Are you on some old ATI card by any chance, like an X1600 or so ?
  • Revel
    Offline / Send Message
    Revel interpolator
    Well my guess would be the Max 2011 bug that when you apply another Xoliulshader, Max will keep the previous map setting. You have to reset everything/ else restart Max (*probably not a good choice though). Cus once I'm in this situation before, stressed out by the map not looking correctly only to find the setting was carried over from the previous setting.

    Do you have another Xolioulshader applied to your model before the problem one?

    _Revel
  • gibson543
    Offline / Send Message
    gibson543 polycounter lvl 13
    I'm using an Intel Graphics media accelarator, and yes I do have a previous model, and there was the same problem, until I switched to two sided render, but then in two sided my spec map doesn't work

    sheetwtf.jpg
    Uploaded with ImageShack.us

    heres a pic to show what I mean
  • Revel
    Offline / Send Message
    Revel interpolator
    @gibson543
    I can see from your material slot in the material editor looks like your ambient color is set to white, which make the sphere looks over exposed, maybe that's causing the issue. Try to set your ambient color to black (under Environment and Effects dialog box - Global Lighting- Ambient), see whether that's going to fix your problem or not.

    @Xoliul
    And owh Laurens, did you noticed that when you put your shader in one of the material slot and drag and drop it into another slot that's gonna make Max crash?..I tried it 3 times and its all resulting crash. But if you create it by actually selecting it again from the list (change into DirectX Shader again in a new slot, pick Xoliulshader from list in you drive etc) it will have no problem. Weird, or is it only me?...thanks before.

    _Revel
  • gibson543
    Offline / Send Message
    gibson543 polycounter lvl 13
    thank you for the response, but thats not it, my ambient was already set to black
  • Revel
    Offline / Send Message
    Revel interpolator
    That's weird..did you mean your preview sphere is default to that overexposed white from the beginning?..

    Just to compare things up, taken from my Max white vs black ambient.

    whiteblack.jpg

    As you can see the white ambient make my preview sphere looks like your black ambient. And the selection's red become pink. I don't know why it works different way in your Max.

    _Revel
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    Revel, it never crashes when I drag and drop in 2010; I do that all the time. Did you get all the latest updates ?

    Gibson, I hate to tell ya, but an Intel GMA is probably the worst sort of videocard to use for this stuff. I don't think it even properly supports pixel shaders, it can barely be considered a full-fledged graphics card.
  • gibson543
    Offline / Send Message
    gibson543 polycounter lvl 13
    Ah alright I see, oh well, I'll just have to keep figuring ways around it thanks
  • Revel
    Offline / Send Message
    Revel interpolator
    Yea, I installed the latest hotfix for my Max 2011. Probably its just a hardware problem or something. Never mind, I just noticed it yesterday and I've been using your shader like from a few months ago, so it wasn't really critical with my workflow, just asking if anyone also got the problem or not.

    *PS: looking forward for your shader new version!heheh..

    _Revel
  • Pangahas
    Offline / Send Message
    Pangahas polycounter lvl 10
    Guys any tips on how to approach making skin and glass materials using the shader?
  • sampson
    Offline / Send Message
    sampson polycounter lvl 9
    max keeps crashing soon as i save a currently used texture. i'm using ps cs5 and max 09 and a 24 bit texture only 512x512 and shader version 1.5 (3 light setup - only using diffuse and specular)
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    PSD/TGA/DDS/JPG ?
    I'd suggest using TGA or JPG only.

    Pangahas:

    skin is tricky. I suggest the right texture first of all (good diffuse that looks great self-illuminated, blue spec, tweaked to look right, glossmap). You can keep tweaking them while you adjust the shader, but you won't get anywhere if your textures are bad.
    Then I'd suggest using Half Lambert and HueAdjust settings to get more vibrant, smoother shading. Setting a slightly red/warm ambient tint can help.
    And finally, you could try to fake SSS by using self-illumination textures on things like ears (there's an example from ravenslayer in this thread). That can be really hard to get right and will not work in all cases though.
    Glass is super-easy (if it needs to be clear). You don't even need textures, just a cubemap. Set up global opacity (0.7 or so), enable fresnel reflections, set it to reflect cubemap, tweak fresnel settings (increase bias, set multiplier to 1.0 due to cubemap). And make sure "alpha affects fresnel is turned off.
    And do read the feature and FAQ pages, it should explain a lot.
  • Racer445
    Offline / Send Message
    Racer445 polycounter lvl 12
    Something in your Maya shader is messing with the tangent basis. Here's a few tests using the sample object from the Max tangent basis thread, and various shaders.

    Your shader seems like the best option for Maya once you sort this out.

    xolilol.jpg
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    ouch, looks like some channel flipping, and a pretty serious issue. Shouldn't be too hard to fix, I'll try to get to this and the opacity problem asap.
  • sampson
    Offline / Send Message
    sampson polycounter lvl 9
    Yes Xoliul i was using a tga
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    You might've just ran out of memory if it was a big set of 2048's. It doesn't really have anything to do with my shader: Max handles how the textures are sent to the shader.
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    Little up, I fixed Racer's issue. Stupid channel flipping, shoulda done more testing. Cubemaps also work in maya now, as they were also broken. I'll try to get to the transparency next.
    Just redownload the rar file, only the Maya version has changed.
  • ctrldashk
    Hey,

    (first post, pls excuse any newb behaviour)
    Xoliul wrote: ยป
    Cubemaps also work in maya now, as they were also broken

    On Maya (2011), it appears that the cubemaps are flipped sideways, with the "horizon" displayed vertically. Have tested with your cubemaps and my own, same result.

    I had a technical friend look at your shader file, and he switched positions on y and z (possible maya/max discrepancy) in the texCUBElod, which solved it for me.

    HTH,

    K.
  • MephistonX
    Offline / Send Message
    MephistonX polycounter lvl 9
    awesome shader - just been testing it on an model and its fantastic thankyou !
  • swytch
    Offline / Send Message
    swytch polycounter lvl 8
    Is there a way to set the tiling and rotation of textures in the shader?
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    Swytch -
    Not really, since those would just be extra controls for something that can be done elsewhere. With that I mean you're better off using the UVW Map modifier in Max. I'm sure Maya has something similar, though I don't know anthing about UV'ing in Maya.

    CtrlDashK-
    thanks man, I must've used a very blurry cubemap with no clear horizon when testing. Gonna fix and upload that straight away. Send my thanks to your friend too.
  • swytch
    Offline / Send Message
    swytch polycounter lvl 8
    Xoliul,

    Duh, facepalm. You're right. I use Unwrap so much I forget about the UVW Map Modifier. Will give it a go.

    Thanks,
  • Micky Pain
    First off - great shader.
    Finally something well done to use in Maya.

    Anyway, there's two things that I would really like to see in future releases:

    First thing is specular for transparent surfaces. Right now there is none on fully transparent areas and it seems that specularity is directly related to how opaque any given surface part is. The same goes for the global opacity level.
    So in all, it's impossible to make something like glass or other transparent but shiny surfaces.

    The other thing would be to add gamma correction to the shader.

    My shader knowledge is fairly limited at the moment, so I don't want to start hacking around in yours, but from what I understand by talking to friends and colleagues those things shouldn't be too hard to do.


    Another thing relating to some earlier posts and suggestions is regarding the maximum amount of textures that you can use in your shader.
    Basically - since this number is limited - you could free up one slot by remapping the gloss map to the alpha channel of the specular texture. Gloss maps are greyscale in any case and specular maps don't need an alpha channel so it's a match made in heaven, or am I missing something here?

    Anyway, once again great shader, keep up the stellar work.

    -Micky
  • zxcman
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    Thanks dudes! I really appreciate this feedback from the users!

    Micky,
    -spec for glass is a good point. Though you actually need reflections with cubemaps for accurate glass, and this does support opacity ;) It's the "alpha affects reflection" checkbox in the fresnel effects. I can just rewire this button to also affect spec, should be an easy fix. I never really needed the spec for opacity, but granted it would be nice to have and look slightly better.
    -The texture slots, well you know I've actually ran into the limit for checkboxes already, needed to do some tricks to work around that. It just tends to happen when you try to encompass so many function in Shader Model 3, while still keeping a clean code structure (which is something where other shaders can differ).

    ZXCman, awwesome stuff dude, gotta see to put some in the gallery.
    And yeah i still have updates in mind, might do a coop with somebody, but can't promise anything, I have work and freelance that come first.
  • Tom Ellis
  • Micky Pain
    Xoliul wrote: ยป
    ...
    -The texture slots, well you know I've actually ran into the limit for checkboxes already, needed to do some tricks to work around that. It just tends to happen when you try to encompass so many function in Shader Model 3, while still keeping a clean code structure (which is something where other shaders can differ).
    ...

    Not sure how this would work, but if you were to use the alpha channel of the specular texture as a gloss map you wouldn't add any more checkboxes.
    The "Use glossmap" box would still be there, but instead of turning on the gloss map texture it simply activates the alpha channel of the specular texture.
    The same really as turning on the alpha channel for the diffuse map.

    Off course that would mean that a gloss map needs a specular map as well since those two would be linked, but those two usually go together anyway, and when only one of them is missing it's usually the gloss map.
    And this would cut the total amount of textures used down by one.


    As for the reflection on alpha thing:
    It seems to work with the cubemap, although it would be nice to have "simple" specular as well.
    To clarify - what I really want to do is use it to build a proper eye for a realtime display so to have nice and shiny reflections on the wet cornea are quite a big part of that.
    With some hefty blurring and minute tweaking of the fresnel it works fine now, and most certainly a mile ahead of most other realtime eyes I've seen.

    Now if I could only get some SSS to accentuate to sub-dermal veins.... :)
  • zxcman
    Offline / Send Message
    zxcman polycounter lvl 10
    creationtwentytwo
    Wow! thats badass!
  • Tosyk
    Offline / Send Message
    Tosyk polycounter lvl 13
    Hi, Xoliul! Thanks for yor excellent shader!

    How can i create effect of "layered (masked) textures"? Like vinils in Need For Speed Most wanted or dirty map on chassis in Mafia 2:

    42c631461313t.jpg
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    I made an update, 1.6. Max only for now, sorry.

    Main new features:

    -Quality Normals in Max 2011 are now supported
    -Diffuse Fresnel allows for diffuse colors to change at angle
    -Gamma Correction with Gamma setting
    -Vertex Colors can now be shown multiplied with the diffuse color
    -Specular can be delinked from opacity

    get it here
  • airbrush
    Offline / Send Message
    airbrush polycounter lvl 13
    link off your site isn't working...

    Error 404 - Not Found
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    Fixed, sorry for that.
  • Sevv
    Ive recently started to use ths shader to present my work, I really like the package it provides but I do have one question / problem id appreciate some help with.

    Any texture that I place into the Diffuse Map channel, the texture always comes though very pale, almost as if the saturation has been sucked from it. I cant seem to get the same vibrant colours that I paint in photoshop. Ive looked over the shaders website, tried searching for similar issues but had no luck. Has anyone else experienced this?

    I want to push on and finish a model over the Christmas period, anyone able to help? Im using the shadowed version of the shader if that makes any difference. Cheers
  • Bigjohn
    Offline / Send Message
    Bigjohn polycounter lvl 11
    Awesome, Thanks for the update.

    I love this shader. Use it all the time to approximate what my stuff will look like.
  • Scruples
    Offline / Send Message
    Scruples polycounter lvl 10
    I will be using all those new features,
    Massive update for me, Thanks!
  • Hazardous
    Offline / Send Message
    Hazardous polycounter lvl 17
    I want to try other shaders man, but you just keep hittin me with the goodness stick!! Always keep coming back to your shader, I'm just comfortable with it :D
  • Bigjohn
    Offline / Send Message
    Bigjohn polycounter lvl 11
    Only thing it's missing is UDK-style Transmission map.

    Shameless feature request :)
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    Thanks guys.
    Yeah I might try getting the blended normals SSS in there, together with transmission. It's gonna take some fiddling though, as I'm really scraping the walls now.

    But first there should be another big big update in the coming weeks, can't really say when though since it's not up to me.
  • Revel
    Offline / Send Message
    Revel interpolator
    Gosh, what other great things that you gonna bring to the community there Xoliul?..looking forward for that big big update!

    Btw, I'm curious with the Quality Normal Supported that you said in your earlier post, are you refer it to 3PointShader Quality modifier? or any other Quality Normal that I'm not aware of?

    _Revel
  • Xoliul
  • cw
    Offline / Send Message
    cw polycounter lvl 17
    Autodesk are calling it 'qualified normals' and you need 2011, newest hotfix installed, and to fiddle with the 3dsmax.ini. But it works!
  • Bigjohn
    Offline / Send Message
    Bigjohn polycounter lvl 11
    I gotta ask, as someone who doesn't know much about that stuff, but isn't that Autodesk fix kinda counter-productive? What I mean is, I use these shaders as a preview for what my stuff will look like once it's imported into an engine. Say Unreal for example. So if I apply this fix, I may go around thinking that my stuff looks good, but then once in the engine it'll look like it did before again.

    See what I'm saying?
  • Racer445
    Offline / Send Message
    Racer445 polycounter lvl 12
    That's a tangent basis issue in general, not specific to this fix. This hotfix corrects the syncing issue between the max scanline renderer and the viewport.

    If you don't know what tangent basis your engine is using, ask someone who knows so you can bake it in the correct program, or build your model in a way that is safe for any engine.
1456810
Sign In or Register to comment.