I got the Parallax Mapping to work. Had misread the description text earlier where it said that the parallax height data had to be stored in the Nmap ALPHA channel... doh!
I got the Parallax Mapping to work. Had misread the description text earlier where it said that the parallax height data had to be stored in the Nmap ALPHA channel... doh!
Here's a test with a fully animated parameters relief/lighting/shadowing.
True the displacement parallax doesn't show up clearly from this angle, on a still image.
For that reason, and also for shadowing effect being animated, I did a quick hardware batch render, which can be downloaded HERE (please rename it as .avi , scratched extension for you to download, and read it without QT, which one changes colours. Prefer MediaPlayer or else with this compression ;o) )
Cool stuff Jeff. Haven't tried fiddling with the Relief Mapping Self Shadowing yet. Seems nice.
I had my students doing everything from Color Maps to Normal Maps today for 6 hours straight, including using this shader, CrazyBump and Maya default stuff. It was definitely an eye opening experience for most to see how far you could fake stuff with "just" a shader.
Hey kodde, thx.
And really a good idea to open their minds to the video games fakability ^^
Far more important as the PixelShader era evolves quickly.
Apart from that, please note 2 important clues I forgot to mention about BRDF relief mapping.
>> 8bits Displacement within alpha chan should be blurred a bit to avoid too visibile shadow aliasing, this due to the actual sampling method for shadows (Tip from Brice). Also he's intending to review this part of it if I'm not wrong.
>> also, If you didn't realize (as I didn't ...), the selfshad intensity slider reaches 0.1, which is invisible in most cases. So manually override it first to 1.
Just 2 other works realized with the BRDF Shader, in a totally "manga" universe.
For the character, the brdf fakes a really nice toon shading, just because the different colors on the BRDF sample are sharp and not blended in a gradient...
Reaaally nice feature, one more time
And a Diorama, always in this universe:
The diorama is a work group realized with Delphine Lacroix and Fabian Kaizer.
They also realized the other characters fighting with the "cat-woman"
These are fanarts of Ankama's Wakfu and Dofus world, well-known mmorpgs in Europe
EDIT-- you answered this question before. nevermind. Any luck with the alpha-blending, though? I still can't get the shader to display alphas without the sharp edges common to 8-bit alpha channels...
Also, how do you link multiple lights? I can only seem to link one light at a time, aside from the included ambient settings.
any chance of someone making a zipped scene for 8.5? I just can't get it working
filled all the slots (apart from the initial dds ones, the checkboxes are off for them)
I just get some of the features working (ambient colour, directional light, rim light) but no env map, normal map. Not sure what I'm doing wrong.. got a gtx 260, should be able to handle modern shaders right?
@ WipeEout: Alpha testing is mandatory, Maya doesn't support sorting of transparent object. It's been discussed here already: I could activate alpha blending in a separate technique but you would need to split the mesh down so that the sorting is properly done per object. Sorry for the lack of support these days, but eeeh... no excuse actually..
The brdf lookup makes it inherently more suited for a single light. I could add more, but you wouldn't have any control over their color, decay or intensity. It kinda reduce the interest of having multiple lights (most of the time you guys want something like a nice blue rim light, or a contrast of colors). Remember you can very easily simulate a back light with an additional gradient into the lookup texture ('brdf').
I've decided not to iterate more over the brdf shader (ah, i still need to publish the latest version tough, and document it, which is the more painful :P). Most people don't make an extensive use of the brdf lookup (except for sss which can be very easily generated procedurally with multiple lamps). So I've been working on the side on a bunch of shaders using the same multilamps system that you can automatically hook up to maya using a few simple python scripts.
They are based on my terrain shader and include: the terrain shader (blend of texture, auto uv, lightmaps etc), a generic shader for props (also supports multiple lamps, lightmaps, auto uv: usefull for rocks etc), a simple shader for dynamic objects (multilamp for characters, with cubemap etc) and I recently hacked a relief mapping multilamp shader, for the sake of killing my brand new gpu
I should hurry if you guys want to use it for DW, but it should be there soon. Everything is pretty much ready, in bug correction phase.
@rooster you seemed pretty interested in the relief mapping feature, maybe that's what you're looking for?
Make sure the BumpScale factor is set to 1, not 0.
The env map contribution is driven by: the specular factor, the fresnel factors and the 'use lerp for reflection' bool
I've been messy on this dev so i don't really know what bugs have corrected etc... :$
(the thin surface translucence is still broken, and all those parameters are a very big mess...)
See, that's my problem: I just got a new nVidia card, but the BRDF shader doesn't work properly without the 175.80 drivers installed. But then Left 4 Dead won't play properly without the current drivers-- now I'm torn
Hi
I personally work with 182.50 for no specific reason (if it works don't touch it^^). So I assume it should work. What is the problem looking like?
the mysterious banding bug maybe (http://i34.tinypic.com/1431203.jpg )? i had one of those again a few weeks back, drivers re installation solved things as usual.
I've been working on some interesting shader projects recently sorry i'm not giving updates on this one
yup, that was the problem with a fresh installation of a new 9600 GSO card, with 185.something drivers. New drivers came out this month, so I wanted to update, and wasn't sure if Beta 4 worked with anything above the 175 driver roll-back that seemed to fix the banding issue for most (as it worked for me, too).
And no worries on the lack of updates-- Beta 3 has been working just fine for my needs. Was in the mood to update so's I can play with some other current-gen models in my near future.
I read you are working on some new shaders, i had a little request, or maybe there's even a cgfx file outthere, but i'm curious to know if there's a possibility if you can build in support for mutiple UV sets, and some blend modes. Like.. ok, there's a tiled texture on one UV set, and the other UV set is used for baked lighting/occlusion/shadows. With maya's shaders, its already possible to do this via a layered texture, but its only visible in highQuality mode (except for maya 7.0), which makes the scenes pretty slow. Anyway, i thought it would be awesome to get such a function in fakeBRDF or any other shader you have in the works.
Hi there, it's already in but I reaaaaaally need to focus on realease
in the meantime you can use my terrain shader, where you can use a lightmap: http://boards.polycount.net/showpost.php?p=834503&postcount=12
(no brdf tough, if you where looking for a combination of both effetcs)
when trying to use the cgfx (both the fakeBRDF and terrainBlend shader) in maya 7, i get the following error when attaching a light:
Error: No object matches name: cgfxShader1.LightPos1W
i think it has something to do with the semantics in maya 7 (which are different than with maya2008 and up) -> you posted a reply in the "environment ubershader request" thread on how I could bypass that error by looking in the sourcecode, but i can't really understand what you meant by that - basically my question is, is it possible at all to use these shaders in maya 7, and if so, which parts of the cgfx should i modify? Cuz thats the version we *still* use at work. here's the link to that thread:
hello Alert
I remember having some similar problems a whiiiile back, but it was something about some node that wouldn't 'unconnect''. It seems to try to connect the w component to something. It can't since it's just a xyz coordinates, but :position semantics often assume a float4 so there might be a conflict there.
Have you tried connecting attributes using the connection editor rather than the usual drop down menu in the shader? do you have that problem even with a brand new scene?
btw the reply in the other thread was about vertex data, which is also slightly different in maya 7.
I'm curious about what you use it for at work tough i could specifically look into it, but i need to find an old maya. let me know.
basically, we recently finished Overlord II, and for the next project I'm assigned to do some researching (along with the help of one of our programmers) into 'new' shader techniques in current gen games. But since our propietary tools don't have a lot of sophisticated shaders yet, they asked me to make a preview in maya of some of the stuff I'd like to see in our new project (SSS, brdf, relief mapping, lightmaps, textureblending, etc.) . Of course, one could argue that there's enough stuff to find on the internet, which I would agree to, but they specifically want to see it on models I made, go figure... So, anyway, i thought of your BRDF shader, since maya's default shaders can't do the stuff that your shader can but, as i said before, i'm still using maya 7 (although 10% of my colleagues are using maya 2009, they won't let me upgrade until the higher-ups agree to newer versions - don't ask why :-P ), and i need the shader to work on that, but it doesn't !! hehe.. Anyway, i hope you can get a version of maya 7, otherwise i guess i would have to wait patiently until they buy some new maya licenses
cheers
- Allert
EDIT: ok, i'm feeling such a noob right now, I took your advice by trying to connect a light/camera to the lightPos1 via the connectionEditor, and voila... you were right, it works now!! woohoo awesome! can't wait to get back to work tomorrow. I could do with a second UV set though, that would really make my day! but all in good time. thanks again dude
i have a meeting with the lead programmer the end of this week to talk about some of the stuff i want to implement, and i'll be sure to drop your name. Basically what we want, is a sort of uber-shader, in which you can disable/enable effects. Most of the guys at work can make shaders, but it gets a little trickier making sure all the elements stay/and work together, this is something that can take a long time to build, or so I was told. But I'll let you know when I know more!
Hey Allert, I'd be interested to follow what you guys decide. I thought creating one uber-shader isn't such a good idea because of the consequences of static/dynamic branching when disabling and enabling effects through IF statements. But then again I'm not all that experienced yet
Hello thx allert !
So everyone can write shaders? you mean using a nodal system or actually writing C code?
Uber shader is my way to go and my code is usually structured this way, so your programmers shouldn't panic (hell I even reduced by 75% the cost of one of CCP's uber shader written by a 'real programmer' )
Xoliul, thx again for the interesting hijack hehe. I've read more than once that static branching (such as one depending on a boolean) comes (almost) for free and that that cost is negligible compare to easy of use. Same goes for conditions that only assign values to variables instead of executing code, such as:
well, with 'most of the guys' i meant the programmers Us measly artists can only attach texture files and play with the sliders a bit to make it look good hehe. But yeah, they use C-code to make shaders. One of the programmers said its pretty 'easy' to make them, you know the standard ones using diffuse, spec/reflection and normalmap stuff, but attaching a lot more to it quickly leads to 'spaghetti code', whatever that means :poly142: Plus it seams that no-one really has the time to make such code (i was told it can lead up to 2 weeks to make said uber-shader). I'm sure you understand, but i guess you would have to sit down and talk with these guys, as i am a total noob when it comes to coding, and i'd like to stay that way for the time being . We'll have the meeting tomorrow btw. So when i get back from work, you'll hear what we have decided!
This Shader is very great, I use it at work for prototyping before sending datas to our Game Engine.
Fantastic works and thanks for sharing this tool to the community ! :thumbup:
I have only few remarks,
For a maximum compatibility with our pipeline and the use of 3DSmax, I set-up in Maya > Preferences > Settings > World Coordinate System the "Z-Axis" to main coordinate system.
In this mode, the CubeMap and the Hemispheric Ambient are in the wrong direction.
In the same idea, a flag "Flip Green Chanel" for the Normal Map is well done. Depending of your Graphic Engine.
A great improvement for me, considering what I do, is the use of Detail Map for adding some grains in close Up.
I have a total n00b question since this is the first time I have ever heard of these rad shaders. So I've been messing around with my scene and replacing my old shaders with your Ubershaders as they are called...and when rendered in Maya's Mental ray (physical sun and sky) all my meshes with the Ubershaders dissapeared. Can you not render a scene with these, they are just for preview and building purposes only?
Sorry if this has been answered already, I couldn't find it in my search of this thread.
don't quote me on this i haven't used them all that much myself but since its a realtime viewport shader i think you have to render with maya hardware...
Rendering a real-time shader in MR sorta defeats the purpose. If you want a render like that you'd be better off building a shading network of non-realtime stuff with true AO, SSS etc, render in multiple passes and composite.
Does this work for Maya 2009? I cant seem to get this to work. I cant find the LightPos slot and there is nothing under the CGFX shader parameters:
Hello
I have never used maya on a Mac so I have no idea how well supported cgfx are on this version. Maybe you should have a look at the sample cgfx that comes with maya nowadays and see if it works. You might also want to grab one of the newest shaders on this thread, since the v1 that's on the website hasn't been updated for some time now.
Do you know what about this shader makes it non-portable to 3dsmax? I thought the whole idea with cgfx/hlsl/fx stuff was that it was portable? I'm just curious if there are things you've done which you'd consider 'maya-only', and if so what those are?
It just seems like rendering code should be rendering code, whether I plug it into a maya directx shader or a max one.
hi everyone!
Today I found this thread on google searching for realtime shaders for maya.
This shader is very nice! Instantly made some test renders :-)
the lightPos is in the GnericBDRF Prameters tab, once you've laoded the shader into the CFGX file- you have to create a CGFX shader and load Brice's file into it to get that tab.
Replies
Check out this YouTube showing it in action. [ame]http://www.youtube.com/watch?v=GpKlZLtnox8[/ame]
Note, you probably want to click the YouTube video frame > takes you to YouTube site > click Watch in high quality just below the video frame.
nice! thats something i'll have to take for a test drive sometime!
Strange... works fine on my comp. Tried both browsers and clearing cache.
Here's a test with a fully animated parameters relief/lighting/shadowing.
True the displacement parallax doesn't show up clearly from this angle, on a still image.
For that reason, and also for shadowing effect being animated, I did a quick hardware batch render, which can be downloaded HERE (please rename it as .avi , scratched extension for you to download, and read it without QT, which one changes colours. Prefer MediaPlayer or else with this compression ;o) )
Here's also some youtube preview, though compression is really poor. Even with HighQuality one, I don't understand why : [ame]http://www.youtube.com/watch?v=cJJpSM0BTWs[/ame]
Cheers, and thx to dude Brice for that killah*Shadeh.
Soon a post for your other killah one, the terrain blender.
I had my students doing everything from Color Maps to Normal Maps today for 6 hours straight, including using this shader, CrazyBump and Maya default stuff. It was definitely an eye opening experience for most to see how far you could fake stuff with "just" a shader.
And really a good idea to open their minds to the video games fakability ^^
Far more important as the PixelShader era evolves quickly.
Apart from that, please note 2 important clues I forgot to mention about BRDF relief mapping.
>> 8bits Displacement within alpha chan should be blurred a bit to avoid too visibile shadow aliasing, this due to the actual sampling method for shadows (Tip from Brice). Also he's intending to review this part of it if I'm not wrong.
>> also, If you didn't realize (as I didn't ...), the selfshad intensity slider reaches 0.1, which is invisible in most cases. So manually override it first to 1.
Cheers, have fun with it ^^
Just another use of Brice's great shaders.
The 2 shaders are used (Blend for the terrain and BRDF for all the assets).
A TurnTable HERE
And you can watch the entire work in this thread
Just 2 other works realized with the BRDF Shader, in a totally "manga" universe.
For the character, the brdf fakes a really nice toon shading, just because the different colors on the BRDF sample are sharp and not blended in a gradient...
Reaaally nice feature, one more time
And a Diorama, always in this universe:
The diorama is a work group realized with Delphine Lacroix and Fabian Kaizer.
They also realized the other characters fighting with the "cat-woman"
These are fanarts of Ankama's Wakfu and Dofus world, well-known mmorpgs in Europe
Also, how do you link multiple lights? I can only seem to link one light at a time, aside from the included ambient settings.
filled all the slots (apart from the initial dds ones, the checkboxes are off for them)
I just get some of the features working (ambient colour, directional light, rim light) but no env map, normal map. Not sure what I'm doing wrong.. got a gtx 260, should be able to handle modern shaders right?
@ WipeEout: Alpha testing is mandatory, Maya doesn't support sorting of transparent object. It's been discussed here already: I could activate alpha blending in a separate technique but you would need to split the mesh down so that the sorting is properly done per object. Sorry for the lack of support these days, but eeeh... no excuse actually..
The brdf lookup makes it inherently more suited for a single light. I could add more, but you wouldn't have any control over their color, decay or intensity. It kinda reduce the interest of having multiple lights (most of the time you guys want something like a nice blue rim light, or a contrast of colors). Remember you can very easily simulate a back light with an additional gradient into the lookup texture ('brdf').
I've decided not to iterate more over the brdf shader (ah, i still need to publish the latest version tough, and document it, which is the more painful :P). Most people don't make an extensive use of the brdf lookup (except for sss which can be very easily generated procedurally with multiple lamps). So I've been working on the side on a bunch of shaders using the same multilamps system that you can automatically hook up to maya using a few simple python scripts.
They are based on my terrain shader and include: the terrain shader (blend of texture, auto uv, lightmaps etc), a generic shader for props (also supports multiple lamps, lightmaps, auto uv: usefull for rocks etc), a simple shader for dynamic objects (multilamp for characters, with cubemap etc) and I recently hacked a relief mapping multilamp shader, for the sake of killing my brand new gpu
I should hurry if you guys want to use it for DW, but it should be there soon. Everything is pretty much ready, in bug correction phase.
@rooster you seemed pretty interested in the relief mapping feature, maybe that's what you're looking for?
Make sure the BumpScale factor is set to 1, not 0.
The env map contribution is driven by: the specular factor, the fresnel factors and the 'use lerp for reflection' bool
http://www.mentalwarp.com/~brice/download/GenericBRDF_4_BETA.cgfx
I've been messy on this dev so i don't really know what bugs have corrected etc... :$
(the thin surface translucence is still broken, and all those parameters are a very big mess...)
I hope it helps
Will have to wait to try this newer version til when I'm at work. Still doesn't work on my machine here are home.
Keep up the good work, this is a fantastic tool.
Will the Beta 4 version work properly with the latest nVidia Drivers (185.85). or should I stick with the 175.80 drivers for now?
I personally work with 182.50 for no specific reason (if it works don't touch it^^). So I assume it should work. What is the problem looking like?
the mysterious banding bug maybe (http://i34.tinypic.com/1431203.jpg )? i had one of those again a few weeks back, drivers re installation solved things as usual.
I've been working on some interesting shader projects recently sorry i'm not giving updates on this one
Pior I'm waiting !
And no worries on the lack of updates-- Beta 3 has been working just fine for my needs. Was in the mood to update so's I can play with some other current-gen models in my near future.
Thanks for the help, as always, Brice!
I read you are working on some new shaders, i had a little request, or maybe there's even a cgfx file outthere, but i'm curious to know if there's a possibility if you can build in support for mutiple UV sets, and some blend modes. Like.. ok, there's a tiled texture on one UV set, and the other UV set is used for baked lighting/occlusion/shadows. With maya's shaders, its already possible to do this via a layered texture, but its only visible in highQuality mode (except for maya 7.0), which makes the scenes pretty slow. Anyway, i thought it would be awesome to get such a function in fakeBRDF or any other shader you have in the works.
cheers!
Allert
in the meantime you can use my terrain shader, where you can use a lightmap:
http://boards.polycount.net/showpost.php?p=834503&postcount=12
(no brdf tough, if you where looking for a combination of both effetcs)
i think http://www.mentalwarp.com/~brice/download/TerrainBlend_BETA2.cgfx is the latest one
when trying to use the cgfx (both the fakeBRDF and terrainBlend shader) in maya 7, i get the following error when attaching a light:
Error: No object matches name: cgfxShader1.LightPos1W
i think it has something to do with the semantics in maya 7 (which are different than with maya2008 and up) -> you posted a reply in the "environment ubershader request" thread on how I could bypass that error by looking in the sourcecode, but i can't really understand what you meant by that - basically my question is, is it possible at all to use these shaders in maya 7, and if so, which parts of the cgfx should i modify? Cuz thats the version we *still* use at work. here's the link to that thread:
http://boards.polycount.net/showthread.php?t=54839
thanks
- Allert
I remember having some similar problems a whiiiile back, but it was something about some node that wouldn't 'unconnect''. It seems to try to connect the w component to something. It can't since it's just a xyz coordinates, but :position semantics often assume a float4 so there might be a conflict there.
Have you tried connecting attributes using the connection editor rather than the usual drop down menu in the shader? do you have that problem even with a brand new scene?
btw the reply in the other thread was about vertex data, which is also slightly different in maya 7.
I'm curious about what you use it for at work tough i could specifically look into it, but i need to find an old maya. let me know.
basically, we recently finished Overlord II, and for the next project I'm assigned to do some researching (along with the help of one of our programmers) into 'new' shader techniques in current gen games. But since our propietary tools don't have a lot of sophisticated shaders yet, they asked me to make a preview in maya of some of the stuff I'd like to see in our new project (SSS, brdf, relief mapping, lightmaps, textureblending, etc.) . Of course, one could argue that there's enough stuff to find on the internet, which I would agree to, but they specifically want to see it on models I made, go figure... So, anyway, i thought of your BRDF shader, since maya's default shaders can't do the stuff that your shader can but, as i said before, i'm still using maya 7 (although 10% of my colleagues are using maya 2009, they won't let me upgrade until the higher-ups agree to newer versions - don't ask why :-P ), and i need the shader to work on that, but it doesn't !! hehe.. Anyway, i hope you can get a version of maya 7, otherwise i guess i would have to wait patiently until they buy some new maya licenses
cheers
- Allert
EDIT: ok, i'm feeling such a noob right now, I took your advice by trying to connect a light/camera to the lightPos1 via the connectionEditor, and voila... you were right, it works now!! woohoo awesome! can't wait to get back to work tomorrow. I could do with a second UV set though, that would really make my day! but all in good time. thanks again dude
i have a meeting with the lead programmer the end of this week to talk about some of the stuff i want to implement, and i'll be sure to drop your name. Basically what we want, is a sort of uber-shader, in which you can disable/enable effects. Most of the guys at work can make shaders, but it gets a little trickier making sure all the elements stay/and work together, this is something that can take a long time to build, or so I was told. But I'll let you know when I know more!
cheers,
- Allert
So everyone can write shaders? you mean using a nodal system or actually writing C code?
Uber shader is my way to go and my code is usually structured this way, so your programmers shouldn't panic (hell I even reduced by 75% the cost of one of CCP's uber shader written by a 'real programmer' )
Xoliul, thx again for the interesting hijack hehe. I've read more than once that static branching (such as one depending on a boolean) comes (almost) for free and that that cost is negligible compare to easy of use. Same goes for conditions that only assign values to variables instead of executing code, such as:
cheers,
Allert
could you fix the SSS effect in your Generic fake BRDF shader v4? It seems it only works with 1.1. Thanks!
Allert
http://www.mentalwarp.com/~brice/download/GenericBRDF_4_RC1.cgfx
This Shader is very great, I use it at work for prototyping before sending datas to our Game Engine.
Fantastic works and thanks for sharing this tool to the community ! :thumbup:
I have only few remarks,
For a maximum compatibility with our pipeline and the use of 3DSmax, I set-up in Maya > Preferences > Settings > World Coordinate System the "Z-Axis" to main coordinate system.
In this mode, the CubeMap and the Hemispheric Ambient are in the wrong direction.
In the same idea, a flag "Flip Green Chanel" for the Normal Map is well done. Depending of your Graphic Engine.
A great improvement for me, considering what I do, is the use of Detail Map for adding some grains in close Up.
Best regards,
Walter
Sorry if this has been answered already, I couldn't find it in my search of this thread.
Hello
I have never used maya on a Mac so I have no idea how well supported cgfx are on this version. Maybe you should have a look at the sample cgfx that comes with maya nowadays and see if it works. You might also want to grab one of the newest shaders on this thread, since the v1 that's on the website hasn't been updated for some time now.
It just seems like rendering code should be rendering code, whether I plug it into a maya directx shader or a max one.
Today I found this thread on google searching for realtime shaders for maya.
This shader is very nice! Instantly made some test renders :-)
Got this error using the shader into 3dsmax :
"error X3000: syntax error: unexpected token 'vector'"
Is because it only work with Maya ? Or is it a technical problem from my side like hardware not supporting this kind of instructions ?
Thanks a lot.
the lightPos is in the GnericBDRF Prameters tab, once you've laoded the shader into the CFGX file- you have to create a CGFX shader and load Brice's file into it to get that tab.
here are my settings:
Is there a way to have multiple light sources or change the intensity of the light?