How to render a realistic panorama view of a terrain?
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Could you help me properly render a panorama view using DEM (Digital Elevation Model) data, please?
This summer I went to the Mountains called Tatras in Slovakia. I walked to the location:
Latitude = 49.232230688571
Longitude = 20.221235240000
Altitude = 1868.8
and I took an image (the first one):

I tried to render the same view in Google Earth (the second image) which was quite successful.
I tried the same in Matlab (the last image) but the result is disappointing. How could I make it more realistic?
I don't care about textures; I am more interested in correct location of the peaks from current viewpoint. Just looking at horizon, it is clear that it is not accurate.
To create the last image I used this code:
dem = readhgt(49, 20);
dem.z(dem.z < 0) = 0;
latlim = [min(dem.lat(:)) max(dem.lat(:))];
lonlim = [min(dem.lon(:)) max(dem.lon(:))];
R = georasterref('RasterSize',size(dem.z),'Latlim',latlim, 'Lonlim', lonlim);
worldmap(latlim, lonlim)
geoshow(double(dem.z), R, 'DisplayType', 'surface')
demcmap(double(dem.z))
daspectm('m',1)
view(3);
camva(20); % had to play with this value because the real camera has around 40 or 50
camposm(49.232230688571,20.221235240000,1868.8);
camtargm(49.195833, 20.194778, 2034);
Thank you for any help.
0 comentarios
Respuestas (2)
Chad Greene
el 13 de Sept. de 2015
Use some sort of lighting to create hills. You should be able to follow all your Matlab commands with shadem, which I wrote to make the process easy. Then it'll make it look a lot more like realistic topography. Or you can skip shadem and edit lighting manually.
0 comentarios
Chad Greene
el 13 de Sept. de 2015
Alternatively, you can drape a satellite image over your topography. Something like what I did here. Just swap my DEM for yours.
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!