Current version: 0.45.1
>GeeXLab homepage

Current version: 1.30.0
>FurMark homepage

GPU Caps Viewer
Current version:
>GPU Caps Viewer homepage

GPU Shark
Current version:
>GPU Shark homepage

>JeGX's HackLab

Geeks3D's Articles
>GPU Memory Speed Demystified

>Multi-Threading Programming Resources

>GeForce and Radeon OpenCL Overview

>How to Get your Multi-core CPU Busy at 100%

>How To Make a VGA Dummy Plug

>Night Vision Post Processing Filter

PhysX FluidMark
Current version: 1.5.4
>FluidMark homepage

Current version: 0.3.0
>TessMark homepage

Current version: 0.3.0
>ShaderToyMark homepage
>ShaderToyMark Scores

Current Version: 1.23.0
>Libraries and Plugins
>Online Help - Reference Guide
>Codes Samples
3D Illustration: CD or DVD box Creation

By Jerome Guinot aka 'JeGX' - jegx [at] ozone3d (dot) net

Initial draft: April 13, 2006

1 - Introduction

2 - Création de la boîte

3 - Downloads

1 - Introduction

In this small tutorial we will learn how to create boxes for CDs and DVDs using Demoniak3D. Once created, these boxes may be used, for example, to show the packaging of a new software. We often find this kind of illustrations on websites that sell software or in computer magazines.

But very often, we see boxes featuring 3D rendering mistakes, such as incoherent vanishing points or side images incorrectly deformed. One reason is that the cg artist does not use 3D software to create the box: instead, a simple 2D vectorial drawing software is used letting the artist the responsibility to deform his own way the 2D box to get the desired 3D result.

The method explained hereafter will lead to a nice realistic result only in few minutes:

Fig. 1 - The DVD box done with the DVD_Box_Maker_with_reflection.xml script.

The main advantage of this method is that everything is handled in real 3D. Once the box created, one can make screenshots from any point of view, change the camera field of view (fov), apply lighting and reflection effects. It is also possible to use vertex and pixel shaders in order to get the appropriate result.

2 - Box Creation

The box creation is quite simple. All we need is:

  • the images (or textures) to map on the box sides
  • the Demoniak3D XML script
  • Demoniak3D

In this tutorial, we are going to use 3 textures we will map on the front, the left and the back sides of the box:

Fig. 2 - The three textures used for the box creation

The XML scritp for Demoniak3D is located in the zip archive available for download at the end of this page. Actually, there are two scripts:

  • DVD_Box_Maker.xml: this script displays the textured DVD box alone
  • DVD_Box_Maker_with_reflection.xml: this script adds a reflection on the floor .

In each script, the user has just to replace the demo's textures by his own:

<texture name="front_tex" filename="data/dvd_front.jpg" function_type="REPLACE" />
<texture name="back_tex" filename="data/dvd_back.jpg" function_type="REPLACE" />
<texture name="left_tex" filename="data/dvd_left.jpg" function_type="REPLACE" />

<texture name="right_tex" filename="data/void_map.jpg" function_type="REPLACE" />
<texture name="top_tex" filename="data/void_map.jpg" function_type="REPLACE" />
<texture name="bottom_tex" filename="data/void_map.jpg" function_type="REPLACE" />

All textures are located in the data/ directory. The first three textures (dvd_front.jpg, dvd_back.jpg and dvd_left.jpg) are the 3 textures of the figure 2. The fourth and the last texture (void_map.jpg) is a texture to map on the other faces that are less important for the final result.

Fig. 3 - the DVD_Box_Maker.xml script in action

The DVD_Box_Maker_with_reflection.xml script allows adding a ground with partial reflection. This partial reflection is achieved using a gloss-map that looks like:

Fig. 4 - the gloss map used for reflection

The gloss map is just a texture that encodes high reflection areas in white and non-reflecting ones in black.

Fig. 5 - the DVD_Box_Maker_with_reflection.xml script

The camera is controled by the 4 direction keys (UP and DOWN: camera forward and backward - RIGHT and LEFT: right and left camera strafe). To place the camera, you can also use the [Ctrl] button + mouse left button: that allows translations in the camera's XY plane.

<scene name="myScene" 
		display_hyperion_logo="FALSE"  >
	<background_color r="1.0" g="1.0" b="1.0" />

Fig. 6 - the DVD_Box_Maker_with_reflection_v2.xml script without the Demoniak3D's logo

The only thing you have to do, is to make a screenshot and use your favorite image processing software to finalize the job!

3 - Downloads

The accompanying Demoniak3D projects
Update: April 13, 2006

*** These source codes require Demoniak3D to work properly.
Demoniak3D is available here: [:: Demoniak3D Demo-System ::].

GeeXLab demos

GLSL - Mesh exploder

PhysX 3 cloth demo

Normal visualizer with GS

Compute Shaders test on Radeon

Raymarching in GLSL

>Texture DataPack #1
>Asus Silent Knight CPU Cooler
Page generated in 0.0018100738525391 seconds.