Very New User! Laying Image Map correctly onto Terrain

Started by Earwig, December 12, 2009, 07:58:54 AM

Previous topic - Next topic

Earwig

Hello! I'm pretty new to Terragen (in general, though I use 2). I've been digging furiously through these forums, Google search, a .pdf manual, and the Planetside wiki for an answer to my issue, but I can't seem to find it. I wouldn't be surprised if that's because I was looking in the wrong places, rather than the information not existing, but better safe than sorry.

Forgive me if I use incorrect terms at all in explaining!

The issue:
I'm making a fantasy map based on a heightmap that I had generated in a game called Dwarf Fortress. The heightmap's dimensions are 4112x4112, though I've also tried 600x600 and even 10,000x10,000! Here's the smaller version of the heightmap for reference:

http://i49.tinypic.com/ad2clk.jpg

What I would like to do is take the color map I made for it to line up exactly with the different features. Whenever I use Plan Y, it makes my terrain all black, and I haven't been able to find the plane that the shader should sit at. Projection obviously works, but only for as long as my camera is looking top-down and center- I need it to lay like a proper texture and exactly color the areas it is meant to color. I've used the same dimensions for the color as I have for the terrain, and fiddled for hours, and still haven't figured it out.

Color map for reference, 600x600 again. http://i49.tinypic.com/2w6dp2u.jpg

Anyway, if you could help me with this very frustrating problem, I'd be pretty much forever in your debt. It's given me over a week of agitation, and I'd like it to be behind me now!

Thanks again!  :)

Henry Blewer

You can add a new camera looking straight down to where you want the image to project. When that is all set correctly, link the new camera to the camera projection in the shader. There is a way to switch cameras by selecting the first (non-projecting) camera from the view selection at the bottom of the preview window. Now you should be able to move your POV and the projection camera not be affected.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

Earwig

EDIT: Nevermind! I've fiddled for a bit and I think I've got it to where I need it, by using the camera's rotation and height options. Thank you SO much for your help! :)

Quote from: njeneb on December 12, 2009, 08:35:09 AM
You can add a new camera looking straight down to where you want the image to project. When that is all set correctly, link the new camera to the camera projection in the shader. There is a way to switch cameras by selecting the first (non-projecting) camera from the view selection at the bottom of the preview window. Now you should be able to move your POV and the projection camera not be affected.

Thank you for that tip. Though now that I'm using Camera Projection correctly, it seems even less like what I need. :/ The shape is now a cone from the base of the camera, which makes perfect sense of course, seeing that that's how it's projecting. If this is the only way to get the texture onto the terrain, do I have to widen the camera to be a full circle? If so, how do I do that? And wouldn't there be a seam at the very back of the camera in the texture?

Thank you again for the help!

cyphyr

Try setting your camera to ortho projection, tilt it 90deg to the ground, and set the cameras ortho width to the size of your terrain. Make sure the terrain and the camera and the image map all have the same coordinales and centre.
should work.
:)
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

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

Oshyan

I don't think camera projection is at all a good idea here. There's no good reason for it, and it just introduces another area of possible error into the process. PlanY is what you need to be using, and if you set the size of the images the same, they should line up. But of course there's a bit more to the whole scene setup than that.

First, it depends on how you're loading your "heightfield". If you're using Heightfield Load, and using an image format without embedded scale data (i.e. anything but TER and GeoTIFF), then it will scale it at 1 meter = 1 pixel. So if you have a 10,000x10,000 pixel map, it'll be 10,000 meters square. You can adjust this of course, but that's the default. So if you then brought your color image in with an Image Map Shader you'd need to scale it to 10,000x10,000 to match (and make sure the position matches of course). rAlternatively, if you're using an Image Map Shader to load both, and just applying Displacement with one, then the scales just need to be set the same in both shaders.

Anyway, you mentioned you had problems with the Image Map shader, but it's hard to know exactly what was going on. If you could post an image showing the problem, and/or a TGD scene file with your current setup, we can probably help more.

- Oshyan