Escolar Documentos
Profissional Documentos
Cultura Documentos
picture perfect
September 2009
September 09
General Information
picture perfect
To step through this tutorial, you need the files in the vred-tutorial directory.
The structure goes as follows:
iges-data
licenseplate
textures_and_environment
vred-data
- This directory contains the starting point file (if you dont
want to import the CAD files by yourself) and the final data
which shows how your scene can look like after going
through this tutorial
- Filenames
microracer_start.vpb (Starting point file after cad import)
microrace_final.vpb (Final file)
September 09
- Filename:
numberplate.vpb (Numberplate geometry)
- Filenames:
Environment.vpb (Environment geometry)
perfectStudio.mtd (Studio HDRI)
forrest.mtd (Forrest HDRI)
licenseplate.png (Numberplate texture)
pi-vr.tif (PI-VR logo texture)
tire_marking_bump.jpg (Tire texture 1)
tire_profile_bump.jpg (Tire texture 2)
File Import
picture perfect
VRED is an interactive render application. Before starting to prepare a VRED render-file CAD data has to
be loaded or imported.
To import data according to your needs the import options in the preferences have to be set.
In the Preferences Editor select Import -> CAD. Ensure that the checkbox Internal Tessellation is
set to active.
Select File -> Import -> CAD in the Menubar. Select all microracer IGES files and then press open.
September 09
Optimize Scene
picture perfect
After all data has been imported the scene needs to be optimized.
Select all imported groups. All imported groups are indicated in a blue font.
Right click on any selected group node and select Edit -> Optimize.
September 09
Optimize Scene
picture perfect
In addition check both Flush transformation nodes checkboxes.This ensures that all transformations
will be set to 0, and all scale operations will be set to 1.
Also Check the Cleanup group nodes checkbox.The Cleanup group nodes function will remove
all groups which have less than two childnodes.
Select Edit ->Optimize Materials. All multiple identical materials will be replaced by a single material.
September 09
Optimize Scene
picture perfect
The imported data is split into separate patches which still need to be merged to a connected part on an
object basis. The optimization process will merge all meshes, with identical materials and which are located
in the same group, to a single object.
September 09
To get a better overview about all objects in the scene, it is recommended to prepare a
structured scenegraph.
Right click on any node in the scenegraph and select Create->Group to create a group node.The
new group node will be created as a child of the node you clicked on.
Right click on the root node and create a new group. Enter the name Microracer.
Right click on the Microracer group and create two further groups as children, and name them
Interior and Exterior.
Now place the Kasko.igs group node into the chassis group, by either doing a cut and paste
operation in the scenegraph, or simply use the drag and drop functionality.
To use cut and paste function, select the group node which has to be repositioned, press
ctrl+x, select the designated parent group node, press ctrl+v.
September 09
To use the drag and drop function, click and hold left mouse button on the group which has
to be repositioned, drag to the designated parent group and drop. If a red indicator line
appears between two nodes, the moved group will be positioned between these. If a blue
frame is shown, the group will be placed into the framed node.
Create further groups and reposition all nodes to achieve a logical structure in the scenegraph.
Since the merge operation is highly optimized, it may occur that physically separated parts are also
merged. An example is the rim_blends.igs node. These parts need to be separated.
Right click on the rim_blends.igs group node in the scenegraph and create two new group
nodes called rim_blend_front and rim_blend_back. Right click-> Create-> Group.
Right click on the geometry node in the rim_blend.igs group and split the mesh into
separated triangles. Right click-> Edit-> Split geometry in triangles.
A new group will be created containing all separated triangles. Clear the current selection. Hold
Shift+Y+Crtl (watch the order) and left click on any triangle of the front rim_blend. All
seamless connected triangles will be selected. Add the other two parts to the selection.
Move the selection with cut (Ctrl + X) and paste (Ctrl + V) to the rim_blend_front group.
September 09
Right click on the rim_blend_front group node and select Edit->Unsplit geometry with
one triangle.
September 09
Three polygons will be left which resulted from errors during modelling. These faces can
be deleted.
A geometry switch node offers an option to make one object, of a series of objects, visible. There are two
versions of front bumpers in this file. Add both front bumpers into a geometry switch node.
Right click on the node, where the switch will be created in the scenegraph and
select Create-> Switch.
Cut and Paste both front bumper group nodes into the switch node.
You will notice that both geometries are invisible. This is because the initial state of the switch
node is set to -1, which means that no child is shown. To change the switch state select the
switch node, go to the Editor Tab in the NodeEditor and set the choice value to 0. This means the
first child object will be drawn. 1 means the second child object will be drawn and so on.
September 09
10
After the scenegraph has been rearranged it becomes obvious that there are parts, which are only partially
modelled and have to be duplicated and mirrored for the co drivers side.
Left click on the group node Bumper_front_b.igs and rename the group node
to bumper_left.
Right click on the group node Bumper_front_b.igs and select Edit -> clone
Clone Options:
Enable the mirror checkbox
Set the mirror axis to X
Enable the Flush matrix
Enable deep clone
Press OK.
September 09
11
Clone and mirror all missing parts, rename them and place them appropriately in the scenegraph:
Headlights interior parts
Rims and tires
Rear lights interior parts
September 09
12
The surface normals define the direction each surface is pointing at. To view the surface directions switch
to the Vertex/Face normal rendering render mode.
Press F5 or click and hold the button Render Options in the Icons Tab and select Vertex/Face
normal rendering
Each surface has a green and a blue drawn side. All surfaces viewed from the outside are supposed
to be rendered in green to receive proper shading and ambient occlusion rendering results at a
later stage. Green means the vertex and surface normals are pointing towards the camera. Blue
means the vertex and surface normals are pointing away from the camera.
Select any geometry with blue shaded parts from the cameras point of view. Press the Face and
Vertex button in the normals tab. All normals of the selected object will be flipped.
It may happen that only parts of the selected object`s normals have to be flipped.
Therefore press and hold the Alt key and click the right mouse button on the blue parts of the surface.
VRED will then only flip the adjacent blue faces. The adjacency crease angle can be set in the
Appearance->GeometryEditor->Normals module in the Adjacency Selection section.
Adjust the normals direction for the car`s frame, brakes, headlights interior, rear
window and others.
Afterwards press F3 to change the render mode to Realistic High Quality rendering
September 09
13
Ambient Occlusion
picture perfect
The precalculated ambient occlusion will only be used in OpenGL and Raytracing-Precomuputed Illumination render mode on surfaces which have TruelightShaders assigned. In Raytracing GI rendering mode the
pre-calculated ambient occlusion will be ignored. All information will then be rendered at runtime.
Before calculating the ambient occlusion, there is a ground plane needed to be taken in account for the occlusion information at the car`s bottom side. Create a polygon plane and place it as a ground plane.
Click and hold the Create Geometry button in the Icons Tab and select Create Plane.
Enter as size 10000 for x and y axis.
Enter resolution 32 for x and y axis.
Press create.
Rename the new plane to Ground Plane.
Press F7 to switch to Ambient Occlusion rendering render mode.The scene appears completely
black since no ambient occlusion has been calculated yet.
September 09
14
Ambient Occlusion
picture perfect
Select the Microracer group node and the Ground Plane object node in the scenegraph.
Open the Appearance->AmbientOcclusion module.
Set the Shadow Quality to Low Quality.
Press Calculate.
The result is not smooth in all areas of the car. The ambient occlusion calculation is vertex based,
which makes it sometimes necessary to recalculate some parts, which dont not have a mesh fine
enough to offer a smooth transition from dark to bright.VRED will add further subdivisions to these
parts if necessary. Subdivisions will be added to all.
September 09
15
Ambient Occlusion
picture perfect
Select the headlight glass. Right click on the headlight glass node in the scenegraph and hide it.
All geometries behind the glass is black. This is because the headlight glass was not recognized as a
transparent object during occlusion rendering. To define objects as transparent objects for ambient
occlusion rendering, the material assigned to them needs to be a transparent material.
September 09
16
Ambient Occlusion
picture perfect
Switch back to AmbientOcclusion render mode (F7) and recalculate the whole car and
the ground.
September 09
17
picture perfect
VRED offers a wide range of material types. To create materials for the different surfaces open
the MaterialEditor->Materials tab.
First create a ShadowMaterial. The Shadow Material is a special material for ground surfaces. The ShadowMaterial is a completely transparent material and only opaque where ambient occlusion is calculated or
shadows casted by light-sources or EnvironmentSphereMaterials(only raytrace rendering mode) hit the
ground.
Drag and drop the GroundMaterial into the scenegraph or the renderwindow onto the Ground Plane.
September 09
18
picture perfect
Create->CreateTruelightMaterial->UnicolorPaintMaterial.
Select with Shift+Ctrl+left mouse click all body parts in the RenderView.
Right click in the Materials tab on the CarPaint_01 material and select Apply to selected nodes.
September 09
19
picture perfect
September 09
20
picture perfect
Rename the UGlassMaterial to HeadlightGlass and assign it to the headlight glass parts.
Rename the UGlassMaterial to IndicatorGlass and assign it to the indicator glass parts.
September 09
21
picture perfect
September 09
22
picture perfect
Assign the Aluminium material to the brushed _alu parts in the headlights.
Set the specular color to a light grey color with a value of 0.8.
September 09
23
picture perfect
September 09
24
picture perfect
Assign the rim_material material to the front_left and front right rim.
Set in the Brush Orientation section the Brush Mapping orientation to Radial YZ.
Select the front left rim and press the Get Center button in the material`s Radial Mapping
Settings section.
Duplicate the rim_material and assign the duplicated material to the rear rims.
Right click on the rim_material in the MaterialEditor->Material tab. Select Edit->Duplicate.
Rename the duplicated material to rim_material_back.
Assign the rim_material_back material to the rear rims.
Select the left rear rim and press the Get Center button in the material`s Radial Mapping
Settings section.
September 09
25
picture perfect
September 09
26
picture perfect
Select the front tire and press the Get Center button in the Texture Settings section
in the materials attributes.
Set the textures repeat U value to 11 and the repeat V value to 5.These two values define
the repeat behaviour of the profile area of the tire.
Set the Scale value to 1.7.This value defines the position and size of the markings.
Duplicate the tire_front_left material and rename the new material to tire_front_right. Assign the
tire_front_right material to the front right tire.The profile will not be placed correct.To update the
profile placement, select the front right tire and press the Get Center button in the material`s
attribute section Texture Settings in the tire_front_right material.
Repeat this procedure for the two rear tires.
September 09
27
picture perfect
Set the carbon Pattern type in the Carbon Pattern section to 3X1 staircase.
September 09
28
picture perfect
Create a black PlasticMaterial for the car`s ground surface called black.
Adjust the windshield`s glass material transparency. Set the Exterior Transparency color to black.
Assign the LED_glas material to the side blinker`s internal light geometry.
Create a BrushedMetalMaterial for all screws and ventiles called dark_metal with the metal type
Tungsten. Assign it to the brake, the screws and the rim covers.
Create a light grey UnicolorPaintMaterial for the rim blends called rim_blends.
September 09
29
picture perfect
September 09
30
Creating an environment
picture perfect
HDR images can be used as spherical environments surrounding all objects in the scene. The HDR image
can also be used to define the lighting in the scene.VRED has an default HDR image which is connected to
all TruelightMaterials and is used to light the scene.
At the bottom of each material`s attributes list (not the ShadowMaterial) there is a
EnvironmentSettings section.
The value of Environment is set to <noname>, which indicates that the default HDR image
is in use.
To use an individual HDR image as an environment, a SphereEnvironmentMaterial is needed.
Select the MateriaEditor->Environments tab.
Create a SphereEnvironmentMaterial.
September 09
31
Creating an environment
picture perfect
In the EnvForest material`s attribute set the Reflected Saturation value to 0.65.
September 09
The previuos lighting information will now be replaced with the lighting of
the new EnvForest material.
Select File-> Add..in the menu and add the file Environment.vpb.
32
Select the root node in the scenegraph. Add the file licenseplate.vpb to file. Rename the Group node to Licenseplate.
Open the Animation->Transform module and select the Basic tab.
Set the transform values for the license plate group node:
Scale X - 10
Scale Y - 10
Scale Z - 10
September 09
33
Enable the Use Texture checkbox and select the texture licenseplate.png.
With the licenseplate geometry node selected open the Textures tab.
Position the projection plane appropriate for a planar projection and press the
Align plane projection to fit the alignment.
September 09
34
A SwitchMaterial is a material node that enables the assignment of different materials. I.e. it can be used to
switch between all color variations of all chassis parts.
Create a SwitchMaterial as a bucket for different car paints.
Right click on the SwitchMaterial carpaintSwitch and select Apply to selected nodes.
All chassis parts will turn black, since there is still no shading added to the
carpaintSwitch node yet.
Select the carpaintSwitch node and paste the CarPaint_01 material into the context
box of the carpaintSwitch node.
Duplicate the CarPaint_01 material. Rename the new CarPaint_ material to CarPaint_02.
Add the CarPaint_02 Material also to the carpaintSwitch node. Set the carpaintSwitch
node attribute Choice to 1.
September 09
Create a MetallicPaintMaterial.
35
September 09
36
picture perfect
An EnvironmentSwitchMaterial is a material node that enables the instant assignment of different HDR
surroundings to all shaders. The lighting situation can be switched instantly, based on the used HDR image.
Create an EnvironmentSwitchMaterial.
Right click into the EnvSwitch content box and select the EnvForrest entry in the dialogbox
to add the EnvForrest HDR as a choice value.
September 09
37
picture perfect
Leave the dialog box empty.The EnvForrest value in the environment parameter in all
TruelightMaterials will now be replaced with the EnvSwitch value.
In the EnvSwitch Choice parameter the HDR image which has to be used can be selected.
Set the choice ID or simply double click on the HDR in the list.
September 09
38
A MultiPassMaterial is a material that layers an unlimited amount of shaders on top of each other.
Create a MultipassMaterial.
Copy and paste the backdoor material into the context box of the backdoor_multi material.
Load the file PI-Logo.png as color texture. Activate Use Texture, activate the
Use Alpha Channel and set the Repeat Mode to Decal.
Select the Backdoor geometry node and the backdoor_logo material and open the
MaterialEditor->Textures tab. Position the logo texture.
Set the Repeat X and Y value to 20. Set the Offset X value to -0.4. Set the Offset Y value to -0.35.
Adjust the backdoor_logo material. Set the diffuse color to white. Set the Environment
value to EnvSwitch.
September 09
39
Creating light-sources
picture perfect
Besides the HDR lighting model which is directly connected to the shaders, additional light sources can be
added to a VRED scene. Light sources can be freely positioned in the 3D environment. By default In VRED
there is always a Headlight activated, which will be switched off as soon as the first TruelightMaterial
is created.
Create a SpotLight.
Right click into the LightEditor-Scenegraph and select Create->Spotlight. A Spotlight node will
be created in the VRED scenegraph and in the LightEditor-Scenegraph.
Select the Microracer node in the VRED scenegraph and select the Top-View on the
Navigation-Cube.
Press the Use Camera button in the Spotlight`s attributes.This places the Spotlight with the
same position and orientation the camera has.
September 09
40
Creating light-sources
picture perfect
Spotlight Settings.
Rename the Spotlight to Keylight_studio.
In the Shadow section of the light attributes set the Intensity to 1.You will not immediately see
the shadows casted by the spotlight.To see the OpenGL shadows the Realtime Shadow
rendering must be activated.
Select Render Options in the Icons Tab and activate Realtime Shadows.
Set the Shadow Map Resolution in the shadow section of the light attributes to 2048 to raise
the shadow quality.
Disable the Keylight-studio and create another key-light source for the forest environment
called Keylight_forrest.
In the Color section of the light attributes set the Intensity value to 4.
September 09
41
picture perfect
Animations can be created in VRED in the CurveEditor module.VRED supports the creation of keyframe
animations. Keyframe animations can be rearranged and retimed in the ClipMaker module.
Create a backdoor animation.
Select the Back_door group node in the VRED scenegraph. Activate the TransformTool in the
Icons Tab.
Right click into the RenderWindow and press Shift + Q to activate the PivotTransformTool.
Position the rotate pivot (yellow pivot) at the top edge of the backdoor.
The Back_door transform parameters will be listed in the CurveEditor`s scenegraph. Press the
Key All button in the CurveEditor to key the initial Back_door position. All parameters will be
coloured to indicate that they are keyed.
Move the upper Timeline in the CurveEditor to frame 24. Rotate the x-Axis of the
Back_door geometry by 95 degree. Again press the Key All button.
Press the Center button to frame all created keyframes in the CurveEditor`s Graph.
September 09
42
picture perfect
Hold Shift click the left mouse button and drag to create a frame selection around all keyframes. Press the
Flat button to define a flat tangent at all keyframes.
Scrub through the timeline to view the animation.To store the animation press the Block
button in the CurveEditor. An animationBlock called Back_door_Block_1, in which all animated
parameters are listed, will be created and added to the CurveEditor`s scenegraph. Selecting the
Back_door_Block_1 parameter the stored animation can be accessed and played.
The Back_door parameters themselves are now free for further keyframe animations. An
unlimited number of Animation Blocks can be created.
September 09
43
Press the Cam button the activate the camera node. All camera modules are listed in the
CurveEditor`s scengraph.
Select the degree parameter in the CurveEditor`s scenegraph and set the value to 0.
Select the Microracer group node in the VRED scenegraph and press right view on the
NavigationCube in the RenderView.
September 09
44
Go to frame 50 in the timeline, set the degree value to 180 and create another keyframe. Press
the Key Sel button.
Go to frame 99 and set the degree value to 357 and create a final keyframe.
Select the three created keyframes in the CurveEditor`s Graph and set the tangent to linear.
Press the Lin button.
Press the Block button to store the animation. A Camera Block will be created.
September 09
45
Using the ClipMaker, all created animationBlocks can be arranged on a global timeline to setup perfect
timings and animation length.
Select the Back_door group node in the VRED scenegraph.The transform parameters of the
Back_door group node and animationBlocks are listed in the CurveEditor`s scengraph. Drag the
Back_door_Block_1 animationBlock into the ClipMaker timeline. A new Clip called Clip1 will
be created.
September 09
46
To export the Clip1 select the Clip1 node in the ClipMaker scenegraph and press the Export
button in the ClipMaker.
Press O.K.
September 09
47
Rendering
picture perfect
VRED supports two different rendering modes. OpenGL rendering and raytraced rendering. Each render
mode has it`s advantages.
There is no further preparation needed to switch between both render modes. To activate the
raytraced rendering press Render Options in the Icons Tab and select Raytracing. Or Press
the F4 key.
OpenGL:
Raytracing:
September 09
48
Rendering
picture perfect
To improve the interactive performance in the RenderView press Render Options in the Icons
tab and select Raytracing downscale.
For antialiasing calculations when no interaction is taking place activate press Render Options
in the Icons tab and select Still antialiasing.
You will notice that while in OpenGL mode all reflections are approximated against the environ-
ment and are where cube mapped, in Raytracing mode they are traced physically correct.
September 09
49
Rendering
picture perfect
All color variations, geometry switches, environment switches and animations are still accessible in
the same way they were in OpenGL mode.
Switch to the studio environment, change the keylight and change the carpaint to silver.
September 09
50
picture perfect
Rename it to ground_plastic.
Whith the studio environment and studio keylight activated double click the
Keylight_studio light node in the LightEditor to select the light object.
September 09
51
picture perfect
Set the scale value to 4000.The hard shadows will become softer relating to the
size of the Area Light.
The whole scene is still being lit by the HDR image used and the Area Light added. To only
use the Area Light`s light emission set the EnvStudio Exposure value to 0.
September 09
52
Using GI
picture perfect
In Raytracing rendering mode full global illumination can be activated. This will activate more than one
bounce of light reflections on all surfaces. All shadows will be calculated on the fly.
Set the Interactive override value in the Illumination Mode Overrides section to
Full Global Illumination
Set the Still Frame override value in the Illumination Mode Overrides section to
Full Global Illumination
Set the Interactive Quality value in the Enable Material Quality Override section to 1.
Set the Stillframe Quality value in the Enable Material Quality Override section to 1.
September 09
53
Final result
picture perfect
September 09
54