Im pretty sure my model mesh.xml file is a million times too big (Picture included)

Hey I have made a poker table and it looks just how I want it but the problem is when I export it the mesh.xml file is 114MB just for the table.

Im pretty sure it is caused by the subsurf modifier (Views set to 3) because when I go into wireframe view I get what looks like millions of edges, faces and vertices on the model and when I turn off the subsurf modifier all those things go away and I’m left with the simple shape I began with.

The problem is without the modifier all the edges and corners are very sharp and not smooth like I need them to be.

Here is the model with the subsurf modifier on:

How do I keep that detail and smoothing but cut down on all the vertices etc?

The game is a poker one so its not like a shooter game where I would be sprinting around and seeing loads of new meshes every second. The only movement in this is when some players stand up or fold cards and push away from the table or the camera zooming in on the table just little things like that so do you think everything in the room could be high poly since it is not very heavy on realtime rendering with lots of movement through a world? Thanks.

You could try if subdivide modifier yields less verts/faces.

However, the quality in your picture looks to be very high resolution.

You could try using textures and normal/bump maps to trick the eye I suppose.

1 Like

Thanks for the reply.

Yeah it does look pretty high resolution. Do you know what the average size for a mesh.xml file is? My 114MB could literally be nearly a million times too big.

The problem with a normal map is the table will be viewed from all angles for example when a player gets dealt cards a new view window will appear somewhere on the screen showing the person bendin up the cards with their hand covering it so that view will be right down at table level so a normal map could start to look funny then.

I turned down the subsurf modifier and now the mesh.xml file has gone down to 11.7MB so its gone down over 10 times in size and still looks good.

Do you know if 11.7MB is too big for a mesh file to be? The only other objects in the room would be a few chairs, a few players that are almost completely static and walls and a floor. The walls are using a normal map.

Depends alot on the environment you are creating, if this is one of the few models you will be using, its probably fine with such an advanced mesh, but if you are planning on using many objects with the same quality, the processing might be slow.

If you just want some idea about the size matter, I was using a character model which had a size of ~1.5 mb.

I used it for all the entities in my game (players/npcs) and used around 20 instances all moving at the same time without any particular loss of FPS.

Generally the lower resolution mesh you can get, the faster your game will flow and more computers will be able to handle it.

Regarding normal maps and bump maps, you can get the surface to look smooth even though it isnt (mesh-wise), but its pretty hard to master it I suppose. What I would propose is to start testing it running in the game engine to see how well it flows,

but I would certainly not want to work with a model larger than 20MB, there should be ways around it while still keeping

nice graphics.

Edit: oh and also, you want to keep your triangle count below 300k, which can be seen in the debug mode of the client, so for any view, you should try to come under that value.

We can’t answer you that, you’ll need to see for yourself. But you can still optmize some things. Like the bottom, you could try to remove that circular bar and replace it with some double lines, above each other. But before doing that, import over jME and see the FPS.

Alright cool thanks for the replies. Damn it looks so nice in high resolution don’t want to bring it down in quality haha.

I’ll start trying to optimize it now. I can get rid of a few things under the table (you can’t see in the render) which nobody would be seeing anyway and bring the quality down on the legs of the table too since they won’t really be viewed.

This page contains a tutorial on exporting normal maps from subsurfs, also make sure to read the linked page on asset management and import in general:

Ok thanks for all the replies going through all that in the link and more.

File size doesn’t really say much as it depends a lot on different formats etc. Vertex and triangle counts might be more informative.