Home Technical Talk

3dsmax Blend Shader

polycounter lvl 13
Offline / Send Message
Bunglo polycounter lvl 13
I'm using the included 'cryBlendShader.fx' max shader that came with the latest SDK release. Obviously I'm trying to blend textures together but I'm having some issues.

The texture that can be controlled via the 'dirt' settings within the material (it goes in the 'DiffuseMap 2' slot) shows up fine and is responsive to said controls.

Unfortunatily, the texture that goes into the 'DiffuseMap 1' slot appears horribly stretched and I can't find a way around it.

Can this shader be used for both the blend and dirt layer function within CE3, or am I simply using it incorrectly? I also can't find an area to put my blend mask, perhaps that's why the first texture appears stretched, that seems to be the most likely problem.

GJnrL.jpg

Replies

  • IxenonI
    Options
    Offline / Send Message
    IxenonI interpolator
    what hardware are you using? This is the dirtshader realtime shader not the blendlayer preview shader.

    Gonna check with SDK on monday if they released the correct fx files...
  • Bunglo
    Options
    Offline / Send Message
    Bunglo polycounter lvl 13
    I'm using a GTX470, i7-930, w/8gb of ram. I took HP's advice and simply checked it in engine when ever I painted new vertex alpha information. Every thing's working in CE3.
  • Criminal
    Options
    Offline / Send Message
    Hey will make sure the SDK includes the right .fx file for you to preview in Max with.

    Apologies it wasn't in there to start with!!

    Can expect the next SDK update mid December so just a few weeks, need to iron out a few bugs with new features first.

    -Sean Tracy
  • [HP]
    Options
    Offline / Send Message
    [HP] polycounter lvl 13
    Cross post from mapcore:

    I would avoid viewport shaders, I mean yes, they're fun to play around with, etc, but they tend to be buggy, unreliable, they crash, and they would never look exactly like it will in the game, etc.
    It's much easier to just hit export and in 0.5sec your back in the editor tweaking the material settings in CE3, rather than spending shitloads of time trying to get the shader to work, get the settings right, etc. It's wasted time, imo.

    Just paint your vertex colors where you want the two materials to blend (white for one material, black for the second), and export to game.
    In the game, open the material for your asset, and tick vertex colors in the material editor, etc. Check the last link.


    PS. Blend and dirt layers are very similar, but with dirt you only have smooth transition and difuse map only.
    Guide for the dirt layer (very useful to just give grundge detail to your surfaces): http://sdk.crydev.net/display/SDKDOC3/Dirt+Layer
    And the blend layer AWESOME TUT FOLLOWING: http://freesdk.crydev.net/display/SDKDOC2/Blend+Layer

    My 2 cents! :)
  • Computron
    Options
    Offline / Send Message
    Computron polycounter lvl 7
    I hope the build it into the editor soon.
  • IxenonI
    Options
    Offline / Send Message
    IxenonI interpolator
    I have to disagree with you here Helder. On larger assets its quite painful to export every time you make a small change. You can just copy your multi sub object, replace all shaders that use the blendlayer with realtime shaders and tweak it with that. It´s pretty stable for me, works and it looks excatly like it would in the engine if setup correctly.

    I agree that it doesn´t make a lot of sense for smaller assets that are not constructed of multipe cgfs...
  • [HP]
    Options
    Offline / Send Message
    [HP] polycounter lvl 13
    Fair enough yeah, as with everything it boils down to what you are trying to do.
  • PixelMasher
    Options
    Offline / Send Message
    PixelMasher veteran polycounter
    ya i get that streaking issue too. The peoper blend fx shaders would be awesome. im about to start digging into cryengine after being a huge udk fan for ages but the lighting tools of CE look too nice to not give shot, and thank christ for no bake times :D
  • Xoliul
    Options
    Offline / Send Message
    Xoliul polycounter lvl 14
    It's probably because they forgot to explicitely set the second sampler to "Wrap" in the fx code. That or you need UV's in every channel or something.
Sign In or Register to comment.