# Patch meshes?

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

# Patch meshes?

Post by Alcoholic »

How many patch meshes can you have before the compiler complains about it? Is it dependant on size, or just how many you have?
Surgeon
Site Admin
Posts: 1386
Joined: Tue Jun 04, 2002 1:15 am
Location: Stirling, Scotland
Contact:

Post by Surgeon »

I think its a mixture of both the number and size - though I can't be sure and have no definate figures
Admin
Image

.map Forums

Truth and Honor.
Slyk
Lieutenant Colonel
Posts: 361
Joined: Sun Jul 14, 2002 12:42 am
Location: Elizabethtown, PA

Post by Slyk »

I have a few comments. To start with, I have found that it is almost always better to use LOD instead of a mesh. Why? Because LOD creates fewer polys and thus is easier to render so that your FPS are better. Quick what-for: I've built HUGE maps using mixes of both and almost EVERY time that I did 'creation' of 512x512 or bigger with a MESH, it dropped FPS in the area. Using LOD brought FPS back up. Prime example is a shell crater. I loved using a MESH for it, with a 7x7 vert. but it killed FPS in open areas. Replacing it with LOD always increased FPS. I've spent 1000s of hours mapping, and here are my first three rules involving terrain:

1. Do it with a normal BRUSH if at all possible. NO better way. You can always merge LOD or MESH into a normal brush. You can use the 'e' or 'v' functions to drag and manipulate your edges/angles.

2. LOD. Use it to create the 'feeling' of the terrain when you need rolling/dipping/accentuated stuff. In areas less than 512x512 you can tuck and then 'f' function your way to deleting the unseen/un-needed triangles.

3. Use a MESH when you need to patch something in. Or to make a small 'patch' less than 512x512 or better yet around 256x256. Something like a rifle pit or small mortar crater would be an example.

Hope that helps a bit. Like I said, it's all about FPS and you need to maximize that in any map. Every map has a combo of the three, but where and when to use them is the key. If you have 100% flat areas of any reasonable size, make them a normal brush. ALWAYS use the normal in any area NOT needing tweaking.

AND, build your maps on a theoretical 512x512 grid if at all possible. It allows much easier work with LOD as you don't need to tuck and clip and such so many freakin' tris. And, it makes things much more neat in the build process.
crunch
Major
Posts: 348
Joined: Sat Jun 14, 2003 2:34 pm
Location: USA
Contact:

Post by crunch »

Excellent response, Slyk.
I couldn't have said it better myself

I have just 2 things to add. You mentioned the 512 grid as a guideline for your building, obviously because of the size of the terrain itself.

I am going to take that 1 step further, and suggest using the 64 gridline as a guide for your structures. That is due to the fact that the individual polys are groups of 2, each on the 64 gridline. (As you know, you can only move LOD along the x and y axis in incrments of 64.)
Using the 64 gridline guarantees perfect alignment within a section of LOD, and helps when needing to delete individual polys, say, under a building.

Also like you said, FPS is THE MOST IMPORTANT aspect of mapping. All levels should be created with the highest possible FPS in mind.
LOD indeed contains less polys over large areas than complex patch meshes.
I do know, however, (FPS not considered...) that you can have quite a few patches. I don't know the exact number of allowable patch data, but it is quite high. For those who would use patch meshes, here is an example of an original EA Single Player level (I forget it's name) but the entire terrain was made of patch meshes covering almost the entire grid.

Image

Again, this is Single Player, for which you can have lower FPS without as much adverse effects as a MultiPlayer map.

Kill Ya Later!
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

yeah the whole entire intro to m1l1 was made of patch meshes, and i had better fps there than other parts in the game.

and second, how did this thread turn into lod terrain and fps? i dont have a problem with fps in my map, i just need to know how many meshes.
Balr14
Colonel
Posts: 450
Joined: Sat Aug 03, 2002 4:01 am
Location: Germantown, WI, USA

Post by Balr14 »

I tend to disagree with the assertion that LOD terrain is superior than mesh (or anything else for that matter). Anything you can do with LOD terrain can be done with triangle brushes in far less face count and no culling, plus you aren't resricted by the square dimensions or height limitations. Patch mesh can be used quite effectively for terrain and culls less than LOD. Just use 3 x 3 mesh and reduce complexity. The edges can go around curves, too.

I have tried using LOD terrain on a number of maps but always wind up deleting it because of poor performance, shape limitations and unwanted culling.
Balr14
Colonel
Posts: 450
Joined: Sat Aug 03, 2002 4:01 am
Location: Germantown, WI, USA

Re: # Patch meshes?

Post by Balr14 »

Alcoholic wrote:How many patch meshes can you have before the compiler complains about it? Is it dependant on size, or just how many you have?
I don't know what the physical limit is, but it's well beyond 64k faces. You won't be able to move in Radiant, but it will still compile. There are limits to how many vertices there can be in one section of mesh (very high), and how many repetitions of the same wave pattern are allowed (64?).
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

another good thing about patch meshes is i can morph each individual vertice, rather than having to lock nearby ones just so they dont move. and even then the whole lod terrain shifts down a few units i dont know why.
Post Reply