Procedural generation based on land terrain texture grid

Feedback on past, current, and future development.
unelsson
Posts: 131
Joined: 17 Mar 2018, 14:57

Procedural generation based on land terrain texture grid

Post by unelsson » 24 Mar 2019, 01:10

It's great fun to have some sort of tool for procedurally generating Instances. This can be used to make forests, or for adding grass... or rocks.. whatever. It's still a WIP, and not ripe for a release, but fun nonetheless. All feedback is welcome.

https://github.com/unelsson/openmw/tree ... rencestool

https://imgur.com/a/Pqj2C03?

User avatar
cc9cii
Posts: 471
Joined: 28 Mar 2013, 04:01

Re: Procedural generation based on land terrain texture grid

Post by cc9cii » 24 Mar 2019, 01:28

Can this be used as a replacement for SpeedTree?

unelsson
Posts: 131
Joined: 17 Mar 2018, 14:57

Re: Procedural generation based on land terrain texture grid

Post by unelsson » 24 Mar 2019, 01:45

cc9cii wrote:
24 Mar 2019, 01:28
Can this be used as a replacement for SpeedTree?
SpeedTree? As in tree modeling software? Nope. This doesn't create or change models, just places them based on some variables.

User avatar
AnyOldName3
Posts: 1498
Joined: 26 Nov 2015, 03:25

Re: Procedural generation based on land terrain texture grid

Post by AnyOldName3 » 24 Mar 2019, 01:56

One of the things SpeedTree can do is dynamically generate a forest based on a variety of input data, a little like this is doing here. It's not just tree modelling software. If you want to do anything with trees and computers, it's probably got a mode which does it. That's not to say that everything uses every mode, though - I *think* Oblivion just used it to generate tree models that didn't all look the same at runtime, for example.
AnyOldName3, Master of Shadows

silentthief
Posts: 375
Joined: 18 Apr 2013, 01:20
Location: Currently traversing the Ascadian Isles

Re: Procedural generation based on land terrain texture grid

Post by silentthief » 24 Mar 2019, 02:08

This looks awesome. I can see that being a very handy utility. Thanks for this.

ST
"Hurry, hurry! Last boat to Solstheim! Until the next one. Hah-ha-hah."

mistermoonshine
Posts: 22
Joined: 03 Apr 2018, 20:35
Location: Ireland

Re: Procedural generation based on land terrain texture grid

Post by mistermoonshine » 24 Mar 2019, 03:50

Could this be used to help out Tamriel Rebuilt? or maybe generate a bigger and more realistic Vvardenfell?

unelsson
Posts: 131
Joined: 17 Mar 2018, 14:57

Re: Procedural generation based on land terrain texture grid

Post by unelsson » 28 Mar 2019, 00:04

To make this more useful, I added user options for random object displacement, rotation x/y, z-rotation, rotations towards slopes, z displacement, and made all the edits to fit into one undoStack macro. The UI is getting a bit cluttered, and it might be useful to have per-object settings instead of just global parameters. The amount of data one has to eventually input can also get overwhelming, perhaps it would also be a good idea to have a save/load feature for all that generation data.

Especially the object rotation based on land shape was a tricky one, I even had to stick my finger into Quat mathematics. Even if most of the Quat stuff is handled by osg, and many crucial formulas were taken from other places of OpenMW, I'm not 1000% percent sure I got it all right, so getting feedback from testing would be nice.

Would be interesting to try to generate wider areas with this, so hopefully modders can take advantage of this.

User avatar
wareya
Posts: 337
Joined: 09 May 2015, 13:07

Re: Procedural generation based on land terrain texture grid

Post by wareya » 28 Mar 2019, 00:07

Should probably have some kind of resource file that determines how/where/in what way the "detail objects" spawn, so you can configure them individually.
paying attention to #1751 #2473 #3609 #3862/#3929 #3807 #4297 #4623

unelsson
Posts: 131
Joined: 17 Mar 2018, 14:57

Re: Procedural generation based on land terrain texture grid

Post by unelsson » 29 Mar 2019, 11:26

wareya wrote:
28 Mar 2019, 00:07
Should probably have some kind of resource file that determines how/where/in what way the "detail objects" spawn, so you can configure them individually.
I added now this feature, so all details can be saved and loaded from a file. Saving is still fixed to a file called procgendata.txt, but loading can be done from any file.

edit: Some screenshots https://imgur.com/a/7pxBaBC

unelsson
Posts: 131
Joined: 17 Mar 2018, 14:57

Re: Procedural generation based on land terrain texture grid

Post by unelsson » 29 Mar 2019, 13:07

Okay, it's been really fun to play with this and try things out... Few further development ideas came to mind though:
- XY-rotation and objects leaning towards slopes, natural objects should probably rotate from the base instead of object center. I wonder if in some cases current behavior is wanted, so maybe this also should be a configurable option.
- There probably should be an option for spawning ingredient objects exactly on the same place as the "mother object". One could make an object for apple tree, and then also have apples spawning as a separate object on all of the object ids.

Post Reply