Stories from November 24th, 2010

Image Processing with OpenGL and Shaders

A great article in The Linux Journal discusses the creation of an OpenGL-based Image Processing system that can analyze video captured from an attached camera in real-time.

This article discusses using OpenGL shaders to perform image processing. The images are obtained from a device using the Video4Linux 2 (V4L2) interface. Using horsepower from the graphics card to do some of the image processing reduces the load on the CPU and may result in better throughput. The article describes the Glutcam program, which I developed, and the pieces behind it.

In the end, he has it running a single edge-detection kernel, but it could easily be modified to do much much more.

via Image Processing with OpenGL and Shaders | Linux Journal.

Science , , ,

 
Stories from October 21st, 2010

Hierarchical-Z map based occlusion culling

Rastergrid is back with more details for their OpenGL4.0 Mountains demo, this time time they update the occlusion culling algorithm to utilitize the Hierarchical-Z buffer technology in new OpenGL4.0 spec.

Occlusion culling is a visibility determination algorithm that is used to identify those objects that did reside in the view volume but still aren’t visible on the screen due to occlusion. That means they are hidden by such objects that reside closer to the camera.

via Hierarchical-Z map based occlusion culling « RasterGrid Blog.

Science ,

 
Stories from October 18th, 2010

OpenGL 4.0 Mountains demo released

Rastergrid has a new OpenGL 4.0 demo released that shows dynamically generated mountains, valleys, and trees all using algorithms in DirectX10 and OpenGL4.  They manage to do level of detail, culling, and and geometry instancing all on the GPU, leaving the CPU almost untouched.

The result is a renderer that does little to no scene management on the CPU, instead uses the GPU for visibility determination that is, in most cases, able to reduce the scene’s geometric complexity from over 400 million triangles under one million triangles providing an interactive experience on a Radeon HD5770 with around 200 frames per second.

Scroll to the bottom to see his performance figures.  It looks amazing, although they test it solely on AMD Radeon cards.

via OpenGL 4.0 – Mountains demo released « RasterGrid Blog.

Science , ,

 
Stories from September 24th, 2010

Mark Kilgard’s GTC2010 OpenGL4.1 Presentation

Mark Kilgard has followed up last year’s GTC presentation on OpenGL3.2 with a new presentation on OpenGL4.1.  I’ve embedded it above for you to see.

Presented as a pre-conference tutorial at the GPU Technology Conference in San Jose on September 20, 2010. Learn about NVIDIA’s OpenGL 4.1 functionality available now on Fermi-based GPUs.

In the presentation he covers some of the new OpenGL profiling and debugging tools you can find in Parallel NSight, Cg3.0, and much more in the 113 slides. It’s also posted online for downloas as a 17Meg PPT file. Developers can download NVidia’s beta OpenGL4.1 driver here.
Gtc 2010 open_gl.

Science , ,

 
Stories from August 18th, 2010

Resource Of The Week: OpenGL SuperBible


This week’s recommended resource is the latest (5th) edition of the OpenGL Superbible from Richard Wright and Addison-Wesley publishing.

OpenGL® SuperBible, Fifth Edition is the definitive programmer’s guide, tutorial, and reference for the world’s leading 3D API for real-time computer graphics, OpenGL 3.3. The best all-around introduction to OpenGL for developers at all levels of experience, it clearly explains both the API and essential associated programming concepts. Readers will find up-to-date, hands-on guidance on all facets of modern OpenGL development, including transformations, texture mapping, shaders, advanced buffers, geometry management, and much more. Fully revised to reflect ARB’s latest official specification (3.3), this edition also contains a new start-to-finish tutorial on OpenGL for the iPhone, iPod touch, and iPad.

Coverage includes

  • A practical introduction to the essentials of real-time 3D graphics
  • Core OpenGL 3.3 techniques for rendering, transformations, and texturing
  • Writing your own shaders, with examples to get you started
  • Cross-platform OpenGL: Windows (including Windows 7), Mac OS X, GNU/Linux, UNIX, and embedded systems
  • OpenGL programming for iPhone, iPod touch, and iPad: step-by-step guidance and complete example programs
  • Advanced buffer techniques, including full-definition rendering with floating point buffers and textures
  • Fragment operations: controlling the end of the graphics pipeline
  • Advanced shader usage and geometry management
  • A fully updated API reference, now based on the official ARB (Core) OpenGL 3.3 manual pages
  • New bonus materials and sample code on a companion Web site, www.starstonesoftware.com/OpenGL

I’ve been looking over this book for the last few days (they were kind enough to provide me a review copy) and I’m impressed.  While it, admittedly, doesn’t mention anything about the new OpenGL4.0 or 4.1 specs, it does a great job covering OpenGL3.3.  It opens with all of the basics of geometry, matrix math, and texturing, before moving into buffer objects, vertex and pixel shaders, and geometry queries.  It even gets platform specific at the end, detailing things you need to know about the specifics of using OpenGL 3.3 on Windows, OSX, or Linux, and contains a chapter on OpenGL ES for mobile devices, including a chapter or two specifically for the iPhone.

I highly recommend it, and you can find this book and many others in the VizWorld Store.

Graphics, Science , ,

 
Stories from August 3rd, 2010

More Insights into the OpenGL4.1, OpenGLES2.0, & WebGL Situation

Update 8/5: By request from Khronos, I’ve added all the little ™ and ® ‘s.

Last week I posted a rather, well let’s just say “sensational”, article about the coincidental announcement by AMD/ATI of their new OpenGL|ES2.0 Driver for Desktops and Khronos’s announcement of the OpenGL® 4.1 spec which offers full backwards compatability with the OpenGL ES 2.0™ standard.  Most people wouldn’t care about OpenGL ES 2.0™ on the Desktop, as it’s the OpenGL Spec for Embedded Systems like set-top boxes and mobile phones, however the OpenGL ES 2.0™ spec is the foundation of the up-and-coming WebGL spec that promises plugin-free 3D graphics on the internet for all to enjoy.

Currently in the WebGL space, you have about 4 options:

  • Download a Plugin.  This is basically what Google started out with, you download a plugin that offers a translation layer between the actual hardware support and the WebGL spec.
  • Download an OpenGL ES 2.0™ Driver. This is what AMD/ATI Announced just prior to SIGGRAPH.
  • Download an OpenGL® 4.1 Driver. This is what NVidia announced during SIGGRAPH.
  • Download a new browser. WebGL is currently supported in some fashion or another in the latest dev releases of Chrome, Safari, and FireFox.

However, each of these has problems.  The whole point of WebGL is to be “plugin-less”, so the first one is out.  This leaves the other three, however, they have hidden issues as well.

Before I continue, many people ask “Why do I need a driver?”, and it’s a valid question.  Right now, without any OpenGL ES 2.0™ driver, you can go download development versions of Safari, Chrome, and FireFox and get WebGL.  It all works just fine, but you’ll notice it works a bit differently in each one.  This is what the driver is for: consistency. With working drivers in place, the visuals will be identical across browsers and hardware, because the rendering is all handled in the Driver, not the Browser.  Currently, browsers have a built-in translation layer that turns the JS-based OpenGL ES 2.0™ commands and turns them into regular OpenGL commands, and some do a better job than others.

Initially, as in the article, I was a bit harsh on ATI for releasing a dedicated OpenGL ES 2.0™ driver and favored NVidia’s announcement of an upcoming OpenGL® 4.1 driver that would encompass the same results.  This way, the user only has 1 driver to manage that in future systems will be installed by default, so the user literally has to do nothing.  Unfortunately, NVidia’s OpenGL4.1 support is limited to only the latest revisions of hardware:

You will need any one of the following Fermi based GPU to get access to the OpenGL® 4.1 and GLSL 4.10 functionality:

  • Quadro Plex 7000, Quadro 6000, Quadro 5000, Quadro 5000M, Quadro 4000
  • GeForce GTX 480, GeForce GTX 470, GeForce GTX 465, GeForce GTX 460

This means all those people with little GeForceM cards in their laptops are out of luck, as well as anyone with the GTX285 or earlier.  No doubt these cards have the horsepower to handle WebGL, but they’re currently unable to get the drivers necessary.

ATI’s solution is a bit less elegant, but by offering a dedicated driver they open it to all of their hardware, not just the latest and greatest.  Unfortunately, it does return us a bit to the previous world of loading plugins, except you’re loading a system-level driver instead.  However, this opens the world to all those old ATI Rage chipsets in laptops and FirePro’s in the wild, covering the full gamut of users.

In the end, I’m sure NVidia will offer a driver for WebGL to older hardware, but there’s no news on when that will be.   If NVidia lags too far behind, we could find ourselves in a “VRML Situation”, where individual browsers begin to support various extensions in attempts to best utilize the hardware, leading to inconsistencies and incompatibilities we already see with HTML & CSS across browsers.  Hopefully, with a good standards organization in place like Khronos, which VRML didn’t have, we’ll find consistent drivers coming to all platforms soon.

Hardware, Science , , , , , ,

 
Stories from July 30th, 2010

Khronos SIGGRAPH2010 BOF Presentations Online

 
Stories from July 26th, 2010

AMD Releases Unneeded OpenGLES2.0 Desktop Driver

Update 8/3/2010: Read a followup to this post here.

I just got a press release from Khronos about the first OpenGL ES2.0 driver for Desktop systems coming to market from AMD.  Upon further inspection, this looks a bit fishy.

At SIGGRAPH 2010, AMD (NYSE: AMD) today announced availability of the first software driver for desktop computing environments to support the WebGL industry standard, which is designed to bring plugin-free 3D graphics to the Internet. The AMD OpenGL® ES 2.0 driver is intended to help developers easily create exciting 3D content that can be rendered more quickly for consumers using open-source web browsers, thereby helping create an application-like browser experience.

Ok.  So where do I get it?  Read further down the press release and see:

The OpenGL ES 2.0 driver from AMD will be generally available with the upcoming ATI Catalyst™ 10.7 beta for OpenGL ES 2.0, expected to be available later today.

So it’s not “official”, it’s “Beta”.  But, how did AMD beat NVidia to the punch on this one?  In fact, why is a special OpenGL ES2.0 driver needed anyway?  OpenGL ES is a subset of regular OpenGL targeted at embedded systems, and in fact that’s exactly what NVidia did with it.  NVidia’s OpenGL ES2.0 support is right where it’s designed to be, in the development kit for their embedded system Tegra.

So why do we care about it?  WebGL, the coming common standard for 3D on the Web, is based on OpenGL ES2.0 (presumably to make it an option for smartphones and other portable devices that lack full OpenGL compatibility).  So most companies haven’t focused on putting OpenGL ES on the desktop, because that’s not where it belongs.

Not that it matters too much anymore, thanks to another press release that I got mere minutes after the accolades came rolling in for AMD.  Khronos, the group behind the OpenGL and OpenGL ES standards has just announced the standard for OpenGL 4.1, with one fascinating addition:  Complete compatibility with the OpenGL ES 2.0 APIs.  This means that being OpenGL4.1 compliant means you’re already OpenGL ES2.0 compliant.  So what has NVidia been doing the last few months?

“The release of OpenGL 4.1 just five months after OpenGL 4.0 shows that collaborative innovation to build market opportunities for high-performance GPU acceleration is not slowing down.  The ARB is also working hard to ensure backwards compatibility with each release so developers can absorb new functionality at their own pace,” said Barthold Lichtenbelt, OpenGL ARB working group chair and senior manager Core OpenGL at NVIDIA.  “I am also pleased to announce that NVIDIA will release OpenGL 4.1 production drivers on our developer site for all Fermi-based graphics accelerators, including the GeForce GTX 400 series, during SIGGRAPH.  OpenGL 4.1 is not just a specification – it’s here and now.”

Myth Busted.

See both press releases after the break.

Read more…

Science , , ,

 
Stories from June 15th, 2010

More Realistic Glass with OpenGL & Shaders

Over at UralDev, they have a great tutorial (in Russian) using OpenGL and some rather complex shaders to create more realistic glass in realtime, complete with reflections, refractions, shadows, and caustic effects.

With the help of modern graphics cards can get more complex dynamic scenes.  This means that high-quality (photorealistic) rendering carried out offline in real time.  In particular, one of the pressing problems of computer graphics is the calculation and rendering of global illumination and complex materials.  In this article I would like to talk about the modeling of glass objects.  Glass is quite complicated to model material, when the goal is to get the most realistic image.  In this article we shall analyze together with you step through the process of modeling and rendering of glass objects.

Google Translate.

Science ,

 
Stories from June 11th, 2010

Fast and Accurate Single-Pass A-Buffer using OpenGL 4.0+

With the new flexibility of OpenGL4.0 and the Fermi architecture, Cyril Crassin decided to revisit some of the older A-Buffer algorithms and see what kind of improvements he could manage.  What is an a-buffer, you ask?

Basically an A-buffer is a simple list of fragments per pixel [Carpenter 1984]. Previous methods to implement it on DX10 generation hardware required multiple passes to capture an interesting number of fragments per pixel. They where essentially based on depth-peeling, with enhancements allowing to capture more than one layer per geometric pass, like the k-buffer, stencil routed k-buffer. Bucket sort depth peeling allows to capture up to 32 fragments per geometry pass but with only 32 bits per fragment (just a depth) and at the cost of potential collisions. All these techniques were complex and especially limited by the maximum of 8 render targets that were writable by the fragment shader.

So, he rewrote the algorithms to exploit the new capabilities.  How did it perform?

It worked pretty well since it provides something like a 1.5x speedup over the fastest previous approach (at least I know about !), with zero artifact and supporting arbitrary number of layers with a single geometry pass.

I would call that a resounding success! Find details and example code at his site.

via Icare3D Blog: Fast and Accurate Single-Pass A-Buffer using OpenGL 4.0+.

Science , ,

VizWorld.com is a production of VizWorld, LLC © 2009