create account

The Fundamentals of Computer Graphics I - Triangles and Rendering by jrkirby

View this thread on: hive.blogpeakd.comecency.com
· @jrkirby · (edited)
$4.73
The Fundamentals of Computer Graphics I - Triangles and Rendering
<p>Ever wondered how Transformers makes such sleek amazing robots that look completely real? How Harry Potter puts the magic onscreen? How Pixar makes such adorable characters come to life?</p>
<p><img src="http://design.bigbangfish.com/wp-content/uploads/disney-cartoons/Brave/Brave-pictures-8-1024x813.jpg" /></p>
<p>Well, wonder no more! In this series, I'm going to explain how computers create the art that our talented artists direct them to. In this part one, I'm explaining the very basics, how everything is a triangle, and how those triangles get turned into an image. By the end of Β series, you should be able to have a knowledgeable conversation with any CG artist, and understand how computers are used to create the movies you love!</p>
<h1>Everything is a Triangle</h1>
<p><img src="https://upload.wikimedia.org/wikipedia/commons/f/fb/Dolphin_triangle_mesh.png" /></p>
<p>That face? Made of triangles. That car? Made of triangles. Dolphin? Triangles. Landscape? Triangles. Gun? Triangles. In computer graphics, <em>everything</em> is made out of triangles. The reason they can make such intricate shapes is because there's <em>lots</em> of triangles. It's not uncommon for an object to be made out of millions of triangles. I've done it myself. Intricate scenes in AAA movies might be billions of triangles. Often triangles are even smaller than a single pixel.*</p>
<p>Why triangles though? Why not squares or circles or balls? Because triangles are the most concise, precisely defined, least ambiguous primitive possible for describing a surface in 3D space. You can fit them together edge to edge with no discontinuities or holes. They're simple to draw, but expressive enough to create any shape.</p>
<p>Triangles in 3D graphics are defined as an ordered list of 3 points. A point is an ordered list of 3 numbers, the x position, the y position, and the z position. The order of the points determines which side of the triangle is the &quot;out&quot; side of the surface, and which side is the &quot;in&quot; side. This is often referred to as the normal** of the surface.</p>
<h1>Computers Need a Camera</h1>
<p><img src="https://farm4.staticflickr.com/3487/cameras/72157602280763141_model_huge_7523f21cc2.jpg" /></p>
<p>Without a camera, the computer has no idea what to draw. Sure, it knows the shape of the object it's drawing, but it can't begin the process until it knows what angle it's drawing it <em>from.</em> You do't want to spend 5 hours painstakingly creating a piece of art, and then have the computer draw it from an angle that doesn't even include your piece!</p>
<p>The camera in computer graphics might just be a virtual object, but it's usually got many of the attributes a real photographer has to worry about, such as focal length. Focal length changes perspective transformation that the camera does. It controls the amount of foreshortening. Close objects should appear bigger than far ones, right? Foreshortening is how much bigger they appear.</p>
<p>In computer graphics, you also get to play with a special type of camera that doesn't exist in real life - the orthographic camera. With this camera, there is no perspective distortion. Everything is at the same scale. It's kind of like looking down at a city from a satellite camera.</p>
<h1>The Two Camps of Rendering</h1>
<p>There are two main ways of turning your camera and triangles into an image, rasterization and raytracing. Neither is better than the other; they both have different use cases and pros and cons.</p>
<h3>Realtime Rasterizing</h3>
<p>The first technique is rasterization. This is used in games, and other applications that are drawn in real time on your computer. The crux of this technique is the perspective transformation matrix. I won't go into detail, but it basically takes everything in 3D and then does some math, and everything comes out in 2D. But you've still got 2D triangles, so you've go to walk through all the pixels on the triangle and put them on the output image. Be careful to draw the ones closer to the camera on top! (with a depth buffer) This is a very fast process that computers can do in parallel easily, so it's used in all kinds of games.</p>
<p><img src="https://msdn.microsoft.com/dynimg/IC520311.png" /></p>
<h3>Production Quality Raytracing</h3>
<p>The other technique is raytracing. Basically, the computer shoots out a bunch of lines out of the camera at each pixel, figures out what they hit, simulates them bouncing around the scene, then uses that to figure out what color the pixel is. In terms of lighting, this technique can make the final result much more realistic and detailed. It also allows for a more true-to-life material design. This is a very physics based technique, approximating the behavior of the very real photons that bounce around the real world allowing us to see. But it takes a lot of time for this to resolve into a clear image, so this is generally restricted to things like movies and video clips.</p>
<p><img src="http://i.stack.imgur.com/gYAlp.png" /></p>
<p><br /></p>
<p>I hoped you liked part one of my overview! If you have any questions feel free to ask, I know a lot about computer graphics. Part two will touch on textures and lighting. Part three will probably about animation.</p>
<p>*Truthfully, you can't arbitrarily compare a triangle's size to a pixel's size. I am talking about when the camera is positioned in such a way that triangles projected onto the image have less area on the image plane than a pixel.</p>
<p>** https://en.wikipedia.org/wiki/Normal_(geometry)</p>
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorjrkirby
permlinkthe-fundamentals-of-computer-graphics-i-triangles-and-rendering
categorycomputer-graphics
json_metadata{"tags":["computer-graphics","tutorial","art","photography",""],"image":["http://design.bigbangfish.com/wp-content/uploads/disney-cartoons/Brave/Brave-pictures-8-1024x813.jpg","https://upload.wikimedia.org/wikipedia/commons/f/fb/Dolphin_triangle_mesh.png","https://farm4.staticflickr.com/3487/cameras/72157602280763141_model_huge_7523f21cc2.jpg","https://msdn.microsoft.com/dynimg/IC520311.png","http://i.stack.imgur.com/gYAlp.png"],"links":["https://en.wikipedia.org/wiki/Normal_"]}
created2016-08-05 18:30:36
last_update2016-08-05 19:58:30
depth0
children15
last_payout2016-09-05 13:55:30
cashout_time1969-12-31 23:59:59
total_payout_value3.636 HBD
curator_payout_value1.095 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length5,572
author_reputation327,516,342,713
root_title"The Fundamentals of Computer Graphics I - Triangles and Rendering"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id631,117
net_rshares2,640,114,097,488
author_curate_reward""
vote details (39)
@alniskobs ·
Dear User known as @jrkirby 
 Steemit has a BOT problem! Your Vote Counts... Maybe 
 https://steemit.com/steemit/@weenis/bots-steemit-s-first-community-based-decision-on-bots-your-vote-counts-to-be-or-not-to-be-details-inside
πŸ‘  
πŸ‘Ž  
properties (23)
authoralniskobs
permlinkthe-fundamentals-of-computer-graphics-i-triangles-and-rendering
categorycomputer-graphics
json_metadata""
created2016-08-05 18:32:21
last_update2016-08-05 18:32:21
depth1
children0
last_payout2016-09-05 13:55:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length225
author_reputation-395,587,580,242
root_title"The Fundamentals of Computer Graphics I - Triangles and Rendering"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id631,177
net_rshares-98,460,443
author_curate_reward""
vote details (2)
@condra ·
This is superb. When I see articles like this it reminds me how Steemit is fast becoming a cornucopia of useful information. 
A1
πŸ‘  , , , , ,
properties (23)
authorcondra
permlinkre-jrkirby-the-fundamentals-of-computer-graphics-i-triangles-and-rendering-20160805t183705838z
categorycomputer-graphics
json_metadata{"tags":["computer-graphics"]}
created2016-08-05 18:36:48
last_update2016-08-05 18:36:48
depth1
children1
last_payout2016-09-05 13:55:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length128
author_reputation56,189,611,335,832
root_title"The Fundamentals of Computer Graphics I - Triangles and Rendering"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id631,335
net_rshares6,512,049,268
author_curate_reward""
vote details (6)
@jrkirby ·
Thanks. After this I might do a more practical series explaining how to actually *do* computer graphics with Blender 3D.
πŸ‘  
properties (23)
authorjrkirby
permlinkre-condra-re-jrkirby-the-fundamentals-of-computer-graphics-i-triangles-and-rendering-20160805t184303800z
categorycomputer-graphics
json_metadata{"tags":["computer-graphics"]}
created2016-08-05 18:43:06
last_update2016-08-05 18:43:06
depth2
children0
last_payout2016-09-05 13:55:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length120
author_reputation327,516,342,713
root_title"The Fundamentals of Computer Graphics I - Triangles and Rendering"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id631,554
net_rshares1,306,749,424
author_curate_reward""
vote details (1)
@eternalabove ·
Dear User known as @jrkirby 
 Steemit has a BOT problem! Your Vote Counts... Maybe 
 https://steemit.com/steemit/@weenis/bots-steemit-s-first-community-based-decision-on-bots-your-vote-counts-to-be-or-not-to-be-details-inside
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
πŸ‘Ž  ,
properties (23)
authoreternalabove
permlinkthe-fundamentals-of-computer-graphics-i-triangles-and-rendering
categorycomputer-graphics
json_metadata""
created2016-08-05 19:48:42
last_update2016-08-05 19:48:42
depth1
children0
last_payout2016-09-05 13:55:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length225
author_reputation-922,435,559,398
root_title"The Fundamentals of Computer Graphics I - Triangles and Rendering"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id633,150
net_rshares-1,255,254
author_curate_reward""
vote details (31)
@feeltheblade · (edited)
Dear User known as @jrkirby 
 Steemit has a BOT problem! Your Vote Counts... Maybe 
 https://steemit.com/steemit/@weenis/bots-steemit-s-first-community-based-decision-on-bots-your-vote-counts-to-be-or-not-to-be-details-inside
πŸ‘  
πŸ‘Ž  ,
properties (23)
authorfeeltheblade
permlinkthe-fundamentals-of-computer-graphics-i-triangles-and-rendering
categorycomputer-graphics
json_metadata""
created2016-08-05 18:31:36
last_update2016-08-05 20:00:15
depth1
children0
last_payout2016-09-05 13:55:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length225
author_reputation-599,382,456,308
root_title"The Fundamentals of Computer Graphics I - Triangles and Rendering"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id631,153
net_rshares-98,846,737
author_curate_reward""
vote details (3)
@gunpower ·
Dear User known as @jrkirby 
 Steemit has a BOT problem! Your Vote Counts... Maybe 
 https://steemit.com/steemit/@weenis/bots-steemit-s-first-community-based-decision-on-bots-your-vote-counts-to-be-or-not-to-be-details-inside
πŸ‘  ,
πŸ‘Ž  ,
properties (23)
authorgunpower
permlinkthe-fundamentals-of-computer-graphics-i-triangles-and-rendering
categorycomputer-graphics
json_metadata""
created2016-08-05 18:47:24
last_update2016-08-05 18:47:24
depth1
children0
last_payout2016-09-05 13:55:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length225
author_reputation-1,328,386,749,651
root_title"The Fundamentals of Computer Graphics I - Triangles and Rendering"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id631,686
net_rshares-95,010,248
author_curate_reward""
vote details (4)
@justoneartist ·
Hope to see more about CGI in steemit.  I'm a 3d artist and I have start sharing my work here.
properties (22)
authorjustoneartist
permlinkre-jrkirby-the-fundamentals-of-computer-graphics-i-triangles-and-rendering-20160805t192836952z
categorycomputer-graphics
json_metadata{"tags":["computer-graphics"]}
created2016-08-05 19:28:39
last_update2016-08-05 19:28:39
depth1
children0
last_payout2016-09-05 13:55:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length94
author_reputation2,343,546,496,538
root_title"The Fundamentals of Computer Graphics I - Triangles and Rendering"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id632,749
net_rshares0
@maykor15 ·
who knows a lot about technology, has the world in his hands!
properties (22)
authormaykor15
permlinkre-jrkirby-the-fundamentals-of-computer-graphics-i-triangles-and-rendering-20160805t195121011z
categorycomputer-graphics
json_metadata{"tags":["computer-graphics"]}
created2016-08-05 19:12:18
last_update2016-08-05 19:12:18
depth1
children0
last_payout2016-09-05 13:55:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length61
author_reputation971,963,694,138
root_title"The Fundamentals of Computer Graphics I - Triangles and Rendering"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id632,348
net_rshares0
@pueblo ·
nice overview! thx
properties (22)
authorpueblo
permlinkre-jrkirby-the-fundamentals-of-computer-graphics-i-triangles-and-rendering-20180324t120045590z
categorycomputer-graphics
json_metadata{"tags":["computer-graphics"],"app":"steemit/0.1"}
created2018-03-24 12:00:45
last_update2018-03-24 12:00:45
depth1
children0
last_payout2018-03-31 12:00:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length18
author_reputation420,954,136
root_title"The Fundamentals of Computer Graphics I - Triangles and Rendering"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id46,319,250
net_rshares0
@simo3222 ·
very good job
properties (22)
authorsimo3222
permlinkre-jrkirby-the-fundamentals-of-computer-graphics-i-triangles-and-rendering-20160809t003243947z
categorycomputer-graphics
json_metadata{"tags":["computer-graphics"]}
created2016-08-09 00:32:39
last_update2016-08-09 00:32:39
depth1
children0
last_payout2016-09-05 13:55:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length13
author_reputation-44,900,017
root_title"The Fundamentals of Computer Graphics I - Triangles and Rendering"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id693,821
net_rshares0
@stellabelle ·
this is really cool. I've made so computer graphics, but i'm impatient so it turned out weird.
πŸ‘  
properties (23)
authorstellabelle
permlinkre-jrkirby-the-fundamentals-of-computer-graphics-i-triangles-and-rendering-20160806t035701619z
categorycomputer-graphics
json_metadata{"tags":["computer-graphics"]}
created2016-08-06 03:57:03
last_update2016-08-06 03:57:03
depth1
children0
last_payout2016-09-05 13:55:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length94
author_reputation516,061,669,130,124
root_title"The Fundamentals of Computer Graphics I - Triangles and Rendering"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id639,585
net_rshares847,750,421
author_curate_reward""
vote details (1)
@viebie ·
Very informative! Thank you @jrkirby
properties (22)
authorviebie
permlinkre-jrkirby-the-fundamentals-of-computer-graphics-i-triangles-and-rendering-20160805t183727708z
categorycomputer-graphics
json_metadata{"tags":["computer-graphics"],"users":["jrkirby"]}
created2016-08-05 18:37:27
last_update2016-08-05 18:37:27
depth1
children0
last_payout2016-09-05 13:55:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length36
author_reputation18,550,460,460
root_title"The Fundamentals of Computer Graphics I - Triangles and Rendering"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id631,354
net_rshares0
@williambanks ·
@jkirby This is awesome!  You should consider stopping by blender.org and doing some updates on their tutorials which have turned a bit stale lately.
Also, is it really still triangles or is it polygons now?
properties (22)
authorwilliambanks
permlinkre-jrkirby-the-fundamentals-of-computer-graphics-i-triangles-and-rendering-20160806t060009558z
categorycomputer-graphics
json_metadata{"tags":["computer-graphics"],"users":["jkirby"]}
created2016-08-06 06:00:09
last_update2016-08-06 06:00:09
depth1
children1
last_payout2016-09-05 13:55:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length207
author_reputation90,708,691,850,244
root_title"The Fundamentals of Computer Graphics I - Triangles and Rendering"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id640,597
net_rshares0
@jrkirby ·
There's a ton of blender tutorial out there, although blender.org isn't the best at featuring them.

Many 3D tools let you use polygons with more vertices. Commonly, using only quadrilaterals is what's recommended for most modeling techniques. But that's only a facade, behind the scenes everything gets split up into triangles before it's sent to the GPU and rendered.
πŸ‘  
properties (23)
authorjrkirby
permlinkre-williambanks-re-jrkirby-the-fundamentals-of-computer-graphics-i-triangles-and-rendering-20160806t060541513z
categorycomputer-graphics
json_metadata{"tags":["computer-graphics"]}
created2016-08-06 06:05:45
last_update2016-08-06 06:05:45
depth2
children0
last_payout2016-09-05 13:55:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length369
author_reputation327,516,342,713
root_title"The Fundamentals of Computer Graphics I - Triangles and Rendering"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id640,633
net_rshares9,092,177,017
author_curate_reward""
vote details (1)
@wisehammer ·
Thanks mate! Very well written, and yes, I love the fact 3d is full of triangles.
properties (22)
authorwisehammer
permlinkre-jrkirby-the-fundamentals-of-computer-graphics-i-triangles-and-rendering-20160805t184152280z
categorycomputer-graphics
json_metadata{"tags":["computer-graphics"]}
created2016-08-05 18:41:51
last_update2016-08-05 18:41:51
depth1
children0
last_payout2016-09-05 13:55:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length81
author_reputation2,502,745,411,790
root_title"The Fundamentals of Computer Graphics I - Triangles and Rendering"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id631,504
net_rshares0