Hi
The
blinnphong is easy enough to use, as it only deals with surface illumination
shaders (+maybe global variables and initialization). If you want basic
blinnphong in your material, just copy the parts and you're set. Making it work
as an anisotropic, combining it with already complex materials is a different
matter. I've just finished playing UFO Aftershock (heavy impact on my life :)),
so I'll see if I can provide an example soon.
I
think I posted something called a metalshader a while back that should have this
stuff builtin, but I'm not sure where it went :) Maybe someone here still has
it?
Two "problems" though. Only the VSL specular
object will properly recognize the "no specular" (or "diffuse only"?) attributte
of lightsources. You'll have to do manual exclusion for custom specular effects.
Also, I was not able to control brushing directions properly, other than
orienting the mapping(s) primitive(s). UV-directions didn't seem to output
anything useful, unfortunately.
And
lastly, I was forced to use _two_ mapping primitives in order to get the correct
anisotropic effect. One for circular grooves on the end of a cylinder using disc
mapping, and one for the grooves along the lenght of a cylinder using cylinder
mapping. Both scopemapped using perpendicular to surface. Sounds like a big
issue, but works good enough for basic effects. But I really wish these kinds of
effects was built into the system.
If
you use bumpmapped metals, consider using custom reflected rays instead of the
builtin one. With this, you can reduce the effect of the bumps for the
reflections only, thus reducing the need for extreme antialiasing requirements
considerably. 3DS Max has this builtin, called bump effect, in it's raytracer
shader. Brilliant approach.
One
final word. Grooves causing anisotropic effects will in real life also cause
anisotropic reflections. These are _very_ hard to make, so fake it. Either blur
normally the reflections in post, or at least provide a secondary ray shader
that fades away the reflections rather quick.
Karl
Hi Karl,Your explanation has been helpful. I understand what you write about the Blinn phong shader but applying it to my metal material is something else.I have one very complex anisotropic hair shader here, by Andy Jones. Could that be the anisotropic effect based on the specular object that you mention? (I hope not, I hope there's an easier approach).Regards,Frank Bueters
Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens [EMAIL PROTECTED]
Verzonden: maandag 16 januari 2006 12:47
Aan: [email protected]
Onderwerp: RE: combine texture map and metal shaderI can think of something in the lines of:CVar MyColor (declare a variable in root)Shader (Surface)CVar = Texture "texture.jpg"Color = Linear(CVar) (use a grayscale multiplicator here)Reflection = Linear(CVar) (use a greyscale multiplicator here)//note that Linear Color + Linear Reflection should not exceed 1.Shader (Illumination)Specular Input=Surface Reflection, Output+=Surface Illumination...and so forth.CVar contains the color to be used by all shaders you need.In a metal, surface color and surface reflection color shouldhave the same color information, but may have different lightness.Specularity is a fake reflection of lightsources, hence it usesthe same color as surface reflection.I usually do this a little different though, by setting a slider thatcontrols shininess vs dullness. One global color, which can evenbe full white if you want. Then assign CVar*(1-p1 Shininess) tocolor, and CVar*Shininess to reflection and specularity.Metals are usually brushed to become polished and shinylooking,and this tends to give them anisotropic specular qualities (streaks)instead of the normal circular specular shapes.Going a bit advanced here, but... There is an anisotropic materialthat can be found within the package. I have not been able to getanything useful from this. Another approach has been made thatuses the specular object to do its magic, but this one doesn't worksatisfactory either (because of the specular sharpness > 1 limitation).Instead, build a material that takes this method of calculatinganisotropics, but replace the actual specular object with the mathsthat goes on within the blinnphong material, which have a LOTbetter results when the sharpness goes very low (or roughness ofblinn goes up). Using the blinn method you can get streaks tospread over much more surface, making it ideal for the task.Hope this was of any use.Karl-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Frank Bueters
Sent: Monday, January 16, 2006 12:05 PM
To: Realsoft 3D Maillist
Subject: combine texture map and metal shaderHi,I have a series of 13 textures with a complex pattern in 5 different colours each that I would like to give a metal like shine.The problem is that all examples of metal like materials that I can find start with a Material Initialization shader that defines the color for the whole material.Would it be possible to somehow derive the color information from the texture instead and than go on with the metal part (i.e. reflection, illumination and secondairy ray etc)? So that I'll have the complex color pattern of the texture with a metal or aluminium like shine over it?Any input is very welcome.Kind regards,Frank Bueters
| This e-mail and any attachment are confidential and may be privileged or otherwise protected from disclosure. It is solely intended for the person(s) named above. If you are not the intended recipient, any reading, use, disclosure, copying or distribution of all or parts of this e-mail or associated attachments is strictly prohibited. If you are not an intended recipient, please notify the sender immediately by replying to this message or by telephone and delete this e-mail and any attachments permanently from your system. |
