SE 313 – Computer Graphics Lecture 13: Lighting and Materials Practice Lecturer: Gazihan Alankuş 1.

Slides:



Advertisements
Similar presentations
Where to get Blender for Free! Download from Blender.org and run the installer.
Advertisements

BodyPaint 3D Basics Configuring and Using BodyPaint With Lightwave Mark Filanov.
SE 313 – Computer Graphics Lecture 12: Lighting and Materials Lecturer: Gazihan Alankuş 1.
Presented by: Benefits Systems Support. Getting Started ê Open Powerpoint, create a blank presentation. ê Select a style for your first slide from the.
First things first – open SketchUp. You may be asked to choose a ‘Template’ For everyday use, choose the Simple Template – Meters Do not choose the Template.
FINAL CUT PRO VIDEO EDITING SUITE REVIEW. FINAL CUT PRO REVIEW GETTING STARTED: Start by clicking the Final Cut Pro (FCP) icon in your dock. Wait for.
Lighting and Procedural Textures. Purpose In this chapter, you will learn about the following:  Setting up a camera and lights to really show off your.
SE 313 – Computer Graphics Lecture 14: Armatures Lecturer: Gazihan Alankuş 1.
Intro to Blender Alex Hawker. First Steps Download
SE 313 – Computer Graphics Lecture 4: Represeting 3D Models Lecturer: Gazihan Alankuş Please look at the last three slides for assignments (marked with.
UV Mapping. Purpose UV mapping is a process of applying textures to an object by hand.
SE 320 – Introduction to Game Development Lecture 11: Animations and GoKit Lecturer: Gazihan Alankuş Please look at the last slides for assignments (marked.
SE 313 – Computer Graphics Lecture 11: Projection Painting and Merging Textures Lecturer: Gazihan Alankuş 1.
SE 313 – Computer Graphics Lecture 10: More Modeling and Texturing Lecturer: Gazihan Alankuş 1.
SE 313 – Computer Graphics Lecture 3: Analytical Geometry and Linear Algebra Lecturer: Gazihan Alankuş Please look at the last three slides for assignments.
Modelling and Simulation Types of Texture Mapping.
CS324e - Elements of Graphics and Visualization Checkerboard World.
Introducing To 3D Modeling George Atanasov Telerik Corporation
Color Correct and Remove Keystoning A minimalist approach to photographing your art By Paul Marley.
PowerPoint 1 The Basics 1. Save this file to your Apps Folder as YourLastName_PP1 2. Read each slide. 3. Complete each set of numbered directions.
Textures and Maps MCC Computer Modelling Trimester 1 – 2015/2016.
Creating a PowerPoint Presentation
EEC-693/793 Applied Computer Vision with Depth Cameras Lecture 13 Wenbing Zhao
Blender User Interface CSIS 5838: Graphics and Animation for Gaming.
CREATING A POWERPOINT PRESENTATION. Planning a presentation Create a presentation Rearrange and delete text and slides Add animations Add transitions.
Introduction to Computer Aided Modeling Instructor: Brent Rossen CGS 3220 Lecture 4 Shaders, Textures, and Light.
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
Learning Unity. Getting Unity
CSE 381 – Advanced Game Programming GLSL Lighting.
SE 320 – Introduction to Game Development Lecture 3: Unity’s Interface and Concepts Lecturer: Gazihan Alankuş Please look at the last two slides for assignments.
PowerPoint Basics Tutorial 3: Graphics In this tutorial we’ll be looking at graphics, and the various types of illustrations that can be included in a.
Realtime NPR Toon and Pencil Shading Joel Jorgensen May 4, 2010.
TEXTURING AND MODELING Build-It-Yourself.com. Simple Dice 1) Start a new blender project 2) Make sure the cube is selected 3) Go into edit mode 4) Choose.
Processing Lab 2 – Geometry Bryce Hutchinson Objectives: Add a dictionary Gain a better understanding of header issues Display geometry correctly Visualize.
Advanced Computer Graphics Shadow Techniques CO2409 Computer Graphics Week 20.
Build-It-Yourself.com BLENDER 3D LESSON 3 BLENDER 3D LESSON 3.
Skater World: Part Four By Deborah Nelson Duke University Under the direction of Professor Susan Rodger June 1, 2009.
Interaction with Max: Modelling and Texturing Marc Hall.
XP Tutorial 3 Creating Animations. XP New Perspectives on Macromedia Flash MX Elements of Animation Layers are used to organize the content of.
PowerPoint Basics Tutorial 2: A Slide Show In this tutorial you’re going to create a presentation from scratch. You will have to keep this presentation.
 The terms LMB, MMB, RMB, and mouse wheel (MW).
 UV mapping is a process of applying textures to an object by hand  Figure: Blender model textured through a UV map.
SE 313 – Computer Graphics Lecture 4: Represeting 3D Models Lecturer: Gazihan Alankuş Please look at the last three slides for assignments (marked with.
MP3.. Start at the very beginning. Almost. Either start from nothing yourself, or use the empty template for this MP. Run through the provided files are.
CIS 205—Web Design & Development Flash Chapter 3 Working with Symbols and Interactivity.
Computer Graphics Imaging Lecture 13 and 14 UV Mapping.
Computer Programming with Scratch JAOIT 8. Scratch Scratch is a programming language that makes it easy to create your own interactive stories, animations,
INTRO TO UNITY Building your first 3D game. DISCLAIMER  “This website is not affiliated with, maintained, endorsed or sponsored by Unity Technologies.
1© 2009 Autodesk Hardware Shade – Presenting Your Designs Hardware and Software Shading HW Shade Workflow Tessellation Quality Settings Lighting Settings.
Compositing and Rendering
EEC-693/793 Applied Computer Vision with Depth Cameras
Computer Graphics Imaging
EEC-693/793 Applied Computer Vision with Depth Cameras
Introducing Blender.
MATERIALS Chakrit Watcharopas Reference:
Assignment 8 Chess Game.
CS451Real-time Rendering Pipeline
Introducing Blender.
EEC-693/793 Applied Computer Vision with Depth Cameras
Introducing Blender.
Computer Animation UV Mapping.
Computer Animation Texture Mapping.
Assignment 1 Creating a Heart.
Introduction to 3D Art and Animation
Assignment 10 A Flag on the Ocean.
Computer Graphics 5Practical Lesson
EEC-693/793 Applied Computer Vision with Depth Cameras
Computer Graphics Material Colours and Lighting
Assignment 1 Creating a Heart.
Presentation transcript:

SE 313 – Computer Graphics Lecture 13: Lighting and Materials Practice Lecturer: Gazihan Alankuş 1

Today Lights and materials Normal mapping 2

Lights We learned that the color of the light and the material are used to determine rendering colors 3

Lights Create a new default Blender scene The cube should have a material. If not, add a material to it. 4

Lights Render the scene. This is what you should see. Press Esc to go back 5

Lights Select the lamp Go to the Object Data tab Change the color of the lamp to bright red 6

Lights Render it. Even though the object is not red, it will appear red 7

Lights Now let’s change the material to blue Select the cube and go to the material tab Change the diffuse color to bright blue 8

Lights Render it Did you expect purple? Why did this happen? 9

Light: Diffuse and Specular Now create a new scene, delete the cube and add a UVSphere Add a material to it Let’s see the difference between diffuse and specular – Change the diffuse color to green – Change the specular color to red 10

Light: Diffuse and Specular Render the scene and notice the hint of red near where the light shines Change specular back to white and render Notice the difference 11

Light: Ambient To enable ambient light in the scene, we need to add it to the environment Go to the world tab Enable Environment Lighting Energy:1 means it’s on Render the sphere and see that it does not have dark sides anymore 12

Light: Ambient We can reduce the ambient light’s energy, or reduce how much the material reflects it Select the sphere and go to the material tab Under Shading, reduce Ambient to 0 When you render now, the sphere will ignore the environment light and will have dark sides as before 13

Light: Ambient Increase it a bit and see how it affects rendering. 14

Light: Emission We can also simulate objects emitting light In the same pane, increase Emit to 2 Now the sphere is more uniformly lit as if it is giving out light 15

Today Lights and materials Normal mapping 16

Normal Mapping We are going to map the normal vectors of one object to another This will be stored as a texture. The red, green and blue components of the texture will actually represent x, y and z components of the normal vector We will see how we can render this in Blender We will see how to make this work in Unity 17

Normal Mapping Start with a new project Create a cube and a Icosphere. Scale up the Icosphere by about

Normal Mapping: Preparing the Texture We are going to map the normals of the sphere to the cube. This will be stored in a texture in the cube. For this, we need to prepare our cube for texture mapping. First split the main view and bring the UV/Image Editor on the left 19 (Right click)

Normal Mapping: Preparing the Texture Select the cube in the 3D view, go to edit mode, while all faces are selected, unwrap the model using smart uv project. 20

Normal Mapping: Preparing the Texture Create a blank image and name it normal texture 21

Normal Mapping The sphere has normal vectors that are a natural result of its shape. We are going to artificially put (bake) those normal vectors on the cube so that they can be used while rendering to make the cube look a bit like the sphere. – The texture on the cube will hold these normal vectors. 22

Normal Mapping: Baking the Normals Go to object mode It is really important that you do this selection exactly in the order it is explained below – Select the sphere first and then shift+select the cube – Think of it as of “from sphere to cube” The cube should have a yellow outline and the sphere should have an orange outline 23

Normal Mapping: Baking the Normals Without breaking this selection, go to the render pane Scroll down to Bake Select Normals as the bake mode Check Selected to Active Click on Bake to start baking 24

Normal Mapping: Baking the Normals In the UV/Image editor you should see something like this This is the encoding of x, y, z values of normal vectors into red, green, blue components of the texture. If you don’t see this, check the thumbnail If the thumbnail is not black and looks like this, then this is a Blender bug. Save the blend file and the texture, and then reload the image to fix this. 25

Normal Mapping: Using the Normal Texture Now turn on the texture mode in the 3D view and move away the sphere. This is what your cube should look like 26

Normal Mapping: Using the Normal Texture Select the cube and add a material and a texture to it 27

Normal Mapping: Using the Normal Texture Now let’s prepare the texture. Set its type to Image or Movie Select the image from the combo Check Normal Map under Image Sampling Under Mapping, set Coordinate to UV Under Influence, uncheck Color and check Normal 28

Normal Mapping: Viewing the Normal Mapping Now we changed this texture to be used as a normal map. We can see this in the 3D view by changing some settings. Make sure the Properties pane is open in the 3D view Scroll down to Display For Shading, select GLSL Now your cube looks different 29

Normal Mapping: Viewing the Normal Mapping The cube is rendered differently – Instead of its geometrically calculated normals, its using normals mapped using the texture – Turn the cube to see that it really is trying to act like a sphere 30

Normal Mapping: Final Preparations Reset the rotation of the cube to 0 Delete the sphere Create a new folder Save the blender scene in this folder Save the image in the same folder 31

Normal Mapping: Using it in Unity Run Unity and create a new project in your hard drive In My Computer, find the folder that you put the files, and drag it into the Project pane of Unity 32

Normal Mapping: Using it in Unity When you click on the model you should see its preview like this Note that Unity didn’t realize that our texture was a normal map and it’s using it as a regular texture. We will fix this 33

Normal Mapping: Using it in Unity Drag the model into the scene In the inspector, you will see the material on the bottom. The material is using our texture as a regular texture. We need another kind of material that accepts normal maps 34

Normal Mapping: Using it in Unity Change the Shader to Bumped Diffuse. Now we have two texture slots, one for the regular texture and one for the normal map. 35

Normal Mapping: Using it in Unity We need to put our texture into the normal map rather than the regular texture Click on Select in the regular texture Select none Click on Select in the normal map texture Select the correct texture 36

Normal Mapping: Using it in Unity Click on Fix Now below to get Unity to really use this texture as a normal map Now our cube looks more like how it was in Blender Add a directional light to see it better 37

Normal Mapping: Using it in Unity Turn it to see that it really is reflecting light like a sphere 38

Normal Mapping: Using it in Unity To see this in the game view, you can drag and dock it separately If you don’t see it, you need to select Main Camera in Hierarchy pane and select GameObject->Align with View in the menu 39

Normal Mapping: Using it in Unity Select the Directional Light Rotate it See how the cube reflects this light Even though it is flat! 40

Lab Now, map the normal vectors of a cube onto a sphere – Demonstrate it both in Blender and in Unity 41