7How do I import objects from my 3D app.docx
- 文档编号:28855483
- 上传时间:2023-07-20
- 格式:DOCX
- 页数:18
- 大小:455.32KB
7How do I import objects from my 3D app.docx
《7How do I import objects from my 3D app.docx》由会员分享,可在线阅读,更多相关《7How do I import objects from my 3D app.docx(18页珍藏版)》请在冰豆网上搜索。
7HowdoIimportobjectsfrommy3Dapp
HowdoIimportobjectsfrommy3Dapp?
Unitysupportsimportingfrommostpopular3Dapplications.Choosetheoneyou'reworkingwithbelow:
•Maya
•Cinema4D
•3dsMax
•Cheetah3D
•Modo
•Lightwave
•Blender
Otherapplications
Unitycanread.FBX,.dae,.3DS,.dxfand.objfiles,soifyourprogramcanexporttothisformatyou'rehomefree.FBXexportersforpopular3Dpackagescanbefoundhere.ManypackagesalsohaveaColladaexporteravailable.
Hints
∙StoretexturesinafoldercalledTexturesnexttotheexportedmesh.ThiswillguaranteethatUnitywillalwaysbeabletofindtheTextureandautomaticallyconnecttheTexturetotheMaterial.Formoreinformation,seetheTexturesreference.
ImportingObjectsFromMaya
UnitynativelyimportsMayafiles.Togetstarted,simplyplaceyour.mbor.mafileinyourproject'sAssetsfolder.WhenyouswitchbackintoUnity,thesceneisimportedautomaticallyandwillshowupintheProjectview.
ToseeyourmodelinUnity,simplydragitfromtheProjectViewintotheSceneVieworHierarchyView.
UnitycurrentlyimportsfromMaya
1.Allnodeswithposition,rotationandscale.PivotpointsandNamesarealsoimported.
2.Mesheswithvertexcolors,normalsandupto2UVsets.
3.MaterialswithTextureanddiffusecolor.Multiplematerialspermesh.
4.AnimationsFK&IK
5.Bone-basedanimations
Unitydoesnotimportblendshapes.UseBone-basedanimationsinstead.Unityautomaticallytriangulatespolygonalmesheswhenimporting,thusthereisnoneedtodothismanuallyinMaya.
IfyouareusingIKtoanimatecharactersyouhavetoselecttheimported.mbfileinProjectViewandchooseBakeIK&SimulationintheImportSettingsdialogintheInspector.
Requirements
InordertoimportMaya.mband.mafiles,youneedtohaveMayainstalledonthemachineyouareusingUnitytoimportthe.mb/.mafile.Maya8.0andupissupported.
Ifyoudon'thaveMayainstalledonyourmachinebutwanttoimportaMayafilefromanothermachine,youcanexporttothefbxformat,whichUnityimportsnatively.Todothis:
1.OpentheMayafile
2.Ifyoudon'thavethefbxpluginalreadyinstalled,downloaditfromAutodeskwebsite.
3.PlacetheexportedfbxfileintheUnityprojectfolder.Unitywillnowautomaticallyimportthefbxfile.
Behindtheimportprocess(Advanced)
WhenUnityimportsaMayafileitwilllaunchMayainthebackground.UnitythencommunicateswithMayatoconvertthe.mbfileintoaformatUnitycanread.ThefirsttimeyouimportaMayafileinUnity,Mayahastolaunchinacommandlineprocess,thiscantakearound20seconds,butsubsequentimportswillbeveryquick.
Troubleshooting
∙Mayainsomerarecasesmessesupthenodehistory,whichsometimesresultsinmodelsnotexportingcorrectly.FortunatelyyoucanveryeasilyfixthisbyselectingEdit->DeleteAllbyType->History.
∙Ifyouhaveanyissueswithimportingsomemodels,ensurethatyouhavethelatestFBXplugininstalled.ItcanbedownloadedfromAutodeskwebsite.
∙AnimationbakinginMayaisnowdonewithFBXinsteadofnatively,whichallowsformorecomplexanimationstobebakedproperlytoFBXformat.Ifyouareusingdrivenkeys,thenmakesuretosetatleastonekeyonyourdriversfortheanimationtobakeproperly
ImportingObjectsFromCinema4D
UnitynativelyimportsCinema4Dfiles.Togetstarted,simplyplaceyour.c4dfileinyourproject'sAssetsfolder.WhenyouswitchbackintoUnity,thesceneisimportedautomaticallyandwillshowupintheProjectView.
ToseeyourmodelinUnity,simplydragitfromtheProjectViewintotheSceneView.
Ifyoumodifyyour.c4dfile,Unitywillautomaticallyupdatewheneveryousave.
Unitycurrentlyimports
1.Allobjectswithposition,rotationandscale.PivotpointsandNamesarealsoimported.
2.MesheswithUVsandnormals.
3.MaterialswithTextureanddiffusecolor.Multiplematerialspermesh.
4.AnimationsFK(IKneedstobemanuallybaked).
5.Bone-basedanimations.
UnitydoesnotimportPointLevelAnimations(PLA)atthemoment.UseBone-basedanimationsinstead.
AnimatedCharactersusingIK
IfyouareusingIKtoanimateyourcharactersinCinema4D,youhavetobaketheIKbeforeexportingusingthePlugins->Mocca->Cappucinomenu.Ifyoudon'tbakeyourIKpriortoimportingintoUnity,youwillmostlikelyonlygetanimatedlocatorsbutnoanimatedbones.
Requirements
∙YouneedtohaveatleastCinema4Dversion8.5installedtoimport.c4dfiles.
Ifyoudon'thaveCinema4DinstalledonyourmachinebutwanttoimportaCinema4Dfilefromanothermachine,youcanexporttotheFBXformat,whichUnityimportsnatively:
1.OpentheCinema4Dfile
2.InCinema4DchooseFile->Export->FBX6.0
3.PlacetheexportedfbxfileintheUnityproject'sAssetsfolder.Unitywillnowautomaticallyimportthefbxfile.
Hints
1.TomaximizeimportspeedwhenimportingCinema4Dfiles:
gototheCinema4Dpreferences(Edit->Preferences)andselecttheFBX6.0preferences.NowuncheckEmbedTextures.
Behindtheimportprocess(Advanced)
WhenUnityimportsaCinema4DfileitwillautomaticallyinstallaCinema4DpluginandlaunchCinema4Dinthebackground.UnitythencommunicateswithCinema4Dtoconvertthe.c4dfileintoaformatUnitycanread.Thefirsttimeyouimporta.c4dfileandCinema4Disnotopenyetitwilltakeashortwhiletolaunchitbutafterwardsimporting.c4dfileswillbeveryquick.
Cinema4D10support
Whenimporting.c4dfilesdirectly,UnitybehindthescenesletsCinema4DconvertitsfilestoFBX.WhenMaxonshippedCinema4D10.0,theFBXexporterwasseverlybroken.WithCinema4D10.1alotoftheissueshavebeenfixed.ThuswestronglyrecommendeveryoneusingCinema4D10toupgradeto10.1.
NowtherearestillsomeissuesleftinMaxonsFBXexporter.ItseemsthatcurrentlythereisnoreliablewayofexportinganimatedcharactersthatusetheJoint'sintroducedinCinema4D10.Howevertheoldbonesystemavailablein9.6exportsperfectlyfine.Thuswhencreatinganimatedcharactersitiscriticalthatyouusetheoldbonesysteminsteadofjoints.
ImportingObjectsFrom3DStudioMax
Ifyoumakeyour3Dobjectsin3dsMax,youcansaveyour.maxfilesdirectlyintoyourProjectorexportthemintoUnityusingtheAutodesk.FBXformat.Savingthemintheoriginal.maxformatisrecommended.
Unitycurrentlyimportsfrom3dsMax
1.Allnodeswithposition,rotationandscale.PivotpointsandNamesarealsoimported.
2.Mesheswithvertexcolors,normalsandoneortwoUVsets.
3.Materialswithdiffusetextureandcolor.Multiplematerialspermesh.
4.Animations.
5.Bonebasedanimations.
TomanuallyexporttoFBXfrom3DSMax
1.DownloadthelatestfbxexporterfromAutodeskwebsiteandinstallit.
2.Exportyourscene(File->ExportorFile->ExportSelected)in.fbxformat.Usingdefaultexportoptionsshouldbeokay.
3.MovetheexportedfbxfileintoyourUnityprojectfolder.
4.WhenyouswitchbackintoUnity,the.fbxfileisimportedautomatically.
5.DragthefilefromtheProjectViewintotheSceneView.
Exporteroptions
UsingdefaultFBXexporteroptions(thatbasicallyexporteverything)shouldbeokayinallcases.
DefaultFBXexporteroptions(forfbxpluginversion2009.3)
ExportingBone-basedAnimations
Thereisaprocedureyoushouldfollowwhenyouwanttoexportbone-basedanimations:
1.Setupthebonestructureasyouplease.
2.Createtheanimationsyouwant,usingFKand/orIK
3.Selectallbonesand/orIKsolvers
4.GotoMotion->TrajectoriesandpressCollapse.Unitymakesakeyfilter,sotheamountofkeysyouexportisirrelevant
5."Export"or"Exportselected"asnewestFBXformat
6.DroptheFBXfileintoAssetsasusual
7.InUnityyoumustreassigntheTexturetotheMaterialintherootbone
Whenexportingabonehierarchywithmeshandanimationsfrom3dsMaxtoUnity,theGameObjecthierarchyproducedwillcorrespondtothehierarchyyoucanseein"Schematicview"in3dsMax.OnedifferenceisUnitywillplaceaGameObjectasthenewroot,containingtheanimations,andwillplacethemeshandmaterialinformationintherootbone.
IfyouprefertohaveanimationandmeshinformationinthesameUnityGameObject,gototheHierarchyviewin3dsMax,andparentthemeshnodetoaboneinthebonehierarchy.
ExportingTwoUVSetsforLightmapping
3dsMax'RenderToTextureandautomaticunwrappingfunctionalitycanbeusedtocreatelightmaps.NotethatUnityhasbuilt-inlightmapper,butyoumightpreferusing3dsmaxifthatfitsyourworkflowbetter.UsuallyoneUVsetisusedformaintextureand/ornormalmaps,andanotherUVsetisusedforthelightmaptexture.ForbothUVsetstocomethroughproperly,thematerialin3dsMaxhastobeStandardandbothDiffuse(formaintexture)andSelf-Illumination(forlightmap)mapslotshavetobesetup:
MaterialsetupforLightmappingin3dsMax,usingself-illuminationmap
NotethatifobjectusesaShellmaterialtype,thencurrentAutodesk'sFBXexporterwillnotexportUVscorrectly.
Alternatively,youcanuseMulti/SubObjectmaterialtypeandsetuptwosub-materials,usingthemaintextureandthelightmapintheirdiffusemapslots,likeshownbelow.However,iffacesinyourmodelusedifferentsub-materialIDs,thiswillresultinmultiplematerialsbeingimported,whichisnotoptimalforperformance.
AlternateMaterialsetupforLightmappingin3dsMax,usingmulti/subobjectmaterial
Troubleshooting
Ifyouhaveanyissueswithimportingsomemodels:
ensurethatyouhavethelatestFBXplugininstalled.ItcanbedownloadedAutodeskwebsite.
ImportingObjectsFr
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 7How do import objects from my 3D app How