Pages

Showing posts with label maya. Show all posts
Showing posts with label maya. Show all posts

February 9, 2013

New LCT Scripts Package

Downloads

I’ve updated the scripts package with new tools and a handy shelf that auto-populates with the scripts.

Here are the new additions:

lcBatchBake:
This is an update to a Mel script I made previously.  It now sports a much smaller interface and handles pathing well.

lcCameraTools:
An update to an old Mel script, now with less bugs.

lcHideByToken:
This tool will let you hide one or more objects based on parts of their file name.  For example, and object named ‘polygon_sphere_geo’ can be hidden by typing the word ‘geo’ in the script window.

lcMoveImagePlane:
This tool lets you make image planes in the orthographic views quickly and can add a control curve to them so they can be moved and scaled.  No more using textured polyPlanes.

lcTextureTools:
Another revision to an old Mel script.  This will rename your fileNodes based on the texture linked to it.  You can also reload all the textures in the scene or only those that have changed since you last reloaded.  You can also repath textures if you move project locations, and open textures in Photoshop.

Also included are the lcRetopoBasic and lcObjTools scripts.

Install Help Video:

November 12, 2012

LCT Scripts Update

Downloads

lcRetopoBasic:

I changed some things so undo will work properly after doing a shrink wrap.

lcObjTools:

Lets you set a path to quickly export obj files.  You can export the selected geometry either combined or each piece individually.  If  you have poly-smooth preview turned on those pieces can be exported with that baked down.  You can also import multiple obj’s at the same time
Note: overwrites without warning.

September 23, 2012

Head Studies

Mendelssohn, Holofernes, and Judith
Rendered in Vray

Click for high-res

September 13, 2012

lcShaderTools_BETA

I’ve been asked about the shadow baking script I was working on.  It made it to the beta form you see here, but I’ve mostly abandoned this project.  The DirectX11 features previewed recently for Maya 2013 address many of my issues, so I’m waiting for that to release new shaders.

This tool is BETA, and I’ll offer NO SUPPORT – the workflow is very rigid, there are bugs.  Extract the ‘lct’ folder to your scripts directory (overwrite as necessary), check the README for run command.

Downloads


USAGE:

  1. Click ‘Make CGFX’ and assign this shader as necessary – only the shader created using the tool can interact with it – no other shaders will work with this tool.
  2. Click ‘Make or Link Lights’ – this creates a directional light and 3 point lights that are automatically linked to the shaders – you adjust light properties through the light node itself – for point lights the intensity value = attenuation and may have to be set very high depending on your scene scale.
  3. For shadow baking, select ONE mesh and click ‘Setup UV’s’ – this creates a secondary UV set for all mesh’s that share the same shader.
  4. Mental Ray must be turned ON and available.
  5. To bake shadows - select ONE object and click one of the Bake buttons – this bakes shadows for any mesh’s that share the same shader – you do not need to specify a bake path unless you want to.

February 25, 2012

lcRetopoBasic–Another Update

Downloads

Some small changes based on requests

  • Removing a mesh from the High Res List will reset its display overrides such as x-ray and hidden
  • Added code to better handle Undo queue functionality when doing a shrink-wrap or relax
  • Adjusting the mesh layering effect with the slider will do so for all mesh’s in the list not just the selected one
  • Adding a new mesh to the High Res List will pop it to the currently active mesh layering distance
  • I disable Viewport 2.0’s vertex animation caching when the script is run – this fixes the problem of the mesh layering effect not updating when the viewport is rotated.  Caching will NOT be automatically re-enabled.

December 24, 2011

lcRetopoBasic–UPDATE

Downloads

Still BETA, but I’ve squashed some bugs and added some helpful features

  • Should deal with object names better, and namespaces from importing obj’s
  • Should no longer hang on occasion when relaxing or shrink wrapping
  • You can work in any selection mode, object, face, edge, vertex and use the Relax and Shrink-Wrap tools
  • Will keep your selection mode so you can continue editing components
  • Highlights the Object List red to remind you that you have no high-res selected

Still to do:
    Viewport 2.0 should(?) offer some speed boosts, especially when working with large high-res objects, but the method for layering the high and low res geo doesn’t work properly in VP2.0.  I need to come up with an updated method

October 27, 2011

lcReproject.cgfx–A Novel Texturing Technique

Download

I was inspired by Brice Vandermoortele’s Normal Map Reprojection Shader and wanted to extend the idea to new uses.  This is a novel way of texturing using lit sphere images and cubemaps.  You can reproject color and normal textures to a new UV Set.

As a CGFX shader, only Nvidia cards will load this reliably, but I’ve added a arbfp1 technique that might work on AMD and older cards.  Cubemaps are lower quality and don’t have any blurring using this mode.

Getting close . . .

My new shader ‘lcShader’ is almost feature complete.  It’s a very close approximation to the Mental Ray mia_material, but in real-time.  In testing I’m able to get very realistic looking materials using a standard texture workflow (diffuse, spec, gloss, cubemap).  Again, HLSL and CGFX versions will be identical, running the same exact code.  Lights react much nicer than previous shaders and have realistic fall-off.  And baked shadow maps too.

My shadow map baking script is also nearing completion, it will automatically link raytrace-baked shadow maps to the shader for linked lights and supports transparency in both the shader surface and the shadow cast.

Here is a quick screen grab, HLSL on the left, CGFX on the right.  They don’t have the exact same shader settings so some slight differences

October 4, 2011

lcRetopoBasic–Maya Retopology Tool

Downloads

I was inspired after seeing RetopoG, but since it is not currently available I decided to make my own tool for Maya.

This tool will let you use Maya’s makeLive features to easily draw new topology on a mesh.  The tool is designed to be very simple and rely heavily on Maya’s built-in modeling tools.  This is written in pyMel, which only comes pre-installed on Maya 2011 and later.

This is a very early beta-like version, I’ve only just begun to test this in the last few days but it seems workable.  I don’t have any plans to include a full custom toolset like RetopoG, you will mostly have to use Maya’s tools.

A short video explaining the tool:

The Relax Verts and Shrink-Wrap Verts are tools based on Oleg Alexander’s oaRelaxVerts.mel

September 17, 2011

New Shader Tools Update

I did some proof of concept work on the new shader and everything looks very positive.  In order to broaden compatibility support I’m co-developing a CGFX and HLSL shader.  They share most of their code by using #include files and are visually identical.  This way people with AMD cards etc. wont be complete out of luck, although Shader Model 3.0 support will always be required.

Here is a quick screen grab, on the left is HLSL on the right CGFX.

lcShader_wip_pinecone_01

Still a long way to go before the shader is feature complete, and the new pyMel UI is another matter. 

This is a great time for Feature Requests, I have a ton of things planned, but I’m always open to suggestions.

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.


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]

August 26, 2010

lcMrBatchBake.mel – Mental Ray for Maya Texture and Vertex Baking

Download - Updated – 08/27/2010
Script: lcMrBatchBake.mel
Icon: icon_lcMrBatchBake lcMrBatchBake.bmp

NOTE: Apparently this script doesn't work on the Mac, I don't have one to test with so you guys are out of luck sorry.'

Now you have the option to bake vertex color as well as texture maps.  This is great for baking ambient occlusion to vertices for game models.  I also consolidated and simplified a lot of the code. Plus now its colorful!
lcMrBatchBake_1.7

August 21, 2010

lcSkinShader.cgfx – Maya Realtime Skin Shader

Download: lcSkinShader.cgfx (save as)

Another cool shader – inspired by the Siggraph 2010 presentation 'Uncharted 2: Character Lighting and Shading' by John Hable.  Its a great presentation and offers a lot of insight on how to create realistic SSS effects in shader. Unfortunately, the main topic – blurred render targets – is not possible in Maya, but the secondary techniques presented, Bent Normals and Blended Normals, are doable in Maya.

This shader takes the Blended Normals approach and adds some other elements, such as a reddish edge to the diffuse falloff, as well as uses 2 specular highlights.  Also the paper describes how the Blended Normals technique results in a blue/red coloration, and the blue is not as desirable as the red, so I have implemented a very basic cyan suppression as well.

Here is a comparison with Lambert diffuse and my SSS effect (exaggerated for emphasis):
ssscompare

Again, a lot of attributes, but the key SSS ones are:

SSS Blended Normal Intensity – this controls the main effect of the blended normals.

SSS Edge Color – this is the color along the Diffuse Shading edge

SSS Edge Radius – this is the size of the Diffuse Shading edge coloration

SSS Edge Exponent – another tweakable parameter to adjust the reddish edge

Specular Normals Intensity – because the blended normals technique can ‘lessen’ the impact of the normal map, but overdriving the normal map intensity on the diffuse can look bad, this only overdrives the normal map on the specular highlight. Can help bring back detail.

The shadowMap and AO parts are the same as my lcHairShader.cgfx.

skinShaderAttr