Jump to content

Home

gensuf


Altus_Thrawn

Recommended Posts

Well, that's about all anybody can make. That's what GenSurf is for. If you play with the "desimate" setting, though, and you have the preview window open, you'll see about how you can reduce triangles.

 

You can always use the "use patch curves" option if you don't want to create brushes, but that can be fps-hell.

Link to comment
Share on other sites

Riiiight...

Once I managed to make it make small bumps in the ground, but they were to small and even to be natural.

 

Is there a way to do it from a heightmap? I tried open bitmap or something similar, but the only filetype it would let me open was a .map file

Link to comment
Share on other sites

You can make a bitmap in Photoshop, Paint Shot Pro, or even MS Paint. Make it a grayscale bitmap, and paint it as if white was the maximum height and black was zero height. Save it as a .bmp file.

 

In GenSurf, on the Bitmap tab, feed it your bitmap and tell it what height (in game units) you want mapped to color 255. (Whether you want white in the image to be 1024 units in game, 256 units, 2048 units, etc.)

 

Be sure to choose appropriate extents and divisions for your bitmap.

 

I can post some interesting GenSurf results if you're curious....

Link to comment
Share on other sites

Ok, here's the deal:

 

Pick the plugin GtkGenSurf -> Ground Surface..., no matter what you're trying to make (wall, ceiling, whatever); you can just rotate the output func_group later.

 

Now, on the first panel, "General," pick the option called "Fractal" (from the middle-ish section) and hit the little checkbox next to "Preview" (on the far right).

 

Down at the bottom, in the "Roughness" field, enter something sort of large-ish, like 128. If those bumps look too big to you, you can go smaller (64, maybe 48, but it will start to look really flat). Ignore "Random seed" for now.

 

On the next panel, "Extents," you get to set how large your terrain will be. Lets say you want your terrain to be 1024x1024 units; you would enter (lower-left, upper-right) X values of -512 and 512, Y would also be -512, 512. See how that works? Let's say you wanted a long, skinny terrain, something like 2048x128 units. Then you would enter X values of -1024, 1024 and Y values of -64, 64.

 

Still on the "Extents" panel, notice the "Divisions" field. This sets up the number of brushes needed to create your terrain. Assuming you have your preview window open, you should be able to see how this affects the GtkGenSurf plugin by playing around with different values. Higher numbers = higher resolution of roughness = larger delta Z values (usually). Also, higher numbers = higher resolution of roughness = exponentially more brushes = exponentially worse fps. A division value of 8, maybe 16 (max) should be good for any square terrain. For that long, skinny one, you would want something like 16 divisions for X, but only 1 or 2 for Y.

 

Never choose the option "Use Bezier patches."

 

I haven't ever played with the "Snap to grid" option, so I can't give you any recommendation.

 

The "Decimate" slider: this is very important. Make sure your preview window is open, and start sliding the "Decimate" slider towards the right. The further right you go, the more "poly-reduction" is done to the resulting terrain. You can get the same basic shape with much fewer brushes this way; very handy if you start running into fps issues.

 

At the bottom of the "Extents" panel, you'll probably have "Linear borders" checked (by default). You can uncheck this or not, depending what you want; watch the preview window to see how it works. If you need to line up your terrain with a flat ground plane on all sides, then yeah, "Linear borders" is for you; if you want realistic looking ground surfaces, you should probably uncheck it.

 

Now, for the "Corner values" settings: this is where you can set any arbitrary heights you want any particular corner to reach. Start entering numbers in and watch the preview window; you won't really see a difference until you start putting in values for one corner that are much larger (like 256 or 512) than the rest. You probably don't want that, though, and you may well be fine if you just leave all four values at zero.

 

The "Bitmap" panel: supposedly, this is where you can load a heightmap to generate your terrain. I've never gotten this to work, it always gives me some error when loading the image. Whatever, right?

 

"Fix Points": this can be an important panel. You can pick points (in the preview window) of your terrain and "lock" them at some arbitrary elevation. You can shift-click to select lots of points; shift-click the upper-left, then lower-right point of a rectangular region of points to select them all. Then, back in the main window, enter what you want them all to be into the "Value" field. The "Free" and "Free All" buttons will remove any changes you make, either to the selected point or all the points you have "locked."

 

The "Texture" pane: here, you should probably set both the "Surface" and "Other" fields to be "textures/system/caulk"--you'll hand texture the terrain later, because GtkGenSurf isn't very good at sizing texture maps. You'll get way too many repeating tiles of your texture if you try and let GtkGenSurf do your texturing for you with the default settings, and it takes to long to try and figure out what offset settings you would need to enter to get good results. Since we're only using caulk, you can ignore the "Steep" stuff and the offsets.

 

If your terrain isn't going to touch the void, and you don't need it to obscure any thing during the VIS phase of compile, you could check the "Use detail brushes" option, but generally I stick to structural terrains. I don't know what the "Add terrain key" button does (I mean, I assume it adds a "terrain" key to the resultant func_group entity, but I don't know what the terrain key does), so I don't use this.

 

That's pretty much it, time to hit "OK" and generate your terrain. It will be a func_group, so you can select the whole thing at once and drag it around your map to wherever you need it to be, and rotate it into place if it came out facing the wrong way. Since it is made of many small brushes, though, you are out of luck if you want to "side strech" re-size it, no-can-do.

 

That's about it, I hope this helps.

Link to comment
Share on other sites

Oops, I spent too long typing my response... Wedge seems to have explained the "Bitmap" pane; I was always trying to load targa images, that must have been why I got the errors. Most certainly, if you have a specific look for your terrain in mind, you should probably try and get a heightmap to work for you.

Link to comment
Share on other sites

Yeah, terrains from a heightmap can be extremely useful. It's great to be able to "scuplt" terrain with the airbrush in Photoshop rather than use brushes manually. :) Can make some pretty cool stuff.

 

Another useful note is that when you havew your terrain in Gtk, you can edit the brushes with the vertex tool--yes, I said VERTEX tool and I meant vertex tool. If you select all the brushes that share a common corner and hit V, you can then grab that corner (even in the 3D view) and move it up or down to change the shape of the terrain. This is great for making terrains line up with each other, or other parts of a map. You can then do extremely cool things like have a terrain and cut a tunnel into a mountain and then GenSurf a floor and ceiling for the tunnel and make it all fit together seamlessly (screenshots of which you can see from me in a little while :D). GenSurf is a really powerful tool, and it surprisingly doesn't hurt FPS *too* much.

 

One note--if you make all the terrain brushes structural, and the terrain is really uneven, you'll end up with a huge number of portal splits where there is only one big area. It's better to make the terrain detail and built a structural caulk hull around the detailed terrain. Alternatively, make all the terrain burshes that touch the "top" of the map structural, so as to form a wall, and the rest detail.

Link to comment
Share on other sites

I used a bitmap. I started with white (high area), then using the Photoshop airbrush tool I painted on an area of black (low ground). I then fed the bitmap into GenSurf (ground surface), bitmap tab, with color 255 mapped to a height of something like 1024.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...