Jump to content

Question about area construction...


Mitovo

Recommended Posts

Hello,


So, I've been working on establishing a workflow for my project, including testing the Blender->T3D Collada pipeline, etc.


I brought in a simple textured quad representing a floor tile, which I duplicated around to create a larger floor area (again, just testing things out, etc). It seems to work perfectly well, but it got me thinking.


I've attached a couple screenshots to show the tile itself, and then how it I have it layed out in-engine...


From a performance standpoint, is it ideal to create an environment using such small pieces? Or is it better to create things from larger pieces? So, rather than building a floor from individual quads, I might model the entire floor as a single piece, etc. Or is the difference negligible?


Thanks!

T3DFloorTile.thumb.jpg.cae23e9ddef25f9e2c2e13ba2539de78.jpg

T3DFloorTiles.thumb.jpg.9a495edbc3a9daabf43763162d90b3ca.jpg

Link to comment
Share on other sites

Not sure but I think that rendering a lot of smaller objects increases drawcalls which can make your game more cpu bound (torque currently depends a lot on single core performance for rendering) so it's better to have larger objects.


EDIT: Torque implements some kind of instancing but it can make the situation even worse https://github.com/GarageGames/Torque3D/issues/678

Link to comment
Share on other sites

The good side of using small tiles is, if you have level designers without access or skill to use a modeling program or want the players to be able to modify things ingame, in that case small modules come in handy.

For example I made my first level DesertRuins with modular pieces, so people can modify it, but in the end I realized it did not save me time, since in that time I could have also modeled everything individually in one piece in blender, maybe it would even have been faster to make all in the modeling app.

Link to comment
Share on other sites

The bigger the better.

It's something I wanted to clarify also. I understand it's better to have a single big model instead of multiple objects making that big model but I wanted to know how worst is it to have multiple pieces and how can we make multiple pieces performance better. Currently, I'm working on a "Bunker Construction Kit" and it seem to work fine but I can't compare since I don't have a full model to compared with yet. I will try to come with a comparaison setup later using a single Bunker made of one piece VS multiples pieces.


Is there any advantages to use multiple pieces for rendering? Like do the Occlusion (Zone,Portals and OcclusionVolumes) works better with single pieces? I haven't got the chance to try those on a complete building model, but does the occluding work with meshes inside. For sure, I will figured it out soon but I'd like to expand the discussion related to this thread further...

Here's an example of the rendering of a Bunker built with multiple pieces using a Zone and Portal for the doors.

http://mud-h.com/miscweb/t3dforum/zone/ZoneAndPortals_v1.jpg

Would I got the same results if it was a Single model (including the crates and Bunker beds)?


Also anyone have a good link explaning what are DrawCalls and overall mesh rendering process?

Link to comment
Share on other sites

The advantage of modules is that level designers without modeling skills can produce levels also and they can be reused and build big levels fast.

Less models often save performance, but it is always a tradeoff on what you want.


If you want to make a simulator with huge outdoor areas you have to make each house as one mesh, but when you do just a simple indoor level, it does not really matter, since you have a high budget left.


But when you have a big outdoor scene with many modules, you may as well use zones, but I never really tried them.

Link to comment
Share on other sites

  • 3 weeks later...

just to speak out against everyone else...


Torque has a batching system that batches identica models into a single drawcall, so for example, if you are constructing a room out of 3 models (1 corner 1 wall and 1 floor) regardless of how big or small the room is you should be able to narrow that down to 3 drawcalls.


Now 3 might seem much more than one, untill you start building, extra rooms, when you have 4 different rooms you are already making less drawcalls than the system that makes single model rooms.


either way works just as well, but it depends what your usage is, frankly if the models get too big and unwieldy then you have other potential problems, it also takes level design out of the hands of designers and puts them into the hands of the artists, the ideal nowadays would be something between, this would allow you to have more 'organic' looking level parts (think caves in oblivion/skyrim) vs traditional square dungeons (think legend of grimrock).


It would also depend a lot on what your gametype is, and how you want to implement indoor/outdoor transition, if you wet with a NWN style transition (teleport to new zone) then torque would naturally hold thousands of building interiors, just wrap them in zones with no portals. If you are building counterstrike levels, honestly i cant think of anything more troublesome and development slowing than relying on an artist to fix up the level every time you have a fault because the level is one big model.

Link to comment
Share on other sites

EDIT: Torque implements some kind of instancing but it can make the situation even worse https://github.com/GarageGames/Torque3D/issues/678

 

Just to address this particular thing


If you are building a very large level with a lot of duplicated resources, this includes props as well as floor/wall/corner parts the batching system would have clear speed benefits.


If you are building a more organic level with more varied props, for example even a simple cube with 50 different textures on it is classed as 50 different cubes so batching doesnt recognise these.


As you can see from my question there are as of yet no metrics, however, if you try and fiddle with the values i'm pretty sure that if you use much repetition of models at all then there will be a setting value that at least helps a little.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...