How to render points using away3d 4? There is no point primitive.
I tried to use a RegularPolygonGeometry but flash player crashes when I have more than 2000 polygons.
I tried to use Sprites3d but does not work too.
Any suggestions?
Render large amount of pointsSoftware: Away3D 4.x |
||
Cleiton Luiz, Newbie
Posted: 02 July 2012 11:55 AM Total Posts: 5 How to render points using away3d 4? There is no point primitive. I tried to use a RegularPolygonGeometry but flash player crashes when I have more than 2000 polygons. I tried to use Sprites3d but does not work too. Any suggestions? |
||
Richard Olsson, Administrator
Posted: 02 July 2012 05:45 PM Total Posts: 1192 [ # 1 ] What do you mean by “does not work”? I would say that Sprite3D is probably your best bet, unless the points don’t need to move independently in which case you could use several meshes with more than a single “sprite” polygon each. Please describe what you want to do with the points and it will be easier to suggest good solutions. |
||
Cleiton Luiz, Newbie
Posted: 02 July 2012 08:37 PM Total Posts: 5 [ # 2 ] Thanks for the reply Richard Olsson. By “not work” I mean that flash player crash or the fps stay too low. The problem that I’m trying to solve is to render Point Cloud like this: http://50.16.202.3/CCLe_Data/samplePublish/Other/?autoload=Inuksuk - 8.5MB. |
||
Richard Olsson, Administrator
Posted: 02 July 2012 08:46 PM Total Posts: 1192 [ # 3 ] Well if it’s going to be static like that, just create the geometry procedurally into a single Geometry instance. That will be super fast, since you will only have a single Mesh in your scene, and the data can exist on the GPU. You can use way more “points” than that even. If possible, try to use single triangles for points. If that doesn’t work for some reason (i.e. if you don’t want the points to be triangular and can’t use alpha to mask them) then use some other shape built from triangles. Create the UV values for the “points” such that they each map to a tiny part of a large texture atlas, and paint your point colors/textures onto that atlas. This is the most efficient way to program something like this on a GPU. |
||
Cleiton Luiz, Newbie
Posted: 02 July 2012 09:01 PM Total Posts: 5 [ # 4 ] You have some tips on how to generate the geometry procedurally? I tried to use the MeshHelper to build a mesh from my set of points. Is that the right way? |
||
Richard Olsson, Administrator
Posted: 02 July 2012 09:07 PM Total Posts: 1192 [ # 5 ] Personally I would do it “manually” by just populating vectors and then passing them into a SubGeometry. That could be a good exercise to learn how Away3D (and GPU data in general) works internally. But you could also use MeshHelper, yeah, or FaceHelper.addFace() to create one face at a time on an initially empty geometry. |
||
Cleiton Luiz, Newbie
Posted: 02 July 2012 11:44 PM Total Posts: 5 [ # 6 ] Thanks again! I was on the right way. I will work on that. |
||
Cleiton Luiz, Newbie
Posted: 03 July 2012 12:10 AM Total Posts: 5 [ # 7 ] Just one last question, how can I “map” this triangles into points? |
||
Jon Tetzlaff, Newbie
Posted: 06 July 2012 04:19 PM Total Posts: 7 [ # 8 ] How do pass the vectors into a SubGeometry? I want to do a similar thing where I would get a bunch of coordinates and then make a 3D model out of them. Thanks! |
||
Fabrice Closier, Administrator
Posted: 06 July 2012 06:48 PM Total Posts: 1265 [ # 9 ] The most easy way is to use MeshHelper.build method var vertices:Vector.<Number> = Vector.<Number>([ //uvs optional |
||
Jon Tetzlaff, Newbie
Posted: 18 July 2012 05:10 PM Total Posts: 7 [ # 10 ] So say we are getting random points from a source. This could be 100 points or a more. What I can’t seem to wrap my head around is how you would build the indices. Have you ever had to deal with a situation like this? |