www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: nill on December 31, 2016, 12:03:16 pm

Title: One Object3D or Multi-Object3D ?
Post by: nill on December 31, 2016, 12:03:16 pm
  happy new year!
  here is the question .  I have many text boards to show. 
  1 which is better way to save memory , create a Object3D for each text  or create only one Object3D for all of text?
  2 if i created only one Object3D , how to hide part of this Object3D ? I have tried  get polygon id and using setVertexAlpha(polygonid, alpha) to archive this effect. it seems not work verywell,
    only first of call is work.  (this problem only on android )


Title: Re: One Object3D or Multi-Object3D ?
Post by: EgonOlsen on December 31, 2016, 12:11:33 pm
I would use several objects. Everything else just adds a lot of complexity without any actual gain. If you are worried about memory usage, you could share meshes and compiled data between these objects and/or create an object pool for these objects.