Introduction

sKulpt aims at being (someday J ) the modern reincarnation of the ancient but beloved Amiga 3D modeling and ray tracing software Sculpt Animate 3D / 4D by Eric Graham and Byte By Byte.

Sculpt was (and still is) a model for simplicity and ergonomy, and many pictures were drawn by it, in amateur and professional contexts.

Furthermore, it was cheap, although it packed many features and was almost bug-free.

Alas... It seems like Byte By Byte is out of business (since long on the Amiga market anyway), unreachable, and the source code for Sculpt was not released in open form.

I would still be using it nowadays if...

SKulpt will someday cover these features in a fully usable form, if I have enough spare time to finish it... You can help, since I provide the source.

At the moment, sKulpt is a project in development, yet supporting :

I'd say that around 60 percent of its features are implemented and available. More are actually in the code. This is because I first developed sKulpt on the PC, under Direct3D v7, with the scope of porting it back to the Amiga afterwards. Developing under Microsoft's Visual C++ v6 is much faster than under SAS/C, and when I started the project, I did not know about StormC, which I bought since!

SKulpt also exists as a 32 bit Windows program, relying on the Microsoft DirectX v7 libraries (available under Windows 98 and 2000), with exactly the same features (since it shares most of its source code with the Amiga version). If you know a bit of both Windows API and Amiga programming, give a look at the sources of both versions, you'll see how you can port something from Windows to Amiga (of course, it is easier if thought from the start). As an example, all dialog boxes on the Amiga version reside in the "gfx/sampler.res" file, which is a Microsoft Visual Studio's AppStudio resource editor compiled file, the very same which is linked into the PC executable. The dialog definitions are loaded from this file when required, and translated on the fly into GadTools windows and gadgets. Funny isn't it ? I did this because setting up a dialog box with AppStudio is a child's play (even if limited in functionality), whereas GUI editors on the Amiga rely on much more complex concepts like fully resizable windows, font sensitive dialogs etc. which could simply not be shared with the PC. I would not like to have to keep up to date two different sets of GUI definitions.

Both versions live at the same level of functionality, one always having a slight advance over the other, depending on which platform I feel it will be easier to add a feature.

Requirements

To run sKulpt, you need :

You CAN'T run sKulpt if you don't have all the above.

Don't try to run sKulpt if the Warp3D samples provided in the Warp3D user archive don't fully work. Among these samples, WarpTest provides an easy GUI to test many Warp3D features.

The 060 version will run on any 32 bit 680x0 (from 020 to 060), and the PPC version will run on Blizzard PPC and Cyberstorm PPC boards (yet the 060 version is optimized for the 060 and the PPC version is optimized for the 604e).

Warp3D should run under Picasso96, but I encountered some problems with this setup, so I can only say it works well with CybergraphX (which I advise running in its latest release, 4.2p7).

Warp3D does not provide a software renderer, so if you have a PPC but no CV64/3D or B|Cvision PPC, you won't be able to run sKulpt. If you have a 030/50, 8 Megs of free RAM and a CV64/3D in an A2000, it will work (I can tell, as such a configuration is used as a test system for sKulpt).

If you would like to run sKulpt without a 3D accelerated board, write to HAAGE & PARTNER saying you want to write the software renderer for Warp3D, and be prepared to code a pretty complex but very interesting piece of software.

A word on 3D hardware acceleration, for the curious unaware. What's covered under these words of much hype is :

All these functions were available since many years, but only in expensive CAD workstations or high-end CAD-dedicated video boards. Thanks to Mr. Carmack and his Quake hit, these features, crucial in 3D game programming, came to the desktops in almost all PCs at affordable prices. One of the first chips implementing these features at a reasonable price was the S3 ViRGE, which is the heart of the Cybervision 64/3D (while completely outdated on the PC scene).

What is left to software (on the Amiga) is :

As you may have heard, on the PC platform, modern graphics boards like nVidia's GeForce ® © J take these two functions into hardware, thus freeing the processor for other calculations. At the time of this writing, this is not the case on the Amiga.

Principles

SKulpt is a 3D scene editor, and an image / animation renderer.

The purpose of sKulpt is to enable one to draw 3D objects, set their respective positions, their appearance properties through association with materials, associate textures with materials, add lights, and render everything into an image. Additional animation features enable rendering a succession of images, between which the scene is modified (object or light movements etc.)

To use sKulpt, one must understand the following concepts :

Thus, the only things you will see in the 3D window are triangles, since vertices and edges don't define surfaces by themselves, so can't be rendered.

Various other considerations are taken into account in rendering, like face normals, blending etc., but for a quick introduction this is sufficient.

The process of creating a 3D object is the following :

This is sufficient to create a 3D scene, which gets rendered as a 2D picture in the 3D view J

This process can be eased by the use of productive tools, like extrusion, curve filling, etc.

The work of vertex / edge / triangle setup is done in 3 2D windows (face, top and side view).

For a more detailed introduction, please give a look at the original Sculpt documentation, which I can't reproduce here for copyright reasons, or at the reference user's guide chapter in this document.

Quick features overview for the Sculpt-aware

Same menu structure as in Sculpt 3/4D, mostly same features at same place.

Able to load, view and rework Sculpt 3/4D scenes, except paths and object names. All the provided ".scene" sample scenes are actually original Sculpt 3D demo scenes.

Able to load / save its own binary file format (IFF ".sk3D", pretty fast).

Able to load / save Microsoft's DirectX X file format (".x") (not fully functional).

Modeling in 3 2D windows (top, face, side views) :

Modeling with 5 cursors :

A white line always links camera and target.

These ease triangle creation, which is available with :

Vertice creation is made at main cursor location, either with the point gadget or with 'P' key.

Modeling with tools (not all available at the moment) :

Release the current tool with either menu or the space bar.

Edit materials with 'm'.

Edit selected faces material association with 'f'.

Reposition all windows with the ESC key.

All selecting, editing, transforming features of Sculpt 3/4D (not all available at the moment).

Able to draw 3D as solid, wireframe or vertices.

Very sophisticated mesh triangulation engine, based on the Triangle project, supporting holes, optimization and more.

User's reference

Introduction

SKulpt offers various flexible ways to do the same thing. For instance :

This chapter aims at giving you the purpose of the various sKulpt commands, be they entered by menu entries, window gadgets, keys. SKulpt embeds various ways to do the same thing, as this was the case with the original Sculpt software, so that you can find the way which is most convenient to you. In the future, this concept will be pushed further, through introduction of customizable menus, a customizable graphical pad which will enable gathering your most useful commands, accessible through small icons, scripting features, with either the embedded sKulpt scripting language (similar to the original Sculpt), and AREXX availability of variables and commands.

This chapter then demonstrates these commands in action in simple scene creations.

If you feel it should be organized or illustrated in a different way, don't hesitate and drop a mail to stephane.guillard@steria.fr

The GUI

The GUI stands for "Graphical User Interface". This chapter is meant to explain its principles to unfamiliar users.

It is what you see on your screen when running sKulpt.

The GUI is made of the following entities :

Contents of the 2D windows

The 2D windows represent the projection of your virtual 3D space along the 3 planes of a Cartesian coordinate system defined this way :

The face view shows the projection of all objects on the X/Y plane. The top view shows the projection of all objects on the X/Z plane. The right view shows their projection on the Z/Y plane.

If I add a circle to my scene, which is centered on the origin, and turns around the Z axis (let's say Z), this circle is in the X/Y plane, and the 3 2D views will show like this :

In the 2D windows, you also see above :

These essential elements can fall in a non-visible space area, since when you pan or zoom in, they don't move in space. To expose them, either zoom out, or pan, or center the views on the main cursor (see this later).

Apart from these essential elements, the objects you create in your scenes display as follow :

This is all what can be seen in the inner region (light blue delimited by white rectangle) of the 2D windows.

To illustrate this, here is a face view of 3 triangles, 5 edges and 2 lamps. A few vertices are selected :

On this picture, you can also discover the window gadgets. They are the small icons taking place in the dark blue border surrounding the inner window region. See "Window gadget commands" section above for a description.

We are done with 2D windows.

Contents of the 3D window

The 3D window will display the perspective view of the scene, seen from the camera position, looking at the target position.

What gets actually drawn is only the triangles (since they are the only basic entities to define a visible surface, as points and edges don't).

Triangles get drawn according to :

 

Remark 1 : in the current pre-version, the specular component of both materials and lights are not taken into account by the lighting engine.

Remark 2 : in the current pre-version, the normals at each vertex are calculated per triangle (and not globally), thus the shading is ok inside the triangle, but the same vertex shared by another triangle will have a different normal, thus the shading will not be smooth across triangles.

Remark 3 : in the current pre-version, only the point light type is implemented. Directional and spot will follow.

Remark 4 : in the current pre-version, the range parameter of lights is not taken into account, thus the attenuation is computed whatever be the distance between a lamp and a vertex.

SKulpt offers two lighting models : the first is fast and inaccurate, considering there is only one light, which is located at the same place as the camera. This is for fast preview. The second is a complete lighting module conforming to a large part of the specifications of the Direct3D v7 lighting module. Light sources in Direct3D emit diffuse, ambient, and specular colors as distinct light components that factor into lighting computations independently of each other. SKulpt determines the distance between a light source and a vertex being lit by taking the magnitude of the vector that exists between the light's position and the vertex : D == ||VL||. D is the distance being calculated, V is the position of the vertex being lit, and L is the light source's position. If D is greater than the light's range property, no further attenuation calculations are made and no light effects from the light are applied to the vertex. If the distance is within the light's range, SKulpt then applies the following formula to calculate light attenuation over distance for point lights and spotlights (directional lights don't attenuate) : A = 1 / (attn0 + D x attn1 + Dē x attn2). In this attenuation formula, A is the calculated total attenuation and D is the distance from the light source to the vertex. The dvAttenuation0, dvAttenuation1, and dvAttenuation2 values are the light's constant, linear, and quadratic attenuation factors as specified by the properties of a light object. The system normalizes D to be within the range [0.0,1.0], where 0.0 indicates no light at the vertex, and 1.0 indicates full light intensity at the vertex. The constant, linear and quadratic attenuation factors act as coefficients in the formula-you can produce a wide variety of attenuation curves by making simple adjustments to them. You could set the constant attenuation factor to 1.0 to create a light that doesn't attenuate (but will still be limited by range), or you can experiment with different values to achieve various attenuation effects. The attenuation formula used by SKulpt computes an attenuation value that typically ranges from 1.0 at the light source to 0.0 at the maximum range of the light. The attenuation value is multiplied into the red, green and blue components of the light's color to scale the light's intensity as a factor of the distance light travels to a vertex. After computing the light attenuation, SKulpt should also consider spotlight effects (if applicable), the angle that the light reflects from a surface, as well as the reflectance of the current material to come up with the diffuse and specular components for that vertex.

In the current release, the complete lighting process is the following (will evolve to get more complete) :

step 1 : calculate the 3 vertex normals

step 2 : preset the RGB color values for the 3 vertices to the following sum : (material emissive + material ambient * ambient light) (for the Alpha component, only the Diffuse is taken into account, and it is the same for the 3 vertices)

step 3 : for each lamp, calculate its contribution to vertex lighting :

step 4 : calculate the vertex Gouraud shading weighting factors : cosine(vector(lamp-vertex), vertex normal)

step 5 : calculate the 3 lamp / vertex distances

step 6 : calculate the 3 attenuation factors

step 7 : calculate the non-attenuated lamp's RGB diffuse contributions (lamp * material)

step 8 : calculate the non-attenuated lamp's RGB ambient contributions (lamp * material)

step 9 : accumulate into the RGB color values for the 3 vertices the lamp's attenuated diffuse and ambient contributions

step 10 : top all calculated RGB's to 1 (so not to overflow the video RAMDAC)

Contents of the trace window

The trace window displays either informative messages, or error messages (if you ask for something impossible like creating a triangle with only 2 vertices, or if sKulpt encounters an internal error).

All these messages have a unique number, which you should mention when you report strange situations or bugs to the author.

The trace window is not refreshed when overdrawn, to save graphics memory. Thus if you really care for the traces, either look in the shell window in which you started sKulpt (which holds a copy of all traces), or set the window positions in such a way that the trace can hold what you are looking after. I suggest using a console manager like KingCon in the shell, so that you can review the traces in the review buffer. You can even copy/paste all traces since startup in your eMails when reporting something to me.

Window manipulation

Window manipulation conforms to the Amiga standards. Windows have front/back gadgets, a title / drag bar, a size gadget. To have more information on this topic, please browse your Workbench documentation.

Menu entries

To be written.

Window gadget commands

These icons enable you to :

 

 

Keyboard commands

Sample workshops

To be written.

To do

Tech notes regarding the Amiga version

Rendering without a 3D graphics board could be done (given the relative conceptual simplicity of Warp3D), but the fill rate would be so slow with a 68K that it would seriously hurt...

Here are the optimization schemes used in sKulpt on the Amiga to reach an acceptable (from my point of view) performance level :

This both faster (on calculation side) and slower (on Intuition and clipblitting side) behavior of the PPC version is well shown when you load a big scene and move the camera around it : you are almost not slowed by calculation, but by the overhead of going to 68K, as the camera moves at the same speed as when you don't have any object ! Kudos to the Jordan and Frieden team because when you run WipeOut in windowed mode, you face the same problems but it does not feel sluggish. Wow.

DownLoad

Mailing List

Author

I am a software engineer working in a subsidiary of a large and great French IT firm, Steria.

Over all, sKulpt is one of an Amiga-fond programmer's projects, which aims at maintaining me fluent with modern programming techniques and environments on the Classic Amiga, a machine I consider superior to others, due to the expandability of all its aspects and design concepts. Do you know a machine and its OS from the mid-eighties, which can run on the Web, with RTG, 3D graphics, 16-bit sounds etc. and still provide excitement to many of us ? Apart from the Classic Amiga, I don't see. Try expanding a Macintosh 512K, an Atari 1040ST or a PC/AT etc. to reach this level of functionality.

Fond, I am of the Amiga (I own and use a 500+, a 1000, various 2000 and 2 4000s), but also of the Apple //s (a //e, a IIc, a IIgs), a Mac SE/30 (brilliant integrated machine), a NextCube, an Atari 1040 ste, and a PC (plus various other less important 8 bit machines). Hours, many (thousands since the early 80's) I spent on these keyboards, diving in system software and writing application software and system tools. Smart Motorola CPU's tend to be the heart of smart machines...

Another Amiga project of mine is AmiVNC (available on Aminet), a VNC server for the Amiga, which should get a deep rework before the end of the year (involving porting from SAS/C to StormC).

Thanks

Legalese

I hope no one will find a copyright infringement in all this stuff, as its only purpose is have fun with open source software, experiment and share, and bring life back into an ancient model of the smart software without having ripped any single of its source line.

" The author of this software can not be pursued in any case ..."

" Use at your own risk ..."

" Make backups ... "

" Please if you propagate this software, do so using the original archives ..."

" Send me back your enhancement ideas and source code ..."

" Have fun ..."