Constrains importing .ter file and generating heightfield?

Started by Onkelpoe, January 07, 2014, 08:02:23 AM

Previous topic - Next topic

Onkelpoe

Hi there,

I want to import a .ter file, created with WorldMachine and I wonder, what settings and/or constrains are there (may be) for the heightfield-generate?

In WM, the terrain was 8x8km in size, 2048x2048 in resolution. So i guess, I should use the same extent for "Size in meters", right?!

I want to use TG to render out some (hopefully) nice textures and checked the xfrog video-tutorial.
So this part is explained well and not hard to understand.

But still I am not sure about the heightfield res in meters and "dots".
Must the heightfield match the 2048x2048 resolution from the .ter file in meters or dots?
Maybe tweak something on the heightfield-end?

Are there values to adjust – or will TG get everything from the .ter file?

So in short: is there something besides the renderer-settings, that I should/must "turn up" to get
a nearly photo-realistic-texture out of TG?

Second thing is, how to set the exact height for the camera for this purpose?

Kind regards

Dune

Things like this can be easily checked if you just import (not generate) the ter file and see what happens. There's a measure tool, you could use a simple shape (and use the white border lines) of the size you need the heightfield to be and check whether they are the same. Adjust some values you find in the heightfield shader, and see what happens.
I can't really give you an answer, as I hardly use any ter's, but experimentation is my way of working.

Oshyan

You shouldn't need to worry about points vs. size, TER files have a "meter point spacing" to take care of that, so as long as scale is set correctly in your generating application, it hsould work. TER files should have scaling info built-in, basically, and Terragen will properly load and respect any settings that your *source program* handles correctly (i.e. exports into the TER).

I recall in the past there were some vertical scaling issues with World Machine TER Files, I think, something like it displaced equally both up and down, rather than using 0 point as a baseline or something. Hopefully that's fixed now, but even if it's not it's a simple matter to rescale vertically with heightfield modifier.

Generally speaking I agree with Dune. *In theory*, if your source program creates a correctly formatted TER, you should have no problems at all. The only way to know for sure is to test it though.

- Oshyan

Onkelpoe

Ok, I teseted it and the import-thing worked out o.k.

Now, I want to render the surface and use this as texture. I followed the tutorial (xfrog) and got some problems, lining up things correct.

My questions:

I use an orthographic camera - so, the size of it must match the renderer-size for the texture (like 2048 by 2048) ?

I set the size of the heightfield to "8000x8000" and position to "centre", camera-perspective to "Top View"
How can I position the camera in a way, that it is centered in the middle of the heightfield
and high enough away from the ground, that the complete heightfield is covered - but not more or less?

Sure, I can try this back and forth - but there must be a precise way (like entering some values) to archive this, I guess?


Dune

Never done this, but I guess if you copy the coordinates of the center of your heightfield and paste those in the camera, you'd only have to change the Y until it's high enough to cover your HF.

Onkelpoe

Ahhhh, thanks!

Copy the coords should help ;) So only the "height" problem left... is there really no formular to point out
how far away from ground the cam must be to make sure, that only the heightfield-extent is rendered (sharp and exactly)?

Onkelpoe

Ok, the height for the Cam is just above the highest point of the heightfield ;)