Hi!
I have to build a scene where i will have some FreeForms with +10000 meshobjects on each one.
It all works ok, but it takes much time to load the files.
Is there any tips to speed up heavy operations like this? Like begin/end updates, or something like that?
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have to build a scene where i will have some FreeForms with +10000 meshobjects on each one.
Whoa it's huge how many vertices in total ? all objects are always visible or not ? what the kind of your project is ?
perhaps
* create dynamic loading depending of your position in the world. Just loading new elements.
* simplify your objects, use proxy objects for duplicated meshes.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a factory to show. It has 3 CNC machines and a couple of storage tables.
The heaviest is one of the storage tables, i think its because it has a lot of holes in it, with little tolerance, creating lots of triangles.
Apart from that the scene actualy moves smoothly.
Is there any function to 'sharp' meshobject, to decrease the triangle count?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In your 3D editor you can do it i think. In other case you'll can try the functions in Meshutils.pas like optimize and strify then save your mesh as glsm (glscene's format)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, im importing the 3D files and then save them in GLScene format.
Every time the user loads a 3D file i load the GLScene file.
I have found that unit but im having dificulties with the functions parameters and the properties available in the TMeshObject.
In other words, how do i make a function that receives a TMeshObject and call StripifyMesh?
Well, i does seem to optimize something, because if i save the file with the mesh information it has half the size than before.
But almost the same loading time so... not quite there yet :p
Last edit: Tiago Rodrigues 2016-08-31
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, this 2 units should help you
see :
procedure TGLFreeFormEx.StripAndRecalc;
procedure TGLFreeFormEx.FacesSmooth(aWeldDistance: Single=0.0000001; aThreshold: Single=35.0; InvertNormals:boolean=false);
procedure TGLFreeFormEx.Optimize(options : TMeshOptimizerOptions);
I wil try those units then :)
The textures are in a MaterialLibrary. I tried to not load textures and the speed gain was minimal so it doesnt seem to be a problem either.
Last edit: Tiago Rodrigues 2016-09-21
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi!
I have to build a scene where i will have some FreeForms with +10000 meshobjects on each one.
It all works ok, but it takes much time to load the files.
Is there any tips to speed up heavy operations like this? Like begin/end updates, or something like that?
Thanks.
Nothing guys? :/
Hi
Whoa it's huge how many vertices in total ? all objects are always visible or not ? what the kind of your project is ?
perhaps
* create dynamic loading depending of your position in the world. Just loading new elements.
* simplify your objects, use proxy objects for duplicated meshes.
I have a factory to show. It has 3 CNC machines and a couple of storage tables.
The heaviest is one of the storage tables, i think its because it has a lot of holes in it, with little tolerance, creating lots of triangles.
Apart from that the scene actualy moves smoothly.
Is there any function to 'sharp' meshobject, to decrease the triangle count?
In your 3D editor you can do it i think. In other case you'll can try the functions in Meshutils.pas like optimize and strify then save your mesh as glsm (glscene's format)
Yes, im importing the 3D files and then save them in GLScene format.
Every time the user loads a 3D file i load the GLScene file.
I have found that unit but im having dificulties with the functions parameters and the properties available in the TMeshObject.
In other words, how do i make a function that receives a TMeshObject and call StripifyMesh?
function StripifyMesh(indices : TIntegerList; maxVertexIndex : Integer;
agglomerateLoneTriangles : Boolean = False) : TPersistentObjectList;
How do i get the indices : TIntegerList; parameter from the TMeshObject and what do i do with the returned TPersistentObjectList?
Thanks :)
Well, after a lot of search i've found an example of this function used on a TGLFreeForm.
Something like this:
Well, i does seem to optimize something, because if i save the file with the mesh information it has half the size than before.
But almost the same loading time so... not quite there yet :p
Last edit: Tiago Rodrigues 2016-08-31
Hi, this 2 units should help you
see :
procedure TGLFreeFormEx.StripAndRecalc;
procedure TGLFreeFormEx.FacesSmooth(aWeldDistance: Single=0.0000001; aThreshold: Single=35.0; InvertNormals:boolean=false);
procedure TGLFreeFormEx.Optimize(options : TMeshOptimizerOptions);
Last edit: Jerome.D (BeanzMaster) 2016-09-11
Hi, another question, do you load your textures dynamically, or there are alredy set in a MaterialLibrary ?
I wil try those units then :)
The textures are in a MaterialLibrary. I tried to not load textures and the speed gain was minimal so it doesnt seem to be a problem either.
Last edit: Tiago Rodrigues 2016-09-21