Hi Ahmad,
Quote from: walwop on April 27, 2014, 05:08:51 PM
I have made sure the image is the mask remains the same size and does not change in terms of the image size. I have also copy pasted the ''NW corner lat long'' in the position of the mask in the image map shader, so everything should align perfectly.
The georeferencing parameters are in degrees of latitude and longitude and not metres. If you use the NW corner settings to position the image then it won't be in the right place, as it's using the wrong units.
Have you tried using a Geog image map shader to load the image? If you used that you could copy the georeferencing settings from the heightfield into the Geog image map shader and that should locate it well.
If you didn't want to use the Geog image map shader you could still do it with the Image map shader. This would work whether you were using a Heightfield load node or the Geog heighfield load node for the DEM:
- Load the DEM in one of the heightfield load nodes
- Load your image with the Image map shader
- Go to the heightfield node and copy the SW corner from the georeferencing data (use the clipboard button at the right to copy both coordinates at once)
- Go to the Planet 01 node (in the Objects node list)
- Paste the SW corner coords into the
Lat long at apex parameter of the Planet 01 node (again use the clipboard button to paste both coordinates at once). This will place the scene origin at the SW corner of the DEM, or on in other words, the lower left corner of the DEM.
- Go back to the heightfield load node. Copy either the
Size in metres coords, if using the Heightfield load node, or the
XY size (metres) coords, if using the Geog heightfield load node.
- Go to the image map shader node.
- Paste the size coords you've just copied into the
Size parameter of the image map shader.
- Make sure the
Position lower left radio button is checked.
- Make sure the
Projection type parameter is set to "Plan Y (edges = XZ)".
- Leave the
Position parameter set to 0, 0, 0.
To sum up, what we're doing here is setting the scene origin to the lower left of the DEM. We are then resizing the image map so it's the same size as the DEM, and setting it up so the lower left of the image is in the same position as lower left of the DEM. This should make the image cover and line up with the DEM.
Quote
also the terrain created by the dem data seems to be much larger in size than the dem data,, for example the Dem file size is 3069*3069 whereis the displace terrain size is 88903, 0, 111319 in meters.
There are two sizes in play when using DEMs. One is the size or resolution of the DEM data itself. This would be the 3069 x 3069 size. This means the DEM data has 3069 x 3069 elevation points in it. The other size is the georeferenced size of the DEM. This is the area that the DEM covers in "the real world". That would be the 88903, 0, 111319 metres size. That means it covers an area of 88903 x 111319 metres. Just because the DEM data is square doesn't mean the actual real world georeferenced size is square. There are all sorts of technical reasons why this might be the case, such as different map projections.
There is a relationship between these two sizes which describes the resolution or detail of the DEM. Let's say you have a real world area that is 1000 x 1000 m square. If you made a DEM of that area which was 100 x 100 that would mean that there would be 10 metres between points in the DEM. However if your DEM was 1000 x 1000 then there would be only 1 metre between points. This would mean the DEM had a lot more detail and was more accurate. Basically the more points there are in the DEM for the real world area it covers, the greater the resolution or detail will be.
Regards,
Jo