Page 11 of 14

Re: Terrain Editing

Posted: 14 Jun 2018, 12:47
by unelsson
What would be needed for terrain selection?
- Ability to click and drag-select land with primary select button, visual representation of selected terrain texture grid (green lines okay?)
- Fundamental code structure so that also terrain shape grid can be selected

Then what?
- Ability to copy&paste terrain? Copy is easy, but how about paste, how should that work?
- Ability to drop land texture to grid?
- What should the custom selection brush button do?

Re: Terrain Editing

Posted: 14 Jun 2018, 14:05
by Zini
For the selection mechanism itself:
* Data-Structure to mark texture tiles as selected
* Rendering for selection: Not sure what would work best; may require a bit of experimentation
* Methods to change what tiles are selected; there is some documentation about this here in this thread and probably on the tracker; don't have it at hand right now

After that we have:
* The missing brush button: Define brush shape by current selection shape. This is a on-time event, meaning when in this mode the brush shape does not continue to follow the selection shape.
* https://bugs.openmw.org/issues/3873
* https://bugs.openmw.org/issues/3869

Re: Terrain Editing

Posted: 15 Jun 2018, 23:13
by unelsson
I collected previous work I had done for land shape editing here, just worked a bit to get it look more like the merged terrain texture editing. I think it's nice to have it public, so the code can be utilized later. Code might not be the prettiest, but it does work.
https://github.com/unelsson/openmw/tree/landshapeedit_1

Next step would be the terrain selection mode. Lets see when I get to that.

Re: Terrain Editing

Posted: 18 Jun 2018, 12:32
by unelsson
Here's an early PR for terrain texture selection. It's mostly Plutonicoverkills code, but I built it to work with recent versions of OpenCS, and did some small improvements regarding coordinates calculations to get the feature working.

https://github.com/OpenMW/openmw/pull/1769

Re: Terrain Editing

Posted: 18 Jul 2018, 01:32
by MinerMan60101
I have a question/suggestion on terrain editing: what happens when you try to edit terrain on the border of loaded cells? In vanilla CS when there's a cutoff (like on the edge of a TR Exterior claim) it acts all derpy and tries to connect the edited terrain with the wilderness cells, often being aggravating when you just want to edit the landscape withing your claim. What I would like to have is the ability to just edit the terrain of the cells loaded without affecting that of the unloaded cells.

Re: Terrain Editing

Posted: 18 Jul 2018, 09:36
by Zini
There is a user settings option for that: Edit -> Preferences -> 3D Scene Editing -> Handle land edit outside of visible cells. Available options are "Show cell and edit" and "Discard".

Re: Terrain Editing

Posted: 18 Jul 2018, 16:23
by MinerMan60101
Awesome! This is a feature I really wanted from OpenCS!

Re: Terrain Editing

Posted: 01 Aug 2018, 19:08
by Br0ken
Can we use it somehow? Looks promising!
http://www.decarpentier.nl/scape

Re: Terrain Editing

Posted: 08 Oct 2018, 21:59
by unelsson
Oh, that Scape seems to have interesting land shaping tools and a bunch of great algorithms. I don't see why similar tools couldn't be implemented, but in a later stage. Regarding the roadmap to land shape editing, implementing terrain selection and transitional changes come before it. And that's a bit of a dead-end to me, as I'm currently short of time, not to mention lacking some coding skills and understanding of how things should be implemented.

Re: Terrain Editing

Posted: 09 Oct 2018, 09:31
by Zini
Understandable. It seems that akortunov might be willing to take over this task at some point, so we aren't stuck here. Thanks for all the time and effort you have put in this feature.