Workshop 8 notes, Week of October 20, 2008

Surface Editing, Materials and Lighting

 

1. Surface Editing: cutting hole in extruded bspline.

Using the Iso View Window (#2), place a rectangle in the ground plane and then put a bspline inside of the rectangle as depicted in the image below.

Use the extrude operator to project the curve into a surface.

Go into the "F" front construction plane via Accudraw and place a rectangle above the front edge of the ground rectangle and facing the curved wall.

From the Surface Modeling task, select the icon labelled "T" and open the sub-palette titled "Modify Surfaces" as a toolbox.

Select the second icon "Project Trim", and then select the curved wall and the rectangle.

Enter a data point and the retangle will cut a whole in the wall.

2. Surface Editing: using surface to cut wall.

A similar application of surface editing uses a Surface by Section to slice an extruded wall. Here the sequence begins with drawing two bspline surfaces on-top of a simple rectangle in the ground plane.

Simple rectangle in ground plane Bsplines added to ground plane

Next, the second bspline is moved above the first bspline along the z-axis. A Surface by Section (first icon in Create Surfaces toolbox) is then created from the two bsplines.

 
Bspline moved above ground plane. Select bpslines with Construct Surface by Section tool  

Next, an extruded rectangle is added to the ground plane of the above figure. From the modify surfaces palette (first icon in palette in figure at right below), the Trim Surface tool is applied, where the wall is selected first and the bspline surface is selected second.

Extruded retangle juxtaposed with sufrace Construct Trim Tool with wall selected st and surface 2nd
Dialog box settings for Construct Trim Tool Result of trim

 

3. THREE FILE TYPES ARE USED TO DETERMINE THE ASSIGNMENT OF MATERIALS TO OBECTS IN A MICROSTATION DRAWING.

These files, identified below, are external to the main Microstation DGN file and need to be included separately in any folder where it exists in order to support rendering of materials.

These files are interchangeable between drawings and are stored outside the .dgn file:

3.1 Material Table File (file extension ".mat" such as "myproject.mat") - Determimes the assignment of materials to objects in a cad model by one of two methods: 1) according to layer and color or 2) by direct assignment to individual objects. The Material Table file references Palette files for the description of individual materials.

3.2 Palette File (file extension ".pal") - Describes the definition of materials according to their property values (e.g., transparency). Typically a palette file is created for a group of materials that have similar qualties, such as palette file for marble (e.g., "marble.pal") or a palette file for wood (e.g., "wood.pal").

Materials within a palette file can be defined according to several methods, sometimes in themselves referring to additional image files.

3.3 Image files, typically jpeg (pseudo 24 bit) or tiff (true 24 bit) are referenced in the definition of individual materials through texture mapping and bump mapping. Occasional such files may also be used in other rendering techniques such as background mapping (an image background to scene, environmental mapping (a six sided box that encloses a model and may be reflected by materials in it), and transparency mapping (an image with a designated transparent color, such as may be used to map figures, such as people or trees, onto a computer model).

4. STANDARD RENDERING

Rendering usually is established with creating one or more light sources. Here, we will setup a rendering with a sunlight set to 10 a.m. by using the Global Lighting dialog box.


It is possible to render through selecting one of any number of standard algorithms as described in the lecture preceding the workshop. Select the render tool from the "Task List - Visualization" on the right-hand side of Microstation's Application Window:

 

Add three simple solids to the figure from part 2.

Go through the "Render Mode" portion of the render tool to invoke varied rendering algorithms from "Hidden Line" through "Ray Trace".

Six different renderings are tested to create the images captured in the table below.

5. MATERIAL DEFINITION BY PROPERTIES

For these examples, copy the classes folders examples/ptrace/ptrace & ptrace2 (ies example) to the local hard drive, and, within the folder ptrace, open the file ptrace2.

To initiate material definitions, you need to follow three steps as illustrated below:

  1. begin by creating a material table file
  2. initiate or load a material palette file for the definition of individual materials
  3. define individual materials

STEP 1: using the task list manager on the upper right hand side of Microstation's application window, select "visualization" and then select the icon labelled "R" (see image below) to open the "Material Editor" dialog box. By default, the prefix name of the material table file ("ptrace2.mat") is the same as the prefix name of the dgn file ("ptrace2.dgn"). This file should be explicitly saved by selecting the menu item "Table" from within the "Material Editor" dialog box and using the "save as" option.

'

 

STEP 2: under the menu item "palette", select the word "new" to create a new palette file, such as the file "mypalette.pal". This file must also be saved by going to the menue item "Palette" and using the "save as" dialog box when materials are added to it.

STEP 3: Once a palette file has been created, begin to develop the definition of individual materials.

The above material "amaterial" has the following properties set

1. color -base color visible by ambient light (turquoise color as shown)
2. dark/bright - brightness of material under direct illumination
3. dull/siny -shininess or dullness of specular highlight
4. opaque/clear - transmissivity of matarial to light (level of transparency)

Once created, right-clicking on the name of the material. and select the word "assign" opens yet another dialog box by which it may be assigned to an object in the dgn file. Assigning the material by Level/Color is achieve by selecting the first icon in the dialog box and then selecting the object (e.g., the sphere).


As illustrated in the example "Material Editor" dialog box below, note that any dgn file, such as the file named "test.dgn", may reference any number of palette files, such as the files "myproc.pal", "test.pal", and "metals.pal", and that each palette file may contain the definition of any number of materials, such as the materials "grue" and "mybyr" below. A "+" symbol appearing next to the name of the material indicates that it has been assigned to objects in the dgn file by the "Level/Color" method or another method.

The above material "grue" has the following attributes:

1. color -base color visible by ambient light
2. dark/bright - brightness of material under direct illumination
3. dull/siny -shininess or dullness of specular highlight
4. opaque/clear - transmissivity of matarial to light (level of transparency)
5. smooth/bumpy - bumpiness with respect to bump map (based upon a jpg image not shown)
6. Reflective - reflection of light
7. Metallic - -metallic/mirror like reflection of light

 

6. TEXTURE MAPPING

Projecting an image as the basis for the definition of a meterial is referred to as "texture mapping".

 


7. TEXTURE MAPPING ADJUSTMENTS

It is possible to change the scale and tile a texture map.

1 3

8. BUMP MAPPING

A bump map assigns a relief map to a surface in a similar dialog to texture mapping. Here the greyscale value of an image is used to simulate the appearance of a surface relief pattern in the object to which it is assigned. The bump map attribute is turned on via the down arrow to the right of the word "bump" in the "Material Editor". Next, a specific image is selected using the selection tool (appears to be two links in a chain) just to the left of the down arrow. A common folder for storring bmp map images is C:\Documents and Settings\All Users\Application Data\BentleyWorkspace\System\Materials\bump. In the figure below, the file "RoughBump.jpg" is selected for the bump map. However, any jpg image can be used for this purpose,

 

 

The bump map can be adjusted similarly to an image map, and assigned to the surface of an object as a whole, or assigned on the basis of master units.

Once the bump map parameters have been established, the material which references it is modified to have a surface relief pattern. The appearance of "myfirstmaterial" is changed accordingnly in the "Material Editor Dialog" box. This material can be assigned to the truncated cone in the dgn file.

9. PRE-DEFINED PALETTE FILES

Apart from the task list manger on the right-hand side of Microstation's application window, you can also open the "Material Editor" dialog box from the top of the view screen by going to "Settings>Rendering>Materials. A number of predefined material palettes are locted on the hard drive of your computer as a part of the typical software installation. For a drawing file with a simple ground rectangle with three objects sitting on top of it (e.g., slab, sphere and cone), you can explore some of the pre-defined palettes as follows.

10. BACKGROUND MAP AND DISTANCE CUE(COVERED LAST WORKSHOP)

11. PROCEDURE TEXT FILE

A procedure file uses a similar dialog to the image map dialog process. In this illustration, we will create our own variation on a standard procedure file. That is, we will save our own procedure file and create a brick material with a unique name (e.g., "mybrick") that we can modify without impacting the definintion of system procedure files.

In the dialog boxes below, the parameters of a procedure based definition for the materal "brick" are adjusted to create a new definition of the material named "mybrick". The material named "mybrick" is copied and renamed from the predefined procedure file for a more standard material named "brick".

The rendering image with these materials may appear as indicated in the following image.

12. CREATE MATERIAL TYPICAL PROCEDURE

A more typical procedure for creating materials relies upon simple bump map definitions and attribute values to arrive more abstractly at the definition of materials. Under Settings/Renderings/Materials (or via the dialog boxes above)

13. TRANSPARENT OBJECTS

 

14. TO MAP IMAGE

 

15. ENVIRONMENTAL MAP

Table>environment maps

16. SAVING RENDERINGS (From before)

17. PARTICLE TRACING / RENDERING

 

18. BASIC SETUP

Action

Use old, update, or generate new solution., save solution

Particle Settings

# particles to use (1 mil)

Maximum bounces

# times bounce (100 avg)

Illuminate both sides

Sometimes surfaces may be non-illuminated (best to default this on)

Ray trace direct

Will alleviate multiple shadows, saves time, not good idea to use this in general

Meshing settings smoothness

Breakdown of mesh to effect smooth surf –noise to smooth

Mesh detail

Level of resolution at key places – higher no. -> higher quality

Min mesh setting

Higher # improves perform at low resolution

Display mode

Visual, luminance (outgoing),illuminance (incoming)

Raytrace final display

Render using raytracing.

Brightness overlay

Aperature.

 

19. Download IES files and test as attached to point source light in new dgn file.

20. PARTICLE TRACING - OVERALL CONCEPTS/FAQ EXCERPTED FROM BENTLEY'S MATERIALS

Question 1: How do I get a "good" particle Trace solution?

Answer : There are several different ways to achieve better results when we Particle Trace render. Below are a few ways to accomplish this:

STEP 1: Raytrace

STEP 2: Particle setup

STEP 3: Brightness

STEP 4: AMP (Add More Particles): Add more particles if:

STEP 5: Mesh smoothing

STEP 6: Final touches

 

Question 2: What settings values are recommended for the initial rendering?

Answer : Using the default settings is a good place to start, they are:

SEE ALSO :

http://www.arch.virginia.edu/arch541/Handouts/render/attrib.html {material attributes
http://archweb.arch.virginia.edu/arch541/Handouts/render/rtraceset.html {raytrace attributes
http://archweb.arch.virginia.edu/arch541/Handouts/render/setup.html {gen render attributes
http://www.arch.virginia.edu/arch541/Handouts/render/viewatr.html {view attributes
http://archweb.arch.virginia.edu//arch541/Handouts/sample.htm {sample marble