PDA

View Full Version : creating holes in terrain



codey87
02-28-2009, 10:26 AM
Im creating a level which features numerous cave enterances is it possible to create hoes in the terrain to make cave enterance and how?

any help would be amazing

cod

DazJW
02-28-2009, 10:29 AM
In the terrain tools one of the options is to paint visibility (or invisibility).

Cr4zy
02-28-2009, 11:08 AM
As Daz said you can hide patches of terrain, although i had tried it previously and come across a few strange collision issues when passing through where the terrain was. May have been a one off.

codey87
02-28-2009, 11:41 AM
Thanks I've just used the visibility tool but I am only able to hide a large area. is it possible to hide a smaller area

cod

Sanch3z
02-28-2009, 12:09 PM
As Daz said you can hide patches of terrain, although i had tried it previously and come across a few strange collision issues when passing through where the terrain was. May have been a one off.

In the terrain properties you have to untick AllowRigidBodyUnderneath <---its something like that not sure exactly but cant open editor right now.

Shivan Hunter
02-28-2009, 12:55 PM
"Thanks I've just used the visibility tool but I am only able to hide a large area. is it possible to hide a smaller area"

Decrease your brush size. You can even get it to where you'll only hide a single unit of terrain.

also, yes, you NEED to check bAllowRigidBodyUnderneath. This adds some physics calculations to the game (it can no longer treat it like a complete boundary with nothing underneath), but like the name suggests, without it nothing can go underneath.

For lolz, try going under a terrain, without it enabled, in a vehicle. The effect is somewhat hard to describe, but it's quite funny. :)

PrecRoy
02-28-2009, 01:13 PM
Thanks I've just used the visibility tool but I am only able to hide a large area. is it possible to hide a smaller areayes, all the advice is good.

related: if the hole you cut is larger than you want, even when the brush is only 10 units wide and touching only 1 vertex, can you subdivide areas or do something else so the hole is smaller? I've cut holes in the terrain, but it tends to take out all four squares that touch that vertex, and sometimes that's a very large square compared to the size of a person and a narrow hallway.

Odedge
02-28-2009, 02:02 PM
related: if the hole you cut is larger than you want, even when the brush is only 10 units wide and touching only 1 vertex, can you subdivide areas or do something else so the hole is smaller?

This should relate to your tessellation size. In the TerrainEdit window, you can increase tessellation which will make all of the squares smaller so you will have a smoother terrain and can create smaller holes.

Keep in mind that it will create more vertices and will require more rendering power, so use with caution on large terrains.

PrecRoy
02-28-2009, 08:36 PM
increase tesselation to get more vertices/patches...good to know. I realize it may have an impact on performance, but will toy with it to see how it goes. I remember seeing there are a couple of "tesselation"-related controls, like for distance, and some other elements. thx

bclagge
02-28-2009, 08:58 PM
You shouldn't increase tessellation unless you really have to. It quadruples the number of triangles. There is a reason you can only remove 4 squares and it is related to tessellation. You are removing sections of terrain based on the highest tesselation - how your terrain is rendered at a great distance. Up close it appears that you are removing 4 squares, but at a distance it is just one square.

Find Terrain properties--->Terrain--->Layers--->MaxTesselationLevel and change it from 2 to 1. Your terrain will not longer reduce LOD in the distance, however.

diesalot
02-28-2009, 10:32 PM
^^ Not sure this is good advice. Increasing tessellation is the way....ive done it with no major side effects. It depends on your needs?

bclagge
02-28-2009, 11:26 PM
The side effect is terrain triangles are quadrupled. It's not going to be a problem in every situation, of course, but you should try and create your map as conservatively as possible. Four times as many triangles have to be rendered. It's four times the light map size. It's four times the memory used for the terrain. It increases the storage size of the map as well. Just bear all that in mind when you decide how to address the problem.

DGUnreal
03-01-2009, 05:54 PM
Min/MaxTesselationLevel does not subdivide the heightmap data to a finer scale, it only combines quads for fewer rendered quads. If you create or import a 512x512 heightmap then set the TesselationLevel values such that it only renders the next larger set of quads for the entire view distance, then you are only using effectively 256x256 of the source heightmap data which is wasting 3/4 of the data and object processing.
Min/MaxTesselationLevel also causes popping at the edge where the transition between quad sizes occurs.
So you should always start with MinTesselationLevel and MaxTesselationLevel both at 1, then if the terrain is large (256x256 +) and it is impacting the framerate, start bumping Max up in value. But you will usually find that if you have to start using TesselationLevel due to render time issues, that you are better off with a smaller properly optimized heightmap size, eg. use a 384x384 instead of a 512x512.
A lot will depend on the shape of the terrain and how well it culls per component.

bclagge
03-01-2009, 07:23 PM
I thought we were talking about using the Tessellate--->Increase button from the terrain edit window? That increases the number of verts.

DGUnreal
03-01-2009, 08:25 PM
Both have been used in this thread.
My post was to inform about the proper Min/MaxTesselationLevel usage, not the Tesselation Increase/Decrease. Sorry if there was confusion as to which I was referring to. I edited the couple of places in my post where I just used "Tesselation" and changed it to "TesselationLevel".
Yes, the Terrain Edit "Tesselation Increase/Decrease" function does increase the number of Heightmap sample points and final terrain mesh vertices.

Terrain Properties Min/MaxTesselationLevel is totally independant of the Terrain Edit Tesselate Increase/Decrease. Unfortunately the former terrain properties should not have been called Tesselation (perhaps Triangulation or Optimization or something similar should have been used).

Regardless, Min/MaxTesselationLevel should always be set to 1/1 when working on a map.
Especially when you are attempting to use the Visibility tool, since that tool always hides/shows quads based on the largest triangulation size.
In other words, a MinTesselationLevel of 1 and MaxTesselationLevel of 2 will cause a Visibility toggle of four quads, not one quad. So Min/MaxTesselationLevel should be set to 1/1 instead. This is considerably more preferable than using the Tesselation Increase to quadruple the number of heightmap sample points.

I don't recommend using the Terrain Edit Tesselate at any time since that changes the underlying heightmap data array by performing a simple 200% increase (duplication) or 50% decrease (cut) in array data, totally without interpolation or filtering, etc. So the underlying data is essentially lossy-destroyed.
Best would be to export the heightmap data and change it in photoshop.

Always work at Min/MaxTesselationLevel of 1/1, keep the DrawScale3D.X/.Y/.Z on even multiple-of-power-of-two grid sizing (64, 96, 128, 192, 256, etc.) and if the size of the terrain quads is still too large, consider exporting and changing the heightmap up to the next intermediate size, eg. 128x128 up to 192x192, or 256x256 up to 384x384. Not a Tesselation Increase from 128x128 to 256x256 or 256x256 up to 512x512.
This is a significant render improvement over doubling the heightmap using the Tesselation Increase.