Looking at your scene I see redundancy in the setup. You have a small sphere
with both reflectivity and an environment shader applied to it. The larger
sphere is textured. The reflection displayed on the small sphere does not
align with the image seen on the larger sphere. Is this the problem?
To correct the problem:
- Make the small sphere reflective (of the environment), and delete the
environment shader from it's render tree.
- Delete the large sphere. It's not needed.
- edit the current render pass by applying the environment shader to the
environment (Render > [Render] Render > Pass options... > Pass shaders). click
the "add" button in the environment section and choose the 'environment'
shader.
- in the scene explorer, press "U" and select the "Environment" property under
the "Framebuffers" folder icon. Then press "7" to open the render tree editor.
- connect a create_transform node to the "transform" input of the environment
shader (Math > Create_Transform). The create_transform node is only needed if
you intend on transforming the environment. It is not needed for transforms
applied to the small sphere or camera.
Draw a region and render the image.
Using this setup I do not see any problems with the environment shaders. The
reflection on the small sphere matches the environment shader as expected.
Rotating the small sphere or the camera also produces expected results.
Script illustrating how to set up the scene from scratch: (JScript)
CreatePrim("Sphere", "MeshSurface", null, null);
SetValue("sphere.geomapprox.gapproxmosl", 2, null);
SetValue("sphere.geomapprox.gapproxmordrsl", 2, null);
ApplyShader("$XSI_DSPRESETS\\Shaders\\Material\\Constant.Preset", "", null, "",
siLetLocalMaterialsOverlap);
SetValue("sphere.Material.Constant.notrace", 1, null);
SetValue("sphere.Material.Constant.invertrefl", true, null);
InspectObj("Passes.Default_Pass", "Pass", null, 1, null);
SIAddArrayElement("Passes.Default_Pass.EnvironmentShaderStack");
SIApplyShaderToCnxPoint2("Softimage.sib_environment.1.0",
"Passes.Default_Pass.Item", null, null);
SIConnectShaderToCnxPoint("Clips.noIcon_pic",
"Passes.Default_Pass.Environment.tex", false);
Matt
>>
Matt, I had this problem about a year ago, and the create transform node
alone wouldn't solve the problem I had of matching a sphere object's
rotation to the environment rotation (so the env reflections, etc, will
correspond to the sphere background you are seeing). It works when you
rotate on Y, but when you rotate on x OR Z it strangely rotates opposite
how it should. (Maybe what you are using it for is a bit different.)
Here are the steps I had to take for my purposes:
1. Make a reversed (horizontally) environment texture to use in the
environment node. This because the environment intrinsically wraps the
texture inside the sphere, where the object sphere wraps it by default on
the outside.
2. Rotate the texture support of the background object sphere 180 degrees
on Y.
3. Parent Background sphere to null, so null rotates it.
4. Use the null's local x,y,z rot to drive x,y,z rot of the 'create
transform' node that is piped into the environment on the reflective
object.
5. For some reason, this rotates the environment texture the opposite
direction from the object sphere, so add '-' in front of the resulting
expressions.
this works in x, y, and z any way you do it.
I made a simple but useful sample scene to puzzle this out, if anyone is
interested it is attached.
Maybe I'm missing something somewhere, but it seems SI is thinking in two
different universes when it comes to environment and object rotation.
thanks,
Nancy