I’m new to jME and I was working throug the beginners tutorial, it’s great from what I’ve seen yet.
Now I wanted to create more complex 3d objects, and this is easy by just importing them with the assetmanager. But how can I create these more complex 3d objects on my own, using code? I’m interested in procedural generation, so importing predefined meshes is not useful.
Can I somehow join and intersect objects s.t. the texture on this object covers everything? Now when I create a house out of four walls, the texture does obviously not fit, especially when I make a door or window into one wall (the wall is 3 or 4 boxes) and the textures don’t match up.
I searched for answers to create a box with a hole, but I only fond that it’s easily possible in blender and you can import the objects.
There is nothing built in because you will always have to trade off between performance and accuracy and even then you will probably never want to put this into the player’s hands at runtime as it’s really easy to blow up in bad ways. Therefore, any implementation will be very specific to a set of requirements.
Even in your example, it would be better to simply batch parts rather than trying to do real boolean geometry operations.
Edit: though if that type of operation is really what you want then someone just posted a thread about it: Another CSG solution
It sounds like your interests in constructing complex 3D objects programmatically is very similar to what I am looking to do. That is why I got involved in implementing a CSG solution for jMonkey. I am hoping to utilize CSG as a tool for building an ‘architecture’ package that will understand buildings/rooms/walls/doors etc.
Please keep posting back to this thread so that we can all learn from your experiences. I am very new at all this and am very interested to see if CSG is a reasonable approach.