# Collision and Impact Force Computation for Virtual Reality ...

Collision and Impact Force Computation for Virtual Reality ...

Therefore, before the subdivision process reaches the lastlevel, these bounding-spheres can be used. In order togenerate successive subdivided segments, the boxes’length, height and width are simply divided by 2, and then8 sub-boxes are of equal size are created (see Fig. 4).RelativeVector = basketball_direction –bsphere_direction (2)Parent boxChild1FALSEChild2TRUEChild8FALSEFigure 5. Successive Tree of Bounding BoxFigure 3. Axis-Aligned Bounding Box of a HandVirtual objectObj dirHandHand dirw/2h/2w – widthh – heightl – lengthFigure 6. Two moving spheres whose path cross eachotherl/2Figure 4. Subdivision of a Box gives 8 Sub-BoxesIn computer graphics, a 3D model can be represented intriangle facets, each consists of 3 vertices. The trianglefacets of the hand model are used to determine if thesubdivided boxes contain any facet of the hand model. Forthose boxes that contain no facet of the hand model, nomore subdivision will be performed; a flag of FALSE isadded to the properties of the sub box as shown in Figure5.3.3 Checking Collision for Two Moving Objects. Thebounding-sphere (used in first level comparison) of thehand model will move according to the user’s handmovement. In the virtual environment, most objects arenon-static, therefore collision detection for two movingobjects is needed. For simplicity, use a sphere to boundthe virtual object. Determining if two moving spherescollide is always problematic. Even if the paths of the twomoving spheres cross it is not guaranteed a collision. Thereason is that they could pass the intersection point at adifferent time (Figure 6).To determine if two moving spheres collide, one spherecan be assumed as static while the other one is assumed tomove at a relative speed and direction. In the exampleshown in Figure 6, if the bounding-sphere is assumed tobe static then the ball’s relative speed can be computedusing Eq. 2. Figure 7 illustrates this calculation:Virtual objrelative_v = obj_dir - hand_dircollision !Obj dirBounding_sphereFigure 7. Computation of Relative Vector-hand_dirTo check if the relative vector indicates collision, theshortest distance of bounding-sphere centre is computed(as illustrated in Figure 8) and compared with the sum ofthe two radii. If the distance is less than the sum of thetwo radii, there will be collision.SPλDQVector VFigure 8. The Shortest Distance (D) from Point P toVector V

The shortest distance can be computed by making use ofvector manipulation:Firstly, the coordinates of Q must be determined, suchthat the distant D can be calculated using the vectordistant formula in Eq. 3.D222= ( XP− XQ) + ( YP−YQ) + ( ZP− ZQ) (3)To find coordinate of Q we use Eqns 4 and 5.~rQ = S + λV(4)~ rλ = ( S − P)• V(5)In order to calculate the response of the ball, twocalculations are carried out. In the first calculation,velocity of the hand is ignored, only the ball velocity isconcerned. It can be assumed that the hand is a staticplane and the ball collides into it.In the second calculation, velocity of the ball is ignored,only the hand velocity is concerned. In other words, thehand moves to hit the ball.The ball responds differently in the two calculations, asillustrated in Figure 9 (a) and (b):where V ~r is the normalised vector of relative VUsing Eqns 3 to 5, the shortest distance between centre ofthe static sphere (in this case, the bounding-sphere) andthe relative vector can be found. Together with theinformation about the two spheres radii, collisiondetection between two moving spheres can be accuratelyachieved.When a collision is detected, the bounding sphere will besubdivided into smaller spheres before it reaches the lastlevel of comparison, then the same collision detectionprocess is done for each subdivided sphere.When the last level of subdivision is reached, thebounding-box method is used instead.Collision checking between the ball and the bounding-boxis similar to checking of ball-plane collision except thesame checking has to be performed six times, each timefor each face on the bounding-box.In a virtual environment that comprises more than onevirtual object to interact with the user’s hand model, onlythe collision that occurs earlier should be handled.4. FORCE FEEDBACKSince the graphics model of a user’s body, for instance ahand, is bound by a box and recursive subdivision of thebounding-box are used for collision detection, thefeedback force is essentially exerted to an area (where acollision takes place) on a surface of the last subdividedbox.Feedback force is then calculated using Newton’s Law:F = ma, where F is force, m is mass, a is acceleration.For example, when a ball is to collide on to the hand, theball’s response to the collision has to be computed. Thiscan be done by updating the ball’s velocity (magnitudeand direction) after the moment the collision occurs. Fromthe changes in the ball’s velocity, acceleration ofdeceleration can be computed. The multiplication of theacceleration and the mass of the ball indicates thefeedback force.NR1(a)L1Figure 9. Ball Responses (R1 & R2) in First (a) andSecond (b) CalculationsAssuming there is no frictional force on the surface of thehand model, then the response velocities of the ball inboth calculations (R1 and R2) are as in Eqns 6 and 7.Therefore, the acceleration or deceleration of the ball canbe computed by subtracting initial velocity from responsevelocity. In the first calculation:a1 = R1− L1= 2 * ( −L 1•N ) * N(8)In the second calculation:a2 = R2− 0= ( L 2 • N)* N(9)From Eq 8 and Eq 9, it can be noticed that the direction ofthe accelerations of the ball are inclined with the directionof the normal. Therefore, the external force exerted to thehand is the opposite direction of the acceleration of theball (feedback force).(b)R 1 = 2*( −L1• N )* N + L1(6)R 2 = ( L2• N ) * N(7)The equation of total feedback force is shown as Eq 10.R2L2

F = MassBall ( a1+ a2)= *(2*(−L1• N)+ ( L2• N))(10)Mass BallSince the feedback force always has opposite direction ofthe normal at the collision point, the direction can beignored and only the magnitude of force is considered.Besides, the feedback force is only exerted to theparticular area where collision occurs. If the number ofsubdivision level is more, “resolution” of force would behigher too.5. OBSERVATIONS AND DISCUSSIONIn order to achieve realistic VR effects, an applicationshould be able to interface objects to input devices (suchas motion capture sensors, keyboard and mouse) and forcefeedback devices. This function should be included as partof the object properties. Feedback force will calculatedonly for those objects with output devices connected andthe API (Application Program Interface) should be able tocommunicate with the drivers of all devices.Calculating realistic responses for all dynamic objects insimulations or animations is essential to achieve realisticvisual effect. This can be done by including a bouncingfactor, friction, degree of deformation of an object when acollision takes place.The methods described have been implemented using a5DT DataGlove16 and Ascension Flock of Bird (a 6-DOFtracker) interfaced to a personal computer on which avirtual reality interface to handling a basketball has beenimplemented. The force of collision is representedgraphically.Generating realistic tactile feedback by including thetemperature and material surface as part of the objectproperties helps to enhance the haptic feedback.Appropriate technology does not exist to achieve this butcurrent research suggests it will soon be available.The author would like to suggest some VR applicationsthat make use of force feedback:5.1 Games and Simulations. Due to the advancements incomputer graphics technologies, games are now poweredby strong 3D engines and sophisticate graphics card. Itcan be seen that most of the games developers are nowcompeting in realistic visual and sound effects. Thus,adding sense of touch to games can indeed boost thedevelopment of gaming technologies. Games that can besignificantly improved by interaction include sports andgames.Besides, feedback force can also be added to most of thesimulation training programs such as driving, piloting, orsome dangerous activities. The feedback force can bescaled down by the simulators in order to strike a balancebetween safety and sense of touch, which increaseproficiency.5.2 Applications for visually impaired persons. Forvisually impaired persons, force feedback devices meanmuch to them. During the past few years, Braille devicesand embossed textures have proved that. Therefore, manyapplications could be developed for visually impairedpersons using force feedback devices. For example, avisually impaired person could realise a picture or eventhe shape of an object using force feedback devices.6. CONCLUSIONSCollision detection, object’s response and feedback forcecomputation are the focus of the project. Existingcollision detection techniques have been studied.Bounding-box methods such as AABB and OBB methodswere considered. Octal subdivision methods proposed andinvestigated in this project increase the accuracy butconsume more computation power.Feedback force was calculated using well known formulasand laws of physics to simulate realistic VR effect. Manyformulae have been revised and improved to suit theneeds of the application.Lastly, when the force output devices become availableand motion capture devices become popular, there will bea boost and incentive in research of VR technologies.REFERENCES[1] VREPAR. Sensing in VR.http://www.psicologia.net/pages/sensing.htm[2] B. M. Jau. Anthropomorphic Exoskeleton dual arm /hand telerobot controller. pages 715--718, 1988.[3] K. B. Shimoga. A Survey of Perceptual FeedbackIssues in Dexterous Telemanipulation: Part II. FingerTouch Feedback. In Proc. of the IEEE Virtual RealityAnnual International Symposium. Piscataway, NJ :IEEE Service Center, 1993.[4] M.I.T Touch Lab. Seeking computers that can feel.http://touchlab.mit.edu/news/NYTimesArticle/NYTimesArticle.htm[5] M.R. Jolly, J.D. Carlson and J.W. Bender, “Propertiesand applications of commercial rheological fluids”SPIE 5 th Annual International Symposium on SmartMaterials and Structures, San Diego, CA, 15 March,1998.[6] Gino van den Bergen. Efficient collision detection ofcomplex deformable models using AABB trees.Journal of Graphics Tools, 2(4):1-14, 1997.[7] S. Gottschalk, M. Lin, and D. Manchoa. OBBTree: AHierarchical Structure for Rapid InterferenceDetection. In Proc. of ACM Siggraph’96, pg 171-180.1996.

More magazines by this user
Similar magazines