8000+ Shapes -> OutOfMemory | Shape with n textures | Invisible shapes
When I load a huge level containing many faces and many textures, I need to create one Shape3D for every face in that map. I searched for a way to create a Shape3D with multiple textures on multiple faces, but for some reason it doesn't seem to be possible.
When the amount of Shape3Ds exceeds 8000 I get an OutOfMemoryError exception.
Is there any way to create a single Shape3D for the level? I can't create a big texture containing all level textures and use different texture coordinates for each texture, because one level uses several hundred unique textures.
Another problem I have encountered is when I use the original vertices of the level nothing is rendered. Only when I multiply the vector data with 0.01, Java3d renders the level. Problem with that is, the level I use is in bsp format and bsp stores texture offsets as dotproducts with the original vertex data. By scaling that data the texture offsets get messed up.
I can give anyone who is interested the source of my bsp loader and shape generator, but it must not be published before the project goes public.
Thank you for reading and thanks for any suggestions and comments!