SourceForge Logo
Documentation and tutorials on other sites
Tutorials

Painless 3D - George Supreeth's site has some excellent tutorials for getting started in 3D, using gSculpt.



gSculpt Documentation and Tutorials
1. Contents

  1. Contents
  2. About gSculpt
    1. Introduction
    2. Development History
    3. License
  3. Installation
    1. Installation on Linux
    2. Installation on Windows
  4. Introductory tutorial
    1. Viewport navigation
    2. Creating a box primitive
    3. Creating a sphere primitive
    4. Moving the sphere using the manipulator
    5. Rotating the box
  5. Using gSculpt project files as modelling tutorials
    1. Viewing a gSculpt modelling tutorial
    2. Creating a gSculpt modelling tutorial
  6. Using live subdivision
  7. Keyboard shortcuts


2. About gSculpt
2.1. Introduction

gSculpt is an open source, procedural subdivision modeller. It has a comprehensive set of polygon modelling tools, including most of those found in Wings 3D, and more.

Workflow and speed of use are important design goals in the development of gSculpt. Pre-selection highlighting throughout the program, and keyboard short cuts ensure that the workflow is fast and efficient, while providing access to a powerful procedural system which allows mistakes to be rectified easily.

Its procedural modelling system makes it an excellent choice for making modelling tutorials, as the steps required to build the model from the beginning are displayed to the user in a list. This list can be navigated easily, allowing a user to view the process one step at a time, at their own pace, while being able too look at the model from all angles as they go.


2.2. Development History

When the project started in 1999, it was inspired by a program called Cybersculpt which was developed by Tom Hudson for the Atari ST platform. During the period of 2000-2001, a procedural modelling system was implemented, whereby gSculpt operates on the procedure required to build a model from scratch, rather than operating on the geometry itself. After that, gSculpt went under the radar, while development continued. It now has features that are present in most modern subdivision modelling programs. gSculpt was initially written entirely in C++, however, in 2005 it was decided that a significant portion of the code should be rewritten in Python, in order to take advantage of the productivity benefits that arise from using dynamic languages. gSculpt as it currently stands uses C++ only for the mathematically intensive operations, using Python for the remainder of the code base.


2.3. License

gSculpt is licensed under the GNU General Public License (GPL) version 2. The full text can be found in the distribution files, or at http://www.gnu.org/copyleft/gpl.html.


3. Installation
3.1. Installation on Linux

You will need to install the following packages in order to build gSculpt:

Python - v2.4. The Python site has source code, and binaries for Linux and Windows. Fedora Core 5 comes with Python v2.4.3.
GTK+ - v2.8. GTK+ v2.8 is available as source, or as binaries for Linux and Windows. Fedora Core 5 comes with GTK+ v2.8.20.
PyGTK - v2.8. Python bindings for GTK+. PyGtk v2.8 is available as source for Linux, or as binaries for Windows. Fedore Core 5 comes with PyGtk v2.8.6.
GTKGLext - v1.0.6. GTKGLext v1.0.6 is available as source for Linux, or as binaries for Windows. GTKGLext v1.2.0 can be acquired via the Fedora Core package management system.
pyGTKGLext - v1.0.1. Python bindings for GTKGLext. pyGTKGLext v1.0.1 is available as source.
Boost - v1.32. Boost libraries; Boost::python MUST be included. Fedore Core 5 comes with Boost v1.33.
PyOpenGL - v2.0. Python bindings for OpenGL.
PIL - Python Imaging Library - v1.1.5. The Python Imaging Library.
Scons - v0.96. The Scons build system is used to build the gSculpt C++ libraries.

Fedore Core users: Python, GTK+, PyGtk, Boost, and GTKGLext will be either be installed as part of Fedora Core 5, or can be acquired via the package management system (yum). The other packages will need to be built from source. (When doing a 'configure; make; make install', remember to use '--prefix=/usr' in order to have the libraries install in a directory where they will be found.)

Debian/Ubuntu users: PyGtkGLExt does not have an official package, however, an unofficial package can be found at the glChess site. Thanks a lot to Rory Yorke for his help in getting gSculpt working on Ubuntu. :-)


Having installed the above packages, unpack the gSculpt package. Go into the directory that was created, and at the command prompt type:

> scons

To build gSculpt. Once this is done, gSculpt can be started by typing:

> ./gsculpt

If that fails, try:

> python gsculpt.py

A warning about gSculpt being alpha release software will attempt to scare you away. If you are tough enough, click 'OK', and the main gSculpt window will appear.


3.2. Installation on Windows

Run the gSculpt MSI installer to install gSculpt. Two shortcuts to gSculpt will be created; one in the start menu in a folder called gSculpt <version>, and another on your dekstop. Start gSculpt by running either of these.

A warning about gSculpt being alpha release software will attempt to scare you away. If you are tough enough, click OK, and the main gSculpt window will appear.


4. Introductory tutorial

There are three modes of navigation; rotation/orbiting, panning, and zooming.

Rotation/orbiting: To rotate/orbit the viewport, hold the Alt-key, press and hold the left mouse button, and move the mouse.

Panning: To pan the viewport, hold the Alt-key, press and hold the middle mouse button, and move the mouse.

Zooming: To zoom the viewport, hold the Alt-key, press and hold the right mouse button, and move the mouse left and right.


4.2. Creating a box primitive

In this section we will create a box primitives. There are two ways to create primitives; a long way, and a short way. The long way will be used to create the box, in this section. The short way for the sphere, in the next section

Creating the node: In the tool panel on the left of the screen, you should see a tab at the top called Scene. This tab should be active. Below it, you should see two buttons, one called Choose model, the other called Scene graph. Press the Scene graph button. The Scene graph window should appear. Click the New button at the top left of the scene window. A menu will appear. Choose Blank model. You will be prompted for a name. Type Box. Press enter, or click the OK button. A node called Box will appear in the scene graph area of the scene window. Double click it to edit it. (You can also single-click it, and then press the Edit button on the left of the Scene graph window to achieve the same thing) You may now close the scene graph window.

Creating the box primitive: In the left panel in the main window, a new tab called Prim will have appeared. Click this tab to bring up the primitive tools. Click the Box button. The Prim tab will have been replace by a tab called Mesh. A new tab called Box will appear and be selected automatically. In it you will find the parameters for the box tool. Change them if you wish. A box will have appeared in the viewport, along with a red, green, and blue manipulator. In the tool panel, you should see options for the box tool. These are: the number of divisions in X, Y, and Z axes, the size, the position, and 6 check boxes which can turn the faces of the box on and off. Finally, at the bottom, there is a Done button, which will dismiss the tool. This can also be activated using the \ key. We want to move the box 50 units to the left. To do this, enter -50 into the X position entry box, and press Enter. The box should move. Dismiss the box tool using the Done button, or the \ key.


4.3. Creating a sphere primitive

Click the Create menu in the menu bar at the top, and choose Sphere. This will create a new node for the sphere model. This creates the node (what you did in the scene graph window in the previous section), and activates the sphere primitive tool. You should now see three tabs in the tool panel; Scene, Mesh, and Sphere. The Sphere tab should be active. A sphere will have appeared in the viewport, in addition to the box.


4.4. Moving the sphere using the manipulator

With the Sphere tool still active from the last section, you should see a sphere in the viewport. At the centre of the sphere, you should see a manipulator with long red, green, and blue handles, smaller yellow, cyan, and magenta corner handles. You may move the sphere by pressing and holding the left mouse button in the viewport, and dragging. Moving the pointer over the manipulator while the button is not held will cause the manipulator handles to highlight as the pointer passes over them. Starting your click-drag on the red, green, or blue handles will constrain the motion of the sphere to the X, Y, and Z axes respectively. Starting on the yellow, cyan, or magenta handles will constrain motion to the XY, YZ, and XZ planes respectively. Starting anywhere else in the viewport will produce unconstrained motion.

Grid snapping: Holding <shift>, <control>, or <shift>+<control> while dragging will snap the position to points on a grid. The size of the grid depends upon which key combination is held, and the snap settings. The snap settings are accessible via the snap settings button in the toolbar (its the one with the blue grid). Clicking the snap settings button will cause the snap settings to pop up, from which you can control the snap sizes for distance/position, scale/fraction, and angle/rotation, for the various key combinations.

Use the manipulator, with grid snapping if you wish, to move the sphere 50 units to the right. You may also enter 50 into the X position entry.


4.5. Rotating the box

Click the Scene tab at the top of the tool panel. Now click the Choose model button (default shortcut: <control>-space). A new tab will have appeared, titled Choose model. This allows you to pick a different model to edit. Click on the box. The box will now become the current model. Dismiss the Choose model tool with the Done button. (Or the \ key)

Click the Mesh tab at the top of the tool panel. There are four buttons at the top of the mesh panel. These allow you to choose which component type you wish to edit. They are for (from left to right) vertex mode, edge mode, face mode, and body mode. Click the body mode button. In the Transformations/Deformations section, you will find the Rotate button. If you click the right mouse button in the viewport, the context menu will appear. The Deformations sub-menu will contain a Rotate item for the rotate tool. Use either the Rotate button in the tool panel, or the context menu to activate the rotate tool. The rotate tool parameters will appear in a new tab in the tool panel, and a rotation manipulator will appear in the viewport. The red, green, and blue rings allow you to rotate around fixed axes. You can rotate the shiny blue transparent sphere part of the manipulator by dragging it. Dragging anywhere else in the viewport results in a free-hand rotation. Once again, grid snapping can be used by holding <shift>, <control>, or <shift>+<control>. Rotate the box until you are happy.


5. Using gSculpt project files as modelling tutorials
5.1. Viewing a gSculpt modelling tutorial

Making and viewing modelling tutorials is one of gSculpts main strengths.

Lets use the head model that comes as one of the examples in the gSculpt package. Go to the File menu and choose Open. From the gSculpt directory (on Windows, it is probably C:\Program Files\Britefury\gSculpt), find the file head.gpx, which can be found in the examples directory. Open it.

You should see a head model appear in your viewport. It is currently in a background layer. You will need to edit the head model. Ensure that the Scene tab (in the toolbar on the left) is selected, and click the Scene button to bring the scene editor window up. You should see a node called head in the scene editor window. Double-click it to edit it (or click it to select it, and click the Edit button on the left of the scene editor window). Close the scene editor window.

In the scene tab, below the Scene button that you just used, you will see a list that is titled Plan. This shows all the operations required to build the model from scratch. Scroll the list to the top. The list will start with an entry called Node: Model. Below this, will be an entry called Box. Click the box entry to select it. You will see a box instead of a head in the viewport. You may now press the down-arrow cursor key to move to the next entry in the list. Holding the down-arrow key will scan through the plan, action by action. Using the up-arrow will scan in the opposite direction. Using the page-down and page-up keys will move a page at a time. This way you can effectively play back the construction of the model, and rewind as you choose. You can also use the navigation controls (Hold Alt-key, press and hold a mouse button (left for rotate, middle for pan, right for zoom), and move the mouse) to view the model from the perspective of your choosing.

The head model also includes a model of the eyes. You may wish to hide them in order to prevent them from obscuring your view of the main head model. In order to do this, click the layers button in the tool bar at the top of the gSculpt window. Its the 4th button from the left. The Layers window will appear. You should see a layer called Default. Expand it to reveal two entries, one called head, the other called eyes. These correspond to the nodes in the scene editor window. To hide them, uncheck the check-box in the Vs column of the layer list.


5.2. Creating a gSculpt modelling tutorial

Creating a modelling tutorial in gSculpt is easy. There is no need to save your progress at various stages into different files as you go. gSculpt records each modelling action as you take it.

Create your model in the normal way, and distribute the gSculpt project file. A person wishing to learn your technique will be able to do so by playing your technique back in the same way as described in the previous section.

If you wish to take screen shots, you do not need to do this as you create your model. Create your model in the normal way. Use the technique presented in the previous section to choose an appropriate point in the construction history, choose your perspective, and take a screen shot using screen-grabber software.


6. Using live subdivision

Live subdivision is applied to mesh objects. To enable it, click the 'Node view settings' button (it has an icon that looks like an eye), which is located in the top left of the 'Mesh' tab in the toolbox (see previous tutorials in order to create a mesh). This will bring up the Node view settings popup. There you will see the live subdivision settings.

The 'enable' check turns live subdivision on and off. The 'iterations' entry controls the number of subdivision levels. The 'max faces' entry limits the subdivision such that it will not subdivide beyond this number of faces; this prevents the program from freezing due to subdividing too far if the number of iterations was set too high by accident. The 'normal sharpness' radio buttons controls how normal sharpness is preserved. The 'wireframe mode' controls which subdivided edges are displayed.


7. Keyboard shortcuts

Please note that all shortcuts can be edited using the shortcuts editor, found in the Edit menu.

General
(always available)
<Ctrl>-WSwitch between quad-viewport and single-viewport layouts
<Ctrl>-FFocus tool
<Ctrl>-DDrawing plane (toggle on/off)
<Ctrl>-<Shift>-SShow scene graph window
<Ctrl>-SpaceChoose model

Tabbed viewport layout
(available when in tabbed viewport layout)
<Alt>-Left arrowPrevious viewport
<Alt>-Right arrowNext viewport
<Alt>-<Shift>-Left buttonPrevious viewport
<Alt>-<Shift>-Right buttonNext viewport

Plan
(always available)
<Control>-DeleteRemove action from plan
<Control>-MModify action

All tools
(available in all tools)
\Dismiss tool; equivalent of clicking the Done button.

Blank model / primitive
(available when editing a blank model; when a new scene node has been created)
BBox mesh
PPlane mesh
SSphere mesh
CCylinder mesh
<Shift>-CCone mesh
TTorus mesh
<Shift>-TTube mesh
FDraw face
MDraw quad mesh

Mesh
(available when editing a mesh)
<Alt>-VVertex mode
<Alt>-EEdge mode
<Alt>-FFace mode
<Alt>-BBody mode

Mesh editing - vertex mode
(available when editing a mesh, in vertex mode)
SpaceUnselect all
<Shift>-SpaceSelect all
[Shrink selection
]Grow selection
WMove
EScale
RRotate
<Shift>-WMove - normal
QTweak
<Shift>-QSurface-tweak
<Shift>-ATemplate tweak
AProportional tweak
FFlatten
XExpand
BBevel
CConnect
TCut
<Shift>-TN-Cut
DTarget weld
<Shift>-DWeld
VDissolve

Mesh editing - edge mode
(available when editing a mesh, in edge mode)
SpaceUnselect all
<Shift>-SpaceSelect all
[Shrink selection
]Grow selection
<Shift>-GPick edge ring path
<Shift>-LPick edge loop path
WMove
EScale
RRotate
<Shift>-WMove - normal
QTweak
<Shift>-QSurface-tweak
AProportional tweak
<Shift>-ESlide
FFlatten
PSpin
IRewire
XExtrude
<Shift>-XExpand
BBevel
CConnect
<Shift>-CN-Connect
SSplit
<Shift>-SN-Split
TCut
<Shift>-TN-Cut
NBandsaw
<Shift>-NN-Bandsaw
VDissolve
<Shift>-VClean dissolve
OCollapse
DWeld

Mesh editing - face mode
(available when editing a mesh, in face mode)
SpaceUnselect all
<Shift>-SpaceSelect all
[Shrink selection
]Grow selection
WMove
EScale
RRotate
<Shift>-WMove - normal
QTweak
<Shift>-QSurface-tweak
AProportional tweak
FFlatten
XExtrude
<Shift>-XFree extrude
IInset
<Shift>-IInset, with 'flow through marked edges' enabled
BBevel
<Shift>-BBevel, with 'flow through marked edges' enabled
TCut
<Shift>-TN-Cut
DWeld
VDissolve
OCollapse
DeleteDelete
<Shift>-DDuplicate

Mesh editing - body mode
(available when editing a mesh, in body mode)
SSubdivide
KKnife
FDraw face
MDraw quad mesh
WMove
EScale
RRotate
HShear
TLinear twist
<Shift>-TRadial twist
PTaper
IShrink
DDent
BBend