Introduction to Computer Aided Modeling - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

Introduction to Computer Aided Modeling

Description:

CGS 3220 Lecture 4 Shaders, Textures, and Light Introduction to Computer Aided Modeling Instructor: Brent Rossen – PowerPoint PPT presentation

Number of Views:132
Avg rating:3.0/5.0
Slides: 30
Provided by: Bub88
Category:

less

Transcript and Presenter's Notes

Title: Introduction to Computer Aided Modeling


1
CGS 3220Lecture 4 Shaders, Textures,and Light
  • Introduction to Computer Aided Modeling
  • Instructor Brent Rossen

2
Overview
  • Working with the menu-less UI
  • Working with the Hypershade
  • Creating shading groups
  • Texture mapping an object
  • Creating basic lighting
  • Rendering a single frame

3
Getting Serious
  • So far weve been making use of numeric input
    fields, menus, and other UI elements. With this
    lesson, lets pretend were hard core and hide
    all the menus while relying on the hotbox and
    hotkeys.
  • Open our file from last time
  • Resave it as litGarage.mb

4
Turn off all menus
  • After we hide the menus, to access them well
    hold spacebar to evoke the hotbox
  • Hold spacebar now, click on Hotbox Controls
  • Select Window Options
  • Show Main Menubar off
  • Show Pane Menubars off (windows only)
  • Display gt UI Elements gt Hide UI Elements
  • Now weve got a much larger and cooler looking
    workspace. Which should allow us to forget the
    computer and focus on Modeling and Animation.

5
Menu-less Navigation
  • Change the Panel Organization
  • Evoke the hotbox by holding the spacebar
  • Click the area above all the menus to apply the
    north Marking Menu
  • Select Hypershade/Render/Perspective
  • Hypershade where you build shaders
  • Render where you see the output
  • You can drag the divisions between the windows to
    change the size of each window

6
Menu-less Navigation Cont
  • Each of the four cardinal directions in the
    hotbox has its own Marking Menu
  • You can edit the contents of the Marking Menus
    from Window gt Settings/Preferences gt Marking
    Menus
  • Open the attribute editor
  • Display gt UI Elements gt Attribute Editor or
    Ctrla
  • Use the attribute editor to update shading
    network attributes. You can also access most of
    the same channels as are available in the channel
    box

7
Important Hotkeys
  • Spacebar hotbox/window popping
  • Ctrla Show/hide attribute editor
  • F frame selected
  • A frame all
  • Q pick tool
  • W move tool
  • E rotate tool
  • R scale tool
  • T show manipulator tool
  • Y invoke last tool
  • G repeat last command
  • Altv stop/start playback
  • Altshiftv go to first frame
  • For the complete list or to change hotkeys
    Window gt Settings/Preferences gt Hotkeys

8
Shading Networks
  • To add colors and texture well use shading
    networks
  • Shading Network contains materials, textures,
    lights and geometry to create a desired look.
  • The Hypershade panel has
  • Create Bar allows you to create material nodes
  • Hypershade Tabs list all nodes in the scene
  • Work area where you can look more closely at a
    particular shading networks graph

9
Hypershade
  • Well use the hypershade to create materials that
    define the look of the boxes, shelves, lamp,
    door, and door knob.

10
Create Blinn
  • RMB in the materials area and Create gt Materials
    gt Blinn
  • Or click the checkered button to open the create
    tab, and select blinn from there
  • You can see that a blinn shading node is added to
    the materials area
  • Blinn a material node that gives you special
    control over a materials highlights. Very good
    for Metals and other shiny objects.

11
Assigning the Blinn
  • Double click the blinn node, and the attribute
    editor will pop up (or ctrla).
  • Rename the blinn to lampMat
  • Lets edit the color attribute first. Double
    click the gray box next to color in the attribute
    editor.
  • Choose any color you want, and hit accept
  • MMBdrag the lampMat onto your lamp, or select
    the lamp, RMB the lampMat and Assign material to
    selection

12
Softer Lamp
  • In the perspective window, notice how the lamp
    appears very polygonal, perfectly showing every
    edge. To create a slightly smoother effect,
    without adding geometry, well just turn on Soft
    Edges.
  • With the lamp selected, Edit Polygons gt Normals gt
    Soften/Harden
  • You can see now that we have smoother edges, try
    different angles from the options box

13
Wire Material
  • RMB in the work area gt Graph gt Clear Graph
  • If there was anything in the work area, it would
    be removed
  • Create a Phong material, change the color to
    black
  • Phong mats have a plastic look to them
  • Change the name to wireMat
  • Select the wire and RMB wireMat gt assign material
    to selection
  • Assign Material to selection can be used with
    multiple selected objects

14
Bulb Material
  • Create a Lambert material, with a yellow color
    and rename it bulbMat
  • Change the incandescence color to dark yellow
  • Lambert Materials good for anything that doesnt
    have strong specular highlights, such as
    clothing, paper, and other fibers.
  • Adding incandescence flattens the material and
    makes it appear to glow, though it does not
    actually give off any light.

15
The Bulb
  • Create a basic NURBS sphere, rename it bulb and
    place it in the lamp
  • Assign the bulbMat to the bulb

16
Creating a procedural texture Map
  • Click the clear graph button (looks like an
    eraser)
  • Lets give the boxes a texture
  • Create a Lambert and name it boxMat
  • Create gt 2d Texture gt grid
  • MMB drag the Grid icon onto the boxMat
  • Select color on the box that pops up
  • Click the Rearrange Graph button

17
Crate Material
  • Assign boxMat to one of the crates
  • Activate the perspective window, Hotbox gt Shading
    gt Hardware Texturing (hotkey 6)
  • Warning be careful with hardware texturing, it
    can significantly reduce machine performance
  • Double click the grid1 node, change the line and
    filler color to whatever you want

18
Changing the Mat
  • Click the place2dTexture1 tab on in the
    attribute editor
  • Change Repeat U and V to 2

19
Display the whole shading group
  • With the grid selected, click on Input and Output
    Connections
  • You can MMB wheel to zoom in and out, most of the
    same controls that work for the main view, work
    for all other windows
  • Press a to frame all
  • lambertXSG is the connection from the boxMat to
    the crate

20
Creating a file texture map
  • Youll often want to use a texture file instead
    of an internal procedral texture object
  • These can be created using Photoshop, Gimp, or
    any other 2d package
  • Create a Phong rename it crateMat
  • Open the attribute editor with crateMat selected
  • Click the Map box next to the color attribute

21
Assign Texture
  • Click the folder button, and select your image
  • Be sure your image is already in the sourceimages
    folder so you can find it easily
  • Apply crateMat to one of the crates
  • If you make changes to the image outside of maya,
    just hit the reload button on the file texture
  • Normally, textures wont look good at first, but
    we got lucky this time

22
Test Render
  • Since the perspective window size can change
    dramatically, lets use the resolution gate to
    see what will actually be rendered
  • Activate the perspective window gt Hotbox gt View
    gt Camera Settings gt Resolution Gate
  • Dolly in so that the image is well framed. Youll
    probably want to be looking towards the boxes to
    get everything in view
  • RMB the render window gt Render gt Render gt persp

23
The Rest of the Room
  • Our shelves are still gray, so lets apply a
    texture to them
  • Create lambert, rename shelfWood
  • Map a file texture, select a wood texture (find
    it next to this lecture on the web page)
  • Assign shelfWood to the shelves
  • The door is just a red blinn, and the handle is a
    yellow-orange blinn
  • Render again, click the clapboard button

24
Default Light Test Render
25
Add a bulb light
  • Were still using the default lighting, which
    looks very flat
  • Create gt Point Light
  • Rename it lampLight, put it inside the bulb
  • Open the shadows tab, check use depth map shadows
  • Render, why dont we see anything but the bulb?
  • Select the bulb, open Render Stats, uncheck cast
    shadows

26
Test Render 2
27
Add a floor light
  • Thats better, but it doesnt show us nearly
    enough. The lamp shade is blocking everything.
  • Lets put another light on the floor to simulate
    reflected light.
  • Turn the floorLight intensity down to .3, Turn on
    shadows
  • Turn the lampLight intensity to .5
  • Now we have some very dramatic night-time shadows

28
The Lit Room
29
Conclusion
  • Save your scene!
  • Weve now covered the basic concepts of
    texturing, lighting, and rendering.
  • We went over materials, procedural textures, file
    textures, lights, and rendered a single frame to
    preview the look of the Shaders and lights.
  • Next time, well go over the basics of animation.
Write a Comment
User Comments (0)
About PowerShow.com