Optimizing Duplicate Model Imports
#1
For the purposes of a simulation built on the DXEngine and PowerToys, a very large number of high-poly models of the same .obj file must be imported on a low-spec system.

I have a Model class which encapsulates WPF's ModelVisual3D and is constructed using the Model3D returned by an instance of AB3D's ReaderObj. An optimization specific to this use-case has already been implemented, whereby we obtain this Model faster by using the CloneCurrentValue extension on Model3Ds generated from a .obj file we've previously imported from. This has the benefit of running our turing machine over the tape in memory rather than that of the disk, but still performs quite poorly on startup. Is there a known/supported method of obtaining many independent Model3Ds from one .obj I am overlooking here?
#2
I have sent you the source code for the ReaderObj so you can tweak it to your needs - getting one Model3D at a time.

Also note that it would save a lot of memory if you would not create the WPF 3D objects (that are then converted into DXEngine objects behind the scene) but create the DXEngine objects directly. This would save the conversion time, and also because DXEngine objects use float Vector3 structs instead of double-based Point3D, this would take much less memory.

See the DXEngineAdvanced/ManuallyCreatedSceneNodes.xaml.cs sample on how to manually create Ab3d.DirectX.GeometryMesh and Ab3d.DirectX.MeshObjectNode objects.

To improve the performance, I would also recommend using .Net 10 because each version improved the performance just by upgrading to a newer version.

Another option is to use Ab4d.SharpEngine instead of Ab3d.PowerToys / Ab3d.DXEngine. This may also improve the performance.
Andrej Benedik
  


Forum Jump:


Users browsing this thread:
1 Guest(s)