home *** CD-ROM | disk | FTP | other *** search
- Data file conversion from DKB 2.0 through 2.05 to DKB 2.11 guidelines:
-
- (If you are converting an earlier version data file than DKB 2.0, then see
- the file 12to20.doc for guidelines for bringing the file up to 2.0 status).
-
- There are a couple of differences in the input language format from 2.05 to
- DKB 2.11 so there are several MANDATORY conversions required. For what it's
- worth, the conversions are all backward compatible to prior versions of DKB,
- for the most part.
-
- 1. BasicShapes.Data - or BASICSHA.DAT or whatever the heck it was being
- called on whatever system it was being run on is now replaced by three
- separate files. The filenames short enough to be useable across all
- systems so the names of the files will remain consistent for everyone.
- To preserve maximum portability, try to keep these filenames in lower
- case.
-
- The Old Way:
-
- INCLUDE "BasicShapes.Data" - or -
- INCLUDE "BasicSha.Dat" - or -
- INCLUDE "BASICSHA.DAT" - you get the idea... -
-
- The NEW Way:
-
- INCLUDE "shapes.dat"
- INCLUDE "colors.dat"
- INCLUDE "textures.dat"
-
-
- 2. All object info except transformations (ROTATE, SCALE and TRANSLATE) and
- basic object COLOUR (when lower quality -q is used and TEXTURE's are being
- ignored) are now REQUIRED to be inside a TEXTURE-END_TEXTURE block. This
- concept is clearer, anyway. Now, the "usual" format for an object looks
- like this (replace comment lines with your own stuff, naturally...):
-
- OBJECT
- { The shape itself - QUADRIC, SPHERE, etc END_QUADRIC, _SPHERE, etc }
-
- { Transformations for Object Only - ROTATE, SCALE, TRANSLATE }
-
- { TEXTURE }
- { Transformations for Texture Only - ROTATE, SCALE, TRANSLATE }
- { Object Lighting Characteristics - AMBIENT, DIFFUSE, etc. }
- { END_TEXTURE }
-
- { TEXTURE }
- { Further Optional Layered Textures - "outside" previous one }
- { END_TEXTURE }
-
- { Transformations Shared by Object and Texture, ROTATE, SCALE, etc. }
-
- { Optional Basic Object Colour - if TEXTURE's are ignored at low -q. }
- END_OBJECT
-
-
- 3. LIGHT_SOURCE's "usual" format is slightly different, also. Replace the
- 'light_diameter' and 'where you want it' with your own values:
-
- OBJECT
- SPHERE <0.0 0.0 0.0> light_diameter END_SPHERE
- TRANSLATE <where you want it>
-
- LIGHT_SOURCE
- COLOUR White { This is the colour of the light emitted from lamp. }
-
- TEXTURE
- COLOUR White { This is the colour of the sphere object itself. }
- AMBIENT 1.0 { It only used if sphere is visible in the scene. }
- DIFFUSE 0.0
- END_TEXTURE
-
- END_OBJECT
-
-
- 4. All of the textures defined in textures.dat (formerly BasicShapes.Data)
- have had the scaling removed from them. It is up to the user including
- the texture to specify the scale desired. For some reason most of the
- textures in common use were scaled by <10 10 10>, so that means to convert
- an existing data file multiply any given scale factors by 10 or so. If
- in doubt, check the old BasicShapes.Data file to see if the texture used
- to use a SCALE statement of it's own. Mostly, Marble, Cloud_Sky and Wood
- textures will need this rescaling.
-
-
- 5. The definitions of the WOOD's in textures.dat (formerly BasicShapes.Data)
- have had the texture randomness removed from them. The same reason as #4
- above applies. Additionally texture randomness looks bad in animations
- because of it's truly random nature. It's allowable for static pictures,
- though. Anyway now it's up to you to specify it if you want to.
-
-
- 6. Prior to DKB 2.10, Alpha and Refraction were totally independent. Now
- they interact heavily. For a complete description of this change, see
- the DKB210.DOC file (there's a nice graph in there illustrating it).
- In short, to get REFRACTION of the light rays, you're going to need some
- ALPHA so they can get through the surface texture to be refracted. Of
- the part that ALPHA lets pass through, REFRACTION determines how much
- of that light gets bent passing through the object.
-
- 7. Rotation was totally backwards in versions prior to 2.11. This means
- that all ROTATE values given will need to be made negative to work as
- they did before. This does not apply to ROTATE values of 0 or 180, as
- a negative value is meaningless for either of these values. If the old
- data file said:
-
- ROTATE <0.0 -90.0 45.0>
-
- then it will now say:
-
- ROTATE <0.0 90.0 -45.0>
-
-
- That ends the necessary conversions. There are several other points that
- you will want to have uppermost in your mind when considering the data file
- conversions:
-
- 1. The files generated by various automatic utilities, such as SCULPT2DKB
- or DXF2DKB, etc. have a COLOUR statement that will modify the texture
- property from the usual "Dull", "Shiny" or whatever texture (because
- "COLOUR" now must be inside a TEXTURE block). This will cause the texture
- to be separately copied for each object that is using the predefined
- "Dull", etc. textures then modifying them by adding an object colour.
- Unfortunately, this makes a copy of the modified texture for each object
- with a different color satement, and uses up more memory. If you possibly
- can, try to anticipate the colours to be used and DEFINE them as textures
- to be commonly used by all objects of that same colour and texture. Not
- doing this may cause an inability to render the same complexity of objects
- as the program used to, because of the increased memory requirements of
- copying all those modified textures.
-
-
- 2. DKB 2.10 now supports automatic transformation of a texture along with an
- object. If the transformations given are after the TEXTURE - END_TEXTURE
- block, then this will occur. To suppress this, put the transformations
- first, before the TEXTURE block. Then the texture will not be transformed,
- a'la 2.05's way of doing things.
-
-
- 3. DKB 2.10 now supports layered textures. They are layered first on bottom
- to last on top. One or more TEXTURE-END_TEXTURE blocks following a
- TEXTURE block invokes this feature. Surface characteristics such as
- REFLECTION, PHONG, etc. only have effect on the outermost (last) defined
- TEXTURE-END_TEXTURE block. In order to see the texture(s) below, the
- outer texture(s) must have some component of ALPHA to them. See MANDATORY
- conversion item #2 above for the example format of an object using layered
- textures.
-