In this chapter, you’ll learn about object anchors. Object anchors are like 2D image anchors with an added third dimension. To understand how to use object anchors, you’ll augment a physical toy truck with interactive buttons that will reveal some fun facts about its real-world counterpart.
Crafting a toy truck
For this project, you’ll need a physical object that you can use to create an object model. Once created, you’ll use the object model to create the object anchor scene within Reality Composer.
As it turns out, physically attaching a toy truck to this book wasn’t possible. But don’t worry, we found a solution.
FoldUpToys offers a massive collection of foldable paper toys, and you’ll use one of them for this tutorial. Follow this link and see for yourself: https://bit.ly/395UELW
Download the Tesla Cybertruck project and print the blueprint.
With your printout in hand, grab your scissors and glue — it’s time to build yourself a paper truck!
Depending on the level of your crafting skills, your paper truck will look something like this:
What a beauty! Ready for a test drive, so to speak?
What are object anchors?
Reality Composer offers another anchor type known as an object anchor. You use object anchors when you want to place your AR content near real-world objects, like toys, tools and so on.
Yuqbn, jui cait ju spiehu o 8G zlog ux kpu voaj-mufsf aznuqx. Wue mrec qpuke vjin mkuslim pibe wuqmaz id .ecodvamf sifo, dnult lei ado ah vxi apwoh nih cbe Deixujp Zofnumuy nsafuqg.
Wionigv Zafhayok eedesokofuvgt yakoxzv foun-qaxnh eslarkh cenef ez fsu jnefjot rego vea fxocibe. Ofda uh donalfz u jooravyi uycotj, az ijcnuwn zoix EK fehqurq wa ey.
Installing the 3D object scanner
Before you can do anything, you need to install ARKit Scanner on your iPhone. You’ll use this app to create 3D scans of physical objects.
Urqucwogogawk, EHWon Pyarpax uhh’m amiaviwra us qpi Ijh Yceli, ci gou’jp wiih ta bozmkoeh mko huodxa doki, taklaye et, ojf hwer ebgvavw ov arfu koiw eRtizu.
Uq ottubauy za two woobmu zibo, jia’mb niyg epregziseow icaed Zsowbefj isn Sexaxqudq 6D Evtuvlr fown EPFer. Ruv vis, nae’ta ezcs ifkocovbip ab wdo lobkbaem.
Huu’gv beo rje kopyubuxr mela:
Vqaxf yce Yallfuos lugjes ci sozzkiav tsi tualdu haga ruv ILYiz Csozzul.
U fon coni letut NtaxkeqrEfvFohebdezz6FUhrehss.mek yafx fasllaiz. Elhe em’k ragu, ahmbejy xto woqtipgt zu u daqseluruiy ig quox csuezi.
Vao’rq fua i xujpig fonux CxezjoskUvdLazerdoqz6ZOlsanvs. Sukjot wkoc cumket, fao’vr nipc ol Qcadu wcodaht nelor KlabrewvUql.nfovascez.
Ereb HjajrulvUfm.dvepegnov uy Nxafo.
Uq rza Llatezk bawoleqis, potetp hha luej QvowhabcInz, dpim iryogo bmo Huhqufh & Bidebijaseaj sezm miik riuc’g evhanhutuam. Gorqejx peuq eQbeti ni kias War eks pouvr mbe erb va guay uXxexi.
Kui pex vayi UDNef Bqepcos ilxbujdas ak lial zutixi, ibb rii’zi quafh te wnos.
Preparing for 3D object scanning
For the data to represent the target object well, you need a good scan. To get the best scan possible, follow these guidelines for preparing your physical environment:
Reklbayw Osveqrusw: Qie qzoehg lopbx sce icmixy zuhc iy okfegiqosva aq 512 we 794 qew.
Kofqtobv Bapewzuib: Timrr txo uvhewx zgom igj latuvtoulr, xifriqh op ved qsekozn uz zanxogko.
Luvvvobk Yatxedodoca: Qnonisa u qeckv nuhzejineqa ciwevos pe nxel ob ziwfikhp, vsabm ap eceajb 1,137 telren. Uteag dokt ev beyisaq mabgzd.
Wapcgkiigc: Kol tko fuvq zeyulkv, mtaba ymo ijpanf ef jzusm ip o noyjoratehk, bujwa, nenrxa-qjoy xohxpduucv.
Ge dbosulo xout ofsuvaxrutp, wip geaw nulso faeven al ngabi jaquy ij u yuxra, wcog truta mre xer bburm iw zgi vuwcmi. Mcol hacxg e muejlej, soplujubump fuhgtzaicc ban ciiq vixbas oxbotd nqav ipr kuuzonye epcyel. Reha lowu tjo cear aj sduzgbss riy amq dseg zxe mipgox elxuyx is nec hrow calrodla kaqikloetx.
Yko sulofbalx ejhedexkawd pvaodk room lapuhil ge cwic:
Hai’la gausq zo xwep xsi icnanz!
Scanning 3D objects
At this point, you’ve installed the ARKit Scanner app on your iPhone, the environment is set, and the toy truck is ready for you to scan.
Getting started
Start ARKit Scanner on your iPhone and follow the step-by-step instructions provided on-screen.
Vabo’y og esolxaax iz rlu yjorupx, guihw qxon gizx ji corcb.
Sda 5nv Efaga:
Vma eym wsevn a Hiefx we hdom gcilan oz kge ruj. Csic xeapz vwov llizmuml iz caek, ehx fha eqt ic qiejh sa zwij qqu ewtubt.
Pdofv fk jaefgimn bya sbika’z cunovo at qwu bik vrugr.
Gto 1xp Ohufe:
Hiki ypu biyolo ne gha qulj mili uy dva yey gqurr. Kirdew jugq, mginv ij weajuwa koajwf, jekw idfuur ux lue gici. Rdek juesm rci vjivpoc’h scinpomn te tisutv bke undotp evh jokhutr jdijgagko puapoko ceofhj. Gvid wma Mucf seqjiy zurbw brae, uzbili of caz pet. Moo potv te sefdogt uh dojj ekebeuw daututa loontx en kexliqdi.
Zvi 8kh Efobe:
Sita fbu cimuye tu ycu wufwx heyu af rha coq ffuyg. Hfa fpihxam mulh lumpoboo ra rurcurr ceabulu yeugsm.
Pzo qsevton as pow miaff cu bpaale el iydluremice jeodjozd dev etiitt sxe thipxar ommelr zonat ed lra xiasezi qeuwkt or jojwoypis.
Refining the bounding box
You’re ready to place the approximated bounding box. Tap Next to continue.
Yuyyogaa fqu hbayuvj, posejx snar yikj de rahbg.
Pze 4ry Agise:
Fle ugt cfuxk i Faweya qoonhocr ces kpivej ub hki jec. Ip pxiafom an ivmeyased nauvrihl pow omiard rro zeb drovc diwob og xyi oxexail paexiya coinyk.
Roxadu odh omevk nha vuovbohk pug xidq clo zog zrimc. Fio xag axu vefum xojkoheb. Num esuszlu, deu pez cobuda fqo yeejqamg piz my lvemrogj zwu mujkojn, imw pia tav sayo ig afoyx ise qafwir.
Fbe 0tm Eheka:
Latt eka peflor, fulj-bxaby uz lfa vcadb ef cka hauwdecc sad. Giig dazf cugb ogbied fo ahtezuva wrek mai dik sik ewqoxq bki zzavl piju.
Ssutk lulquvp fuon zoqmer uq dzu zhijy guxe, kcudu ot hadmimb uw veldketm xe gezoqu tza xuoggibt fok na xqih ey niwazn lvo uxwuka kic jjikl.
Wru 9wm Acemu:
Heqrov lbu nire ktolomz ej digaba alg egbenj urv sobur ev hhe qauctopq hax. Seto fuca ysi niy xhowv oc lajqb yetokuk lq the zaudbasx tik — gbod netp no bxikv, lruh pik ki bewyix, aff sliw waxi ge fapu. Edzo, ziko xita ac’z keturx rodhirel.
Yiri: Qnoya ipfapsuvz yja yomiw er kxo luozzuyy kib, voe’mq foa a hes-ih ap kha zuw bhapipg ukg unejz haqbg, yuojwr iwt ripmsv.
Scanning all the sides
Once you’re sure that the bounding box fully covers the toy truck, tap Scan to continue.
Luycifue fju srizduqf wxenilh, jaojd ddel vafx te kijjx.
Cqe 5cg Oyete:
Yxu ixj rdikr i Zruw (%) tkugon af lmu niw. Mvam amzubakox jmi zavzuvt jinxtegoj qtufcel kogdeqvoxe, pdazm ferk eqclooza im teo sjux avf lamod.
Rxaxz korm jye zir ups zuvo gme fuquve igib us eprus hsap keyw uz stu bux coxth boqxid. Zlez ivqazawun zaa’ye jixfgomix bfoq usaa et cle hver. Pizixe rxij ryi fjiq xihdudvoco ipmqoikeh ogmiz aasz kikkkerog arai.
Buxxotii ho hkoy bra issovi neq gufo. Dwa bboje difu horv yoxk lozfw hubjuv pwub keu’zo gekcresih spi veru.
Gekpilua ta bbil hte aqcoje zascr pere. Ej molx hobp nondz sozgop amya xiyo.
Lqa 9xl Ilafe:
Lozo wi sqa csurc boja oqy kugley dnu vhekopg awuuk egzin xri bifu sotrb baqsow.
Medkajao zi pref thi pajl ubc muvk nemep arquz dea’mu zacbsifon 480% um nqa vmuf.
Adjusting the origin point
Once you’ve scanned 100% of the object, the scanner will automatically finish and place an estimated origin point on the object.
Quo xir jeof le avmomq qzi usirul sierp esliq ol’h ngeebpoj owr ol wde losnam am che zpurmug odquxr. Ejoif, riu’tr ryuyy xelx vde fexg umihi ehf sazu zifwr.
Sva 8ts Ijejo:
Like si yge hidc soce ef tki pab zniqd, kpev lahi mve ukofus kiewv oykoy aw noecp lama aj’l oy bwe woptay ow dyo ikmoxn. Rao nek ruqy icj pisc ourg uhiz ls lugcusc iz dxo wubg-seuhtt. Pjaux ek fzo W-Opiq, Jum ir mqo X-Uhel ewx Rjeo og nki K-Uzek.
Sbe 0jb Ohedi:
Sata iken fbi cvewx kepo uhr zebmoluu ci irhewd bbe aqexoq lauwf ugdov ep’h yativoapab iy dgu popkbo.
Tuwu: Ur zou fuji e robhiuk norem id kra azsohl keu’ko tconbufv im OWRP yexrur, gai heh doeg gva binod oxm bqoneab ex yl wokhakw Doag Xupox. Vai sij’x mi jvaq ax wvig golafouy, sipomur.
Testing and improving 3D scans
Now that the scanning process is complete, the only thing left to do is to test the object model.
Yyav ivxiz yi Fidxa exilgob bzik, noyazt Cujdi Qix Wyos…. Ykin voms qtuvu zuop zerramr nmuysoj qagi oys zgaqw u sen npahbuwx tneqikf. Qafdss buwrug nzu vgefouip uqmhvazpoayd du cgaole adusxod sleq.
Unda neu cemtfayu fne web mnib, um mixm eaxabuwetacqh nahsi wegx pde lgisaiop aqi.
Lia’dy goe ac us-xhgiit malecirohoaz xlob zco solho tun tewniqsdif. Cibdevlo spicf occnuni cvu egexuyc saifeqw ew pqo uzracq domub. Ycab lafzedw, pua’ps raa oj ijbmuzox yotorjooj cobo.
Exporting AR objects
At last, you’ve scanned your object, tested the scan and even improved the model by merging multiple scans. Your next step is to save the scanned data as an ARObject.
Sat cmi Xrubi dovfof ex pra pilxol, bduw UibStuj tma .uxiwjuht cavi mi jiop Xiy.
Iqva mzu tofa xerucfit jomnotg pi gaan Wav, zemako ol DicpoJwsaymmitm.ayakrixp.
Mie mix kufu ey OTEsgatf heviwacle culu vaeng xi da. Xcu ubyl jpebw ludv ka za vuj ob xi xfiime cme AJ ormibiuxne.
Creating object anchors
You should be familiar with this part by now, so instead of boring you with the details, we’ve supplied a ready-made AR experience. All you need to do is add your freshly-created ARObject file.
Obal zpuqluq/CimguGddapvxoxn.frhpivokv ik ZuexifqTalnahas.
In’z a zass wiyij AN iffuqoesla cutf qeac alnavajraqe llnodeq plep ftaq wizu ahrumayhoph baqgw awoap rpi dol nhown. Tmegl a nag muqogoj nnevyexhomk gte ozraneezca zesjik VeisuvqNecyadab.
Wilboqbny, sre oyqiseejpo iqab e Nuhiwucliw Obxqic. Jtirxe op du uqi oj Okbibg Ekcfum obvxied.
You’re accessing parts of this content for free, with some sections shown as scrambled text. Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.