readme 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. **AnKi 3D Engine**
  2. Copyright (C) 2009, 2010 Panagiotis Christopoulos-Charitos
  3. http://www.ancient-ritual.com
  4. [email protected]
  5. .. contents:: Table of Contents
  6. ========
  7. Building
  8. ========
  9. AnKi build system is very Linux specific (GNU make only) at the moment. It
  10. also requires a few extra development libraries. You can also find a custom
  11. build system that generates GNU makefiles.
  12. Required libraries
  13. ------------------
  14. AnKi requires a few up to date versions of some libraries. The libraries are:
  15. - Bullet Physics
  16. - SDL ver 1.3
  17. - GLEW
  18. So before generating makefiles or building AnKi you have to download from their
  19. repositories and build the above libraries. Instructions follow. You can
  20. alternately use the script download-and-build-externals.sh
  21. Bullet Physics Library
  22. ~~~~~~~~~~~~~~~~~~~~~~
  23. From now on the AnKi requires the Bullet physics library. You need CMake and
  24. SVN installed.
  25. #) $ Go to the root AnKi path (where src, shaders and blenderscripts are)
  26. #) $ cd ..
  27. #) $ svn checkout http://bullet.googlecode.com/svn/trunk/ bullet_svn
  28. #) $ cd bullet_svn
  29. #) $ cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release
  30. #) $ make
  31. SDL ver 1.3
  32. ~~~~~~~~~~~
  33. We need SDL ver 1.3 for creating OpenGL 3.x context. You need to have the
  34. Mercurial and autoconf installed.
  35. #) $ Go to the root AnKi path (where src, shaders and blenderscripts are)
  36. #) $ cd ..
  37. #) $ hg clone http://hg.libsdl.org/SDL SDL-hg
  38. #) $ cd SDL-hg
  39. #) $ ./autogen.sh
  40. #) $ ./configure
  41. #) $ make
  42. GLEW
  43. ~~~~
  44. The latest GLEW provides us with OpenGL 3 and 4 extensions. Needs SVN and a
  45. Unix environment (for step 5).
  46. #) $ Go to the root AnKi path (where src, shaders and blenderscripts are)
  47. #) $ cd ..
  48. #) $ svn co https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew glew
  49. #) $ cd glew
  50. #) $ make extensions
  51. #) $ make
  52. Generating makefiles and building AnKi
  53. --------------------------------------
  54. There are 4 build targets in this folder. There is also a build system that
  55. generates GNU makefiles (it requires Python 3 installed). If you want to
  56. generate the makefile for the debug target (for example) do the following:
  57. #) $ cd <path to anki>/build/debug
  58. #) $ ../genmakefile.py
  59. #) $ make
  60. And the build process will begin.
  61. The gen.cfg.py files contain the build options of every target. Their format
  62. is pretty straightforward and minimal.
  63. **WARNING**: Sometimes I forget to update all the targets. The debug is always
  64. updated though.
  65. ======
  66. Assets
  67. ======
  68. Currently there are no assets (models, textures, materials etc) so even if you
  69. build it, the application will fail to run.
  70. ===================
  71. System requirements
  72. ===================
  73. The engine requires:
  74. - GPU with shader model 4
  75. - Linux OS
  76. - Proprietary GPU drivers
  77. Development rig: Ubuntu 9.10, AMD Radeon 4870 w/ Catalyst 10.6. So it should be
  78. working on similar systems.
  79. =========================================
  80. Generating source documentation (doxygen)
  81. =========================================
  82. The AnKi source code utilises doxygen style comments. For that you need doxygen
  83. (http://www.doxygen.org/). To generate the html documentation from a terminal
  84. do:
  85. #) $ cd docs
  86. #) $ doxygen doxyfile
  87. Then open doxygen.html to see it.
  88. ============
  89. Coding style
  90. ============
  91. Some things to remember while coding AnKi.
  92. Classes
  93. -------
  94. class
  95. {
  96. friends
  97. pre-nested (if necessary)
  98. nested
  99. properties
  100. public
  101. protected
  102. private
  103. }
  104. Material shader program naming
  105. ------------------------------
  106. dnspgke:
  107. - diffuse mapping
  108. - normal mapping
  109. - specular mapping
  110. - parallax mapping
  111. - grass like
  112. - hardware skinning
  113. - environment mapping
  114. Naming shortcuts
  115. ----------------
  116. This list contains some of the naming shortcuts we use in AnKi:
  117. - Array : arr
  118. - Animation : anim
  119. - Application : app
  120. - Buffer : buff
  121. - Camera : cam
  122. - Color : col
  123. - Controller : ctrl
  124. - Feature : feat
  125. - Fragment : frag
  126. - Framebuffer Attachable Image : fai
  127. - Geometry : geom
  128. - Location : loc
  129. - Material : mtl
  130. - Matrix : mat
  131. - Number : num
  132. - Physics : phy
  133. - Property : prop
  134. - Quadrilateral : quad
  135. - Quaternion : quat
  136. - Resource : rsrc
  137. - Rotation : rot
  138. - Shader : shdr
  139. - Shader Program : shaderProg or sProg
  140. - Skeletal Animation : sAnim
  141. - Skeleton : skel
  142. - Text : txt
  143. - Texture : tex
  144. - Transformation : trf
  145. - Translation : tsl
  146. - Triangle : tri
  147. - Utility : util
  148. - Variable : var
  149. - Vector : vec
  150. - Vertex : vert
  151. Controllers
  152. -----------
  153. The controllers are part of the scene node objects. They control the node's
  154. behaviour.
  155. They have an input (script, animation, etc) and they control a scene node. The
  156. naming convention of the controllers is:
  157. <what the controller controls><the input of the contoller>Ctrl
  158. For Example:
  159. MeshSkelNodeCtrl A Mesh is controlled by a SkelNode
  160. Submitting patches
  161. ------------------
  162. If you want to update/patch a file (for example Main.cpp) do:
  163. - Make the changes on that file
  164. - Save the differences in a file using "svn diff Main.cpp > /tmp/diff"
  165. - E-mail the "diff" file with subject "[PATCH] Main.cpp updates"
  166. =========
  167. ToDo list
  168. =========
  169. - Continue working on the new coding style in shaders
  170. - Changes in the blending objects problem. The BS will become one stage and the
  171. PPS will be divided in two steps. The first will apply the SSAO and the EdgeAA
  172. in the IS_FAI and the second will do the rest
  173. - The second Physics demo: Create a box that is geting moved by the user. It has
  174. to interact with the other boxes
  175. - Set the gravity of a certain body to a lower value and see how it behaves
  176. - In the Ragdoll bullet demo try to change the distances of the bodies
  177. - Ask in the bullet forum:
  178. - How to make floating particles like smoke. But first try with one body and
  179. manualy setting the gravity
  180. - What the btCollisionObject::setActivationState takes as parameter?
  181. disable the test
  182. - Re-enable the stencil tex in Ms.cpp and replace all the stencil buffers with
  183. that (Smo, Bs) to save memory
  184. - See if the restrictions in FBOs (all FAIs same size) still apply