十DG
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了十DG相关的知识,希望对你有一定的参考价值。
1.DG是dependency graph,我认为是依赖图,和DAG(有向无环图)的区别:DAG用来做场景管理,每个node代表的不是tranform就是shape,有父子关系。
DG是代表了每个实体节点之间的相互关系,通过plug,从output到input,再在每个DG节点中,对数据进行存储和计算,这样一种数据结构。
Dependency graph nodes are used for almost everything in Maya such as model creation, deformation, animation, simulation, and audio processing.
Most objects in Maya are dependency graph nodes, or networks of nodes (several nodes connected together). For example, DAG nodes are dependency graph nodes, and shaders are networks of nodes.
When dependency graph nodes are connected together they can affect DAG nodes and thus affect what is rendered.
2.
例子:
如图的DAG hierarchy包含了一个DG节点time, transform1, transform2, transform3,sphere是DAG节点,同样也是DG节点。
transform3的scale x, y, z,被time驱动。即time的输出,链接到transform3的输入,当动画播放的时候,sphere的两个实体,会变化。
3,dirty的传导机制,当一个dg节点的输入变化的时候,他的输出被mark成dirty,然后他连接到的属性被mark成dirty,一直传导。
例如refresh,系统要walk down DAG,对每个DAG节点进行检查,看是否需要re-evaluate(by checking if any plugs on it are dirty).
4. Node states.
MPxNode::state
5. Base dependency node classes:
(1)MPxNode: include ::compute()
(2)MPxLocatorNode: 让你可以在场景中绘制三维图形,可以用于定义没有shape的实体在空间中的位置。例如灯光。
(3)MPxGeometryFilter: 可以接受一个geometry shape作为输入,然后deform它。
::deform(), ::accessoryAttribute(), ::accessoryNodeSetup().
MPxDeformerNode:The MPxDeformerNode class specializes MPxGeometryFilter to handle per-vertex weight lists.
MPxBlendShape: MPxSkinCluster
6.MPxIkSolverNode: ::doSolve()
7.MPxFieldNode: lets you define your own dynamic field to affect other geometry in the scene. 动态场???不理解啊
8.MPxEmitterNode: Emitters are nodes which emit particles in to a Maya scene. 粒子发射器。MPxFluidEmitterNode
9.MPxSpringNode: 弹簧节点 ::applySpringLaw()
10.MPxObjectSet:
11.MPxHwShaderNode:allows the creation of user-defined hwShaders.
12.MPxTransform: allows the creation of user defined transform nodes. They are designed to be an extension of the standard Maya transform node and include all of the normal transform attributes.
13. MPxImagePlane:allows the creation of new types of image plane nodes.
14.MPxParticleAttributeMapperNode:
15.MPxConstrait:
16. MPxManipulatorNode/MPxManipContainer: viewport当中的与用户交互用。鼠标事件的处理。
17.MPxSurfaceShape/MPxComponentShape: If you need to create a new kind of shape primitive, you will need to create a new class that derives from MPxSurfaceShape orMPxComponentShape, which will be used to represent instances of your geometry within the scene hierarchy and the dependency graph.
18. MPxAssembly:
19.MPxCameraSet:Maya treats custom nodes that you derive from this class like the built-in cameraSet node. You can derive a new class fromMPxCameraSet if you need to customize the way Maya handles your camera layers for stereo viewing.
20. MPxMotionPathNode: if you need to customize the way that Maya evaluates the input animation curve in order to computes and apply new position and orientation values to an animated object moving along a path.See the class description and the motionPathNode/motionPathNode.cpp example for details.
21. MPxPolyTrg: This is the base class for nodes that define a custom face triangulation algorithm for meshes.
22. MPxThreadedDeviceNode/MPxClientDeviceNode:
以上是关于十DG的主要内容,如果未能解决你的问题,请参考以下文章