Extending Blender Development of a Haptic Authoring Tool.docx
《Extending Blender Development of a Haptic Authoring Tool.docx》由会员分享,可在线阅读,更多相关《Extending Blender Development of a Haptic Authoring Tool.docx(17页珍藏版)》请在冰豆网上搜索。
ExtendingBlenderDevelopmentofaHapticAuthoringTool
英文原文
HAVE'2007-IEEEInternationalWorkshopon
HapticAudioVisualEnvironmentsandtheirApplications
Ottawa,Canada12-14October2007
ExtendingBlender:
DevelopmentofaHapticAuthoringTool
SheldonAndrews',MohamadEid2,AtifAlamri2,andAbdulmotalebElSaddik2
MultimediaCommunicationsResearchLaboratory-MCRLab
SchoolofInformationTechnologyandEngineering-UniversityofOttawa
Ottawa,Ontario,KIN6N5,Canada
'sandrO71]@site.uottawa.ca,2teid,atifWabed]@mcrlab.uottawa.Ca
Abstract-Inthispaper,wepresentourworktoextendawellknown3Dgraphicmodeler-Blender-tosupporthapticmodelingandrendering.TheextensiontoolisnamedHAMLAT(HapticApplicationMarkupLanguageAuthoringTool).WedescribethemodificationsandadditionstotheBlendersourcecodewhichhavebeenusedtocreateHAMLATFurthermore,wepresentanddiscussthedesigndecisionsusedwhendevelopingHAMLAT,andalsoanimplementation"roadmap"whichdescribesthechangestotheBlendersourcecode.Finally,weconclude
withdiscussionofourfuturedevelopmentandresearchavenues.
Keywords-Haptics,HAML,GraphicModelers,Blender,VirtualEnvironments.
I.INTRODUCTION
A.Motivation
Theincreasingadoptionofhapticmodalityinhuman-computerinteractionparadigmshasledtoahugedemandfornewtoolsthathelpnoviceuserstoauthorandedithapticapplications.Currently,thehapticapplicationdevelopmentprocessisatimeconsumingexperiencethatrequiresprogrammingexpertise.Thecomplexityofhapticapplicationsdevelopmentrisesfromthefactthatthehapticapplicationcomponents(suchasthehapticAPI,thedevice,thehapticrenderingalgorithms,etc.)needtointeractwiththegraphiccomponentsinordertoachievesynchronicity.
Additionally,thereisalackofapplicationportabilityastheapplicationistightlycoupledtoaspecificdevicethatnecessitatestheuseofitscorrespondingAPI.Therefore,deviceandAPIheterogeneityleadtothefragmentationanddisorientationofbothresearchersanddevelopers.Inviewofalltheseconsiderations,thereisaclearneedforanauthoringtoolthatcanbuildhapticapplicationswhilehidingprogrammingdetailsfromtheapplicationmodeler(suchasAPI,device,orvirtualmodel).
ThispaperdescribesthetechnicaldevelopmentoftheHapticApplicationMarkupLanguageAuthoringTool(HAMLAT).ItisintendedtoexplainthedesigndecisionsusedfordevelopingHAMLATandalsoprovidesanimplementation"roadmap",describingthesourcecodeoftheproject.
B.Blender
HAMLATisbasedontheBlender[1]softwaresuite,whichisanopen-source3Dmodelingpackagewitharichfeatureset.Ithasasophisticateduserinterfacewhichis
notedforitsefficiencyandflexibility,aswellasitssupportsformultiplefileformats,physicsengine,modemcomputergraphicrenderingandmanyotherfeatures.
BecauseofBlender'sopenarchitectureandsupportivecommunitybase,itwasselectedastheplatformofchoicefordevelopmentofHAMLAT.Theopen-sourcenatureofBlendermeansHAMLATcaneasilyleverageitsexistingfunctionalityandfocusonintegratinghapticfeatureswhichmakeitacompletehapto-visualmodelingtool,sincedevelopinga3DmodelingplatformfromscratchrequiresconsiderabledevelopmenttimeandexpertiseinordertoreachtheleveloffunctionalityofBlender.Also,wecantakeadvantageoffutureimprovementstoBlenderbymergingchangesfromitssourcecodeintotheHAMLATsourcetree.
HAMLATbuildsonexistingBlendercomponents,suchastheuser-interfaceandeditingtools,byaddingnewcomponentswhichfocusontherepresentation,modification,andrenderingofhapticpropertiesofobjectsina3Dscene.ByusingBlenderasthebasisforHAMLAT,wehopetodevelopa3Dhapticmodelingtool
whichhasthematurityandfeaturesofBlendercombined
withthenoveltyofhapticrendering.
Atthetimeofwriting,HAMLATisbasedonBlenderversion2.43sourcecode.
C.ProjectGoals
Aspreviouslystated,theoverallgoalfortheHAMLATprojectistoproduceapolishedsoftwareapplicationwhichcombinesthefeaturesofamodemgraphicmodelingtoolwithhapticrenderingtechniques.HAMLAThasthe"lookandfeel"ofa3Dgraphicalmodelingpackage,butwiththeadditionoffeaturessuchashapticrenderingandhapticpropertydescriptors.Thisallowsartists,modelers,anddeveloperstogeneraterealistic3Dhapto-visualvirtualenvironments.
Ahigh-levelblockdiagramofHAMLATisshowninFigure1.Itillustratestheflowofdatainthehapticmodeling.HAMLATassiststhemodeler,orapplicationdeveloper,inbuildinghapto-visualapplicationswhichmaybestoredinadatabaseforlaterretrievalbyanotherhapticapplication.Byhapto-visualapplicationwerefertoanysoftwarewhichdisplaysa3Dscenebothvisuallyandhapticallytoauserinavirtualsetting.AnXMLfileformat,calledHAML[2],isusedtodescribethe3Dscenesandstorethehapto-visualenvironmentsbuiltbyamodelerforlaterplaybacktoanenduser.
Traditionally,buildinghapto-visualenvironmentshasrequiredastrongtechnicalandprogrammingbackground.Thetaskofhapticallyrenderinga3Dsceneistedious
sincehapticpropertiesmustbeassignedtoindividualobjectsinthesceneandcurrentlytherearefewhigh-leveltoolsforaccomplishingthistask.HAMLATbridgesthisgapbyintegratingintotheHAMLframeworkanddeliveringacompletesolutionfordevelopmentofhapto-visualapplicationsrequiringnoprogrammingknowledge.
Theremainderofthepaperisorganizedasfollows:
inSection2,wepresenttheproposedarchitectureextensionsanddiscussdesignconstraints.Section3describestheimplementationdetailsandhowhapticpropertiesareaddedandrenderedwithintheBlenderframework.InSection4wediscussrelatedissuesandfutureworkavenues.
II.SYSTEMOVERVIEWANDARCHITECTURE
TheBlenderdesignphilosophyisbasedonthreemaintasks:
datastorage,editing,andvisualization.Accordingtothelegacydocumentation[3],itfollowsadata-visualize-editdevelopmentcycleforthe3Dmodelingpipeline.A3DsceneisrepresentedusingdatastructureswithintheBlenderarchitecture.Themodelerviewsthescene,makeschangesusingtheeditinginterfacewhichdirectlymodifiestheunderlyingdatastructures,andthenthecyclerepeats.
Tobetterunderstandthisdevelopmentcycle,considertherepresentationofa3DobjectinBlender.A3Dobjectmayberepresentedbyanarrayofverticeswhichhave
beenorganizedasapolygonalmesh.Usersmaychoosetooperateonanysubsetofthisdataset.Editingtasksmayincludeoperationstorotate,scale,andtranslatethe
vertices,orperhapsare-meshingalgorithmto"cleanup"redundantverticesandtransformfromaquadtoatriangletopology.Thedataisvisualizedusingagraphical3Drendererwhichiscapableofdisplayingtheobjectasawireframeorasashaded,solidsurface.Thevisualizationisnecessaryinordertoseetheeffectsofeditingonthedata.Inanutshell,thisexampledefinesthedesignphilosophybehindBlender'sarchitecture.
InBlender,dataisorganizedasaseriesoflistsandbasedatatypesarecombinedwithlinksbetweenitemsineachlist,creatingcomplexscenesfromsimplestructures.
Thisallowsdataelementsineachlisttobereused,thusreducingtheoverallstoragerequirements.Forexample,ameshmaybelinkedbymultiplesceneobjects,butthepositionandorientationmaychangeforeachobjectandthetopologyofthemeshremainsthesame.AdiagramillustratingtheorganizationofdatastructuresandreuseofsceneelementsisshowninFigure2.Asceneobjectlinkstothreeobjects,eachofwhichlinktotwopolygonalmeshes.Themeshesalsoshareacommonmaterialproperty.Theentiresceneisrenderedononeofseveralscreens,whichvisualizesthescene.
WeadopttheBlenderdesignapproachforourauthoringtool.Thedatastructureswhichareusedtorepresentobjectsina3Dscenehavebeenaugmentedtoincludefieldsforhapticproperties(e.g.,stiffness,damping);userinterfacecomponents(e.g.,buttonpanels)whichallowthemodelertochangeobjectpropertieshavealsobeenupdatedtoincludesupportformodifyingthehapticpropertiesofanobject.Additionally,aninteractivehapto-visualrendererhasbeenimplementedtodisplaythe
3Dscenegraphicallyandhaptically,providingthemodelerorartistwithimmediatefeedbackaboutthechangestheymaketothescene.inthecurrentversionoftheHAMLAT.themodificationstotheBlenderframeworkinclude:
datastructuresforrepresentinghapticproperties,
aneditinginterfaceformodifyinghapticproperties,anexternalrendererfordisplayingandpreviewinghapticallyenabledscenes,scriptswhichallowscenestobeimported/exportedintheHAMLfileformat.
AclassdiagramoutliningthechangestotheBlenderrameworkisshowninFigure3.ComponentswhichareertinenttoHAMLATareshadedingray.HAMLATbuildsonexistingBlendersub-systemsbyextendingthemorhapticmodelingpurposes.Datastructuresforrepresentingobjectgeometryandgraphicalrenderingareaugmentedtoincludefieldwhichencompassthetactilepropertiesnecessaryforhapticrendering.
ToallowtheusertomodifyhapticpropertiesGUIComponentsareintegratedaspartoftheBlendereditingpanels.Theoperationstriggeredbythesecomponents
operatedirectlyonthedatastructuresusedforrepresentinghaticcuesandmaybeconsideredpartoftheeditingstepoftheBlenderdesigncycle.
Similarlytothebuilt-ingraphicalrenderer,HAMLATusesacustomrendlererfordisplaying3Dsscenesgrphcalandhaptcall,anisineednoftheBlenderrenderer.Thiscomponentisdevelopedindependently