teaching machines

CS 491 Lecture 13 – Pinch and zoom and pan

Before class A Before next class: Watch http://youtu.be/rQC_kQtVt38. Read http://android-developers.blogspot.com/2010/06/making-sense-of-multitouch.html. B Before next class: Watch http://youtu.be/Jfgr3Ewsw8s. Read about HTML5’s Canvas transformation API at https://developer.mozilla.org/en-US/docs/Canvas_tutorial/Transformations. In class Continue the problem from last lecture. If you have 1x, add the ability to pan around the canvas. If you have 2x, add the ability to scale, either with two fingers pinching and […]

A rotating 3-D model with Raspberry Pi

I left off with a visible but maligned rendering. The malignancy is gone. I did not have a depth buffer in my EGL context. EGL(depth_size=8) fixed that. I also wanted to be able to handle key events. Peter insisted on a select-driven event loop, so I went searching to figure out how to read the keyboard via […]

CS 491 Lecture 12 – Continuous rendering and gestures

Before class A Before next class: Watch http://youtu.be/spSomawdgTg. Skim http://developer.android.com/reference/android/view/SurfaceView.html. B Before next class: Watch http://youtu.be/T_Z9lNQVaNg. Browse http://developer.android.com/reference/android/gesture/package-summary.html. In class Write a continuous renderer that draws a number word like “one”, “two”, “three”, and so on, which gets bigger and bigger and bigger over time. If the user draws the corresponding gesture—a 1, 2, 3, …—generate […]

HNRS 304.503 Lab 4 – Tiled platformer

Game design is not for coders alone. In this three-week lab, you and your chosen partner (not the same as you partnered with for lab 3), will create a tile-based platformer whose levels can be designed in a plain old text editor. For example, I might have a level comprised of blue spheres and orange […]

Showing a 3-D model on our Raspberry Pi

Eric got his OBJ loader working, we think, so it came time for me to integrate his code with my demo renderers. It kind of worked. I added a normal attribute to the vertex shader and sent it along to the fragment shader, where I calculated some simple directional lighting in eye space. I drew […]

Drawing a line

I have a friend who is trying to get a bunch of first semester programmers to plot a line between two points into a 2-D pixel array. Bresenham’s is out of the question. A first attempt was a slope-based approach. I never saw the code he came up with, but it wasn’t able to handle […]

Make a one-sided surface two-sided in Blender

I often model things like walls and leaves with only one side. Most computer graphics tools I’ve dealt with only show geometry that faces the viewer. This puts one-sided surfaces in a predicament. When the viewer goes behind them, the geometry disappears. One simple workaround to this problem is to duplicate your one-sided model and […]

Toon shading in Unity

We were curious if we could incorporate cel-shading into Unity. Yes, it can be incorporated pretty easily by: Importing the Toon Shading package. Going to all Mesh Renderer components and switching the material to one of the four toon materials that we imported. Applying toon material to terrain took some searching, as the terrain shader […]

SIGITE Talk

I’m giving a talk on Paul Wagner’s MOBILE project at SIGITE 2012. Following is a draft of my presentation. * * * Many of us have had those nightmares where we discover we’ve been enrolled in a class but forgot to attend. The final exam is in an hour. Thankfully, our panic wakes us. Those […]

Schedule something for future destruction in Unity

Problem: I have a game object, a prefab probably, that I instantiate and velocify. It goes off screen. I want it gone then. Solution: To expire a game object or component based merely on time, call Destroy(thingToDestroy, nSeconds). After nSeconds elapses, thingToDestroy will disappear.

1 175 176 177 178 179 204