7How do I import objects from my 3D app.docx

上传人:b****5 文档编号:28855483 上传时间:2023-07-20 格式:DOCX 页数:18 大小:455.32KB
下载 相关 举报
7How do I import objects from my 3D app.docx_第1页
第1页 / 共18页
7How do I import objects from my 3D app.docx_第2页
第2页 / 共18页
7How do I import objects from my 3D app.docx_第3页
第3页 / 共18页
7How do I import objects from my 3D app.docx_第4页
第4页 / 共18页
7How do I import objects from my 3D app.docx_第5页
第5页 / 共18页
点击查看更多>>
下载资源
资源描述

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页珍藏版)》请在冰豆网上搜索。

7How do I import objects from my 3D app.docx

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

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 自然科学 > 物理

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1