[WebCast 培训] Day 4 - 3ds Max - Webcast Training_第1页
[WebCast 培训] Day 4 - 3ds Max - Webcast Training_第2页
[WebCast 培训] Day 4 - 3ds Max - Webcast Training_第3页
[WebCast 培训] Day 4 - 3ds Max - Webcast Training_第4页
[WebCast 培训] Day 4 - 3ds Max - Webcast Training_第5页
已阅读5页,还剩37页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、 2009 Autodesk 1The Reference* Hierarchy 3ds Max webcast training Day 4 Stephen Taylor* Not to be confused with Animatable 2009 Autodesk 2The Animatable Hierarchy In 13 words or less! 2009 Autodesk 3The Animatable Hierarchy (Review) ReuseREUSE1 2009 Autodesk 4The Animatable Hierarchy (Review) Reuse

2、existing EXISTING2 2009 Autodesk 5The Animatable Hierarchy (Review) Reuse existing classes CLASSES3 2009 Autodesk 6The Animatable Hierarchy (Review) Reuse existing classes. Expose EXPOSE4 2009 Autodesk 7The Animatable Hierarchy (Review) Reuse existing classes. Expose as AS5 2009 Autodesk 8The Animat

3、able Hierarchy (Review) Reuse existing classes. Expose as SubAnim SUBANIM6 2009 Autodesk 9The Animatable Hierarchy (Review) Reuse existing classes. Expose as SubAnim toTO7 2009 Autodesk 10The Animatable Hierarchy (Review) Reuse existing classes. Expose as SubAnim to allow ALLOW8 2009 Autodesk 11The

4、Animatable Hierarchy (Review) Reuse existing classes. Expose as SubAnim to allow user USER9 2009 Autodesk 12The Animatable Hierarchy (Review) Reuse existing classes. Expose as SubAnim to allow user toTO10 2009 Autodesk 13The Animatable Hierarchy (Review) Reuse existing classes. Expose as SubAnim to

5、allow user to viewVIEW11 2009 Autodesk 14The Animatable Hierarchy (Review) Reuse existing classes. Expose as SubAnim to allow user to view and AND12 2009 Autodesk 15The Animatable Hierarchy (Review) Reuse existing classes. Expose as SubAnim to allow user to view and control.CONTROL13 2009 Autodesk 1

6、6The Animatable Hierarchy 2009 Autodesk 17Todays Goal Create a billboard effect Find a Camera to look-at Use References to update calculation 2009 Autodesk 18Todays Goal Create a billboard effectWe will apply this with a Rotation controller Find a Camera to look-at Use References to update calculati

7、on 2009 Autodesk 19Todays Goal Create a billboard effectWe will apply this with a Rotation controller Find a Camera to look-atIterate the scene to find a particular object Use References to update calculation 2009 Autodesk 20Introducing The Sample 2009 Autodesk 21Introducing the Sample 2009 Autodesk

8、 22Introducing the Sample 2009 Autodesk 23Introducing the Sample 2009 Autodesk 24Finding a Camera A Camera is an Object Objects Live on Nodes All Nodes are part of the Scene TreeJoined through Parent/Child relationships GetCOREInterface 2009 Autodesk 25Finding a CameraINodeINodeINodeINodeINodeINodeL

9、ightGeometryCameraGeometry 2009 Autodesk 26Finding a CameraFindCamera(node): If node has Camera return Camera foreach child FindCamera(child)FindCamera (rootnode)INodeINodeINodeINodeINodeINodeLightGeometryCameraGeometry 2009 Autodesk 27Finding a Camera (Task 1 of 3)INodeINodeINodeINodeINodeINodeLigh

10、tGeometryCameraGeometryComplete FindCamearNode: - Recursively iterate tree - Return INode if found 2009 Autodesk 28Finding a Camera (Task 1 of 3)INodeINodeINodeINodeINodeINodeLightGeometryCameraGeometryComplete FindCamearNode: - Recursively iterate tree - Return INode if foundChange feedback to Red

11、when done 2009 Autodesk 29Now What? GetValue is not being called enoughIs called during animationNot called while user changing Deleting the camera causes a crashHanging pointer 2009 Autodesk 30BaseObjectModifierObjectGeomObjectCameraObjecLightObjectHelperObjectControlStdControlMtlBaseMtlTexMapRende

12、rerSpecialFXAtmosphericBaseShaderLife-time control, Messaging,Monitoring, File IOIdentification, Parameter definitionAnimatableReferenceMakerReferenceTargetClassDesc2ParamBlockDesc2IParamBlock2UtilityObjGupSceneExportSceneImport 2009 Autodesk 31References Creates a dependency between 2 instancesOne

13、instance (maker) watches another (target)Target notifies maker when it changesNotifyDependentsReferenceMakerReferenceTargetUpdate yourself I have changedI depend on your values 2009 Autodesk 32References Creates a dependency between 2 instancesOne instance (maker) watches another (target)Target noti

14、fies maker when it changesNotifyDependents Controls instance life-timeReleasing all references to a target causes target to release.ReferenceMakerReferenceTargetMy services are no longer needed:I will be released nowThis reference is being released 2009 Autodesk 33How To Turn a Pointer into a Refere

15、nce Max Implements:ReplaceReference We Implement:ReferenceMaker:NumRefsReferenceMaker:SetReferenceReferenceMaker:GetReference 2009 Autodesk 34How to turn a pointer into a Reference (Task 2 of 3) Make m_pCamNode a referenceint ReferenceMaker:NumRefs ( )ReferenceTarget* ReferenceMaker:GetReference(int

16、 i) void ReferenceMaker:SetReference (int i, ReferenceTarg rtarg )See the comments in the source for detailed instructionsChange feedback to Yellow when done 2009 Autodesk 35Creating a Reference (Task 3 of 3) Currently: m_pCamNode value is simply assigned Change To: m_pCamNode is a Reference (Task 2

17、) Assign its value through Max mechanisms for managing ReferencesSee comments in code for detailed instructionsChange feedback to Green when done 2009 Autodesk 36How does Max do it? Class ReferenceTargetRefList simple LinkedListReplaceReference Maintains RefListNotifyDependents Iterates RefListMaybe

18、AutoDelete Empty RefList 2009 Autodesk 37How does Max do it? Class ReferenceTargetRefList simple LinkedListReplaceReference Maintains RefListNotifyDependents Iterates RefListMaybeAutoDelete Empty RefList Do NOT call SetReference directly Do NOT delete objects 2009 Autodesk 38Processing Messages NotifyRefChanged processes messages from our References Allows us to respond to changes on the targeIt will tell us if the camera is deleted 2009 Autodesk 39Final Thoughts. We create the reference, but never use it. Someho

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论