Terrain

Involved development of the OpenMW construction set.
User avatar
Greendogo
Posts: 1292
Joined: 26 Aug 2011, 02:04

Re: Terrain

Post by Greendogo » 04 Aug 2014, 20:41

If there is a cell/s inside a collection of other cells that isn't included with them in the click and drag operation (for whatever reason- maybe there are objects already placed by the modder in that cell for which he doesn't want the terrain altered) and is therefore immune from alteration from the terrain tools (right?), how will you deal with the edges? Will the selected cells have the edge that's touching that cell meet it's elevation at the edge? Or will it create a "land tear"?

Rendering all the terrain at once and making the unselected cells semi-transparent would allow the modder to get them out of the way while still being able to keep them in mind.

User avatar
scrawl
Posts: 2085
Joined: 18 Feb 2012, 11:51
Contact:

Re: Terrain

Post by scrawl » 04 Aug 2014, 20:49

"Land tears" will never happen, because the last row/column of vertices of a Land record is unused. Instead the first row/column of the adjacent cells' Land records is used. This ensures all terrain connects up properly. We are actually forced to do that, because there's some garbage data in these rows/columns, most likely caused by the CS not adjusting both cells if a cell border is modified.

User avatar
Zini
Posts: 5134
Joined: 06 Aug 2011, 15:16

Re: Terrain

Post by Zini » 04 Aug 2014, 20:56

how will you deal with the edges? Will the selected cells have the edge that's touching that cell meet it's elevation at the edge?
We need to make that configurable, because depending on the situation different behaviors might be required. I see the following options (for operations that would modify terrain outside the selected cells):

- Make the change to the unselected cell anyway (maybe with a sub-option of automatically selecting it first)
- Do not change the unselected cell, which might result in some kind of edge that needs to be fixed later
- Reject operations that would affect unselected cells.

The later two options should be particularly useful for multi-person projects where people are working concurrently on nearby cells.

User avatar
scrawl
Posts: 2085
Joined: 18 Feb 2012, 11:51
Contact:

Re: Terrain

Post by scrawl » 04 Aug 2014, 21:17

I see. No, this feature is not needed, since the scenario you describe is already supported. Open a scene view, set it to show only terrain and select all cells from the worldspace (either from the region map or the cell table) and drag them to the scene view. Done.
Unless I am reading the code wrong, hiding the cell objects is implemented with visibility flags. That's fine, but will not properly support the above use case. The cell won't be rendered, but it will still add a scene node for each object to the scene graph (which slow down rendering), and all objects will be loaded anyway. For all exterior cells in the game, that's quite hefty. I wouldn't be surprised if that either causes a complete freeze or just runs out of memory.

User avatar
Zini
Posts: 5134
Joined: 06 Aug 2011, 15:16

Re: Terrain

Post by Zini » 05 Aug 2014, 08:47

That is easy to optimise away. We just need to make a small change. If a cell is added and objects are hidden, don't add the objects yet.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests