Mark A Becker
Home  Me  Portfolio  Words
Send message  Send Message GitHub Google + LinkedIn FaceBook
 WebCL Project - Raytracer
A Raytracer utilizing WebCL

WMI_Monitor_screenshotDevelopment Purpose:

This project was created to explore the usage of the newly developed specification WebCL. A previously built project OpenCL_Raytracer was used as the basis for this application. Like OpenCL, WebCL allows for direct access to the many-core environment of the CPU and or GPU.

  • New! Javascript version for comparison
  • Choosing Images
  • Moving camera and view positions
  • Adjusting the run parameters
  • Utilized OpenCL / WebCL built-in functions

Start Application
*Note Firefox and other requirements stated below!
[A new window will open]

Program on
[A new window will open]

Web Page Interface

Choose Device:Screenshot 2
  • The page creates a list of appropriate platforms and devices that can be used with the WebCL kernel.
  • Shown is both the Intel and AMD implementation of OpenCL.

Choose Images:Screenshot 3
  • There is three, preloaded, 'scene' text files of primitives that when used within the WebCl kernel will create the scene. Each scene, 1, 2, 3, creates a progressively more complicated image. With the increase of complicatedness, comes an increase in run-time.

Move Camera and View:
  • When the scene is run at least once, the camera position and the viewing angle in the 3 dimensional realm can be changed. The 'Camera' set of adjustment buttons surround the cameras icon, and the 'Viewing Angle' buttons surround the eye icon.

Adjust Run:Screenshot 4
  • The 'Adjust Run' section of the input lets the user choose the final size of the image, 'Work Item' size, 'Trace Depth' and number of identical runs to average time-wise.
  • The width and height of the image need to be multiples of the work item [0] and [1] respectively. This is because the 'Work Items' in WebCL and OpenCL need to fit evenly into the global memory (screen size) allocated to the compute device.
Web Page Interface (cont.)

Built-in Functions:Screenshot 5
  • The 'Built-in Functions' lets the user choose the different functions that OpenCL provides.
  • OpenCL, therefore WebCL, allows for manufacturers to supply built-in, hardware based, functional units to handle some of the more common arithmetic operations. This should, in theory, increase the processing speed because the function is optimized for the hardware. Sometimes this is not the case. That is why the option is here, to test the differences.

Information Output:Screenshot 6
  • The 'Information Output' is created after each run. The text is labeled to be self explanatory. Some of the information presented is based on the environment the code (kernel) is run on. The other info is specifically concerning the individual run(s) as in average run time.

Scene Created:Screenshot 7
  • The largest section of the page is reserved for a displaying of the scene image created. The area is fixed to display a 800 by 600 image. Larger (and smaller) images can be created and scroll bars will be implemented accordingly.
Runtime Environment
    The easy part...
  1. This web application can only be run on Firefox browser
  2. The Nokia WebCL extension needs to be installed
  3. WebGL needs to be enabled
  4. WebCL needs to be enabled

    All of this can be checked and or installed at Nokia Research

    The not as easy part...
  5. AMD App Acceleration SDK installed
    AMD Developer Central

  6. Intel SDK for OpenCL installed
    Intel SDK for OpenCL
The FAQ for Nokia Research's WebCL

Runtime Environment Concerns
  • This application runs directly on the GPU or CPU. With that in mind, pushing the adjustments, size, run count, may effect the computer it is run on. There was more than a few times that during development the GPU was overflowed and needed to restart. It also may push the limits of Firefox.
  • Therefore, a certain amount of caution needs to be used. But don't be afraid to use it.

What is a Ray tracer?

Ray tracing is a technique that generates an image by tracing the path of light through pixels in an view plane and simulating the effects of its intersections with virtual objects. Ray tracing is capable of producing an image of photo-realistic quality. usually higher than that of scan-line rendering methods. Unfortunately this level of realism comes at a greater computational cost.

More info from Wikipedia

What is WebCL?

The WebCL working group is working to define a JavaScript binding to the Khronos OpenCL standard for heterogeneous parallel computing. WebCL will enable web applications to harness GPU and multi-core CPU parallel processing from within a Web browser, enabling significant acceleration of applications such as image and video processing and advanced physics for WebGL games.

More info from Khronos

What is Nokia Research doing?

Nokia Research has developed an extension for the Firefox web browser running on Windows and 32-bit Linux.

More info from Nokia Research
Contact   ©2012 Mark Becker