Pages

August 31, 2011

New Shader Tools for Maya

Congrats to Laurens Corijn and Robbert-Jan Brems on their XoliulShader 2 release, it looks amazing.  They've noted that there will be only limited Maya support - so lets fill that void.

I'm going to update an entire new toolset for interacting with my CGFX shaders.  Here is a preview UI layout.  Very preliminary work.  I have most of the functionality in place from other tools, just have to bring it together in one Monster release.


August 29, 2011

lcTextureSaver Extension

I know some people were interested in this Photoshop extension tool, I wrote it for a very specific workflow we use at Turbine but if you find it useful all the better.  I don’t have any plans to edit or modify the tool.

Download

Here is a quick intro video on installing and using the tool.

August 25, 2011

Some updates

I’ve made some relatively minor updates to a few shaders, check the dates on the Downloads page.  I like to keep things fluid and make rapid changes back and forth.  Hopefully I’ll get some time to do a major pass on the Uber and Skin shaders soon.

I posted download links to a tool I made to simplify texturing at work a bit.  the lcTextrueSaver is an extension for Photoshop CS4 and 5 that creates a custom folder structure for your PSD and uses that structure to save out RGB+A ‘combinations’ such as Diffuse+Clip, Normals+Specular, etc.  It’s a tool mostly set up for the way we do texturing at my job but if you find it useful or inspiring run with it.

As a note on installing Photoshop extensions, make sure you run the Adobe Extension Manager as an Administrator in Windows. (Also I never test this stuff out on Mac so good luck to you guys)

I’ve been doing a lot of pyMel development, I’ll get around to releasing updated tools with these new skills.

May 25, 2011

lcShaderTools.mel–v2.3

Download

Updated to let you interact with my new CGFX shaders featuring point lights.

lcShaderTools

March 6, 2011

lcAMDShader.cgfx – compromise shader for AMD graphics cards

EDIT (03/24/2011) – Seems even with my bests attempts although the shader ‘runs’ on AMD cards, normal maps don’t show up.  I’m taking the download offline until I can do more testing and hopefully fix the issue.

CGFX in Maya and AMD graphics cards seem to get along very poorly – most often they simply will not work together.  CGFX offers a large number of ‘profiles’ under which to compile shaders at runtime and only the arbfp1 and arbvp1 profiles seem to work reliably.

I’ve put together a cut down version of my lcUberShader so that it will run under the arbfp1/arbvp1 profiles.  This means that I’ve had to remove a lot of features, for example there are only 2 lights supported, 1 directional and 1 point light.  There are no cubemaps supported and currently no glow/incandescence map (although I hope to fit it in at a later time).  Also, rendering in the hardware render buffer seems to have problems in the 8-bit alpha mode.  But many of the features remain intact and it seems to work well.

I don’t have AMD hardware to test this on but hopefully some of you can give me your feedback.

I’m investigating whether the glslf/glslv profiles could work on AMD hardware, but its not certain.  With any luck Maya 2012 will have a new CG compiler and provide better AMD support.

February 28, 2011

lcUberShader_2.7.cgfx

Download

Seems that I had uploaded the incorrect version, this is now fixed.  2.7 uses gp4vp and gp4fp profiles.

February 24, 2011

Updated lcShaders to gp4vp / gp4fp

lcUberShader, lcSkinShader
version 2.7 – Download Page

I have updated my lcUberShader and lcSkinShader to run on the gp4vp and gp4fp profiles instead of vp40 and fp40 as this removes some restrictions on the number of temporary registers available and allows for more complicated, math intensive shaders.  The lcUberShader suffers only a minor performance penalty but the lcSkinShader seems to run at 1/2 to 1/4 the speed compared to the old profile.  I’ll have to investigate the issue but I’m not focused on speed with these shaders.

On the plus side they both now have 3 directional lights and 3 point lights and I’ll expand the features in the near future to include baked shadow map functionality for the point lights as well.

I’ve only done preliminary testing so let me know if you run into issues.

February 23, 2011

lcUbershader Point Lights

version 2.6 – Download Page

I’ve added 3 point lights in addition to the 3 directional lights to the lcUbershader.  These point lights also have an attenuation property, so as they move away from an object their intensity decreases, there is a multiplier to adjust this effect.

I’m not quite sure what will happen with the baked shadows, currently only active for the directional lights, I will probably add the option for the point lights at a future time.

I haven’t had the time to test this change extensively so let me know if something is not working right.

I’m working on adding the point lights to the lcSkinShader also, but I hit the registers limit (32) for the fp40 profile so I’ll have to break things up into more passes or remove some features.

January 9, 2011

Updated Uber and Skin Maya Shaders

versions 2.3 – available here: Download Page

Added 2 new texture inputs
a mask to remove rimlighting from unwanted areas
a mask for the cubemap reflection, for example to isolate metal bits

I changed the way back face shading is done – instead of using the faceforward() function to invert the normals (as this causes some shading errors along the silhouette), I am now doing a 2 pass method.  A pass is rendered for the back faces and a second pass for the front faces is layered on top.  This is much more expensive as the geometry is rendered twice but you get perfect results.

Thanks to Richard Smith for the feedback leading to these updates.

September 7, 2010

Maya Realtime Shaders – Big Update

Up to date downloads are available here: Download Page
I’ve been reading alot of technical papers and was inspired to rewrite and double check all my shaders.  First, some things were broken for example, ambient color was not doing what its supposed to do.  Second, I finally understood the whole linear-lighting thing and all my rgb inputs have been appropriately gamma corrected.  With linear lighting, tonemapping and exposure become much more useful, so I implemented a simplified version of the Uncharted 2 “film-tonemap curve”.  Third, I wanted to make it easier to do rewrites and maintain the code, so i switched the way I was working with multiple lights and inspired by rsl illuminace loop am now doing my lighting through a loop.  This means I can change the code without having to worry about the number of lights or keeping track of their variables and passing them to all needed functions.  I only have to initialize an array to hold that information.
lcUberShader.cgfx and lcNextGenShader.fx are now visually the same although slight differences in the languages are apparent in the code.  I still recommend using cgfx over hlsl for Maya.
lcSkinShader.cgfx and lcHairShader have few changes beyond linear math option and code style changes.  Some attributes have been removed or rearranged - especially with the lcSkinShader, old posts with attribute descriptions may no longer apply.
lcLitSphere.cgfx is an implementation of matcap/lit sphere shading – just for fun and in case anyone is interested.
Pictures: (click for larger)
shaderCompare_A[1]

hairShaderComparison[1]
litSphereImage[1]