Question about creating sea level

Started by monks, April 20, 2011, 09:31:30 PM

Previous topic - Next topic

cyphyr

Monks, sorry but maybe I've missed something here but have you not un-ticked "Flatten surface first" in the displacement tab of your heightfield shader. Your terrain should now follow the curvature of your planet object and lakes and spheres should work as expected.
:)
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

monks

Hey Richard...hmmm, it doesn't though.
Yes flatten first is unchecked. All displacement in shaders is turned off. I checked my terrain out in a couple of apps and selecting from terrain by height at the coastline shows the coastline is correct at all points, yet in the render the sea level is too high in the nearer area of the terrain. See pics comparison.
My calculation of the sea level on my terrain proved to be incorrect within TG. It should be: planet radius + (10 x 5486.4 m), x 10 since sea level = 5486.4m and I'm exaggerating the terrain height by 10. But I had to eyeball it and set it visually from repeated renders- it took me a while  :P
The terrain height is spanned both outside and inside Terragen so there are no hidden offsets in it.

One thing I wasn't sure about is the angular position of the sphere. It could be this. What is angular position?

monks


cyphyr

#17
Hmm, looks like Middle Earth?
It shouldn't make any difference how much you have exaggerated your terrain since sea level "should" be by definition at 0m since that's what sea level essentially is ...
Why your sea level is at 5486.4 m I don't know. If your sure that's the right height then try lowering your terrain (Heightfield Operator>Adjust vertical, type -5486.4 into the add height field). Your sea level "should"  now be at 0m now and again your sphere or lake object should work correctly.
:)
Richard

A thought: Is the terrain a bitmap rather than a geotiff? If so the sea level is set at an arbitrary height, well its not set at all really.
If your using a greyscale bitmap (bmp, tiff (not geotiff) etc) you will need to make two heightmaps, one from sealevel to the top of your highest peak and the other from sealevel to the bottom of your lowest sea trench. Using image map shaders plugged into displacement shaders (NOT Heightfield load) displace the heightmap above sealevel positively and the below sealavel negatively.
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

monks

Middle Earth yes  ;)
I have set up like that so that we can model the bathymetry as well. It'd be nice to set the water colour and opacity as a function of depth.
Well in essence I've been doing what you just said by altering the sphere radius. The terrain is a .ter. I didn't go with the georeffed route.
Maybe there's a distortion or inaccuracy produced by the size- I've set the terrain to 4000 km across (the correct scale), but I'm happy to go smaller if that corrects the sea level.
It suggests some kind of distortion. You can see in the pic that as soon as I bring the sea level lower to correct the southern region, the sea level needs to be higher around the island indicated. So it's impossible to set it.
I tried turning off warp by normal in the base colours shader, but that didn't help.

monks

monks

I've noticed that the Sphere radius is being rounded up by 5m. I set it and then open up another shader and then go back into the sphere and it's being rounded. That can't help.

monks

monks

#20
Hey guys, I've found the source of the problem. It is the terrain size that is causing accuracy problems.

Here's a shot of the terrain at half res, scaled to 2000 Km. The coastline is set to the figure I stated: radius of sphere +(10 x 5486.4) metres. As you can see the coastline is now correct- or near as damn it. With a tweak I might be able to solve the last remaining problems in the south.
There must be accuracy problems with the curvature at that scale. Will that or can that be addressed with the 64 bit version?

Thanks for your help with this   ;)




Oshyan

monks, I'd like to see if this is actually a bug, or if there's some other setting that can be tweaked to make this work. Can you share your terrain file(s) and TGD, maybe on the ME-DEM FTP?

- Oshyan

monks

#22
 ok, I've uploaded the terrain and the tgd.

[link expired]

[link expired]

The only thing I can think of is that I've got too many heightfield shaders- still left in there from the default project. I've turned the fractal displacement off in them though, and I've not genned any terrain.

Vertical exag =10. The coastline should be: planet radius + (5486.4 x 10). The span of the ter is set there too (0.1 - 9375.91) - that may produce an error of 1m (ie, 0.1 x 10) but not enough to cause the problems.
The project is set to 4000 Km. When you change that to 2000 Km you'll see the coastline become a lot closer to how it should be.

monks

RArcher

I haven't downloaded your project but had a quick thought...  Where is the 0,0 point set for your terrain?  If you have it set to the lower left corner which is the default I believe, then the inaccuracies due to the curvature would radiate out from this point, which could explain why the left half is closer to being accurate than the right half.  If you set your terrain to "Position Centre" then the curvature inaccuracies should be a little more even on both sides perhaps.

Or this could be complete crap thinking and terrible advice  ;)

monks

  ;D...the terrain is set to centre. The only thing I can think of is the shaders left in place- but I turned everything off which might alter things. Sea level was checked in two apps, so I know that's correct.

monks