Re: Controlling the Terminator in XSI
| Date : Thu, 11 Jan 2007 16:08:37 -0500 |
| To : XSI(at)Softimage.COM |
| From : Joey Ponthieux <j.g.ponthieux(at)LaRC.NASA.GOV> |
| Subject : Re: Controlling the Terminator in XSI |
Andre is right. His suggestion will work best. You'll be wanting to add a texture map though so it gets more complicated than what a constant shader will likely provide. Here is one way to implement what he suggests. The incidence gain will provide some control over the softness/hardness of the terminator. Use the Mix2Colors1 to control the balance of the dark side of the planet, use the Mix2Color and the Phong's specular decay to control the bright side of the planet. Specularity get's tough under this model.
Alternatively, I typically just use a phong, lower the specular real low, and drop the specular decay to something like .5 and use some Mix2Color nodes between the texture and the ambient,diffuse and specular inputs to control the lighting balance. You get similar results to the incidence shader example, but you won't give much control over the softness of the terminator.
CreatePrim("Sphere", "NurbsSurface", null, null);
ApplyShader(null, "", null, "", siLetLocalMaterialsOverlap);
SelectObj("light", null, null);
ToggleVisibility(null, null, null);
SelectObj("sphere", null, true);
CopyPaste(null, "Shaders\\Texture\\Surface\\Incidence.Preset", "TransientObjectContainer", null);
CopyPaste(null, "Shaders\\Texture\\Mixers\\Mix_2colors.Preset", "TransientObjectContainer", null);
SIConnectShaderToCnxPoint("TransientObjectContainer.Incidence", "TransientObjectContainer.Mix_2colors.base_color", false);
SIConnectShaderToCnxPoint("Sources.Materials.DefaultLib.Material.Phong", "TransientObjectContainer.Mix_2colors.color1", false);
SIApplyShaderToCnxPoint("Image", "Sources.Materials.DefaultLib.Material.Phong.diffuse", null, null);
CopyPaste(null, "Shaders\\Texture\\Mixers\\Mix_2colors.Preset", "TransientObjectContainer", null);
SIConnectShaderToCnxPoint("Sources.Materials.DefaultLib.Material.Phong.Image", "TransientObjectContainer.Mix_2colors1.base_color", false);
SIConnectShaderToCnxPoint("TransientObjectContainer.Mix_2colors1", "Sources.Materials.DefaultLib.Material.Phong.ambient", false);
SIConnectShaderToCnxPoint("TransientObjectContainer.Mix_2colors", "Sources.Materials.DefaultLib.Material.surface", false);
SIConnectShaderToCnxPoint("Sources.Materials.DefaultLib.Material.Mix_2colors", "Sources.Materials.DefaultLib.Material.shadow", false);
SIConnectShaderToCnxPoint("Sources.Materials.DefaultLib.Material.Mix_2colors", "Sources.Materials.DefaultLib.Material.Photon", false);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.Mix_2colors1.color1.red", 0, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.Mix_2colors1.color1.green", 0, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.Mix_2colors1.color1.red", 0, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.Mix_2colors1.color1.green", 0, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.Mix_2colors1.color1.blue", 0, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Scalar2color.Incidence.mode", 9, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.red", 0.806, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.blue", 0.806, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.red", 0.987, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.blue", 0.987, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.green", 0.987, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.red", 0.529, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.blue", 0.497, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.red", 0, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.blue", 0, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.red", 0.432, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.blue", 0.4, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.red", 0.129, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.blue", 0.129, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.red", 0.258, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.blue", 0.258, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.green", 0.258, null);
Undo();
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.Mix_2colors1.weight1.red", 0.684, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.Mix_2colors1.weight1.blue", 0.697, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.Mix_2colors1.weight1.red", 0.716, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.Mix_2colors1.weight1.blue", 0.716, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.Mix_2colors1.weight1.red", 0.748, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.Mix_2colors1.weight1.blue", 0.748, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.Mix_2colors1.weight1.red", 0.781, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.Mix_2colors1.weight1.blue", 0.781, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.Mix_2colors1.weight1.green", 0.781, null);
CreateProjection("sphere", siTxtUV, siTxtDefaultPlanarXY, "", "Texture_Projection", null, null, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.shiny", 0, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.shiny", 8, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.specular.red", 0.877, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.specular.blue", 0.871, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.specular.red", 0.548, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.specular.blue", 0.548, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.specular.red", 0.542, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.specular.blue", 0.542, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.specular.green", 0.542, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.specular.red", 0.484, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.specular.blue", 0.484, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.specular.red", 0.426, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.specular.blue", 0.426, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.specular.red", 0.419, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.specular.blue", 0.419, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Phong.specular.green", 0.419, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.red", 0.219, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.blue", 0.219, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.green", 0.219, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.red", 0.271, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.blue", 0.271, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.red", 0.342, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.blue", 0.342, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.green", 0.342, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.red", 0.574, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.blue", 0.581, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.red", 0.677, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.blue", 0.677, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.green", 0.677, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.red", 0.865, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.blue", 0.871, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.red", 0.871, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.blue", 0.871, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.green", 0.871, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.red", 0.826, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.blue", 0.806, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.red", 0.781, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.blue", 0.781, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.weight1.green", 0.781, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Scalar2color.Incidence.bias", 0.911, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Scalar2color.Incidence.gain", 0.034, null);
SetValue("Sources.Materials.DefaultLib.Material.Mix_2colors.Scalar2color.Incidence.gain", 0.084, null);
Joey Ponthieux NCI Information Systems Inc. NASA Langley research Center ____________________________________________________________ Opinions stated here-in are strictly those of the author and do not represent the opinions of NASA or any other party.
André Adam wrote:
You could use an Incidence Node switched to Surface/Light mode and multiply that on top of an unlit (eg constant shader) surface. It offers Gain and Bias controls. Not ideal, but might work for your scenario...
-André
Adrian Lopez wrote:Folks,
How does one control the softness of the Terminator on a sphere or planet? For those who dont know the term, the terminator is the boundary between light and dark - or day and night. In other packages, there's a setting to control how soft or sharp this terminator is on an object - I dont see anything similar in XSI.. Am I missing something?
-- Adrian Lopez CEO | Director | Producer Liquid Light Digital Kingston, Jamaica C: 876.381.2471 W: 876.978.6418
www.liquidlightdigital.com <http://www.liquidlightdigital.com>
HD/SD Production | VFX & Animation | Production Management
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi
--- Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body: unsubscribe xsi
- Follow-Ups:
- Re: Controlling the Terminator in XSI
- From: Bradley Gabe <withanar(at)stanwinston.com>
- Re: Controlling the Terminator in XSI
- References:
- Controlling the Terminator in XSI
- From: "Adrian Lopez" <liquidlightdigital(at)gmail.com>
- Re: Controlling the Terminator in XSI
- From: André Adam <a_adam(at)49games.de>
- Controlling the Terminator in XSI
| DATE: | << | >> | THREAD: | << | >> | INDEX: | Main | Thread |
|---|
- Previous by Date: RE: Starfield Environment Shader
- Next by Date: RE: Starfield Environment Shader
- Previous by Thread: RE: Starfield Environment Shader
- Next by Thread: RE: Starfield Environment Shader
- Index(es):
| Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available. |