SlideShare una empresa de Scribd logo
1 de 43
WebGL
3D GRAFIKA NA INTERNETU
www.quinced.com
Preslikavanje realnosti
Shaders
Okruženje
Kvadrat
Pojmovi
Pipeline
Transformacije
Kocka
Pojmovi
Teksture
Svetlo
Animacija
Sfera
Okruženje
Istorija, budućnost
Primena
OpenGL

OpenGL ES
WebGL
LOW LEVEL
mora malo da se misli
model > priprema > Crtaj! > vertex shader > fragment shader
HTML5 Canvas
Step by step
gl_Position = vec4(vpos, 0, 1);

gl_FragColor = vec4(0,0,0,1);

function getShader(...)

function initShaders()

function initWebGL(…)

function start()
Setting the scene
gl-matrix
gl_Position = pMatrix * mvMatrix * vec4(vpos, 1);

mat4.perspective(pMatrix, Math.PI/4, 400 / 400, 1, 1000);

mat4.translate(mvMatrix, mvMatrix, [0, 0, -10.0]);

mat4.rotateY(mvMatrix, mvMatrix, Math.PI/6);

mat4.rotateX(mvMatrix, mvMatrix, Math.PI/6);

gl.drawElements(gl.TRIANGLES, 36, gl.UNSIGNED_SHORT, 0);
varying vec4 vColor;

vColor = aVertexColor;

gl_FragColor = vColor;
varying vec2 vTexture;
vTexture = aVertexTexture;
uniform sampler2D uSampler;
gl_FragColor = texture2D(uSampler, vTexture);
textureCoordinates = [...]
function initTextures()
gl.texImage2D(...)

gl.texParameteri(...)
gl.activeTexture(...)
ambientLightColor = vec3(0.6, 0.6, 0.6);
directionalLightColor = vec3(0.0, 0.8, 0.7);
directionalVector = vec3(0.5, 0.5, 0.5);
vertexNormals = [...]
mat3.normalFromMat4(normalMatrix, mvMatrix);
attribute vec3 aVertexNormal;
uniform mat3 uNormalMatrix;
transformedNormal = uNormalMatrix * aVertexNormal;
directional = max(dot(transformedNormal, directionalVector), 0.0);
vLighting = ambientLightColor + (directionalLightColor * directional);
gl_FragColor = vec4(textureColor.rgb*vLighting, textureColor.a)
window.requestAnimationFrame(tick);
function animate()
vertices = [...];
vertexNormals = [...];
textureCoordinates = [...];
triangles = [...];
Vertexi (koordinate)

Matrice transformacija

attribute

Boje

uniform

Mapiranje tekstura

varying

Normale za osvetljenje

Animacija

Matematika

Vertex shader

Fragment shader
How it’s made
Šta fali?
Mnoge oblasti: napredno osvetljenje, upravljanje tekstom,
interakcija sa korisnikom, blending, manipulacija 3D modelima….
Komunikacija/komentari
Interakcija
Three.js
Zašto tutorijal?
Odnos prema učenju
INFORMACIJE
VIŠE sadržaja
MANJE kvalitetnog
INDIVIDUALNOST
Student > Profesor/Mentor?
Profesor/Mentor > Student?
Niko nema TOLIKO vremena da traži odgovor
(ili bar tako oni misle)
Šta će očekivati studenti za 10 godina?
(ili bar šta mi mislimo o tome)
Student će i dalje
trebati mentora TUTORA
> Saradnja / komunikacija
[IZMEĐU SVIH KOJI KOMUNICIRAJU-RAZMENJUJU]

+ Alati / načini
E-Learning?
E-Learning?

pa….ne baš
Studenti
Kritika i reakcija na kritiku
Jasne misli
Pismenost (pravopisna, akademska, idejna, poslovna, digitalna)
Izbegavanje “lošeg” društva
Poštovanje nauke
Otkrivanje talenata van okvira ocena
Kompromis nepomirljivog (naučna institucija <> produkcija radne snage)
Hvala!

Más contenido relacionado

Destacado

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destacado (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

WebGL tutorijal