Hey all. I've been trying to figure a very small thing but failed miserably :P
Do you know if there is a way to display a rough aproximation of a glass shader in a realtime 3DSMax viewport? By this I mean a transparent object that still shows a hotspot reflected from lightsources. Because when giving a 0% opacity and strong spec to an object, said object gets rendered perfectly in a scaline render but completely disappears in the realtime viewport.
I am hunting for that kind of looks :
I have seen many demos showing objects with such a material, even with realtime hdri and refractions. So I was curious to know if there are .FX librairies available for Max doing that kind of effect.
Which makes me think about something else. I have searched a fair bit already but couldn't really find librairies of realtime shaders for Max except Ben Cloward's and the Nvidia CGFX plugin. Is there some place where to find some nice premade .FX, or artist-friendly shader editors that output max-compatible shader code?
Thanks if you can help!
Replies
We have one at NS, but as usual, it's NDA, heheh.
I'll give it a try...
okay got something working now
the light position is not correct, not sure how to retrieve it from max properly yet, will work it out.
and the effect is per-vertex now, per-pixel technique to come.
There is 2 sorts of rim lighting options, one time based on the light and one time based on camera.
to make the transparency works well in the viewport make sure that you do:
object properties-> Rendering Control -> Visibility = any value < 1.0
there is no reflection/refraction stuff for simplicity. It would be done via a cubemap that you pass in. Not sure if I have that much time to do that as well, but I will do the per pixel version now
http://crazybutcher.cottages.polycount.com/wip/fxshaders/simple_glass.fx
now with per pixel support, too. It's a bit super glowy but well, hopefully it helps. Light position seems to be warped a bit, but at least moving an omni light around does change something now.
I'll give it a try asap and will show you the results. Very nice of you man.
Now that you mention it, cubemap based-spec is a nice idea, but overkill for what I was after. Anyways, I think I am going to try and understand the syntax of these sweet .fx files from now on.
Nice fur on that horse, also :P Is this the fur shader provided with max? Or a just alphas?
Thanks again!
and no problem always wanted to play with fx composer and max. waiting for fx composer 2.0 to support cgfx which I intend to add to our engine, too, so far we had our own .shader format.
I used it on the cornea lens and also on a thin object I put where the eyeball meets the lower eyelid. I also rotated the cornea normals slightly to get better control on highlight position.
Only drawback is that the objects dosent appear transparent on top of other object if said transparent objects are not selected. On deselection, it's shows up fine until I rotate/pan/zoom the viewport.
Anyways! Awesome tool I must say. Thumbs up!
i also prefer to use viewport screens
hello! i am searching directx realtime shader, what support cubemaps or reflections. Can u write one? please?=)
that's for eyes too.