home *** CD-ROM | disk | FTP | other *** search
/ PC/CD FUN 24 / cdimage.iso / dos / POV / MORAY2 / UTILS / POV2MDL.TXT < prev    next >
Encoding:
Text File  |  1995-12-28  |  10.3 KB  |  283 lines

  1.                                                         11/19/95
  2.  
  3.  
  4.                               P O V 2 M D L 
  5.  
  6.                                Version 1.0  
  7.  
  8.                     POV-Ray 2.x to MORAY 2.x Converter
  9.  
  10.                              by Thomas Baier
  11.  
  12.  
  13.  
  14.  
  15.  
  16.        Version 1.0 and later of POV2MDL are Shareware. Note that this 
  17.        program is fully functional.
  18.  
  19.  
  20.  
  21.                             What does POV2MDL do?
  22.  
  23.        POV2MDL converts scene files from POV-Ray's POV to MORAY's MDL format.
  24.  
  25.  
  26.                                Introduction
  27.  
  28.        POV-Ray certainly belongs to the best raytracers and is freely
  29.        available. The voluminous script language makes the realization of
  30.        complex scenes with high image quality possible. Soon after the
  31.        release of POV-Ray there were modellers available which supported
  32.        graphical design of scenes. Certainly one of the first modeler
  33.        is MORAY. For a lot of people it is one of the best POV-Ray modelers.
  34.        Soon there was a request for a converter from POV-Ray to MORAY which
  35.        would allow importing older, manually designed scenes.
  36.        This is where the idea of POV2MDL was born. The program reads a 
  37.        POV-Ray scene file and converts it to the MDL format of MORAY. 
  38.  
  39.  
  40.                              What do you need?
  41.  
  42.        minimum 386 Compatible PC
  43.        DOS 3.3 or higher
  44.        Windows 3.x or higher (Dos-Box)
  45.        OS/2 2.x or higher    (Dos-Box)
  46.  
  47.        POV-Ray V2.0/2.2    (optional)
  48.        MORAY V2.0 or higher
  49.  
  50.        Copy the shipped files to a directory of your choice. Make sure
  51.        that the program DOS4GW.EXE is available via the PATH variable.
  52.        The DOS Extender is needed by POV2MDL and MORAY. Please use
  53.        version 1.97 or higher.
  54.  
  55.  
  56.                         Files produced by POV2MDL
  57.  
  58.        POV2MDL generates a MDL file, which can be read by MORAY V2.x.
  59.        Additionally a LOG file will be generated which contains warnings
  60.        that might be issued during conversion.
  61.  
  62.  
  63.                              Running POV2MDL
  64.  
  65.        POV2MDL expects a filename as parameter in the commandline. The
  66.        file should be a POV-Ray scene file in ASCII format.
  67.  
  68.        e.g.
  69.  
  70.               POV2MDL colors.pov
  71.  
  72.  
  73.        After successfully reading the POV file, the MDL file will have 
  74.        been generated in the same directory (e.g. colors.mdl). Syntax 
  75.        errors in the POV file abort the conversion. Additionally a LOG 
  76.        file (e.g. colors.log) may exist which contains possibly issued 
  77.        warnings.
  78.  
  79.  
  80.                           POV-Ray Search paths
  81.  
  82.        The environment variable "POV_INC" contains additional searchpaths
  83.        for include files. 
  84.  
  85.               set pov_inc=c:\povray;d:\MORAY\scenes
  86.  
  87.        If an include file is not found during parsing, the conversion will 
  88.        still be continued, but any declarations in the include file will 
  89.        not be available. If these are referenced in a POV file, this will
  90.        lead to a failure.
  91.  
  92.  
  93.                             What is supported
  94.  
  95.        The following POV-Ray objects are supported:
  96.          Box            Sphere         Cone           Cylinder
  97.          Light_source   CSG            Heightfield    Bicubic_Patch
  98.          Torus          Plane          Disc           Object
  99.          Blob           Texture        Camera
  100.  
  101.        Bounding and clipping is not supported.
  102.  
  103.        The parser supports only POV-Ray 2.x syntax. POV-Ray 1.0 syntax is
  104.        not supported. The exact syntax is described in POVRAY.DOC.
  105.  
  106.        The keyword "version" is totally ignored.
  107.  
  108.        All other objects and features of POV-Ray are ignored.
  109.  
  110.        If there is an object that is not convertable by POV2MDL, a short
  111.        message will be written to the LOG file.
  112.  
  113.  
  114.                                 Converting
  115.  
  116.        The transformations are a special topic during conversion. The
  117.        syntax of POV-Ray accepts transformations (scale, rotate and
  118.        translate) at several locations and in several orders. MORAY on
  119.        the other hand accepts object and texture transformations only
  120.        in a strict order (scale, rotate and then translate). This leads 
  121.        to some strangs effects after conversion.
  122.  
  123.        The surprise appears if a scale <a,b,c> follows a rotation. The
  124.        conversion to the sequence scale, rotate, translate can not be
  125.        made complete. The result in MORAY will not be what you expected.
  126.        An additional shear vector would be helpful but is not yet
  127.        implemented in POV-Ray or MORAY. If POV2MDL recognizes such a
  128.        construction the message "Warning: Inaccurate Matrix Operation
  129.        (Shear Vector) in Object xxx !" will be written to the LOG file.
  130.        The problem does not appear when the scaling vector is of the
  131.        form <a,a,a> (equal to 'scale a').
  132.  
  133.  
  134.                                 Some hints
  135.  
  136.        If you have problems converting a scene, try to render the scene with
  137.        POV-Ray. If POV-Ray has problems, the chances that POV2MDL will have 
  138.        problems, too. Conversely, if POV-Ray can render the file, POV2MDL will
  139.        probably be able to read it, too. If not, I would appreciate hearing
  140.        from you with a sample POV script showing the error. See the end of 
  141.        this file for ways to reach me.
  142.  
  143.        If you have problems with memory try this:
  144.  
  145.        put these 10 lines in to a file named NEW4G.VMC ...
  146.  
  147.         !.VMC file DOS4GW.EXE
  148.         !This file shows the parameter values.
  149.         minmem = 1024           At least 1024K bytes of RAM is required.
  150.         maxmem = 8192           Uses no more than 8MB of phys. RAM
  151.         !virtualsize = 32768     Swap file plus allocated memory is 32MB
  152.         virtualsize = 16384      Swap file plus allocated memory is 16MB
  153.         !To delete the swap file automatically when the program exits, add
  154.         deleteswap
  155.         !To store the swap file in a directory called SWAPFILE, add
  156.         !swapname = c:\swapfile\dos4gvm.swp
  157.  
  158.        and on the DOS command-line enter this:
  159.  
  160.        set dos4gvm=@new4g.vmc   [RETURN]
  161.  
  162.        This is from the DOS4GW - documentation and will increase the
  163.        virtual memory for DOS4GW.
  164.  
  165.  
  166.  
  167.                                For Techies
  168.  
  169.        POV2MDL is written entirely in C++. The parser was developed with
  170.        Lex&Yacc, a class library manages all POV-Ray objects. The parser
  171.        engine is absolutely independent from any MORAY modules and could
  172.        be used for a wide variety of tasks.
  173.        For example the POV-Ray syntax could be easily enlarged by some
  174.        elements for animation. Nevertheless the output can be pure
  175.        POV-Ray code.
  176.  
  177.        Every converter from POV-Ray to XXX is conceivable ..., but makes
  178.        no sense, because I am not aware of other modelers or raytracers
  179.        that follow the rules and have the features POV-Ray has (except
  180.        POLYRAY).
  181.  
  182.        All known modelers for POV-Ray are very strict in using
  183.        transformations. The work for a converter is very hard, and I am
  184.        not sure it is worth it. The converter could not support all
  185.        features of POV-Ray.
  186.  
  187.  
  188.                                 Thanks to
  189.  
  190.        Bernhard Baier
  191.        Lutz Kretzschmar         (MORAY)
  192.        Erkki Sondergaard        (POV-Team)
  193.        Lex van der Sluijs       (GUM)
  194.        Andreas Lagotzki         (RR)
  195.  
  196.                                    The future
  197.  
  198.        Further I have a POV-Ray to RAW converter in mind. First ideas are
  199.        in my drawer.
  200.  
  201.  
  202.                      If you find a strange situation
  203.  
  204.        If you have a scenery or object that is not convertable in the
  205.        right way, or you find a bug or some strange behaviour, please
  206.        send me a letter or e-mail with the scene file and an error
  207.        description.
  208.  
  209.        Thanks.
  210.  
  211.  
  212.                               Use of POV2MDL
  213.  
  214.        You are welcome to make copies of this program and pass them on
  215.        to friends or post this program on bulletin boards or distribute
  216.        it via disk catalog services provided the entire distribution is
  217.        included in its original, unmodified form. A distribution fee may
  218.        be charged for the cost of the diskette, shipping and handling.
  219.        However, POV2MDL may not be sold, or incorporated in another
  220.        product that is sold, without the permission of Thomas Baier.
  221.  
  222.        You are welcome to contact the author:
  223.  
  224.                                Thomas Baier
  225.                               Ammerseestr. 9
  226.                              85551 Kirchheim
  227.                                  Germany
  228.                         Internet: thbaier@ibm.net
  229.                   Compuserve: 100527,3011 or GO GRAPHDEV
  230.  
  231.  
  232.        Both the POV2MDL program and documentation are Copyright (c) 1995
  233.        by Thomas Baier. You are not authorized to modify the program.
  234.        "POV2MDL" is a trademark.
  235.  
  236.  
  237.                                Registration
  238.  
  239.        If you enjoy this program, use it frequently, and can afford to
  240.        pay a registration fee, then send $15 to my address above. 
  241.        Please include your name and mailing address. 
  242.        With this contribution you help me improve POV2MDL. With registration 
  243.        you can expect a prompt response on questions or bugs. Thanks. 
  244.  
  245.                                 Disclaimer
  246.  
  247.        POV2MDL is provided "as is" without warranty of any kind, either
  248.        expressed or implied. This program may contain "bugs" and
  249.        inaccuracies, and its results should not be assumed to be correct
  250.        unless they are verified by independent means. The author assumes
  251.        no responsibility for the use of POV2MDL and will not be
  252.        responsible for any damage resulting from its use.
  253.  
  254.  
  255.                                 Trademarks
  256.  
  257.        OS/2 is a trademark of IBM
  258.        Windows is a trademark of Microsoft
  259.        DOS is a trademark of Microsoft
  260.        POV-Ray is a trademark of the POV-Team
  261.        MORAY is a trademark of SoftTronics, Lutz + Kretzschmar
  262.  
  263.  
  264.                                  History
  265.  
  266.  
  267.        Version 0.5
  268.        - syntax error with declared color_maps fixed
  269.  
  270.        Version 0.4
  271.        - some bugs fixed
  272.        - blobs added
  273.        - camera
  274.  
  275.        Version 0.3
  276.        - some bugs fixed
  277.        - bug in CSG - transformations fixed
  278.        - very old (!) bug in heightfield fixed
  279.  
  280.        Version 0.2
  281.        - first Beta
  282.  
  283.