Re: Making bump show in AO pass

Date : Tue, 22 May 2007 10:52:03 +0200
To : XSI(at)Softimage.COM
From : Andy Jones <andy(at)thefront.com>
Subject : Re: Making bump show in AO pass
I don't know -- I'm just copying the log. I think you are getting the old bumpmap shader which outputs a color (hence the color2Vector). So, I think you'll need to use the bumpmap generator instead. I never really even understood how the old bumpmap shader was supposed to work with a color output... Did you try the second script I sent? That should hopefully fix this. Let me know if it works, and I'll post the update back to the list for people on older versions.

- Andy

Edmund Wong wrote:

Not sure if it's correct but should the last few lines(missing Color2Vector) be as below? Correct me if i'm wrong

SIConnectShaderToCnxPoint "TransientObjectContainer.Fractal", "Sources.Materials.DefaultLib.Material.Scalar2color.Vector_math_scalar.Color2Vector.Bumpmap.input ", False
CreateProjection "sphere", siTxtSpatial, siTxtDefaultSpherical, "Texture_Support", "Texture_Projection"
SetInstanceDataValue , "Sources.Materials.DefaultLib.Material.Scalar2color.Vector_math_scalar.Color2Vector.Bumpmap.Fractal.tspace_id ", "Texture_Projection"
SetValue "Sources.Materials.DefaultLib.Material.Scalar2color.Vector_math_scalar.Color2Vector.Bumpmap.Fractal.max.x", 5
SetValue "Sources.Materials.DefaultLib.Material.Scalar2color.Vector_math_scalar.Color2Vector.Bumpmap.Fractal.max.y ", 5
SetValue "Sources.Materials.DefaultLib.Material.Scalar2color.Vector_math_scalar.Color2Vector.Bumpmap.Fractal.max.z", 5



Cheers, Edmund

On 5/22/07, *Andy Jones* <andy(at)thefront.com <mailto:andy(at)thefront.com>> wrote:

    In the past I've sometimes done a pass that is basically just a dot
    product of the bumped and un-bumped normals.  This is of course an
    over-simplification, but you can use this to obtain the self-occlusion
    of the bump-map pattern assuming the surface patch is immediately
    surrounded by a flat planar surface.  Given the general inaccuracy of
    bump-maps anyway, it should work for what you need.  In theory, You
    actually would need to remap the output color range from [-1,1] to
    [0,1], as the vectors being perpendicular actually means 50%
    occlusion,
    not complete occlusion.  But in practice, I've found that I'm usually
    having to remap the range pretty severely to taste in the comp anyway.
    The following script just creates a simple example scene that should
    give you the basic idea.

    - Andy

    CreatePrim "Sphere", "MeshSurface"
    ApplyShader , , , , siLetLocalMaterialsOverlap
    CopyPaste , "Shaders\Texture\Bump\Bumpmap.Preset",
    "TransientObjectContainer"
    CopyPaste , "Shaders\Texture\State\Vector_state.Preset",
    "TransientObjectContainer"
    SetValue "TransientObjectContainer.Vector_state.mode", 3
    CopyPaste , "Shaders\Texture\Math\Vector_math_scalar.Preset",
    "TransientObjectContainer"
    SIConnectShaderToCnxPoint "TransientObjectContainer.Bumpmap",
    "TransientObjectContainer.Vector_math_scalar.vector_input1", False
    SIConnectShaderToCnxPoint " TransientObjectContainer.Vector_state",
    "TransientObjectContainer.Vector_math_scalar.vector_input2", False
    SetValue "TransientObjectContainer.Vector_math_scalar.mode", 1
    SIConnectShaderToCnxPoint "
    TransientObjectContainer.Vector_math_scalar",
    "Sources.Materials.DefaultLib.Material.surface", False
    CopyPaste , "Shaders\Texture\Fractal.Preset",
    "TransientObjectContainer"
    SIConnectShaderToCnxPoint " TransientObjectContainer.Fractal",
    "Sources.Materials.DefaultLib.Material.Scalar2color.Vector_math_scalar.Bumpmap.input",
    False
    CreateProjection "sphere", siTxtSpatial, siTxtDefaultSpherical,
    "Texture_Support", "Texture_Projection"
    SetInstanceDataValue ,
    "Sources.Materials.DefaultLib.Material.Scalar2color.Vector_math_scalar.Bumpmap.Fractal.tspace_id",
    "Texture_Projection"
    SetValue
    "Sources.Materials.DefaultLib.Material.Scalar2color.Vector_math_scalar.Bumpmap.Fractal.max.x",
    5
    SetValue
    "Sources.Materials.DefaultLib.Material.Scalar2color.Vector_math_scalar.Bumpmap.Fractal.max.y
    ",
    5
    SetValue
    "Sources.Materials.DefaultLib.Material.Scalar2color.Vector_math_scalar.Bumpmap.Fractal.max.z",
    5


Peder Kallin wrote:

    > Hey list!
    >
    > Do you guys have any tricks for making bumpmaps show in an AO
    pass? I
    > cant afford to render everything with displacement and thought
    someone
    > might have a solution for this? My scene now is quite heavy on the
    > ambience lighting side so it doesnt matter what I do in my beauty
    > pass, the bump doesnt show :(
    >
    > Sincerely
    > Peder
    >
    >
    ------------------------------------------------------------------------
    > Connect to the next generation of MSN Messenger  Get it now!
    >
    <http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
    <http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline>>


--- Unsubscribe? Mail Majordomo(at)Softimage.COM <mailto: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


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.