YARCA YET ANOTHER RAYCASTING APPLICATION Michele Pilloni  Elda Paja Davide Mottin PROJECT REPORT  FOR  COMPUTER GRAPHICS C...
PROBLEM STATEMENT <ul><li>The scope of this project is to extend NASA’s  </li></ul><ul><li>World Wind to perform ray casti...
YARCA ENVIRONMENT
SYSTEM ARCHITECTURE
RAY CASTING <ul><li>Ray casting on the terrain </li></ul><ul><li>Ray casting on arbitrary 3D objects  </li></ul>
RAY CASTING ON THE TERRAIN <ul><li>Transmitters  </li></ul><ul><li>Ray Casting Technique  </li></ul><ul><ul><li>Ray Castin...
TRANSMITTERS  <ul><li>3D model objects of two types:  </li></ul><ul><ul><li>Antennas </li></ul></ul><ul><ul><li>Bulbs </li...
RAY CASTING TECHNIQUE
RAY CASTING ALGORITHM
RAY CASTING ALGORITHM
GROUPS OF TRANSMITTERS  <ul><li>We can put more than one transmitter on the terrain.  </li></ul><ul><li>Different types of...
<ul><ul><li>The values of the resulting matrix containing all the given matrices will be calculated as :   </li></ul></ul>...
GROUPS OF TRANSMITTERS:  MATRIX COMPUTATION  <ul><li>Compare  t1  with  t2.  </li></ul><ul><ul><li>If they intersect, comp...
<ul><li>Repeat step 1 with  t i  for i = 1 … n  </li></ul><ul><li>Repeat comparing  t i  for i = 2 … n  and  t i+j   for  ...
WHY GROUPING TRANSMITTERS? <ul><li>The main problem of casting each image individually was that the borders were not so we...
RAY CASTING ON 3D OBJECTS  <ul><li>Barrier Layer  </li></ul><ul><ul><li>Compute texture  </li></ul></ul><ul><ul><li>Textur...
BARRIERS <ul><li>Barrier is an object containing:  </li></ul><ul><li>a sector for the extent of the object base that is a ...
BARRIERS <ul><li>Directionable Barriers </li></ul><ul><ul><li>bounding box as a sphere </li></ul></ul><ul><ul><li>can dist...
COMPUTE TEXTURE <ul><li>To perform ray casting on the object surface the transmitter needs to know for each barrier  b : <...
COMPUTATION OF THE DISTANCE FROM THE TRANSMITTER TO THE BARRIER:  <ul><li>Set the frustum, defining  </li></ul><ul><ul><li...
MAXIMAL HEIGHT TO WHICH THE TRANSMISSION CAN REACH <ul><li>Split the cone of transmission into an infinite number of circl...
RAY CASTING ON BARRIERS ALGORITHM  <ul><li>For each Transmitter  </li></ul><ul><li>For each Barrier with center ≤ transmis...
<ul><li>Textures are images that are mapped in a 3D world  </li></ul><ul><ul><ul><li>In our case, textures are images repr...
DETERMINE THE POSITIONING OF THE OBJECT FACES <ul><li>Consider the normal vector of each face of the object and compute th...
MULTIPASS TEXTURE MAPPING <ul><li>For every barrier that has to be rendered and has a texture on it:  </li></ul><ul><ul><l...
MULTIPASS TEXTURE MAPPING Multi Passing Scheme
FUTURE WORK  <ul><li>Further improvements </li></ul><ul><ul><li>Increase computation velocity </li></ul></ul><ul><ul><li>A...
CONCLUSIONS  <ul><li>The developed system solves problems regarding ray casting in world wind environment  </li></ul><ul><...
Upcoming SlideShare
Loading in …5
×

YARCA (Yet Another Raycasting Application) Project

448 views

Published on

The scope of this project is to extend NASA’s World Wind to make it possible to visualize ray casting not only in intersection with the terrain, but also to consider 3D objects, which we call barriers, that will be hit by rays emitted by other objects which we call transmitters, calculating the coverage area and field of view of the transmitters and showing how the transmission signal is reflected onto the objects’ surfaces.

Published in: Education, Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
448
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • To find out the distance from the transmitter to the barrier: (1) we set the frustum, defining the eye position, the eye direction, which is from the transmitter to the centroid of the barrier, the up vector and the near clipping distance. (2) DEPTH_TEST is enabled to render the barrier. (3) the result of the DEPTH_TEST is written on the Depth Buffer. This matrix is saved. (4) associate the values of the Depth Buffer to world wind distances. The idea is that the values inside the Depth Buffer do not have unit measures though they already express information about distances. We need to make some kind of calibration to do the right mapping between values and real distances. We use proportion for this purpose. A known point, for which we know the position in our matrix, is considered. We chose the vertex of the barrier nearest to the transmission center. Having this known point, we do know this information about it: a. the corresponding value in the depth matrix b. the distance to the transmitter, which is calculated as the distance from the transmitter to this point of the barrier In this way, we can build a correspondence between the values of the depth buffer to the distances, to calculate the actual distance for each point.
  • The diameter of the circles is as wide as the transmission at the specified height.
  • It is important not to forget to disable the depth buffer test before performing the “stencil” buffer and the color buffer test, otherwise it would destroy the view in the 2nd and the 5th step, because every new object would have to pass this test first.
  • YARCA (Yet Another Raycasting Application) Project

    1. 1. YARCA YET ANOTHER RAYCASTING APPLICATION Michele Pilloni Elda Paja Davide Mottin PROJECT REPORT FOR COMPUTER GRAPHICS COURSE
    2. 2. PROBLEM STATEMENT <ul><li>The scope of this project is to extend NASA’s </li></ul><ul><li>World Wind to perform ray casting both on the </li></ul><ul><li>surface of the world and on arbitrary 3D objects. </li></ul>
    3. 3. YARCA ENVIRONMENT
    4. 4. SYSTEM ARCHITECTURE
    5. 5. RAY CASTING <ul><li>Ray casting on the terrain </li></ul><ul><li>Ray casting on arbitrary 3D objects </li></ul>
    6. 6. RAY CASTING ON THE TERRAIN <ul><li>Transmitters </li></ul><ul><li>Ray Casting Technique </li></ul><ul><ul><li>Ray Casting with barriers </li></ul></ul><ul><li>Groups of transmitters </li></ul>
    7. 7. TRANSMITTERS <ul><li>3D model objects of two types: </li></ul><ul><ul><li>Antennas </li></ul></ul><ul><ul><li>Bulbs </li></ul></ul><ul><ul><li>They support different types of signals (i.e. linear, Gaussian, etc…) </li></ul></ul><ul><li>To manage transmitters, associate: </li></ul><ul><ul><li>A sector, as big as the coverage area of their signals </li></ul></ul><ul><ul><li>A matrix which is mapped to the sector </li></ul></ul><ul><ul><li>A sector image to represent the coverage area of the transmitter </li></ul></ul><ul><ul><ul><li>The color of the image will vary in compliance with the values of the matrix </li></ul></ul></ul>
    8. 8. RAY CASTING TECHNIQUE
    9. 9. RAY CASTING ALGORITHM
    10. 10. RAY CASTING ALGORITHM
    11. 11. GROUPS OF TRANSMITTERS <ul><li>We can put more than one transmitter on the terrain. </li></ul><ul><li>Different types of transmitters transmit different types of signals </li></ul><ul><li>In case we have signals of the same type that are within the coverage area of one another, they intersect. </li></ul><ul><li>Except for the intersection, the resultant transmission is also computed and this is shown graphically using a more intensive color. </li></ul><ul><li>On the other hand, signals of different types cannot intersect with one another, even if they were close together. </li></ul>
    12. 12. <ul><ul><li>The values of the resulting matrix containing all the given matrices will be calculated as : </li></ul></ul>GROUPS OF TRANSMITTERS: MATRIX COMPUTATION <ul><ul><li>We focus our attention in the intersection area: </li></ul></ul>
    13. 13. GROUPS OF TRANSMITTERS: MATRIX COMPUTATION <ul><li>Compare t1 with t2. </li></ul><ul><ul><li>If they intersect, compute resulting matrices setting the resulting value in the intersection part for t1 and 0 in that of t2. </li></ul></ul><ul><li>Computation is performed </li></ul><ul><li>on pairs of matrices: </li></ul>
    14. 14. <ul><li>Repeat step 1 with t i for i = 1 … n </li></ul><ul><li>Repeat comparing t i for i = 2 … n and t i+j for j = 3 … n, until no comparisons are needed </li></ul><ul><li>Compute images starting by the matrices </li></ul>GROUPS OF TRANSMITTERS: MATRIX COMPUTATION
    15. 15. WHY GROUPING TRANSMITTERS? <ul><li>The main problem of casting each image individually was that the borders were not so well defined, mainly because world wind performs some operations, to improve the quality of the textures such as Gaussian filtering. </li></ul><ul><li>This kind of indexing and grouping offers great flexibility when moving, adding, removing, or stopping a transmitter, updating the current view accordingly, coming out with an high quality texture </li></ul>
    16. 16. RAY CASTING ON 3D OBJECTS <ul><li>Barrier Layer </li></ul><ul><ul><li>Compute texture </li></ul></ul><ul><ul><li>Texture mapping </li></ul></ul><ul><ul><li>Multipass Texture Mapping </li></ul></ul>
    17. 17. BARRIERS <ul><li>Barrier is an object containing: </li></ul><ul><li>a sector for the extent of the object base that is a world wind object, and </li></ul><ul><li>the barrier itself that is a Model to render a 3D object using openGL primitives. </li></ul>
    18. 18. BARRIERS <ul><li>Directionable Barriers </li></ul><ul><ul><li>bounding box as a sphere </li></ul></ul><ul><ul><li>can distinguish which of their faces are illuminated by the transmission and which are in shadow </li></ul></ul><ul><ul><li>can determine which is the nearest point to the transmission center </li></ul></ul><ul><ul><ul><li>define the near plane </li></ul></ul></ul>
    19. 19. COMPUTE TEXTURE <ul><li>To perform ray casting on the object surface the transmitter needs to know for each barrier b : </li></ul><ul><ul><li>At what distance b is positioned </li></ul></ul><ul><ul><li>For each point of the base sector of b , the maximal height to which the transmission can reach </li></ul></ul><ul><ul><li>Whether there are other barriers that can hide totally or partially the transmission on b. </li></ul></ul>
    20. 20. COMPUTATION OF THE DISTANCE FROM THE TRANSMITTER TO THE BARRIER: <ul><li>Set the frustum, defining </li></ul><ul><ul><li>the eye position, </li></ul></ul><ul><ul><li>the eye direction, which is from the transmitter to the centroid of the barrier, </li></ul></ul><ul><ul><li>the up vector, and </li></ul></ul><ul><ul><li>the near clipping distance. </li></ul></ul>
    21. 21. MAXIMAL HEIGHT TO WHICH THE TRANSMISSION CAN REACH <ul><li>Split the cone of transmission into an infinite number of circles </li></ul><ul><li>Choose one of this circles and assign it a color </li></ul><ul><li>Looking at the direction and position where the barrier is supposed to be prospectively through this circle we can see the extension of the transmission for that particular perspective </li></ul><ul><li>Save such information in what we call a “ stencil ” buffer, that is color buffer used as a mask and is represented by the selected circle </li></ul><ul><li>All the values of the stencil buffer that do not coincide with the given color of the selected circle, are considered to be out of the transmission area, as they are higher than the maximum transmission height </li></ul>
    22. 22. RAY CASTING ON BARRIERS ALGORITHM <ul><li>For each Transmitter </li></ul><ul><li>For each Barrier with center ≤ transmission radius </li></ul><ul><li>set the frustum based on the bounding box </li></ul><ul><li>calculate the “stencil buffer” and save it </li></ul><ul><li>clean the color buffer </li></ul><ul><li>calculate depth buffer and save it </li></ul><ul><li>disable depth test so that nothing is overwritten in the depth buffer </li></ul><ul><li>render other barriers starting from the most distant, in order to know whether there are other barriers in front of the one that is being considered and read values from the color buffer. </li></ul><ul><li>Calculate the texture by combining the information taken from the three buffers. </li></ul>
    23. 23. <ul><li>Textures are images that are mapped in a 3D world </li></ul><ul><ul><ul><li>In our case, textures are images representing the transmission area </li></ul></ul></ul><ul><li>To perform the texture mapping we need to map texture coordinates to vertices of the object that define the face where the texture will be mapped </li></ul><ul><ul><li>Generate texture coordinates </li></ul></ul><ul><ul><ul><li>Automatically using glTexGen. </li></ul></ul></ul><ul><ul><li>Determine the positioning of the different sides/faces of the object wrt the transmitter. </li></ul></ul>TEXTURE MAPPING
    24. 24. DETERMINE THE POSITIONING OF THE OBJECT FACES <ul><li>Consider the normal vector of each face of the object and compute the scalar product between such vector and the vector of eye direction: </li></ul><ul><li>If the product is positive, it means that the angle between the two vectors is less than 90°, and texturing should be enabled. </li></ul><ul><li>Otherwise, if the product is negative, the angle is greater than 90°, and texturing should be disabled. </li></ul>
    25. 25. MULTIPASS TEXTURE MAPPING <ul><li>For every barrier that has to be rendered and has a texture on it: </li></ul><ul><ul><li>If the barrier has not been rendered before, draw it normally and map the texture on it; </li></ul></ul><ul><ul><li>If the barrier has been already rendered, draw a fully transparent barrier over it with only the texture visible: </li></ul></ul><ul><ul><ul><li>Blending technique is used. </li></ul></ul></ul>
    26. 26. MULTIPASS TEXTURE MAPPING Multi Passing Scheme
    27. 27. FUTURE WORK <ul><li>Further improvements </li></ul><ul><ul><li>Increase computation velocity </li></ul></ul><ul><ul><li>Achieve better precision </li></ul></ul><ul><ul><li>Consider barriers of other shapes and dimensions </li></ul></ul><ul><ul><li>Consider flying objects </li></ul></ul><ul><ul><li>Adaption to the latest version of the world wind framework </li></ul></ul>
    28. 28. CONCLUSIONS <ul><li>The developed system solves problems regarding ray casting in world wind environment </li></ul><ul><li>It has a modular architecture that allows great expendability </li></ul><ul><li>The two proposed techniques are different approaches to this problem </li></ul>

    ×