FAQ for Viewport Shader
This is a special page, dedicated to frequently asked questions regarding my shader. I see the same ones return all the time, so I will answer them here.
Help, how do I use this?!
It’s not difficult to load a DirectX shader in Max. Here’s a small guide I took directly from Jeroen Maton:
- Open your material library.
- Choose a DirectX Shader. Keep old material as submaterial.
- Now browse to your fx file and apply the material to your model
For Maya, the procedure is not difficult, but less transparent.
- First you need to enable the HLSL shader plugin through Window > Settings / Preferences / Plug-in Manager
Check both boxes next to hlslShader.mll to enable the use of the plugin for this and future sessions.
- Once that is done, you will always need to enable Hardware Texuring. To do this, click the Shading menu of your viewport, and select Hardware Texturing.
- Now all that is left is to create an hlslShader material. Open up the Hypershade window and create a new hlslShader material.
The shader doesn’t render correctly/ doesn’t work!
This is a big question that can have many causes:
- First of all, make sure you have a graphics card that supports the shader. At least GeForce 6 series or ATi X1000 series. Recommended is GeForce 8 or ATi HD3000.
- Updated video card drivers are also recommended, as wel as updating your 3DS Max with the latest Service packs and hotfixes.
- Make sure you’re using Max 9 or higher for the _noshadows version, Max/Maya 2008 or higher for the regular version.
- Make sure you set up the correct lights and the number of lights you want to use.
- For every texture you want to use, you need to check a tickbox to enable it, don’t forget this.
- If all of these are correct and double checked (try resetting the material and restarting) and you still get problems like a pure black mesh, check if you have an ATi card below HD3000 series. If you do, this is most likely the cause. Driver updates can help, but are not guaranteed. The problem lies with ATi and its drivers that lack proper support. This is the biggest cause of problems so far!
Opacity/translucenty is behaving strange!
If other meshes become invisible behind meshes that have opacity maps, this is actually a problem inherent to realtime rendering. You program needs to sort the order in which meshes are drawn, to prevent these sort of invisibility problems. 3DS Max unfortunately doesn’t do this. You can try to work around this, by forcing Max to draw the problematic object last; you do this by duplicating it and deleting the old object, making it the newest created object and thus last drawn. If this doesn’t work: make sure it’s not linked to another object: linking influences the drawing order.If you have some strange translucency issues in Max 2010, you might need to change the viewport settings between Good and Best quality, as well as change the translucency quality to “None”.
In short: this is a problem with 3DS Max, I can’t do much about it.
How do I enable shadows ?
You can’t have shadows in maya, just Max.
The following image illustrates how to do this in Max 2008 -2009:
In Max 2010-2011 it’s much simpeler. After enabling shadows on a light:
How do I use the viewport grab script? It does nothing when i run it!
It’s a macroscript. that means you run it once and it defines an action that you can bind to a hotkey or custom button. Go to Customize > Customize User Interface. In the “Tools” Category you can find the entry created by the script, it is called “Grab Viewport”, without the ellipsis (… three dots) behind it. I recommend adding it to a custom toolbar to which you can add buttons for other usefull scripts.
If I re-open a scene in Max 2010, some settings are gone!
This is an issue created by Autodesk, it is fixed by a few updates and hotfixes. Install all of them: 3Ds Max Updates
In Max 9, the light behaves very strange when changing position?
This is a known problem. It will probably not be fixed anymore. I would need to rewrite a lot of the light code (and make it less performant) just to support a program that is already 4 years old by now. I don’t see this as a viable option. I suggest you upgrade to a newer version of max if you can not live with this problem.