COMPUTER AIDED ARCHITECTURAL DESIGN
Workshop 9 Notes, Week of  October 16,  2016

TEXTURE MAPPING, REAL SCALE AND ADDITIONAL MATERIAL PROPERTIES 

These cover cover different kinds of material mapping techniques and control of scale for V-Ray plugin to Rhino in Part I. For comparative purposes, similar techniques used in Maxwell are described in Part II.

Part I: VRay Mapping Techniques

1. Create The Rhino File and Get Some Images of Materials

Create a working folder in your desktop. Open Rhino, create a new Rhino 3dm file in working units of "feet" and save it to to the same folder. Copy the folder from the Classes server "CLASSES\ARCH2710-6710-Mark-FAL2016\examples\materials" to the desktop folder where you have saved the 3dm file.

2. Create three objects siting on a surface in the ground plane as in Workshop 6, with each object on its own distinct layer, and with two spot-lights and a point source light as was created for workshop 6.

setup geoemtry

3. Set V Ray as the rendering plugin by going to the menu item Render>Current Renderer > V-Ray for Rhino

select vray

4. To create a brick texture map, go to the menu item V-Ray/Material Editor

material editor

Within the V-Ray/Material Editor, create a "standard" material named "mybrick" per the methods described in workshop 6. Within the Material Editor, select the letter "m" adjacent to the "Color" spefication area of the "Diffuse" tab.

create brick mat

WIthin the "Texture Editor", within the pull-down menu under the preview window, select "texBitmap" and then select the file "jamesstchapelbrick.jpg" from the materials folder created previously.

select brick

Now preview the brick within the V-Ray material editor.

preview brick

Select the block within the pespective view in rhino, right-click on "my-brick" and select the option"Apply Material to Selection"

apply brick

Now go to the properties editor for the block, and select the "Apply Box Mapping" tool.

Within Rhino, select opposite corner points on the ground, and an upper corner point to determine the scale of the box mapping.

box mapping

Now, back with the properties editor, note the XYZ size at 0.783, 1.038 and 0.654 in the case here, which is in the model dimension units of feet of the box in the x, y, and z directions.

xyz box map size

Render the box for a mapping at this scale, and note the entire texture map is scaled to the exact size of the cube, such that the scale of the bricks varies accordingly in each face of the cube.

boxmap

However, witin the properties editor, adjust XYZ size by entering values of 1.0, 1.0, and 1.0. This establishes that the scale of the brick texture is 1 unit (1 foot) each along each directlion.

adjust scale

Re-render the cube and note the more uniform size of the the result.

box brick 2

 

Note: If the mapping scale doesn't change, you may need to select the cube and use the "Delete Mapping" tool option. There is an occasional problem with V-Ray that may prevent the re-scaling to occur immediately. In this case 1_ use the "Delete Mapping" tool shown below, 2_reinitiate the apply box mapping option described above, and 3_reset the X, Y, Z size as also described above, and then re-render.

delete mapping

The "Delete Mapping" option may be necessary between each of the changes below on a a case by case basis.


At this point, to repeat the texture map in a tile pattern along each face of the cube,  there are two options:

1. Change the UVW repeat parameters to 2, 2, 2 to double the texture along each face of the cube.

repeat texture map

brick double

 

2. Or, change the XYZ size to 0.5, 0.5, 0.5 for a simlar result. Here each tile of the map is at the scale of 0.5 units (i.e., 0.5 ft.) each.

change to half unit

 

5. To create a slighlty aged look, go back to the V-Ray Material Editor, select "mybrick" go to the maps tab on the brick, and select check-mark for "Bump" and the adjacent letter "m":

add bump map

Next, in the pop-up dialog box "V-Ray Texture Editor" that follows selecting the letter "m", select the TexNoise option:

add noise2

Change the type to "Perlin", the Amplitude to 0.1, and the frequency to 50.

adjust noise

6. To add a bump map on the ground, go to the V-Ray Material Editor", create a material "mySand', go to the Maps tab, and select the letter "m" adjacent to the word "Bump".

my sand start

Next, in the pop-up dialog box "V-Ray Texture Editor" that follows selecting the letter "m", select the image file "sand.jpg" for the bump map.

Select the ground plane, and go to the properties attribute and then the texture mapping tool, and select "Planar Mapping" icon and trace the corners off the ground plane highlighed below. Next use the XYZ size of 2, 2, 2 to scale the bump map at 2 foot units in the direction of each axis.

planar map

 

Re-render the geometry in V-Ray amd note the bump map representation on the ground with a neutral gray color.

add sand texture

To establish an alternative sand color, return to the material editor and the diffuse tab for "mySand", select the color rectangle and then use the "Select Color" dialog box to determine a new color.

color the sane

Re-render the image.

7. Alternatively, select off the "Bump" map option for the sand, select the check-box for Displacement within the same tab, and once again select the file "sand.jpg"

get displacement sand

TheV-Ray texture editor follows selection of the "sand.jpg" file. Within the editor, change the value of Height to 0.1 and then render.

adj height

Note the appearance of the sand with a more self-evident 3D appearance casting more realistic shadows and occluding the base of the brick cube and the cone. However, the rendering time also increases when switching from a bump map to a displacement map.  The tradeoff between realism and rendering time needs to weighed in any decision to use the displacement map method.

7. Reflection map

Copy the folder "reflectionMapImages" from the classes folder to the same folder where you had placed the "materials" folder.
Create a material named "myGlass" with an IOR of 1.55 as was done in workshop 6, apply it to the sphere, and render it.

apply glass material

In the V-Ray material editor, select the Reflection tab for "myGlass" and select the letter "m" adjacent to the word "Reflection":

add refl map

Select the image "cloulds-large.jpg" from the folder "reflectionMapImages":

cloulds

Render the result.

reflection map1

 

For the cone, create a material called "myCone" with a reflection layer. Change the diffuse color to light-grey and add the same reflection map.

myCone

 

cone render

 

Next, try a cylindrical texture map for the cone and re-render, and see the difference in the results.

cyl map to cone

8. Transparency Maps

Download the folder "transparencyMapImages" from the examples folder on the classes server. 

The original images were obtained as free samples from a web site (the web address has been lost). Each of these images has been modified within Photoshop to be used in two pairs.

  transparency maps   

Each pair includes a photographed figure on black pixel background and a transparency mask of the same figure in black pixels on a white pixel background. In Photoshop, the pair of images was created in thee steps: 

1. start with the original figure:

step one

2. use the magic wand tool in Photoshop to select the pixels of the background,  invert the selection to select the pixels of the figure,  and then use the Photoshop fill tool to covert the the pixels to white:

Step 2


 3. Use the invert tool in Photoshop to get the black pixels figure on a white background:

step 3

Step 3.

Create a new Rhino file with three vertical surfaces on a horizontal surface that are roughly proportional to the tree, bicyclist and pedestrian. Add  a V-Ray sunlight.

transparency map movel

Within the V-Ray material editor, create three materials named 'tree", "bicyclist" , and "pedestrian"

create three materials

For the "bicyclist" material, go to the diffuse tab and select the letter "m" adjacent to the word "color",  and within the "V-Ray" texture editor, select the option TexBitMap, and then select the file "biker.jpg" from the transparencyMapImages folder.

 Select Biker Image

 Similarly, go to the diffuse tab and select the letter "m" adjacent to the word "transparency",  and within the "V-Ray" texture editor, select the option TexBitMap, and then select the file "bikeMask.jpg" from the transparencyMapImages folder.

select biker mask

Do the same for the pedestrian and tree materials and render.