Professional Documents
Culture Documents
There are several tools in development for Showcase to help you create custom environments. This document outlines when to use these tools, and other tips and tricks for getting the job done. There are four steps involved in this process, each building on the last: 1. Change the background image and lighting maps. 2. Create a new environment with built in tools and standard geometry. 3. Calibrate the environment. 4. Edit the dome geometry
This document also describes how to create custom dome geometry in Maya and hand edit the a3e file, and provides supplementary workflows and troubleshooting information.
. Figure 1: RMB over the Generic environment to open the Environment Properties window
2. The background image is actually a property of a material assigned to an environment dome. To change the background image, edit the material properties for the environment dome geometry. Click the Wall Material button, and the Floor Material button to edit the material currently assigned to the wall and floor, respectively. This is usually an Image Map material with the only editable attributes being the image assigned to it, and the mapping it uses (parametric, planar etc.)
Figure2: Change the background image by editing the material on the geometry dome. Changing the background image this way does not change reflections or lighting. Note: The Wall and Floor Transform buttons are not used in this particular workflow.
Figure3: Replace the IBL maps with those from another environment. Note: The Highlight map is often referred to as a specular map. 2. At this point you can also: Change the overall brightness and color using the Environment Properties Lighting Overrides. Change the preview icon for the environment by right-clicking on the environments icon then selecting Set image. Rename the environment.
Figure5: Adding an Environment Library 2. Save your edits to the environment Library for later use.
Right-click on the environment icon and select Save to Environment Library. The new environment appears in the Environment Overlay UI section of the library for later use.
Figure 4: Example of IBL maps-: background, reflect, specular (highlight), and diffuse
Figure6: RMB over the Generic Environment to evoke the Create IBL command 2. Browse to an HDR image. (You might be prompted to create a folder to save the new environment to.) The Create IBL button at the bottom of the window becomes enabled when an HDR image is specified. The image must have a: 2:1 width to height ratio if its in latitude longitude layout. 3:4 width to height ratio if its in vertical cross layout. 1:1 width to height ratio if its in mirrored ball/spherical layout. HDR images are often very large (for example, 6000 x3000 pixels= 80MB). As such, the image may take a few seconds to read-in before the Create IBL button becomes enabled. 3. Click the Create IBL button to create the new environment.
These Lighting overrides can adjust the whole environment. You can also adjust individual maps. For example, it is common to increase only the highlight map (specular map) value. Note: The attributes in the window are covered further on in this document. Room Transforms button Rotates the IBL maps. The effect of rotating the IBL maps is only visible in reflections. To rotate the visible background, you must rotate the dome itself. The IBL contrast slider will have no effect until the contrast midpoint is also changed. Environment too bright or overexposed If the resulting environment is obviously way too bright and overexposed, the original HDR image may need to be pre-processed in Photoshop or HDRShop. Important Note: All HDR images are not created equal and the results produced by Showcase will depend heavily on the light value range in the HDR image. For this reason it is strongly recommended that you set the images exposure in Photoshop:
Figure9: IBL Effect materials applied to spheres a. Switch from the new environment to any other (such as the Docks environment). b. Observe how much the materials appear to change.
Figure 10: Switching to another environment reveals that the new environment (previous image) is too dark by comparison
3. Return to the new environment and adjust the IBL Lighting Overrides until the change in materials is appropriate to the background image. This is a subjective task. You are eyeballing it.
Notes on using the lighting overrides Changes to the Environment Lighting Overrides are visible only when there is an object in the scene. IBL changes are only visible in reflections.
reduce saturation on diffuse map to .5 increase IBL effect of diffuse map to 1.5 reduce saturation on highlight map to .5 increase IBL effect of highlight map to 2
Figure 12: Before and after environment calibration Assign Yellow Car Paint to a sphere and confirm that it does not appear to have a green tint. If so, the Diffuse and Highlight maps are probably too saturated. (This is noticeable in environments with lots of bright blue sky). Assign White Car Paint to a sphere and confirm that it is not overexposed. If so try lowering the IBL Effect of the highlight map. Assign Black Car Paint to a sphere and confirm that it is not underexposed. If so, try increasing the IBL Effect of the diffuse map.
Figure14: Room Transformations will allow the background to be rotated Note: The effect of rotating the Environment geometry does not affect reflections. Rotate the geometry first, and then rotate the IBL maps with the same values. Use the Room Transforms button in the Environment Properties window to rotate the geometry
Figure15: Changing the geometry to correct distortion. The following geometry can be interchanged fairly easily: Counrtyroad.apf Docks.apf Has straight sides which is good for buildings or scenes with trees. The Docks has a planar mapped ground. It is designed to have a separate image assigned to the floor. For example, a repeating tile pattern. DryLakeBed.apf Very large, useful for vast, open spaces. Generic.apf GreenRoom.apf:
Note: The GreenRoom has a third material for the ceiling which is not accessible via the Environment Properties window. The UV layout of this environment supports a single image mapped repeatedly onto all four walls. Sepulveda.apf
Figure16: Relative sizes and shapes of existing dome geometry When the environments dome is switched, the material that was assigned to the previous apf file may not display correctly. This is because the new file may have differently named walls and floors and this can break the materials link to the object. This problem can be corrected by making sure that the correct Wall geometry is listed in the Walls pull down menu. Use the Wall Material and Floor Material buttons to edit the material currently assigned to the wall. This is usually an Image Map material with the only editable attributes being the image assigned to it, and the mapping it uses.
Figure 18: Required naming convention of geometry for use as Showcase environment.
Figure 19: Examples of some useful shapes for environments 3. Center the pivot point of the Room group to the center of the Ground object. 4. Center the Room at the origin:
Figure 20: Room is at the origin and its pivot point is centered on the Ground. 5. Modify > Freeze transformations on all the objects. 6. Export the Room objects as an apf file. 7. Flip all normals so that they face inward. To preview this in Maya, turn OFF double sided in the objects attribute editor (uncheck Attribute Editor > Render > Double Sided) The object representing the floor should be centered at the origin. 8. The geometry must have an orderly UV layout, that is, no overlapping UVs.
Figure 21: Orderly, non-overlapping UV layout is required for the projected Surface Shader workflow
Figure 22: Maya High Quality Rendering in the main view d. Use the Surface Shaders place3dTextures handle to rotate and translate the image and align it correctly with the geometry.
Figure 23: The Surface Shaders outColor is positioned with the place3dTexture handle
Figure 24: Mental Ray Bake Set attributes. Note: The resulting image, named baked will be saved to \projects\default\renderData\mentalray\lightMap b. To render the new image, select Lighting/Shading > Batch Bake > Mental Ray. This displays the Bake Set overrides. c. Click the Convert and Close button.
Figure 25: rendering the new background image via Lighting/Shading>BatchBake (Mental ray) d. Copy the image from \projects\default\renderData\mentalray\lightMap to the new environment folder.
Figure 26: Original image and the newly rendered layout to support the custom geometry
Figure 27: This set up of a Phong will be interpreted by Showcase as an Image Map material.
Copy the models from the test file to the environment file
The simplified syntax of the models section of the a3e file looks something like this:
<models>
<import group <light type=" </light> </models>
1. Here is the full version of the Testenviro.a3s models section (has no lighting statement).
Note that the <models> section can be very long in the case of custom geometry with many polygon objects.
<models> <import group_based_names="1" src="Generic.apf" original="C:\Temp\Generic.apf" name="Generic.apf"> <child node="Generic.apf:fileroot"> </child> </import> <group urto="1" name="Generic.apf:fileroot"> <child node="Generic.apf:Room"> </child> </group> <group urto="1" name="Generic.apf:Room"> <child node="Generic.apf:Ground"> </child> <child node="Generic.apf:Dome"> </child> </group> <group urto="1" name="Generic.apf:Ground"> <child node="Generic.apf:Ground-mesh"> </child> </group> <lod_group urto="1" name="Generic.apf:Ground-mesh"> </lod_group> <group urto="1" name="Generic.apf:Dome"> <child node="Generic.apf:Dome-mesh"> </child> </group> <lod_group urto="1" name="Generic.apf:Dome-mesh"> </lod_group> </models>
</group> <lod_group urto="1" name="env.apf:Dome-mesh"> </lod_group> <light type="directional" name="exhibition_2Light"> <parameter type="string" name="castsShadows" value="true"> </parameter> <parameter type="string" name="explicitLightType" value="directional"> </parameter> <parameter type="double3" name="lightColor" value="1.0 1.0 0.98"> </parameter> <parameter type="double3" name="lightColor" value="0.632045654083 0.624242621316 0.608636555784 1.0"> </parameter> <parameter type="double4" name="lightDirection" value="-0.265066887112 -0.773454767137 0.575766678915 1.0"> </parameter> <parameter type="double4" name="lightPosition" value="-265.067031399 -773.455188159 575.766992327 1.0"> </parameter> </light> </models>
3. Paste the models section from the TestEnviro.a3s (marked in blue) into MyEnviro.a3e. 4. Save the edit s to myEnviro.a3e and test that the environment still loads in Showcase (the materials assignments will be lost at this point).
Copy the materials and material assignments from the test file to the environment file
Note: The material assigned to the ground must be of type Unlit to receive shadows. 1. Here is an example of a materials section of an a3s file.
<materials name="Miscellaneous"> <material type="A3S::Unlit" name="Image Map[0]" label="Floor"> <parameter type="string" name="diffuseIBL" value="none"> </parameter> <parameter type="string" name="diffuseLight" value="none"> </parameter> <parameter type="string" name="diffuseSource" value="texture"> </parameter> <parameter type="string" name="specularIBL" value="none"> </parameter> <parameter type="string" name="specularLight" value="none"> </parameter> <parameter type="string" name="specularSource" value="none"> </parameter> </material> <material type="A3S::Unlit" name="Image Map" label="Walls"> <parameter type="string" name="diffuseIBL" value="none"> </parameter> <parameter type="string" name="diffuseLight" value="none"> </parameter> <parameter type="string" name="diffuseSource" value="texture"> </parameter> <parameter type="string" name="specularIBL" value="none"> </parameter>
<parameter type="string" name="specularLight" value="none"> </parameter> <parameter type="string" name="specularSource" value="none"> </parameter> </material> </materials>
2. Copy paste the entire materials section from the test file and use it to overwrite the materials section in the MyEnviro.a3e file. 3. Do the same for the material assignments:
<material_assignments> <material_assignment visible="" material="Miscellaneous::Image Map" target="Drive.apf:Dome-mesh"> </material_assignment> <material_assignment visible="" material="Miscellaneous::Image Map[0]" target="Drive.apf:Ground-mesh"> </material_assignment> </material_assignments>
Note that the material is assigned to the dome using its name, not its label; the label is what you would see as the material name within Showcase, but the under the hood name of the material is Miscellaneous::Image Map in this case. Its label is Walls. 4. Save the edits to MyEnviro.a3e, and load the file into a new Showcase session to preview MyEnviro. 5. Align the environment IBL to the custom geometry dome. 6. In the process of creating and exporting a custom dome
b. Find the reflection of the sun in the object. (That is, position the camera so that the environment light is behind you.) c. Ctl-click to place the highlight. 8. Avoid making the light very close to the horizon, and thereby casting excessively long shadows. 9. Save the scene as MyEnviro_lightPosition.a3s. 10. Open the MyEnviro_lightPosition.a3s file in WordPad and look for the lightPosition statement (at the top of the file, at the end of the models section). a. Copy the following positional information (highlighted in red):
<light type="directional" name="GenericLight"> <parameter type="string" name="castsShadows" value="true"> </parameter> <parameter type="string" name="explicitLightType" value="directional"> </parameter> <parameter type="double4" name="lightColor" value="1.0 1.0 1.0 1.0"> </parameter> <parameter type="double4" name="lightDirection" value="0.0 0.0 1.0 1.0"> </parameter> <parameter type="double4" name="lightPosition" value="0.0 0.0 1000.0 1.0"> </parameter> </light>
b. Paste this positional information from MyEnviro_lightPosition.a3s into the same respective location in MyEnviro.a3e . c. Save the file and test it in Showcase on a new scene. Turn on scene shadows and import an object to confirm that the shadows appear in the correct location for MyEnviro.
After:
<?xml version="1.0" encoding="utf-8"?> <environment_description name="TestEnviro" image="Generic.tif">
Figure28: Generic environments folder contents. Note that the IBL maps for this environment are not located here. For this example, it is necessary to copy the IBL maps from the support\environments\common folder.
Figure29: Typical contents of an environment folder (Night Plaza shown) Note that the .mayaSwatches folder contains pre-rendered material swatches. It is optional to include this or not.
Before:
<?xml version="1.0" encoding="utf-8"?> <environment_description name="TestEnviro" image="Generic.tif">
After:
<?xml version="1.0" encoding="utf-8"?> <environment_description name="TestEnviro" image="TestIcon.tif">
2. Launch Showcase and verify that the copied environment can be displayed, and appears with its new name and icon.
</lighting>
2. Change to:
<lighting type="ibl" name="GenericIBL"> <cube_map name="reflect"> <image name="cube" src="Reflect_new.hdr"/> </cube_map> <cube_map name="diffuse"> <image name="cube" src="Diffuse_new.hdr"/> </cube_map> <cube_map name="specular"> <image name="cube" src="Specular_new.hdr"/> </cube_map> </lighting>
Note: The ../Common/ was edited out. This is because the IBL maps were copied from the common folder to their current location with the TestEnviro folder. 3. Test that the new files are showing up in Showcase.
2. Test that the new background is showing up in Showcase by switching to another enviro and then back.
Appendix C: Troubleshooting
It is important to test any changes to a hand edited environment every step of the way: a single syntax error will break the file.
Showcase saves explicit paths to images and apf files. If you are planning to share your new environment with another user, you may want to edit out these explicit paths. Showcase will look in the current environment folder for any images/files regardless. In Showcase, make sure that the IBL reflections are aligned with the visible background: 1. Import a sphere and assign an IBL Reflection Effect material. 2. Press the Home key to get to the home view. This is the initial view seen when the environment is first seen. 3. Rotate the environment geometry to get the best possible view. (Most Showcase environments are rotated so that the main light source appears to be just over (and slightly behind) the users right shoulder.) 4. Save the changes to the environment. 5. Switch to a birds eye view of the sphere. Rotate the Environment IBL to match the dome geometrys rotations (if any). 6. When previewing edits as theyre made: a. Switch to another environment. b. Save any image edits done in Photoshop etc c. Reload the environment.
Editing the a3e files may require a restart of Showcase for changes to be seen. Editing the dome geometry requires a restart of Showcase for changes to be seen. Be aware of the operating systems tendency for one application to put a lock on files so that another application may not overwrite it. In this case, error messages are not always apparent.