Ploting more points with different material

Software: Away3D 3.x

flash3d, Newbie
Posted: 05 February 2014 10:31 AM   Total Posts: 4

Currently we are placing more than 10000’s of point in away 3d using mesh.
we used mesh and added segment to achive this.

Is it possible to have every segment with different material(color)I applied material for segment its not reflecting in the scene.

var seg:Segment = new Segment(
                      new Vertex(30*i,30*j,20*z),
  new Vertex(30*i,30*j+1,20*z),
  new ColorMaterial(0xCC0000)
    );

and also i want to know is it possible to add mouse click for the vertex.


Thanks

   

rdoi, Member
Posted: 06 February 2014 11:47 AM   Total Posts: 86   [ # 1 ]

Is there any reason that keeps you in the 3.x serie?

I am not sure how Segments worked in Away 3.x, but in the 4.1 series, you don’t need to pass materials, just start to end color ranges.
Also, they are grouped in SegmentSets, so you could add a set of Segment/LineSegments with different thickness and colors.

> and also i want to know is it possible to add mouse click for the vertex.

Vertex is just a point that has no dimension, so no (easily) targettable hitarea.
To get some mouse interaction you should probably add a mouseEnabled dummy/invisible mesh positionated in the same point.

   

flash3d, Newbie
Posted: 10 February 2014 07:08 AM   Total Posts: 4   [ # 2 ]

Thanks for your reply

We are using flex-4.0 SDK in our project that’s why we are using away3d - 3.6.

I will try this adding dummy mesh for mouse action , It will affect the performance when we add 10,000 dummy meshes or instead may be sprite 3d is better for that ?

Thanks in advance

   

rdoi, Member
Posted: 12 February 2014 06:38 PM   Total Posts: 86   [ # 3 ]

I don’t know much about Flex, but I think it has no restriction running the latest version of Away3D. Isn’t you refearing to the AIR version?

And yes, a lot of additional meshes can degrade your performance, worse if you target mobile devices.

If your intention is creating a kind of interactive grid like surface with a lot of vertices, you may consider working with just one subdivided planegeometry mesh, and use a shader pickingtype to get the position on it that received the mouseevent.

Check this link for defails about picking methods: http://away3d.com/tutorials/Introduction_to_Mouse_Picking

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X