DirectX FX Shader Demo

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  06 June 2005
New demo

I made a new shader demo. This is a shader that's intended for grass and other small foliage that blows in the wind. It only requires DirectX 8 this time (GeForce 3 and up) so hopefully it will run on everyone's hardware. Give it a try and tell me what you think! Here's a screen grab from the Max viewport:



The shader uses a sine wave to animate the grass as if it's waving in the wind. There are parameters to allow you to set the wave size, speed, and frequency. Be sure to push play to see the animation.

You can grab the demo here:

http://www.bencloward.com/fxShadersFolliage.zip

CG_Gordon - this is one of shaders I've been working on that uses opacity maps.

SOuLjA`- Normal Mapping SHOULD workk with a 9800 card - yes - but it appears to be a broken feature. There seem to be a lot of bugs with DirectX in the viewport. I hope that they're able to address these in a future release. Did you try my normal map shader? I'm hoping that that one will work for you.

theotheo - Glad to see that it worked and that you like it. Thanks!

If any of you decided to make something else with these other than what I've got in the demos, post some images. I'd love to see this stuff get used for something other than simple demos.
__________________
Ben Cloward
Technical Artist

HLSL Training DVDs
| ShaderFX | HLSL Shader Thread | My Shaders | Free Textures | Tutorials



Last edited by bcloward : 06 June 2006 at 05:21 AM.
 
  06 June 2005
Wowzers Ben! Way to blow me away, that looks incredible. I can't believe thats running in the viewport in realtime. As you said it ran fine on my 5800 card at work. Havent tried merging in the other file at home yet. This is truly inspiring, having shaders like this at your disposal opens up so many different possibilities for models and envirnoments. Keep up the excellent work.
 
  06 June 2005
Wooow, its just superb man, very nice to see it in expert mode....
cool bcloward.
 
  06 June 2005
Hey Ben! That last demo was amazing! I wish i could render it out to frames using scanline or mental ray

Keep it up!

Last edited by theotheo : 06 June 2005 at 11:17 AM. Reason: bad english :)
 
  06 June 2005
Hey, I'm glad that you guys liked that one. In terms of code, what it's doing is very simple - and it's very cheap to do computationally. This is the type of shader that you could probably use to cover your whole game environment with grass and still have pretty good performance because what it's doing is pretty simple.

SOuLjA`- I'm very curious to know if my Normal Mapping shader worked for you or if you just get the red wireframe thing with it. Here is a tutorial on how to apply the shader (if you need it):
http://www.bencloward.com/tutorials_shaders1.shtml
__________________
Ben Cloward
Technical Artist

HLSL Training DVDs
| ShaderFX | HLSL Shader Thread | My Shaders | Free Textures | Tutorials



Last edited by bcloward : 06 June 2006 at 05:17 AM. Reason: updated link
 
  06 June 2005
Time for a new shader!

CG_Gordon mentioned wanting a shader for eyeballs, so that's what I've been working on in my free time. Here's a screen shot:



The shader uses reflection with a cube map to give the eyeball the wet look and includes some parameters for adjusting the appearance of the refleciton. It also uses refraction with a cube map to simulate the warping that happens to the iris as light enters the cornea. Specularity is also used to simulate the caustic that the cornea creates on the iris.

The screen shot doesn't do this one justice. You need to see it moving to tell what the shader is really doing. You can download the shader, the Max file, and required textures here:

http://www.bencloward.com/fxShadersEyeball.zip

Read the included text file for more information.

This one requires pixel shader 2.0 hardware so it should work fine on GeForce FX and Radeon 9700 or better graphics cards.

What do you think?
__________________
Ben Cloward
Technical Artist

HLSL Training DVDs
| ShaderFX | HLSL Shader Thread | My Shaders | Free Textures | Tutorials



Last edited by bcloward : 10 October 2006 at 04:04 PM. Reason: Updated link
 
  06 June 2005
This totally rocks! I have to say I really didnt expect you to actually make an eyeball shader let alone such an acomplished one. This is really nice stuff, i never expected an eyeball to work so well with normal maps etc. This is inspiring ben cant wait to try it out on my next model. Whats next in line for the shader treatment
 
  06 June 2005
The grass looks pretty cool, Ben.
I do get a slight alpha halo around the the edges, though, on my 5900XT.
It doesn't look like you are getting one in your screenshot there.
Any ideas on getting rid of that, or do you think it's a limitation in the card?

Really cool of you to share your research!

~Mike D.
 
  06 June 2005
That is some crazy cool stuff right there. Very impressed.

I do have a question/comment though - what good are these shaders since you can't render them??
Now, don't get me wrong here, I think it is amazing that you can see them in your viewport, BUT since NONE of the materials that I work with are like these FX file, all my work needs to be rendered out (to either a movie file or just a still image). Why isn't there a way to have these materials both display in the Material Editor preview, in the viewport, and also render out to an AVI?

I realize that what I am saying has nothign to do with BCLOWARD's files, but I think it is very silly that these great FX shader files can display such amazing images in realtime, yet there is nearly no way to actually USE them for actual real work.

By the way, if anyone at AutoDesk is reading this thread: Hire BCLOWARD, cuz it looks like he really knows what he is doing - unlike the rest of the people working at AutoDesk.
 
  06 June 2005
Quote: I realize that what I am saying has nothign to do with BCLOWARD's files, but I think it is very silly that these great FX shader files can display such amazing images in realtime, yet there is nearly no way to actually USE them for actual real work.


That is unless your work IS realtime. This stuff is getting used in all the next generation video game hardware systems, and also in alot of current (or at least soon) gen PC games. The quality of realtime is catching up with the quality of rendered images pretty quick!

~Mike D.
 
  06 June 2005
Why in world would you want to "render" them? There they are, rendering at a blazing 30 frames per second - right in your viewport!

Seriously though, the purpose of these is for real-time apps like games. Theoretically, you could make FX shaders for everything that you wanted to do in your scene and have the whole thing render in real-time and never have to push the render button again! That would speed up productivity, don't you think? If you needed an AVI you could just do a "preview render."

It will be awhile before that's possible because of image quality differences (anti-aliasing, texture sampling and filtering, etc) and also because a lot of the cool things possible with software rendering (global illumination, ray tracing, etc) are very hard to do on the graphics hardware.

Not to get the thread too far off topic - Frogspasm, I get the alpha halo too sometimes. It just depends on what direction you view the grass from. The halo is caused by the grass not being sorted in the right order for transparency and I don't have control over the sort order. That's something that Max is doing. I can turn the transparecy off and just use alpha ref (just use alpha for clipping and not transparency) but then it doesn't look as nice. If anyone has more ideas on how to correct the alpha halo around the grass, I'd love to hear them.

Thanks for the feedback, guys! I'm glad that you like my eyeball. CG_Gordon, I'm playing around with a metal shader right now that will allow you to adjust how reflective/shiny the surface is based on the diffuse texture alpha channel. Do you guys have any other shaders you're interested in using ?
__________________
Ben Cloward
Technical Artist

HLSL Training DVDs
| ShaderFX | HLSL Shader Thread | My Shaders | Free Textures | Tutorials


 
  06 June 2005
Originally Posted by bcloward: Why in world would you want to "render" them? There they are, rendering at a blazing 30 frames per second - right in your viewport!


I think there is a huge irony, in that I copied over the grass in your file a bunch of times and got a cool field to render in the viewport all in real time - YET, if I tried doing the same thing for an architectural rendering, it would takes minutes/hours to render the equivalent grass. That is totaly rediculious in my book.

I seriously think these FX shaders have MUCH more potention than just in realtime game development, and yet I find it very frustrating in the lack of development that companies like AutoDesk have put into that.

Lots of processing horse-power is being wasted when using 'regular' shaders - these FX shaders really show what truely can be done in realtime.
 
  06 June 2005
Hey Ben I was thinking an advanced skin shader with maybe some sort of fake SSS would be pretty cool. Not sure if you've already tackled a skin shader? IMO skin is the one thing that really stands out a mile when normal maps are used, just doesnt look as convincing as most other materials. I'd love to see what you come up with. The metal shader sounds interesting looking forward to seeing that one too.
 
  06 June 2005
Ouch - now we're getting into the hard stuff. The reason that skin doesn't look good is because nobody has come up with a very good way to do it yet. I've tried a few things before but never come up with anything that I was happy with. Sounds like a good challenge though. I'll give it some thought.

I finished the metal shader last night. Tonight I'll see if I can put together a zip file and post it.

Also, I just discovered how to use 32 bit floating point cube maps in real-time with my shaders!! Real-time high dynamic range image based lighting - here we come!!

More to come soon.
__________________
Ben Cloward
Technical Artist

HLSL Training DVDs
| ShaderFX | HLSL Shader Thread | My Shaders | Free Textures | Tutorials


 
  07 July 2005
I finally got the zip file all put together for my metal shader. I really like the way this one turned out - for two reasons:

1. - You can control how shiny/reflective the surface is per-pixel by using the alpa channel of the diffuse texture. This means that you can make chrome with rust spots, brushed steal, dull looking iron, etc - all with the same shader.

2. - This Max file is using High Dynamic Range cube maps for Image-Based Lighting. These increase the realism a lot and make the whole scene look more vibrant and alive. I was finally able to create HDR cube maps to use with my shaders because Photoshop CS2 now has support for these floating point formats - and it handles them really well.

I also included some other features like normal mapping, offset mapping, support for a dynamic point light, etc. Take a look at the readme file in the zip for more details.

Here's a sample pic:



Again, this pic doesn't do it justice. You really need to download the zip file and see it in action. This zip is a bit larger than some of the others. I hope 4 megs is a reasonable download size. Floating point cube maps are pretty big.

http://www.bencloward.com/fxShaderMetal.zip

I haven't been able to do any real art with these shaders yet since I've been doing so much research and coding. I hope that some of you guys can use them for something. If you make something cool with them, be sure to post it. After all, what's the point of making nice shaders if you only ever apply them to spheres?!
__________________
Ben Cloward
Technical Artist

HLSL Training DVDs
| ShaderFX | HLSL Shader Thread | My Shaders | Free Textures | Tutorials



Last edited by bcloward : 06 June 2006 at 05:23 AM.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 06:28 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.