Loading half million geomentry on mesh

Software: Away3D 4.x

flash3d, Newbie
Posted: 10 June 2014 11:39 AM   Total Posts: 4

    We are using Away3d4.0 in our project to place the pointclouds on the fly.
    As per our project requirement we need to place the points of around 1,500,000 and able to select the any one points with highlight.
    We achieved this by using particles mesh and cube geometry .
         
         
            From the below Away3d Tutorial
            http://away3d.com/tutorials/Introduction_to_Particles

          When I tried to place the cube geometry inside particle mesh I can able to add around 100000 .
When I place the plane geometry I can able to add around 500000 item in Mesh.

          I added the 3d mouse event listener to the mesh particle , If particle contains only one geometry then I can able to get the
            3d coordinates properly.
            When I tried the same 3d mouse event for mesh particle contain 500000 plane geometry . I can’t able to get the
            Proper 3d coordinates. Its giving some other point and also event is firing when I click the empty space also
.
          The following are my queries :
• Is it possible in Away3d4.0 to get the coordinates of particular particle item of the mesh.
• What his maximum number of geometry items I can able to add it in the particle mesh.
• I want to make the points to show same size in all the zoom levels. Using any geometry (in 2d we are having points similar like that)
Or we have to adjust the camera to achieve this
         

          We are trying to achieve like below url with selecting a particular item and highlight that.
          http://potree.org/demo/potree_2014.05.23/examples/skatepark.html
         
           
         

   

Mr Margaret Scratcher, Sr. Member
Posted: 10 June 2014 09:37 PM   Total Posts: 344   [ # 1 ]

I’ll have a hunt for some code for a project I did which plotted points on screen which remained at a constant size - the points were spheres which I scaled according to their distance from the camera:


http://www.margaretscratcher.co.uk/projects/3DFlashPlotter/index.html

   

flash3d, Newbie
Posted: 12 June 2014 10:24 AM   Total Posts: 4   [ # 2 ]

Thanks Mr Margaret Scratcher for your suggestion.

We are tried like adjusting the fov in away3d_3.x its working fine but its not working with away3d4.x

We tried with adjusting the zoom and fov on away3d_4.0 . Its not working.
Is it we need to adjust the scale of every object based on the camera position or Can you explain the method to adjust the size of the object from camera.

Thanks in Advance

   

Mr Margaret Scratcher, Sr. Member
Posted: 17 June 2014 10:00 PM   Total Posts: 344   [ # 3 ]

Sooooo:

We have this:

private function calcDistScale():void
  {
    
// Two points at different distance from the camera (1000u apart.)
   
var v0:Point view.camera.project(new Vector3D(010));
   var 
v1:Point view.camera.project(new Vector3D(011000));
   
_scaleFactor = (v1.v0.y) / 1000;  
   
   
trace ("scale Factor is " _scaleFactor);
  

and then in enterframe:

for (var i:Number 0nodeArray.lengthi++)
     
{
      
var nodeToScale nodeArray[i].nodeMesh;
      var 
dist:Number Vector3D.distance(camera.positionnodeToScale.position);
      
scale = (dist) * _scaleFactor;
      
nodeToScale.scaleX scale;
      
nodeToScale.scaleY scale;
      
nodeToScale.scaleZ scale;  
     

Ta-DAAAAA!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X