TerraRoad v0.1

Started by aknight0, August 22, 2021, 08:42:29 PM

Previous topic - Next topic

WAS

Quote from: mhaze on August 24, 2021, 03:06:51 PMInterseting - python is recognised by the system. If it's any help when I run the program a box flashes up and immediately disapears.
What output do you get when you run the pip install instructions?

aknight0

That is helpful actually.  It could mean that the script is hitting an error, and then immediately closing before you get a chance to see what it was.  I might be able to make a debug version that will hold the window open if it hits an error.  Was this from running "python TerraRoad.py" from the command line, or from clicking the file?  (Not sure why the forum really wants that filename to be a link, sorry)

Here's a rough video showing my workflow for installing, creating the input files, and running.  https://youtu.be/tF4_IzExQv8

mhaze


mhaze

OK! problem solved. Thank for the help and YouTube video, it helped no end, I was not loading the dependencies correctly. Now to work out how to use the program!

WAS

Quote from: mhaze on August 25, 2021, 01:26:37 PMOK! problem solved. Thank for the help and YouTube video, it helped no end, I was not loading the dependencies correctly. Now to work out how to use the program!

That's what I figured.


I had issues with the prerequisites too. Strangely, installing the prerequisites on their own one by one produced no errors.

aknight0

Quote from: mhaze on August 25, 2021, 01:26:37 PMOK! problem solved. Thank for the help and YouTube video, it helped no end, I was not loading the dependencies correctly. Now to work out how to use the program!
Glad the video helped!  Take it for a spin and let me know what works and what doesn't. 

WAS already pointed out that some of the masks are blurred too much.  I usually run them through a color adjust in Terragen to tighten the edges, but I'm thinking I will also add another tab that lets you choose which masks you want, at what resolution, file format, and how much blurring/smoothing to apply to each.  The mask blurring is to try to help with aliasing, but it seems that the road mask needs a different amount of blur than the lines for example.  At some point, shading with image masks may just be too resolution limited, but I can't think of a good alternative.

I'm also planning to add some images to the docs to explain better what the settings do.

WAS

Quote from: aknight0 on August 25, 2021, 05:31:28 PMAt some point, shading with image masks may just be too resolution limited, but I can't think of a good alternative.

I wish we had velocity type warping. I imagine TerraRoad could output a warp map, which could be used to warp things in Terragen to the road (from 0,0,0).

The biggest issues with roads in TG currently is you can't plot them, additionally, the warping in TG is not very good, you got one flavour, and it doesn't warp road proportionately.

aknight0

Here's a couple more samples on a Gaea terrain.  The sideline masks also work pretty well for dirt roads if you make them wide and blurry.  It's surprisingly difficult to get natural looking angles for a road climbing a hill.  I'll have to look at some more pictures, or find a civil engineering book or something.   :D

I'm working on an update that allows you to set the resolution and blurring for each mask individually, as well as adding 16 bit PNG output for the masks, which seems to help somewhat with the road lines.  

8.jpg 9.jpg

WAS

This is a very promising and probably really helpful plugin for TG. Even for paths Id imagine too. Still need to tinker some more.

Dune

That is a great example of its possibilities! Have you talked to Matt about ways to integrate this into TG directly?

aokcub

#25
Great work!

Confirmed that it could be launched on my macbook.
(used python3 command to launch)

I'll try to generate textures.

aknight0

Just uploaded version 0.2 to the GitHub page.  Here's the changelog:

### Added
- Save Terrain as JPEG button for easier road drawing reference.  (Saves normalized grayscale image to selected output folder)
- Mask Settings tab with individual blur and resolution settings for each mask.
- Check at startup to see if an small EXR file can be read.  Prompt user to allow automatic install of FreeImage EXR library if needed.

### Changed
- Rearranged some of the basic and advanced settings based on the ones I use more often.


There's a bottleneck right now with blurring masks upscaled to large resolutions.  Apparently doing a gaussian blur on a 50k image uses a huge amount of memory, goes into swap, and is very slow.  I recommend running with low res masks until you get the heightfield right, and then turn the mask resolution up.  I also definitely recommend using a color adjust after the image map to fine tune the masks.  

Dune, I've talked back and forth with Cris a few times about this, but not to Matt directly.  I think he's been on vacation.

aknight0

Here's another quick sketch.  Also, I started working on some better documentation here: https://aknight0.gitbook.io/terraroad/

4.jpg

WAS

That's definitely a very good example project right there. Thats cool, and literally something I have wanted to do in TG.

mhaze

#29
Yeah, that's an excellent use of your road app! wanted to do that years ago but couldn't work it out! Most of the problems I've encountwerd with the app were due to my own stupidity! but helped my sort it out. The .exe flie from heightfield generate has to be carefully setup otherwise nothing else works! Used Affinity for the .svg file as I could not work out how to export it from Photoshop. Oh, later displacements messed up the white lines hence the request for a larger road mask - then I can rough up the verges without messing up the white lines. I could probably produce something in Photoshop but it would speed up the process it I had an extra mask.
It would be useful facility if I could up date just one parameter instead of waiting for 4/4 mins to up date them all (8191x8191 HF terrrain)