Hey Brice, just to let you know, I'm a huge fan of this shader! As far as suggestions go, I'd really like to see the possibility to connect material nodes, not just diffuse/normal/spec maps. Is this at all possible in the foreseeable future ? Or am I too picky wanting to have this... Oh, and also, just to be absolutely certain, is it ok to use this shader for commercial projects? Anyway, keep up the amazing work, i'm curious to see your next shader/project!
Hello and thanks for you support hehe
Unfortunately I don't really know anything about maya material nodes. But for what I can see it is very limited in the viewport. It seems the tree is calculated at render time. If I apply a procedural checker as a color it won't show up in the viewport even in highquality mode (which is basically maya's own cgfx). So it seems maya doesn't output anything in realtime I could display in the shader. If anyone has more information about this it'd be interesting
You can see the licence i've been using for the shader here: http://creativecommons.org/licenses/by-sa/3.0/
There's nothing against commercial use it'd be nice to know about it if anything ships using it, but there's nothing I could claim IP for obviously
i am really busy right now other wise i would have tried this shader already ... first i want to say i am blown away by all the test images i see here in the thread i think you are doing an OUTSTANDING job on this custom shader
does it by any chance support additive/multiplicative/multiplyX2 scene blending transparency ?
that is like the number 1 thing i am missing from all the custom shaders out there its such a simple thing but nobody cares to support it. you would do me a HUGGGGGGGGGEEEEEEEEEEEE favor if your shader would get support for that
Hey Brice, I tried baking a lightmap from a model with this shader applied but the lightmap comes up completely black. Can this be fixed or do cgfx shader not support mental ray baking?
Excuse my ignorance, I'm just now seeing this thread and looking for shaders. But is there something like this for max kicking around the net somewhere?
while busy kicking out amazing sceneries with your shader, I was wondering though, wouldn't it be a good idea to include a relief map and BRDF slots to the shader. Sort of like, combining the GenericBRDF- and TerrainBlend shader into one? That would really be awesome. Anyway, as always, keep it up!
Allert
EDIT: i tried to use this shader at work (gamecompany) to pre-vis some stuff, but it looks like the shader uses the cgFX code from maya2008 and up? cuz we still use 7.0 at work, I couldn't really get it to work. I'd really appreciate it if you could make it backwards-compatible. Just a side-request. Give my regards to Bjorn Eriksson at CCP! we went to the same art-academy in Rotterdam. Cheers
@warby: I'm not sure all blending states are supported. I remember playing around to get transparency working so it might be possible. But don't underestimate the ability of maya cgfx plugin to be buggy on every single feature that's something I'd like too, I'll look into it.
@malcom: you indeed need a regular maya shader to bake a light map, but you can easily map the 'hardware shading' of that shader to a cgfx shader. The renderer will then use the blinn or lambert shader and the real time display in the viewport will be the cgfx one.
@Allert: I was thinking about making a blend relief mapping, but one of the problem is that it only works well on flat surfaces. It would need somehow of a precomputing to store curvature to use it on an arbitrary mesh. This is atm far beyond my knowledge sorry
Btw I'm not really sure what could cause incompatibility with an older maya, but there's a ton of mysterious problems around there so could you check on the same machine with 2008? could you be more precise about the problem?
I'm not working at ccp anymore, but you can contact Börkur at borkur at ccpgames.com (the email is on his website so i guess i can spread it :P)
thanks for the quick respone. Too bad the relief shader is so picky, but i somehow managed to get pretty good results with terrain and overhangs/. Basically, i'm kind of mis-using the relief shader to get some nifty fake refraction, like with ice and stuff, it would be cool to blend like an ice-wall to a more snowy wall/floor with your terrainshader... So, its basically nothing more than an impuls request. So no worries
here's 2 screenshots of both the cgfx shader in maya 7.0 and the 2008 one. I think its because maya 7.0 refers to it as 'shader mesh data' (and misses most of its semantics), whereas maya2008 (Vertex Data) has all the semantics in place. Hope this helps, though let me know if you need more specifics
Hi Allert it'd be nice to have screen of that effect you achieved with relief mapping (animation? even better!), maybe there's something specific that can be done there I was thinking of doing surface covered in crystal gems with relief, maybe that's something similar
About backward compatibility there's several things there:
maya 7 don't use properly the 'UIName' value and instead use the name of the variable in the interface. It might be a bit more confusing (usually names are way shorter and abbreviated but that's still the same action).
Same problem goes with vertex data. Maya 7 keeps the regular names (every vertex data that is not the normal, color or position is treated as a uv set). You can find out the real usage of those (the names displayed in maya2008 ) by looking at the source code (you can't escape the code!).
A shader is not very long and vertex data look pretty specific. here's the ones i use in the blend cgfx.
firstly, awesome work Brice, this shader is amazing.
ive been fiddling around with the terrain blending and am getting really nice results, but ive been reading through this thread and a few others and see examples of this shader being used with baked vertex occlusion. can anyone share some info on how to set this up, i can bake ao to vertex, but have no idea how to have this show over the top of the terrain textures.
any help would be greatly appreciated.
go to your custom polygon display options, and be sure to set:
Color: enabled
Color material channel: Diffuse
Material blend setting: Overwrite
and hit Apply/Apply and Close
now in your viewport hit '6' to go to textured mode, and '7' to see the texture with vertex colors. Each time you change the vertex AO, you need to go to the CPD window and hit apply again.
I have some mel buttons that automate this process a bit. let me know if you're interested.
Hi forum dwellers,
I have a little problem with the shader... its being disobedient to all my mouse clicks and maps...I do not know why i have all the settings and color sets done and its just wont look the way it should..
Replies
Unfortunately I don't really know anything about maya material nodes. But for what I can see it is very limited in the viewport. It seems the tree is calculated at render time. If I apply a procedural checker as a color it won't show up in the viewport even in highquality mode (which is basically maya's own cgfx). So it seems maya doesn't output anything in realtime I could display in the shader. If anyone has more information about this it'd be interesting
You can see the licence i've been using for the shader here: http://creativecommons.org/licenses/by-sa/3.0/
There's nothing against commercial use
does it by any chance support additive/multiplicative/multiplyX2 scene blending transparency ?
that is like the number 1 thing i am missing from all the custom shaders out there its such a simple thing but nobody cares to support it. you would do me a HUGGGGGGGGGEEEEEEEEEEEE favor if your shader would get support for that
while busy kicking out amazing sceneries with your shader, I was wondering though, wouldn't it be a good idea to include a relief map and BRDF slots to the shader. Sort of like, combining the GenericBRDF- and TerrainBlend shader into one? That would really be awesome. Anyway, as always, keep it up!
Allert
EDIT: i tried to use this shader at work (gamecompany) to pre-vis some stuff, but it looks like the shader uses the cgFX code from maya2008 and up? cuz we still use 7.0 at work, I couldn't really get it to work. I'd really appreciate it if you could make it backwards-compatible. Just a side-request. Give my regards to Bjorn Eriksson at CCP! we went to the same art-academy in Rotterdam. Cheers
@warby: I'm not sure all blending states are supported. I remember playing around to get transparency working so it might be possible. But don't underestimate the ability of maya cgfx plugin to be buggy on every single feature
@malcom: you indeed need a regular maya shader to bake a light map, but you can easily map the 'hardware shading' of that shader to a cgfx shader. The renderer will then use the blinn or lambert shader and the real time display in the viewport will be the cgfx one.
@Allert: I was thinking about making a blend relief mapping, but one of the problem is that it only works well on flat surfaces. It would need somehow of a precomputing to store curvature to use it on an arbitrary mesh. This is atm far beyond my knowledge sorry
Btw I'm not really sure what could cause incompatibility with an older maya, but there's a ton of mysterious problems around there so could you check on the same machine with 2008? could you be more precise about the problem?
I'm not working at ccp anymore, but you can contact Börkur at borkur at ccpgames.com (the email is on his website so i guess i can spread it :P)
cheers
thanks for the quick respone. Too bad the relief shader is so picky, but i somehow managed to get pretty good results with terrain and overhangs/. Basically, i'm kind of mis-using the relief shader to get some nifty fake refraction, like with ice and stuff, it would be cool to blend like an ice-wall to a more snowy wall/floor with your terrainshader... So, its basically nothing more than an impuls request. So no worries
here's 2 screenshots of both the cgfx shader in maya 7.0 and the 2008 one. I think its because maya 7.0 refers to it as 'shader mesh data' (and misses most of its semantics), whereas maya2008 (Vertex Data) has all the semantics in place. Hope this helps, though let me know if you need more specifics
Allert
About backward compatibility there's several things there:
maya 7 don't use properly the 'UIName' value and instead use the name of the variable in the interface. It might be a bit more confusing (usually names are way shorter and abbreviated but that's still the same action).
Same problem goes with vertex data. Maya 7 keeps the regular names (every vertex data that is not the normal, color or position is treated as a uv set). You can find out the real usage of those (the names displayed in maya2008 ) by looking at the source code (you can't escape the code!).
A shader is not very long and vertex data look pretty specific. here's the ones i use in the blend cgfx.
struct vIN
{
float4 Position : POSITION;
half3 Normal : NORMAL;
half4 Color : COLOR0;
half2 TexCoord : TEXCOORD0;
half3 Tangent : TEXCOORD1;
half3 Bitangent : TEXCOORD2;
half4 Blend : TEXCOORD3;
half2 TexCoord2 : TEXCOORD4;
};
ive been fiddling around with the terrain blending and am getting really nice results, but ive been reading through this thread and a few others and see examples of this shader being used with baked vertex occlusion. can anyone share some info on how to set this up, i can bake ao to vertex, but have no idea how to have this show over the top of the terrain textures.
any help would be greatly appreciated.
go to your custom polygon display options, and be sure to set:
Color: enabled
Color material channel: Diffuse
Material blend setting: Overwrite
and hit Apply/Apply and Close
now in your viewport hit '6' to go to textured mode, and '7' to see the texture with vertex colors. Each time you change the vertex AO, you need to go to the CPD window and hit apply again.
I have some mel buttons that automate this process a bit. let me know if you're interested.
I have a little problem with the shader... its being disobedient to all my mouse clicks and maps...I do not know why i have all the settings and color sets done and its just wont look the way it should..