Texturing/Shading Help

Started by sjefen, October 20, 2007, 09:01:50 PM

Previous topic - Next topic

sjefen

I really don't understand this.

I have a terrain with resolution 4096x4096 and images with the same resolution that I want to use as textures, but I can't figure out how to do this. It never fits. I loaded the terrain, then in shaders, I added a Image Map Shader and set it to Y and the size to 4096x4096 but it doesn't fit.

What am I doing wrong here?
ArtStation: https://www.artstation.com/royalt

AMD Ryzen Threadripper 1950X
128 GB RAM
GeForce RTX 3060 12GB

dhavalmistry

try using the option "Position Center" or maybe you can try resizing the heightfield.....
"His blood-terragen level is 99.99%...he is definitely drunk on Terragen!"

sjefen

I've already tryed that with no luck.
ArtStation: https://www.artstation.com/royalt

AMD Ryzen Threadripper 1950X
128 GB RAM
GeForce RTX 3060 12GB

Mr_Lamppost

Ok not tested but my guess would be that you need to set the image map size and centre to match the size and centre of your heightfield generator.

I think the resolution i.e.  4096X4096 of images and height fields (DEM or otherwise), is independent of the size used by TG2
Smoke me a kipper I'll be back for breakfast.

dhavalmistry

but when you first load a heightfield in TG2...its always at 0,0,0

unless he moved it.....
"His blood-terragen level is 99.99%...he is definitely drunk on Terragen!"

sjefen

I have not moved it. It is at 0,0,0
ArtStation: https://www.artstation.com/royalt

AMD Ryzen Threadripper 1950X
128 GB RAM
GeForce RTX 3060 12GB

Mr_Lamppost

I don't usually do this and I know you will not have my lamppost but here is a quick test of the old daytime version projected onto a procedural heightfield.

You will need to both Generate Heightfield and replace the image with one of your own.

tgd included
Smoke me a kipper I'll be back for breakfast.

sjefen

Thank you very much. I will try this.
ArtStation: https://www.artstation.com/royalt

AMD Ryzen Threadripper 1950X
128 GB RAM
GeForce RTX 3060 12GB

sjefen

I'm sorry, but it didn't work.
ArtStation: https://www.artstation.com/royalt

AMD Ryzen Threadripper 1950X
128 GB RAM
GeForce RTX 3060 12GB

Mr_Lamppost

#9
In the example I posted the image and heightfield resolutions were very close, 1024 and 1000 respectively.  EDIT I just noticed that I had typed 100 not 1000    :-[

Here is a close up of a section of the heightfield this time with the image replaced with the 64 X 64 pixel version of the night time lamppost I am using just now

The only change to the TGD posted was the camera position and the image used.  Believe it or not the white area is the lit lantern
Smoke me a kipper I'll be back for breakfast.

sjefen

I'm not sure I fully understand.
Maybe it's best if you, or someone else take a look at this: http://www.cajomi.de/Forum/showthread.php?t=501
That is what I am working on.
ArtStation: https://www.artstation.com/royalt

AMD Ryzen Threadripper 1950X
128 GB RAM
GeForce RTX 3060 12GB

Oshyan

You need to set the size in the Image Map shader to the size of your terrain *in meters*. The default "point spacing" of a Terragen .ter terrain is I believe 30 meters. If the terrain is from Geocontrol I'm not sure how the scale is set (not sure if GC has real world units), but if nothing else you can load it in TG 0.9 and check the total size in meters there (in the Size dialog from the Landscape window). We will of course show you terrain size (in meters) in TG2 itself in the future.

- Oshyan

bigben

Another way to get the numbers (close enough) is to set the terrain's position to lower left at 0,0,0 and then zoom in to the top right corner of the terrain's bounding box. Position the mouse over the corner and read the coordinates at the bottom of the preview window. Remember it's in metres, so if the coordinates are in km you need to multiply by 1000.  X is width, Z is height.

Set image projection to Plan Y and position with the same settings as the terrain...

Mr_Lamppost

I made another test; I brought in an old terrain from V 0.9.43.  The size (Area covered by), the terrain is controlled by the file being loaded.  As Oshyan says all you need to do is match the size of the image map to this. 

Sorry if I was being less than clear yesterday, Before the test I just made I have never imported a terrain so I was figuring it out as I went along.  Virtually everything I do is procedural. 

Smoke me a kipper I'll be back for breakfast.