Jump to content
The Dark Mod Forums

Modular modeling – a quick example


peter_spy

Recommended Posts

Great stuff! This definitely looks like what my Game Art Major classmates were up to. :P

 

Do you think inefficient meshes are a common problem in TDM? I only took one class in 3D modelling so I'm not the best person to pick that out. I definitely think that would contribute to a lot of the performance issues I have.

Link to comment
Share on other sites

You might be aware of this already, but Dark Radiant doesn't care where the pivot point/origin is. DR doesn't rotate models around their origin.

 

Something I wish I had noticed earlier on was the camera direction of the model preview window in DR, so that might be something you want to check--ideally models should be facing the camera by default for easier previewing.

 

Do you think inefficient meshes are a common problem in TDM? I only took one class in 3D modelling so I'm not the best person to pick that out. I definitely think that would contribute to a lot of the performance issues I have.

 

 

Performance in TDM has far more to do with shadow calculation and AI than it does with inefficient meshes.

Link to comment
Share on other sites

Of course DR cares where the pivot is. It's highlighted as soon the model is selected and also serves as the point for snapping, movement, or rotation, as in any other engine:

 

image.jpg

image.jpg

 

 

Do you think inefficient meshes are a common problem in TDM? I only took one class in 3D modelling so I'm not the best person to pick that out. I definitely think that would contribute to a lot of the performance issues I have.

 

Just some of them are, mostly those in modules folder. Those with flat faces and weird extra edges along them, that don't contribute to an actual shape of the model, just adding triangle count (and shadow mesh triangle count, probably). It shouldn't be a major performance issue; even idtech 4 can tolerate higher triangle counts. But having many different meshes like that may be a problem, sooner or later.

Edited by Judith
  • Like 2
Link to comment
Share on other sites

What rotation tool are you using? Both the rotation tool buttons and free rotate do not rotate around the model's origin, as you can see in the video below. Is there a third rotation tool that does?

 

 

 

edit: Oh, you probably have the "rotate around func_entity origin" selected. Yes, if you have that turned on, it will rotate around the origin. But there's no particular reason to have that on by default.

Link to comment
Share on other sites

Wow, that was weird. I can do it both with Rotate mode and the Arbitrary Transformation dialogue. Why wouldn't I want to have that option turned on by default? It's easier to manipulate objects with pivot placed in a proper pre-designed spot, so that it facilitates rotation and alignment with other meshes. This is rather basic functionality for meshes. Turning it off is for special cases, not the other way around. This way I wouldn't be able to place those meshes easily on a grid of 16, which I did.

Edited by Judith
  • Like 1
Link to comment
Share on other sites

Why wouldn't I want to have that option turned on by default?

 

 

It's up to you what you want on by default. But there will be less to complain about regarding model origins if you leave it off.

Link to comment
Share on other sites

It's on by default in all game editors I've ever seen. I'm not even sure you can turn it of just from the menu. Well, except for this one :) I must have clicked that icon as soon as I saw the description (yes, hell yes!).

 

Even though these models are relatively simple, they need to use pre-designed pivots. Originally the pivot was aligned with the plane in 0,0,0, but I had to move it so it doesn't intersect with the wall the mesh will be aligned with. I moved it away by just 1 u, so if you're not using that pivot, you'll have to bring down the grid to 1. For architectural models, that's really bad. This way I can use the whole set with grid of 16, and they snap to walls and to each other properly.

Link to comment
Share on other sites

It doesn't affect the inspector window. That rotates around the origin regardless of the other setting.

Link to comment
Share on other sites

Origin placement is important. If the model origin is greatly misplaced and ends up outside worldspawn (in the void), then dmap will fail.

 

As long as the origin is somewhere within the model and makes the module snap perfectly to the grid, all is well.

 

It is very fortunate DR does not rotate stuff around the origin, because many objects do not have the origin dead in the center, because that would compromise the grid snapping. Also, door models must have their origins at the actual in-game rotation point.

  • Like 3

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Origin placement is important. If the model origin is greatly misplaced and ends up outside worldspawn (in the void), then dmap will fail.

 

As long as the origin is somewhere within the model and makes the module snap perfectly to the grid, all is well.

 

It is very fortunate DR does not rotate stuff around the origin, because many objects do not have the origin dead in the center, because that would compromise the grid snapping. Also, door models must have their origins at the actual in-game rotation point.

 

 

You're absolutely right. Good thing is, the pivot can be placed on the edge of the brush wall that seals your level from the void, and there will be no errors.

Edited by Judith
Link to comment
Share on other sites

The polygon count for your modules are too low. With matching textures, the scenes depicted could easily be recreated with a few brushes and the clipping tool.

 

It's important to note that TDM uses a forward renderer. For each light, for each entity, render a pass. Every module in view is going to get a separate draw call. And if you're incurring the penalty of a draw call and not throwing a considerable number of polygons at the GPU, you're not getting your money's worth.

 

I recommend beveling a few of the hard edges and making use of smooth shading.

  • Like 1
Link to comment
Share on other sites

I thought about it too, at least the middle section could have those bevels and insets left on geometry, and it still would be something like 200 triangles :) That was just the fastest way to make proper UVs (I really hate unwrapping in max). Making it with brushes wouldn't make sense, there would be a lot of micro-adjusting for corners and such, and all those surfaces would be treated as unique geometry, so that's even worse for performance. Here you have maximum of 12 models, all using one texture.

Link to comment
Share on other sites

Have you used the clipper tool with brushes much? It's very easy to make mitered corners.

 

 

As far as performance, it's a tradeoff. You consume more memory with brushes. You consume more draw calls with models.

 

 

No, I always preferred making meshes to using brushwork, mostly because in Thief 3 the geometry tools were shitty, and anything more complex caused errors in the renderer. Also, in Unreal engines, brushes had no smoothing options whatsoever.

By the way, your example uses 2 or 3 different tiling textures, isn't it even bigger performance impact? Or at least memory consumption.

Link to comment
Share on other sites

Hey guys it's me (what??!)

 

I started making a map the other day having downloaded 2.05, and using some (many) of both Springheel's modules and other models in the package, and found them pretty easy to use. That doesn't mean they're totally seamless - I ended up with various gaps and stuff because of the dimensions of the walls/buildings I wanted, and had to fill with a variety of creative trim, but that's actually often how (especially older) buildings are contstructed, repaired, added to, patched up over time. You could easily end up with a very grid-like contstruction otherwise, which would fit some aesthetics but not others.

 

I'm probably a pretty sloppy mapper, technique wise, but I guess in the end it comes down to how you prefer to work as much as anything - brushes vs models, etc. As rich says, performance is always going to be a tradeoff in some respects.

  • Like 3
Link to comment
Share on other sites

 

 

No, I always preferred making meshes to using brushwork, mostly because in Thief 3 the geometry tools were shitty, and anything more complex caused errors in the renderer. Also, in Unreal engines, brushes had no smoothing options whatsoever.

By the way, your example uses 2 or 3 different tiling textures, isn't it even bigger performance impact? Or at least memory consumption.

The reason I'm using SH's modules is because their detail is completely above what I could reasonably achieve in brushwork or patches (or doing so would be a huge waste of time and very inefficient). I'm also not saying SH's modules are perfectly constructed. But your example could easily be achieved, and actually would be more flexible in brushwork, you could do different heights of panel, more angles etc.

 

I realise modules can't easily be resized, so the attraction has to be:

 

1) I couldn't make it in brushwork or patches or

2) It looks better than brushes would do

 

That's not to denigrate what you made, which is a lovely texture! And you've used it, as you said, in the way that you personally prefer to map. We can argue till the cows come home about performance gains.

 

The much more detailed panelling, or the wooden vaulted roof in your cathedral photo above would be better candidates for modules that would appeal to other mappers, I would think. I've never been very satisfied with the look of vaulting made of patches.

  • Like 1
Link to comment
Share on other sites

Thanks, Fingernail, I'm 100% with you on this one. This was a simplistic and fast example, and probably the most efficient use of texture space ever ;), since modelled panelling would require exploding this mesh into smaller parts on the UV, etc. etc..

 

To be more precise, the best practice would be somewhere in between my example and stuff we already have in TDM library, where number polygons can be higher than the shape seen ingame would suggest.

 

Also the our approach might differ because of the background: in Dromed you didn't use models until it was absolutely necessary. It's kind of the other way around e.g. in Unreal engines, and in modern games in general. I can only guess that professional devs can't really choose between having an impact on CPU/GPU or memory – at least with all consoles up to X360/PS3 generation, they had to conserve memory, so their workflow is in part a result of that. Current gen consoles have a lot more memory now, so that might have changed a bit.

Edited by Judith
Link to comment
Share on other sites

I must have some setting enabled, because a lot of models and prefabs arent rotating on the spot but around some other origin away from the model.

 

If you rotate using the right mouse button, it rotates around the origin. If you use the left, it rotates around some abstract point behind the camera (I might have those reversed).

 

@Fingernail

 

Wow! Blast from the past. How are you doing Finger? (glad you're enjoying the modules btw. They're far from perfect but you can do pretty cool things with them).

Link to comment
Share on other sites

As far as performance, it's a tradeoff. You consume more memory with brushes. You consume more draw calls with models.

 

Btw. I'll have to do a little more reading on that, since my knowledge on ins and outs of rendering pipeline is pretty fragmentary, but aren't brushes actually consuming more drawcalls than meshes? I remember reading that with CSG, every face is treated as a separate object. And also, the multi-material meshes are bad, because such mesh is split into smaller meshes, per material, before being fed to the GPU, thus more drawcalls?

Link to comment
Share on other sites

I think you're right there.

The only savings on Brushes is BSP culling which (in this engine) is very conservative.

 

 

Edit:

 

 


 

The engine will split the polygons it sends to the video driver per texture, per light, per entity, and per portal area. That means that for every light volume in the scene, a batch is sent for every group of polygons sharing a texture affected by that light volume. If the same texture appears on brushes in the world and on a func_static, even within one light volume the func_static will go to the renderer in separate batches. If a func_static with the same model keyvalue is repeated sixteen times down a hallway, each one will batch separately from the other fifteen. If you have a long, highly subdivided patch mesh with four or five chiclet lights spaced out along the curve, the curve will be split into small batches for each light.

 

 

https://www.iddevnet.com/quake4/LevelEditor_Performance

 

So it seems that all brush-work of the same texture, touched by the same light, in the same portal area should be one draw.

Of course, "same texture" is a very strict term which only applies to a texture tiled over the geometry with the same UV and scale,

hence how shifting textures ( brush carving ) can be used to split brushes at light boundaries.

 

And then, with brushes, everything is dynamically generated per PVS view which seems to make them heavier in most scenes compared

to the same scene with lots of proper func_statics or models.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

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.

  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 6 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...