Permalink
Browse files

First openMaya release with first renderer appleseed.

The compiled plugins do not work at the moment, I will fix it asap.

Signed-off-by: haggi <git@haggi.de>
  • Loading branch information...
1 parent c628e54 commit 955e5195a8b0ea381088740e79a4fa8497a8b51f haggi committed Jul 22, 2012
Showing with 11,141 additions and 1 deletion.
  1. +3 −0 .gitignore
  2. +8 −1 README.md
  3. +71 −0 src/common/cpp/mayaObject.cpp
  4. +59 −0 src/common/cpp/mayaObject.h
  5. +903 −0 src/common/cpp/mayaScene.cpp
  6. +64 −0 src/common/cpp/mayaScene.h
  7. +130 −0 src/common/cpp/mayarendernodes/renderGlobalsNode.cpp
  8. +60 −0 src/common/cpp/mayarendernodes/renderGlobalsNode.h
  9. +27 −0 src/common/cpp/mayarendernodes/rendercmd.cpp
  10. +26 −0 src/common/cpp/mayarendernodes/rendercmd.h
  11. +17 −0 src/common/cpp/memory/memoryInfo.cpp
  12. +12 −0 src/common/cpp/memory/memoryInfo.h
  13. +230 −0 src/common/cpp/renderGlobals.cpp
  14. +158 −0 src/common/cpp/renderGlobals.h
  15. +339 −0 src/common/cpp/shadingtools/material.cpp
  16. +80 −0 src/common/cpp/shadingtools/material.h
  17. +308 −0 src/common/cpp/shadingtools/readShaderDefs.cpp
  18. +14 −0 src/common/cpp/shadingtools/readShaderDefs.h
  19. +124 −0 src/common/cpp/shadingtools/shadingNode.cpp
  20. +101 −0 src/common/cpp/shadingtools/shadingNode.h
  21. +10 −0 src/common/cpp/threads/queue.cpp
  22. +86 −0 src/common/cpp/threads/queue.h
  23. +46 −0 src/common/cpp/threads/threads.cpp
  24. +19 −0 src/common/cpp/threads/threads.h
  25. +84 −0 src/common/cpp/translators/meshTranslator.cpp
  26. +52 −0 src/common/cpp/translators/meshTranslator.h
  27. +269 −0 src/common/cpp/utilities/attrTools.cpp
  28. +41 −0 src/common/cpp/utilities/attrTools.h
  29. +54 −0 src/common/cpp/utilities/logging.cpp
  30. +29 −0 src/common/cpp/utilities/logging.h
  31. +1,057 −0 src/common/cpp/utilities/pystring.cpp
  32. +291 −0 src/common/cpp/utilities/pystring.h
  33. +383 −0 src/common/cpp/utilities/tools.cpp
  34. +74 −0 src/common/cpp/utilities/tools.h
  35. +192 −0 src/common/python/Renderer/__init__.py
  36. BIN src/mayaToAppleseed/deployment/mayaToAppleseed/bin/appleseed.dll
  37. BIN src/mayaToAppleseed/deployment/mayaToAppleseed/bin/appleseed.shared.dll
  38. +6 −0 src/mayaToAppleseed/deployment/mayaToAppleseed/mayaToAppleseed.mod
  39. BIN src/mayaToAppleseed/deployment/mayaToAppleseed/plug-ins/mayatoappleseed.mll
  40. +91 −0 src/mayaToAppleseed/deployment/mayaToAppleseed/ressources/appleseedRenderer.xml
  41. +17 −0 src/mayaToAppleseed/deployment/mayaToAppleseed/scripts/.project
  42. +11 −0 src/mayaToAppleseed/deployment/mayaToAppleseed/scripts/.pydevproject
  43. +35 −0 src/mayaToAppleseed/deployment/mayaToAppleseed/scripts/AETemplates/AEappleSeedNodeTemplate.py
  44. +62 −0 ...ayaToAppleseed/deployment/mayaToAppleseed/scripts/AETemplates/AEappleseedSurfaceShaderTemplate.py
  45. 0 src/mayaToAppleseed/deployment/mayaToAppleseed/scripts/AETemplates/__init__.py
  46. +192 −0 src/mayaToAppleseed/deployment/mayaToAppleseed/scripts/Renderer/__init__.py
  47. 0 src/mayaToAppleseed/deployment/mayaToAppleseed/scripts/__init__.py
  48. +16 −0 src/mayaToAppleseed/deployment/mayaToAppleseed/scripts/asutils.py
  49. +200 −0 src/mayaToAppleseed/deployment/mayaToAppleseed/scripts/mtap_initialize.py
  50. +16 −0 src/mayaToAppleseed/devkit/.gitignore
  51. +19 −0 src/mayaToAppleseed/devkit/appleseed_devkit_win64/.gitignore
  52. BIN src/mayaToAppleseed/mtap_devmodule/bin/appleseed.dll
  53. BIN src/mayaToAppleseed/mtap_devmodule/bin/appleseed.shared.dll
  54. +6 −0 src/mayaToAppleseed/mtap_devmodule/mayaToAppleseed.mod
  55. BIN src/mayaToAppleseed/mtap_devmodule/plug-ins/mayatoappleseed.mll
  56. +91 −0 src/mayaToAppleseed/mtap_devmodule/ressources/appleseedRenderer.xml
  57. +17 −0 src/mayaToAppleseed/mtap_devmodule/scripts/.project
  58. +11 −0 src/mayaToAppleseed/mtap_devmodule/scripts/.pydevproject
  59. +35 −0 src/mayaToAppleseed/mtap_devmodule/scripts/AETemplates/AEappleseedNodeTemplate.py
  60. +62 −0 src/mayaToAppleseed/mtap_devmodule/scripts/AETemplates/AEappleseedSurfaceShaderTemplate.py
  61. 0 src/mayaToAppleseed/mtap_devmodule/scripts/AETemplates/__init__.py
  62. 0 src/mayaToAppleseed/mtap_devmodule/scripts/__init__.py
  63. +16 −0 src/mayaToAppleseed/mtap_devmodule/scripts/asutils.py
  64. +200 −0 src/mayaToAppleseed/mtap_devmodule/scripts/mtap_initialize.py
  65. +1,983 −0 src/mayaToAppleseed/src/appleseed.cpp
  66. +107 −0 src/mayaToAppleseed/src/appleseed.h
  67. +57 −0 src/mayaToAppleseed/src/mayatoappleseed.cpp
  68. +22 −0 src/mayaToAppleseed/src/mayatoappleseed.h
  69. +22 −0 src/mayaToAppleseed/src/mtap_MayaObject.h
  70. +19 −0 src/mayaToAppleseed/src/mtap_mayaObject.cpp
  71. +114 −0 src/mayaToAppleseed/src/mtap_mayaScene.cpp
  72. +36 −0 src/mayaToAppleseed/src/mtap_mayaScene.h
  73. +189 −0 src/mayaToAppleseed/src/mtap_renderGlobals.cpp
  74. +47 −0 src/mayaToAppleseed/src/mtap_renderGlobals.h
  75. +142 −0 src/mayaToAppleseed/src/mtap_renderGlobalsNode.cpp
  76. +47 −0 src/mayaToAppleseed/src/mtap_renderGlobalsNode.h
  77. +44 −0 src/mayaToAppleseed/src/mtap_rendererController.cpp
  78. +39 −0 src/mayaToAppleseed/src/mtap_rendererController.h
  79. +817 −0 src/mayaToAppleseed/src/mtap_surfaceShader.cpp
  80. +188 −0 src/mayaToAppleseed/src/mtap_surfaceShader.h
  81. +146 −0 src/mayaToAppleseed/src/mtap_tileCallback.cpp
  82. +42 −0 src/mayaToAppleseed/src/mtap_tileCallback.h
  83. +100 −0 src/mayaToAppleseed/src/pluginMain.cpp
  84. +19 −0 src/mayaToAppleseed/vs2010/.gitignore
  85. +26 −0 src/mayaToAppleseed/vs2010/mayaToAppleseed.sln
  86. BIN src/mayaToAppleseed/vs2010/mayaToAppleseed.suo
  87. +206 −0 src/mayaToAppleseed/vs2010/mayaToAppleseed.vcxproj
  88. +195 −0 src/mayaToAppleseed/vs2010/mayaToAppleseed.vcxproj.filters
  89. +10 −0 src/mayaToAppleseed/vs2010/mayaToAppleseed.vcxproj.user
View
@@ -10,3 +10,6 @@
*.lai
*.la
*.a
+
+# Compiled Python scripts
+*.pyc
View
@@ -7,4 +7,11 @@ There are connections for mantra (mayaToMantra) Appleseed (mayaToAppleseed) and
The idea is to develop a renderer framework to be able to implement a new renderer without reimplementing the
same procedures again and again.
-A description of all renderers is/will be available on http://www.openmaya.net.
+A description of all renderers is/will be available on http://www.openmaya.net.
+
+At the moment it's all VisualStudio project. Just starting to lear cmake, simply to be able to compile some OpenSource projects.
+
+Because these are my first steps releasing code, I'll have to learn a lot how to do it the right way. So please let me know how
+I can improve this project, or do it yourself.
+
+haggi
@@ -0,0 +1,71 @@
+#include <maya/MFnDagNode.h>
+#include <maya/MFnDependencyNode.h>
+
+#include "mayaObject.h"
+#include "utilities/logging.h"
+#include "utilities/tools.h"
+#include "utilities/attrTools.h"
+
+static Logging logger;
+
+bool MayaObject::geometryShapeSupported()
+{
+ return true;
+}
+
+bool MayaObject::shadowMapCastingLight()
+{
+ if(!this->mobject.hasFn(MFn::kLight))
+ return false;
+
+ MFnDependencyNode lightFn(this->mobject);
+
+ bool useDepthMapShadows = false;
+ if(!getBool(MString("useDepthMapShadows"), lightFn, useDepthMapShadows))
+ return false;
+
+ if(!useDepthMapShadows)
+ return false;
+
+ return true;
+}
+
+MayaObject::MayaObject(MObject& mobject)
+{
+ this->isInstancerObject = false;
+ this->origObject = NULL;
+ this->mobject = mobject;
+ this->supported = false;
+ this->shortName = getObjectName(mobject);
+ logger.debug(MString("Getting dagNode from: ") + getObjectName(mobject));
+ MFnDagNode dagNode(mobject);
+ dagNode.getPath(this->dagPath);
+ MString fullPath = dagNode.fullPathName();
+ logger.debug(MString("fullpath: ") + fullPath);
+ this->fullName = fullPath;
+ this->transformMatrices.push_back(this->dagPath.inclusiveMatrix());
+ this->instanceNumber = 0;
+ // check for light connection. If the geo is connected to a areaLight it is not supposed to be rendered
+ // but used as light geometry.
+ //checkLightConnection();
+
+ //getObjectShadingGroups(this->dagPath);
+ MFnDependencyNode depFn(mobject);
+ this->motionBlurred = true;
+ this->geometryMotionblur = false;
+
+ bool mb = true;
+ if( getBool(MString("motionBlur"), depFn, mb) )
+ this->motionBlurred = mb;
+
+ this->perObjectMbSteps = 1;
+ this->index = -1;
+ this->scenePtr = NULL;
+ this->lightExcludeList = true; // In most cases only a few lights are ignored, so the list is shorter with excluded lights
+ this->shadowExcludeList = true; // in most cases only a few objects ignore shadows, so the list is shorter with ignoring objects
+
+}
+
+
+MayaObject::~MayaObject()
+{}
@@ -0,0 +1,59 @@
+#ifndef MAYA_OBJECT_H
+#define MAYA_OBJECT_H
+
+#include <maya/MObject.h>
+#include <maya/MDagPath.h>
+#include <maya/MBoundingBox.h>
+#include <maya/MString.h>
+#include <maya/MMatrix.h>
+#include <vector>
+#include "shadingtools/material.h"
+
+//typedef void (*functionPointer)(void *, void *);
+
+class MayaScene;
+
+class MayaObject : public MBoundingBox
+{
+public:
+ MObject mobject;
+ MString shortName;
+ MString fullName;
+ int index;
+ MDagPath dagPath;
+ MayaScene *scenePtr;
+ std::vector<MDagPath> linkedLights; // for objects - light linking
+ bool lightExcludeList; // if true the linkedLights list contains excluded lights, else included lights
+ std::vector<MDagPath> shadowObjects; // for lights - shadow linking
+ bool shadowExcludeList; // if true the shadowObjects contains objects which ignores shadows from the current light
+ std::vector<MDagPath> castNoShadowObjects; // for lights - shadow linking
+
+
+ std::vector<MString> exportFileNames; // for every mb step complete filename for every exported shape file
+ std::vector<MString> hierarchyNames; // for every geo mb step I have one name, /obj/cube0, /obj/cube1...
+ std::vector<MMatrix> transformMatrices; // for every xmb step I have one matrix
+ std::vector<MString> shadowMapFiles; // file paths for a shadow map creating light
+
+ Material material;
+ // instancer node attributes
+ MMatrix instancerMatrix; // matrix of instancer node and paricle node
+ bool isInstancerObject; // is this an instancer object
+ int instancerParticleId;
+ MObject instancerMObj;
+
+ bool supported;
+ bool shapeConnected; // if shape connected, it can be used to determine if it has to be exported for every frame or not
+ bool visible; // important for instances: orig object can be invisible but must be exported
+ int instanceNumber;
+ int perObjectMbSteps; // default 1 can be overridden vor some renderers
+ bool motionBlurred; // possibility to turn off motionblur for this object
+ bool geometryMotionblur; // if object has vertex velocity informations, there is no need for real deformation blur
+ bool shadowMapCastingLight(); // to know if I have to add a light to render passes
+ virtual bool geometryShapeSupported() = 0;
+
+ MayaObject *origObject; // this is necessary for instanced objects that have to access the original objects data
+ MayaObject(MObject& mobject);
+ ~MayaObject();
+};
+
+#endif
Oops, something went wrong.

0 comments on commit 955e519

Please sign in to comment.