home *** CD-ROM | disk | FTP | other *** search
- Ken Van Camp 9/21/90 MOLECULE.DOC
-
- This is a rather complex example of how to use PREPROC in an
- object-oriented approach to create an intricate model for SURFMODL.
- You will need about 470KB of free disk space to create this model,
- although when you are done you can throw away all but about 160KB
- of that. There are two ways to construct the model from scratch.
- The easy way is to use the MKAPPLE.BAT file by typing:
- MKAPPLE
- from the main SURFMODL directory. If you have Borland's MAKE utility
- and you want to get fancy, copy the provided MAKEFILE into this directory
- and type:
- MAKE
- They both take just as long to run, but the advantage to the makefile
- approach is that it uses a dependency list to automatically recreate
- files as they are needed. This is only an issue if you want to play
- around with the model to change parameters.
-
- When you are done, you can throw away all the output files except
- the one called APPLE.SRF. You can now view APPLE.SRF with SURFMODL, in the
- usual way.
-
- If you would like to make a movie for use with the PLAYBACK utility,
- you will find several .INI files provided: APPLE1.INI, APPLE2.INI,
- etc. These files are all the same, except that they have slightly
- varying view points. The MKMOVIE.BAT file uses these .INI files
- to create several views so you can save the screens to disk.
- To run it, type:
- MKMOVIE
- As each new image is displayed on the screen, it is automatically
- saved to disk and then the next image is created. When you are done,
- you can play it all back by typing:
- PLAYBACK APPLE.PLY
- and be impressed with the movie!
-
- NOTE: This is a big model, so be prepared to wait a few minutes for
- some of these steps. (On a VGA system in 256-color mode, the entire
- process may take more than an hour on some systems!) Also, you will
- need versions of both SURFMODL and PREPROC that have been compiled with
- the BIGMEM option to allow many nodes and surfaces. (This is now the
- default that I ship as standard on the installation disks, so this is
- probably what you have.) Finally, please note that PLAYBACK has to have
- enough free memory to read ALL the images into RAM before it will start the
- animation. This is especially a problem if you are using one of
- the high-resolution VGA modes, which can require more than 64KB for
- a single image! If PLAYBACK reports that you do not have enough
- memory for the animation, you have a few options:
-
- 1. Remove any large memory-resident (TSR) programs that you may
- have loaded.
-
- 2. If you have extended memory in your system, you may want to
- install the HIMEM.SYS extended memory manager (provided with the
- SURFMODL distribution disks), or a compatible memory manager like
- QEMM or 386-Max. This allows PLAYBACK to store images in extended
- memory. Unfortunately, PLAYBACK animations are somewhat slower when
- using extended memory, due to the extra memory moving involved.
- Therefore, you will not see the smooth animations that are possible
- when only using standard RAM. Also, please note the possible bug
- in PLAYBACK when using extended memory, as documented in 300NOTES.TXT.
-
- 3. Edit the APPLE.PLY file so there are not so many images in the
- animation. This will cut down on RAM usage, since RAM usage is
- proportional to the number of images.
-
- 4. You can re-run SURFINST and select a lower-resolution graphics
- mode, or one with fewer colors. If you have a VGA, you may want
- to use one of the EGA modes or (gasp!) even a CGA mode. Of course,
- the pictures will not look as sharp but at least you can see the
- animation.
-
- One last note. Of all of the above fixes, only #4 requires you to
- re-run MKMOVIE.BAT. If you do re-run it, keep in mind that a whole
- new set of picture files will be created; it will not overwrite the
- old ones. That is, the first time you ran it you created APPLE.1,
- APPLE.2, and so on up to APPLE.9. If you do not delete these files,
- and run MKMOVIE.BAT again, you will now create new files called
- APPLE.10, APPLE.11, and so on. Not only will you be wasting disk
- space, but you will never even see the results of re-running MKMOVIE!
- That is because the names APPLE.1, APPLE.2, etc. are specifically
- used in the APPLE.PLY file. So make sure you delete all nine of the
- old files before re-running MKMOVIE.BAT.
-
- Hope you find this adventure enjoyable!
-
- ..KVC
-