Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: High resolution heightmaps?  (Read 7070 times)
asia
Customers
Community Member
*****
Posts: 183


« on: April 07, 2010, 08:58:33 AM »

Is it possible to have an heightmap with more than 256 levels? If yes how?
I did try with red, green, blue but with no success. Any idea? Huh
Fabio
Logged

Fabio Musmeci
ENEA
CR Casaccia
Via Anguillarese 301
00060 Rome
Italy
musmeci@enea.it
+39 3333934898
Learning to live better on a smaller footprint..
Lenn
Customers
Community Member
*****
Posts: 876

+/-


« Reply #1 on: April 07, 2010, 09:04:32 AM »

You can use an array of floating point values as your image, and set it to the landscape using TVLandscape.SetHeightArray.
Logged

TV3D 6.5 Community Docs - Read, use and please contribute!
asia
Customers
Community Member
*****
Posts: 183


« Reply #2 on: April 08, 2010, 01:33:48 AM »

Thanks Lenn, You are always very collaborative! Cheesy
Fabio
Logged

Fabio Musmeci
ENEA
CR Casaccia
Via Anguillarese 301
00060 Rome
Italy
musmeci@enea.it
+39 3333934898
Learning to live better on a smaller footprint..
Lenn
Customers
Community Member
*****
Posts: 876

+/-


« Reply #3 on: April 08, 2010, 05:18:47 AM »

No problem Smiley

(unless ... you were being sarcastic and expected me to give you a code example Wink )
Logged

TV3D 6.5 Community Docs - Read, use and please contribute!
asia
Customers
Community Member
*****
Posts: 183


« Reply #4 on: April 08, 2010, 09:11:26 AM »

Dear people,
after a bit of struggling I discovered that landscape precision can be set via the following method:
Code:
Land.SetHeightmapMode TV_HEIGHTMAP_ALLBGR
(to be called before the GenerateTerrain method)
This method allows height H at a given position (pixel) coded by the following:

Code:
green = Int(H / 256)
blue = H - green * 256
color = RGB(0, green, blue) ‘ VB6 syntax

Hope this can be useful to some one in the future…
Ciao
Fabio

Logged

Fabio Musmeci
ENEA
CR Casaccia
Via Anguillarese 301
00060 Rome
Italy
musmeci@enea.it
+39 3333934898
Learning to live better on a smaller footprint..
Lenn
Customers
Community Member
*****
Posts: 876

+/-


« Reply #5 on: April 08, 2010, 10:52:30 AM »

Of course, didn't you see that before?
But height array is still more precise. Wink
Or at least simpler for me anyway.

btw, why aren't you using the red channel? Maybe a small mistake there?
Logged

TV3D 6.5 Community Docs - Read, use and please contribute!
asia
Customers
Community Member
*****
Posts: 183


« Reply #6 on: April 09, 2010, 12:45:19 AM »

Quote
didn't you see that before?
yes! I forgot! Embarrassed
I have only the highest montain at 2300 m and I keep 1 meter precision. With such a precision I do not need the red channal. Mont Everest is 8850 m. (less the 65536) so many of us wont need the red channel Smiley.
« Last Edit: April 09, 2010, 12:51:56 AM by asia » Logged

Fabio Musmeci
ENEA
CR Casaccia
Via Anguillarese 301
00060 Rome
Italy
musmeci@enea.it
+39 3333934898
Learning to live better on a smaller footprint..
Lenn
Customers
Community Member
*****
Posts: 876

+/-


« Reply #7 on: April 09, 2010, 04:59:17 AM »

only 1m  precision?  Huh oh... well okay then. you're good to go Wink
Logged

TV3D 6.5 Community Docs - Read, use and please contribute!
TecnoBacon
Customers
Community Member
*****
Posts: 305


WWW
« Reply #8 on: April 09, 2010, 09:59:12 AM »

One trick I use for less than 1 m  is to set it to an expanded terrain then rescale it by a fraction such as .5 for half meter resolution then save it as a height array.
Logged

www.TecnoBacon.com - the other side of the Bacon family! 3D Development, Music and more.
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks