Hey there,
I'm currently looking into using litsphere shading as a method for texturing.
The goal here is to use "decals" which has a normal map applied to it with an opacity mask.
Using lit spheres would allow me to reproject the normal map and create unique textures by putting together a bunch of decals in maya.
The output texture would be then extracted through a hardware render from an orthographic camera.
The hardware 2.0 engine in maya allows me to also extra an ambient occlusion map (SSAO technique) in realtime and also transparency with multi-sampling.
I'm currently looking into modifying the shader to add support for alpha based transparency stored either in the color texture or in the normal map (alpha channel).
I would greatly appreciate any pointers regarding the direction I should be taking.
As of now, I'm no tech artist but I'm looking it learning how to author my own cgfx/hlsl shaders which I would gladly share with the community.
The shader I'm currently using is made by Leonardo Covarrubias (blog.leocov.com)
Links to download the shader :
Icreproject (advanced litsphere/reprojection shader) :
https://dl.dropbox.com/u/53969153/litsphere/lcReproject.zip
Simple litsphere shader :
https://dl.dropbox.com/u/53969153/litsphere/lcLitSphere_1.1.cgfx
Here is an example of usage with a normal map litsphere :
Litsphere used : swizzle +X, +Y, +Z
A few test with some low poly brick stones which has a normal map baked into it :
Shade map (SSAO + simple litsphere) :
Failed attempt to use with objects which has transparency (decals method) : AO was turned on to see two planes.
Replies
I just changed
to
Basically stripping and using the alpha of the color texture (since this is a lit sphere, maybe using the alpha of the normal might be better and more convenient (?)) and changed the technique to alpha test.
Here's the modified shader. Its pretty simple and basically what Drew mentioned. If you want to learn more about shaders, HLSL, CGFX etc check out Ben Clowards DVD's on CGAcademy. They're written with HLSL and if you want CGFX check out Luiz's DVDs on Eat3d. Let me know if you wanted more info etc. Also definitely a useful thing to do!
Only thing left is to get alphablend technique to work with the hardware engine of maya.
Currently it only works with the default rendering engine which doesn't render in software mode.
Any help would be appreciated.
Are you just using the hardware render like Choco for the alpha? AFAIK Drew and Choco made this shader One option you can do is using Maya API to render the scene.