• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

m4/H27-Oct-2003-312280

scripts/H03-May-2022-521396

src/H03-May-2022-34,91023,204

AUTHORSH A D13-Jul-2003168 117

BUGSH A D04-Sep-20031.6 KiB5130

COPYINGH A D13-Jul-200314.8 KiB281237

ChangeLogH A D22-Aug-200432.9 KiB858662

INSTALLH A D19-Nov-20032.1 KiB5035

Makefile.amH A D13-Jul-2003596 2822

Makefile.inH A D03-May-202218.3 KiB590500

NEWSH A D13-Jul-200339 91

READMEH A D01-Dec-20032.8 KiB6948

README.scriptingH A D20-Nov-20034.1 KiB8871

TODOH A D24-Dec-200319.1 KiB431382

aclocal.m4H A D22-Aug-200460 KiB1,5981,377

autoeverything.shH A D13-Jul-200343 54

config.guessH A D13-Jul-200328.9 KiB1,035908

config.h.inH A D13-Jul-2003508 2013

config.subH A D13-Jul-200320 KiB994885

configureH A D22-Aug-2004168.4 KiB5,5334,482

configure.acH A D24-Dec-20037.1 KiB263217

depcompH A D13-Jul-200313 KiB465298

install-shH A D13-Jul-20035.5 KiB251152

kludge3d.desktopH A D13-Jul-2003138 87

kludge3d.spec.inH A D13-Jul-20031.7 KiB7660

missingH A D13-Jul-200310 KiB337263

mkinstalldirsH A D13-Jul-2003725 4123

oldTODOH A D21-Jul-20039.2 KiB217185

regenMakefiles.shH A D11-Nov-200347 32

stamp-hH A D13-Jul-200310 21

stamp-h.inH A D13-Jul-200310 21

README

1
2Kludge3d - 3d modeler released by Andrew Sampson (ads4260@rit.edu)
3
4homepage: kludge3d.sourceforge.net
5
6Kludge3d is a simple 3d polygonal modeler, based on code harvested from
7several other (presumably abandoned) projects.  Kludge3d is released under
8the GPL, and requires GTK2 and gtkglext to work.
9
10What it does:
11
12- loads and saves 3d models in several formats, including AC3d, Wavefront,
13  3ds (load only), Quake2 MD2 (load only), and Quake2 .map (save only).
14
15- creates vertices and polygons.  No NURBS, splines, etc.
16
17- organizes polygon meshes into a tree heirarchy
18
19- applies textures to the meshes.
20
21Kludge3d, as the name implies, is a kludge.  An ugly hack.  It will never
22be the next 3d Studio MAX, or even the next Milkshape.  I set out to fashion
23a usable GPL'ed level modeler, similar to AC3d, for creating game levels.
24Rather than re-invent the wheel, I based my efforts on several existing
25editors, and kludge3d is the result.  I hope you will find it useful.
26
27Compilation instructions can be found in the INSTALL file.
28The INSTALL file also has info on the ~/.kludge3d directory.
29Usage instructions can be found on the kludge3d web page.
30
31A NOTE FOR THOSE USING 3dfx CARDS:
32If, like me, you're using a 3dfx card (such as the voodoo3, 4, or 5), then
33you might run into problems using kludge3d.  Apparently, the DRI drivers for
34the 3dfx cards suck, and won't allow a single application to open more than
35one OpenGL surface at a time.  Multiple OpenGL applications can run
36simultaneously, but a single application can open only one OpenGL window.  The
37problem manifests itself as tootie-fruitie rainbow colors on all of the model
38geometry, rather than the expected colors.  You can "fix" the problem by
39falling back on software mode; run the following shell commands
40(bash-specific, csh users are on their own) to do so:
41	export LIBGL_ALWAYS_INDIRECT=1
42	kludge3d
43
44
45Creds:
46
47In writing kludge3d, I took code from the following projects:
48
49   - G3D by Blake Hegerle
50        http://condor.stcloudstate.edu/~hebl9901/g3d
51        laertes@stab.gemma.com
52   - ME3D by Sam Revitch
53        http://www.cs.washington.edu/homes/samr7/me3d
54        samr7@cs.washington.edu
55   - Orbit (space sim), which, in turn, took the code from ac_to_gl
56
57Most of the interface was taken from G3D.  The opengl-preview was taken
58from ME3D.  ME3D also provided the file-format-framework, and the Wavefront
59loader.  Orbit provided much of the AC3D loading code.
60
61Very little of either G3D or ME3D remain in the current version of kludge3d.
62Most of the code has been rewritten at some point or another.  The vast
63majority of the new code was written by Andrew Sampson, with some important
64contributions from David Pinson (including the ground work for the Python
65scripting interface, and much of the GTK2 porting work).
66
67
68
69

README.scripting

1Using kludge3d's scripting features
2===================================
3
4Introduction
5------------
6In my opinion, the Python scripting capability of kludge3d is easily the most
7interesting feature to be added in recent memory.  At the moment, the kludge3d
8functions that can be accessed through scripts (the "scripting interface" or
9"scripting API") are limited, as compared to other 3d modelers with Python
10scripting (ex. Blender).  However, there is enough to create some interesting
11tools.
12
13Before going any further, let it be known that I assume that the reader is at
14least a little familiar with Python.  If you are not, I suggest that you visit
15the Python web site (www.python.org) and check out some of the tutorials.
16Python is an easy language to learn.
17
18The functions in kludge3d's scripting API are listed in the file
19'src/pywrapper_wrap.doc'.  You can also check out the 'src/pywrapper.c' file
20for more info.
21
22Running Python code
23-------------------
24Running Python code in kludge3d is easy.  Once kludge3d is running, you can
25type Python code into the text box at the bottom of the "Groups" notebook tab.
26You can treat this the same as you would the command-line Python interpreter,
27with the following exceptions:
28	- Don't call any functions which expect input from stdin.  You won't be
29	  able to send any input to them.
30	- The command-line Python interpreter will print out the return value of
31	  any statement you execute directly.  Kludge3d won't do that; you need to
32	  use the 'print' keyword. (See the next item, also.)
33	- You won't see the text output.  This is where kludge3d's log window
34	  becomes handy.
35
36About the log window
37--------------------
38Were it not for the log window, all of the text output generated by kludge3d
39(including output from Python scripts) would be sent to the console.  If you
40use your window manager to start kludge3d (rather than a command line), you
41would never see such output.  To remedy this, the log window intercepts and
42stores all of the text output by kludge3d.
43
44There is a second Python text box at the bottom of the log window, for your
45convenience.  You can use either one; they both do the same thing.
46
47Writing re-usable tools
48-----------------------
49Using the Python text box, you can experiment with the scripting API.  However,
50once you are ready to create a re-usable script, you will want to create a
51script file to store it in.  See the README file for info on where to put your
52script files.  Briefly, they should go in ~/.kludge3d, and you should put an
53"import" entry in ~/.kludge3d/base.py for each of your modules.
54
55Once you've done this, you can call your script by entering:
56
57modulename.functionname( )
58
59...in the Python text box, where modulename is the name of the file that you
60stored your functions in, and functionname is the name of the function you want
61to call.  Any arguments to your function go between the parenthesis, and are
62separated by commas.  You can avoid all this typing (and can avoid having to
63remember the arguments to your functions) by adding your functions to the
64script-shortcut buttons in kludge3d's "Tools" notebook tab.
65
66About the shortcut buttons in the "Tools" notebook tab
67------------------------------------------------------
68If you would like to create shortcut buttons for your scripts, you need to
69add the following line to the end of your script file:
70
71register_function( __name__, functionname )
72
73You would obviously substitute your function's name for functionname.  You
74need to call register_function once for each function you want to appear in
75the Tools tab.
76
77The next time you run kludge3d, a button with your function's name will appear
78under the "Scripts" rollup in the "Tools" notebook tab.  If you click on the
79button, a dialog will pop up showing the function's name, the "doc string"
80for the function, and a prompt for each of the function's arguments.
81
82Take a look at the example scripts
83----------------------------------
84If you're uncertain about where to start, take a look at the scripts I've
85written.  They can be found in the 'scripts' directory.  The 'prefabs.py' file
86is a good place to start.
87
88