1 29.4.2015 WebGL Seminar TUT Technical Overview Arto Salminen, Matti Anttonen

Slides:



Advertisements
Similar presentations
© Copyright Khronos Group, Page 1 COLLADA FX Update and FX Composer 2.0 Daniel Horowitz & Ignacio Castaño.
Advertisements

An introduction to WebGL Viktor Kovács. Content A little 3D modeling. What is WebGL? Introducing Three.js. Visualizing GDL objects.
HTML5 Haptics Standardization
WebGL - use JavaScript for 3D visualization By Christo Tsvetanov.
MULTIMEDIA DEVELOPMENT 4.3 : AUTHORING TOOLS. At the end of the lesson, students should be able to: 1. Describe different types of authoring tools Learning.
OpenGL Brian Farrimond Robina Hetherington. What is OpenGL A specification of a set of functions for drawing graphics –Names of functions –What information.
WebGL: a New Platform for 3D Games Advanced Games Programming by Jarek Francik 2011.
Referent · von xx Seiten HTML5. Overview 1.HTML & HTML5 Basics Facts 2.Flash vs. HTML5 3.HTML5 - the new features Sebastian Viereck·
Michael Robertson Yuta Takayama. WebGL is OpenGL on a web browser. OpenGL is a low-level 3D graphics API Basically, WebGL is a 3D graphics API that generates.
Declarative 3D for the Web Architecture Web3D 2012 Workshop Johannes Behr, Kristian Sons.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
HTML 5 New Standardization of HTML. I NTRODUCTION HTML5 is The New HTML Standard, New Elements New Attributes Full CSS3 Support Video and Audio 2D/3D.
HTML5 GAMING By Scott Benton. HTML5 New HTML Standard Previous Version of HTML, HTML 4.01, Released in 1999 Not an Official Standard Yet No Browsers Have.
WebGL Patrick Cozzi University of Pennsylvania CIS Spring 2012.
Evaluation of HTML5 Graphics for Data Structure Visualization
DHTML. What is DHTML?  DHTML is the combination of several built-in browser features in fourth generation browsers that enable a web page to be more.
WebGL for lazy dudes Janne Lautamäki 1 GLGE – Janne Lautamäki
4.1 JavaScript Introduction
Chapter 11-Multimedia Authoring Tools. Overview Introduction to multimedia authoring tools. Types of authoring tools. Cross-platform authoring notes.
WebGL: Hands On Zhenyao Mo Software Engineer, Google, Inc. Chrome GPU Team.
CS 480/680 Computer Graphics Course Overview Dr. Frederick C Harris, Jr. Fall 2012.
Introduction to Silverlight. Slide 2 What is Silverlight? It’s part of a Microsoft Web platform called Rich Internet Applications (RIA) There is a service.
A Really (too) Short Introduction to OpenGL Peter Rautek.
Introduction to HTML5. History of HTML HTML first published – Tim Berners-Lee HTML 2.0 HTML 3.2 HTML 4.01 XHTML 1.0 XHTML 2.0.
Programming with OpenGL Part 2: Complete Programs Ed Angel Professor of Emeritus of Computer Science University of New Mexico.
Programming with OpenGL Part 2: Complete Programs Ed Angel Professor of Emeritus of Computer Science University of New Mexico.
CS 418: Interactive Computer Graphics Introduction to WebGL: HelloTriangle.html Eric Shaffer.
WebGL: in-browser 3D graphics Nick Whitelegg Maritme and Technology Faculty Southampton Solent University.
1 Angel and Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Introduction to Computer Graphics 靜宜大學 資訊工程系 蔡奇偉 副教授
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
1 Angel and Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Introduction to Computer Graphics Ed Angel Professor Emeritus of Computer.
1 Graphics CSCI 343, Fall 2015 Lecture 4 More on WebGL.
CS 480/680 Intro Dr. Frederick C Harris, Jr. Fall 2014.
به نام خدا تنظیم کننده : فرانه حدادی استاد : مهندس زمانیان تابستان 92.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Graphics CSCI 343, Fall 2015 Lecture 2 Introduction to HTML, JavaScript and WebGL.
Session: 1. © Aptech Ltd. 2Introduction to the Web / Session 1  Explain the evolution of HTML  Explain the page structure used by HTML  List the drawbacks.
Cs332a_chapt10.ppt CS332A Advanced HTML Programming DHTML Dynamic Hypertext Markup Language A term describing a series of technologies Not a stand-a-lone.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
OpenGL-ES 3.0 And Beyond Boston Photo credit :Johnson Cameraface OpenGL Basics.
WebGL Presentation by: Viet Nguyen.  Final Project Outline  Introduction  History  Support  Implementation  Advantages  Disadvantages  Conclusion.
Computer Graphics 3 Lecture 6: Other Hardware-Based Extensions Benjamin Mora 1 University of Wales Swansea Dr. Benjamin Mora.
Programming with OpenGL Part 0: 3D API. For Further Reading Angel 7 th Ed: –2.2: JavaScript –2.3: OpenGL & WebGL –2.8: fragment & vertex shaders Beginning.
An Overview of the AgentCubes Web API Scott Keller Erin Rowland Stuart Reed Michael Wally George McCabe dy· na· mo: (n.) A generator 1Erin Rowland.
 Learn some important functions and process in OpenGL ES  Draw some triangles on the screen  Do some transformation on each triangle in each frame.
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
IE Developer Tools Jonathan Seitel Program Manager.
CGS 3066: Web Programming and Design Spring 2016 Introduction to JavaScript.
COMP 175 | COMPUTER GRAPHICS Remco Chang1/XX13 – GLSL Lecture 13: OpenGL Shading Language (GLSL) COMP 175: Computer Graphics April 12, 2016.
CSCI 3100 Tutorial 5 JavaScript & Ajax Jichuan Zeng Department of Computer Science and Engineering The Chinese University of Hong.
Build your own 2D Game Engine and Create Great Web Games using HTML5, JavaScript, and WebGL. Sung, Pavleas, Arnez, and Pace, Chapter 5 Examples 1.
X3DOM : Integrating 3D content seamlessly into webpage
DHTML.
WebGL The HTML5/JavaScript 3D Computer Graphics API
The Basics: HTML5, Drawing, and Source Code Organization
گرافیک رایانه ای.
Tips for Environment Mapping
Web3D Consortium X3DOM: Next-Generation Web3D Applications on Open Standards and Open Source Web3D Consortium
Introduction to OpenGL
Introduction to Silverlight
Programming with OpenGL Part 2: Complete Programs
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
JavaScript CS 4640 Programming Languages for Web Applications
CIS 441/541: Introduction to Computer Graphics Lecture 15: shaders
Introduction to Computer Graphics with WebGL
Introduction to OpenGL
CS 480/680 Fall 2011 Dr. Frederick C Harris, Jr. Computer Graphics
Engine and functionalities
Presentation transcript:

WebGL Seminar TUT Technical Overview Arto Salminen, Matti Anttonen

How To Get Credits Maximum number of credits: 3-5 op Attendance: 1 op Seminar presentation (30-45 minutes) on selected WebGL library/technology: 2 op Successfully written new demo application and/or written report on selected technology: additional 2 op

Getting WebGL enabled browser See instructions on: Minefield (Firefox development release) Go to the nightly builds page and get the appropriate version for your machinethe nightly builds page Install it (you’ll need to quit any running Firefox instances while this happens) Start Minefield Go to the page “about:config” Filter for “webgl” Switch the value “webgl.enabled_for_all_sites” to “true” Chrome Windows: (the Chrome Canary Build) If you already have Chrome 7 or newer, try to execute it with --enable-webgl parameter

WebGL debugging WebGL Inspector.“What Firebug and Developer Tools are to HTML/JS, WebGL Inspector is to WebGL”. Extension for injecting into pages Embed in an existing application with a single script include Capture entire GL frames Annotated call log with stepping/resource navigation and redundant call warnings GL state display Resource browsers for textures, buffers, and programs Available for Chrome and Safari only! WebGL’s error reporting mechanism based on calling getError Library available at:

WebGL in nutshell Hardware assisted 3D rendering in browser Native -> No plugins needed Bases on OpenGL ES 2.0 Shaders Uses graphics card for faster graphics rendering Graphics are drawn in HTML5 element Khronos Group WebGL wiki: WebGL OpenGLOpenGL ESDirect3D Graphics Hardware OS Drivers:

WebGL in nutshell Specification closing on 1.0 WebGL is already available on nightly builds of Firefox, Chrome and Safari WebGL requires OpenGL 2.0 capable graphics card ANGLE (Almost Native Graphics Layer Engine) OpenGL ES 2.0 interpreter for Windows Translates OpenGL ES 2.0 API calls to DirectX 9 API calls Software rendering with OSMESA Very slow windowshttp://learningwebgl.com/blog/?p=11#install-minefield-mesa- windows

WebGL rendering on Canvas element WebGL is rendering context for HTML5 Canvas Canvas is a rectangular area, that can be manipulated dynamically via JavaScript var canvas = document.getElementById("minigolf-canvas"); gl = canvas.getContext("experimental-webgl"); gl.viewportWidth = canvas.width; gl.viewportHeight = canvas.height; gl.clearColor(0.0, 0.0, 0.0, 1.0); … HTML page Canvas

Graphics Pipeline Vertex Shader Buffers (vertex arrays) Textures (images) Uniforms (call parameters) Fragment Shader Computes color of the pixel Render target or Framebuffer object for rendering to textures Shader Demo: #ifdef GL_ES precision highp float; #endif varying vec4 vColor; void main(void) { gl_FragColor = vColor; } attribute vec3 aVertexPosition; attribute vec4 aVertexColor; uniform mat4 uMVMatrix; uniform mat4 uPMatrix; varying vec4 vColor; void main(void) { gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0); vColor = aVertexColor; }

Pure WebGL code vs WebGL libraries Numerous WebGL libraries rise the abstraction level of WebGL programming Using libraries often sets some restrictions for the implementation Pure WebGL has greater degree of freedom, but the coding is more complex Quality of WebGL libraries is varying Some libraries have a good documentation but no examples Others have only examples, but no documentation whatsoever

More detailed pure WebGL example

More detailed GLGE example Demo: GLGE scene is predefined in level.xml Defines meshes, animations, scene, camera, lights, objects, groups etc. These can be defined dynamically inside JS code, too Scene logic is defined in JS code Logic is evaluated in a function called every 1 ms In some cases, logic can be implemented with DOM events (e.g. mouse events) Scene is rendered by calling GLGE.Renderer render() function function render(){ now=parseInt(new Date().getTime()); mouselook(); checkkeys();... gameRenderer.render(); lasttime=now; } setInterval(render,15);

More detailed Copperlicht example Demo: orial6/index.html orial6/index.html 3D world is loaded from an external file called ”room.ccbjs” Worlds can be edited with CopperCube tool Camera and cameraAnimator are added to the scene on JS side CollisionResponseAnimator is initialized to enable simple physics Key events are handled with DOM events When spacebar is pressed collision handling get’s done with a 3D line created dynamically Key event is passed on to Copperlicht engine

WebGL - Possibilities HTML5 features WebSockets Offline Drag and drop Video and audio Geolocation CSS SVG Access to webcam possible (with flash for example) JavaScript -> scriptable Native apps (Qt for example) can embed a webview Kinect demo:

More demos Google’s shiny teapot demo Google’s particle demo SpiderGL shadows Pl4n3’s RTS CopperLicht’s Quake demo ChemDoodle 3D WebGL slideshow editor

Student presentation and demo Introduction high-level overview, purpose of the technology, background/history Technical overview of the technology Small examples Walkthrough of a more comprehensive example illustrating the use of the technology Evaluation benefits, drawbacks, general usefulness, possible measurements Summary Presentation length: min (incl min for questions) Demo application for additional 2 op

Presentation Topics Frameworks C3DL ( Copperlicht ( CubicVR ( EnergizeGL ( GLGE ( O3D ( SceneJS ( SpiderGL ( three.js ( WebGLU ( X3DOM ( JigLibJS 3D Physics engines for JavaScript ( Some other topic?