home *** CD-ROM | disk | FTP | other *** search
/ Dream 55 / Amiga_Dream_55.iso / RISCOS / MAGAZINE / NEWS / 3DENGI.ZIP / 3DEngine / !ReadMe next >
Text File  |  1998-08-13  |  7KB  |  178 lines

  1.                             PlotLib/ModelLib
  2. Release 0.03                ----------------
  3.  
  4. Wassit all about then?
  5. ~~~~~~~~~~~~~~~~~~~~~~
  6.  
  7. For a long time, I have wanted to see a freely available 3D engine for
  8. RISC OS, to allow people (myself included) to have something to use as
  9. a basis for 3D work.
  10.  
  11. Interested developers, prepared to sign the stringent license form,
  12. have been able to sign up to get a copy of the TAG3 library and specs,
  13. but this is a process with enough hurdles to overcome (getting the
  14. form, agreeing to the terms, getting accepted by TBA, sorting out the
  15. release of anything you produces) that it acts as a discouragement for
  16. many.
  17.  
  18. Then, Martin Piper, the author of the TAG3 engine, released a simple
  19. demonstration engine on to the net to encourage people to play. When
  20. prompted he gave the following statement about its copyright status:
  21.  
  22. > OK, I declare this code as freely available to anyone who wants to
  23. > use it. There is no fee for using this code, or parts or sections,
  24. > in your own programs. The copyright for this specific released
  25. > source code found on TBA's website is entirely in the public domain
  26. > and the original author, ie me!, decalares he waives all copyright
  27. > for the aforementioned release of source code.
  28. >
  29. >
  30. > Important! All other released work from TBA is not in the public
  31. > domain and copyright still rests with the originating
  32. > author(s)/company and the above statement does not effect in anyway
  33. > existing license conditions for previous or future software
  34. > releases.
  35. >
  36. > I only ask that if anyone improves the code and they think it would
  37. > be useful for other people to see the changes then they should
  38. > attempt to keep some sort of log of changes. Also email the new code
  39. > back to myself so I can keep a database of changes and maintain it
  40. > in some sort of tidy state. ;-)
  41.  
  42. This proves that he is a nice chap :-)
  43.  
  44. I have taken the code and played with it for a bit, with the results
  45. that:
  46.  
  47. 1) The central cores of the polygon plotting loops are in ARM code.
  48.  
  49. 2) The ploygon routines now (optionally) clip to the edge of the
  50. screen.
  51.  
  52. 3) Plotters have been implemented for 8 and 16 bit modes as well as
  53. the original 24 bit modes.
  54.  
  55. 4) WIN32 support has been removed (I wasn't prepared to invest the
  56. time to keep it up to date).
  57.  
  58. 5) The original (bugged) Gouraud shading code has been fixed,
  59. optimised and ARMcoded. It now uses the same intensity of lighting
  60. for R,G and B; so no coloured lights - sorry. If there is a demand I
  61. can add this back again, but that costs lots of registers, and there
  62. are none spare so it would slow it all down.
  63.  
  64. 6) Many more plotters have been added: You can now choose between
  65. Untextured/Textured/Textures-with-transparent-bits plotters with or
  66. without Gouraud shading and alpha levels.
  67.  
  68. 7) By changing the #define MAX_VERTICES_ON_FACE in PlotLib:PlotLib.h
  69. you can now compile in support for quad (or more) plotters rather than
  70. just triangles. In theory any convex polygons can be plotted. ModelLib
  71. is limited in its support of this - it only copes with 3 or 4 vertexed
  72. polygons.
  73.  
  74. 8) The code has been structured into several different sections;
  75. first, a central plotting library (imaginatively named PlotLib) that
  76. contains the plotting routines- People just needing a polygon
  77. plotter can use this. Second, there is a library (even more
  78. imaginatively called ModelLib) that handles models- people wanting to
  79. load and display 3D models can use this. Finally there is the
  80. rest of Martins' example application, now restructured to show the use
  81. of these libraries.
  82.  
  83.  
  84. Building it
  85. ~~~~~~~~~~~
  86.  
  87. Unpack it.
  88.  
  89. Run !ModelLib to set the paths and open the filer window. Run AMU on
  90. the Makefile, don't use !Make or you deserve all you get, and much
  91. worse too.
  92.  
  93. Run !PlotLib to set the paths and open the filer window. Run AMU on
  94. the Makefile.
  95.  
  96. Run AMU on the top level makefile.
  97.  
  98. The code has been tested under Norcroft Cv5 and Objasm only, but it
  99. will probably work under the free equivalents. I don't have the time
  100. to test it under different schemes - sorry.
  101.  
  102. If you have Dr Smiths C Development Toolkit then a HierProf build
  103. of the example application can be generated to show where its spending
  104. its time. A MemCheck build is now also available so you can see how
  105. marvellously bug free it all is. Oh yes.
  106.  
  107.  
  108. Copyright
  109. ~~~~~~~~~
  110.  
  111. Given that Martin has given up his rights to the code, it would be
  112. poor form for me to do anything else, so the distribution rights for
  113. this software are as follows:
  114.  
  115. 1) The code/documentation/libraries etc may be copied freely and no
  116. charge (other than reasonable media/copying costs) may be charged for
  117. it.
  118.  
  119. 2) A copy of this file must be kept with the code. If you change the
  120. code, then by all means add your own top level ReadMe, but do either
  121. include this original file or at least include a pointer to where
  122. people can get it.
  123.  
  124. 3) If you use these libraries in a program of your own, no royalty or
  125. license is payable to anyone.
  126.  
  127. 4) No warranty is given. If the code works, count yourself lucky. If
  128. it doesn't its your fault.
  129.  
  130. 5) This is NOT a TBA software or a Warm Silence Software Ltd product.
  131. While I will certainly try to help people as much as my
  132. time/commitments/inclination allows, no support is guaranteed.
  133.  
  134. The following points can't be legislated, but it would nice if:
  135.  
  136. 1) If you make changes to the engine that might be useful to other
  137. people, please share them; sending them back to me is a good idea.
  138.  
  139. 2) If you write anything interesting using these libraries (God
  140. forbid a game!) then offering us a free copy might be considered
  141. polite!
  142.  
  143. 3) Most importantly, let us know what you think of it all...
  144.  
  145. Happy Hacking...
  146.  
  147. Robin Watts <Robin.Watts@wss.co.uk>
  148. ---------------------------------------------------------------------
  149. Thanks to:
  150.  
  151.  * Martin Piper for releasing the code originally.
  152.  * Matt Bloch for testing it out, being enthusiastic and generally
  153.      being a good person to bounce ideas off.
  154. ---------------------------------------------------------------------
  155.  
  156. Release Log:
  157.  
  158. 0.01:    Martins release
  159.  
  160. 0.02:    First release as PlotLib/ModelLib
  161.  
  162. 0.03:    Gouraud shading of textured polygons reintroduced
  163.  
  164. 0.04:    Gouraud shading of flat polygons introduced. This should be
  165. a complete set. Phew.
  166.     Fixed division-by-zero bug in the plotters.
  167.  
  168. 0.05:    Fixed problems with lines getting negative.
  169.     Removed need for rowbytes.
  170.  
  171. 0.06:    Added Transparent texture support.
  172.     Fixed R<->G bug with Flat Gouraud plotting in 8 bit modes.
  173.     Fixed #defines causing unclipped versions to be compiled.
  174.     Added compile time support for changing the number of vertices
  175.         in a face; so quad plotters are now available.
  176.  
  177. 0.06b    Tiny tweaks, and reincluded the precompiled demo app - Oops!
  178.