블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2737)
Unity3D (817)
Programming (474)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (228)
협업 (58)
3DS Max (3)
Game (12)
Utility (136)
Etc (96)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (53)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday
04-20 00:00

Latest Update 5/01/09
New Shader, codenamed 'Bleach' (for reasons I'll explain in a moment):
- Improved Vertex Color and Alpha support
- Tweaked the glow system to reduce blown-out glowing
- Added Light Attenuation (not yet linked to the lights' actual attenuation settings, but very good for moody lighting)
- Added Fresnel Highlights
- Added some simple subsurface scattering (nice alliteration, eh?)
- Added 'glowthru' subsurface scattering
- Half-Lambert is now tied to the alpha channel of the SSS map for added control
- Added a "Bleach Bypass" filter. Hence the shaders name. This is by no
means the marquee feature, its just a nifty little addition.

This shader is still a bit raw I feel, so I wanted to get it into your hands and see if you folks can exploit it to the point of breaking. So test the heck out of this and give me some feedback. With DomWar going on, I'm sure you all have nearly-complete characters to use as guinea pigs. 

Shader_Donze_Bleach_Beta.fx
Shader_Donze_Bleach_NoShad.fx




Important Info Concerning All Shaders
Any of the reflective shaders require DDS format cube maps for the environment. Since alot of folks don't know what a cube map or DDS is (or how to make them), here are a few samples that you can use:
Desert Scene
City Scene
Blurred version of Desert Scene (Good for brushed metal look)

I would like to encourage any of you to post images of work you've created with these shaders. Particularly when I start posting some of my more advanced shaders, I'd be very interested to see how you can get the most out of them. Hope you enjoy them!

Each shader has a 'No-Shadows' counterpart. Versions of Max prior to 2008 don't support shadows, so you'll need the no shadow version if you have Max9 or something.




NEW! COMPLETE SHADER - (requires Pixel Shader 3.0)
LAST UPDATED 4/13/09 - Version 1.1 Improved glow and added Vertex Color support
Shader_Donze_Complete.fx
Shader_Donze_Comp_NoShadows.fx




STANDARD SHADER
LAST UPDATED 1/30/09 - 4 lights and proper opacity support.
Shader_Donze_Std.fx
Shader_Donze_Std_NoShadows.fx




GLOW SHADER - (requires Pixel Shader 3.0 support for now)
LAST UPDATED 1/30/09 - 4 lights and proper opacity support.
Shader_Donze_Glow.fx
Shader_Donze_Glow_NoShadows.fx
Note: Still has one odd little bug, but I've not been able to fix it yet. Most people will never notice it anyway.




ENVIRONMENT SHADER - (requires Pixel Shader 3.0)
LAST UPDATED 1/30/09 - 4 lights and proper opacity support plus Fresnel reflectivity.
Shader_Donze_Env.fx
Shader_Donze_Env_NoShadows.fx




SKIN SHADER - (requires Pixel Shader 3.0)
LAST UPDATED 12/5/08 - first pass at skin.
Shader_Donze_Skin.fx
Shader_Donze_Skin_NoShadows.fx
Note: The skin shader has a lot of advanced features. For an explanation of them go HERE.




GLASS SHADER - (requires Pixel Shader 3.0)
LAST UPDATED 12/14/08 - first pass at glass.
Shader_Donze_Glass.fx
Shader_Donze_Glass_NoShadows.fx




TOON SHADER - (requires Pixel Shader 3.0)
LAST UPDATED 11/30/08 - first pass at toon shading.
Shader_Donze_Toon.fx
Shader_Donze_Toon_NoShadows.fx
Note: The outline part of the code is a bit shaky right now so the 'Line Thickness' setting is currently inactive.[/url]

Here's a quick explanation of the basic features available in all of my shaders. First, for those of you that have no idea how to even get a shader onto a model, here's a quick tut:

Bring up your Material Editor. Choose a material that you would like to be a DX Shader. Now in the top right there is a button that probably says "Standard" (circled in red here). Click that and you'll be presented with the menu pictured on the left. Choose "DirectX Shader" from that menu.




Voila, your material is now a shader. Now, to make it a specific shader (like the one you just downloaded from this thread) click on the big button at the top, circled here in red.



This is a path to an .fx file. So, find the one you like and select it. There are actually a bunch that ship with Max, but they are mostly for demonstraion and not all that useful.


So, once you've loaded my shader, your Material Editor will turn into this:


Now, let me explain what all of this means (most of it is pretty self-explanatory)
First, lets actually start at the bottom. The Material slot can pretty much be ignored. But, if you have an insatiable thirst for knowledge, this is a separate material that Max will use to display your model if you disable DirectX or if you try to render the scene (DirectX shaders don't render, but they really don't need to)

More importantly, at the bottom is also an option for "Technique." You have 2 options here, SingleLight and DualLight. This will tell the shader how many lights to use to light your model.

Now, back at the top, you'll see there are slots where you can specify lights and shadow casters. These, obviously, are where you specify what lights to use. If you have the Technique set to Single Light, then only "Light Position 1" and "shadowCaster1" will matter. Generally you will want the Light Position to match its cooresponding shadowCaster.

Below the lights, there is a slew of map options. First are the Diffuse Map options. This will set the color of the model. There is a "Diffuse Map" and a "Diffuse Color." If you check the box that says "Enable Diff Map" then the shader will use the Map you have selected in the Diffuse Map slot. If you uncheck "Enable Diff Map" then the shader will just use the color that you've selected in the Diffuse Color slot.

The same applies for the Specular Map. The spec map however, also has a few extra options for Glossiness. This shader is set up so that the alpha channel of the Spec Map can be used to control glossiness. If you do not want that option, you can just uncheck the box and use the spinner to control glossiness.

Next is the Normal Map. The only tricky thing here is the "Invert Green Channel" option. Basically, Max uses a somewhat oddball coordinate system. Because of this, your normal map's Green Channel needs to be inverted depending on how you generated your normal maps. So, if you select a normal map and it looks a little weird, try using this option.

You can also turn on "Half-Lambert" lighting. This is a little trick developed by Valve a long time ago. It basically softens the lighting, giving a more appealing but less-accurate look.



[출처] MAX Shader - DirectX Buzzy's Shaders|작성자 온새미로

반응형
Posted by blueasa
, |