Fw: Re: Surface data

Wookey wookey at wookware.org
Wed Sep 14 02:08:49 BST 2011


Copying this patch to the list to stop it getting lost. 

As it stands its very hacktastic, but it does demonstrate what's
needed to display the surface grid as a tranparent surface, rather
than grid.

A full implementation would need proper data loading and on/off
control, Z-buffer management so that the cave is actually under the
surface etc.

Nevertheless it's already useful for the CUCC dataset. 

----- Forwarded message from Stuart Bennett <sb476 at cam.ac.uk> -----

Date: Tue, 13 Sep 2011 00:23:31 +0100
From: Stuart Bennett <sb476 at cam.ac.uk>
To: Wookey <wookey at wookware.org>
Subject: Re: Surface data
X-Spam-Status: No, score=-3.5 required=4.5 tests=AWL,BAYES_00,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1

On 12/09/11 23:37, Wookey wrote:

> But of course now I just want more :-) That transparency and actual
> surface is great, but as it stands there is no visual clue of relief
> until things start to overlap. I guess it need a light
> direction/shading or something to make it comprehensible? The
> grid-surface provides those clues due to the way the grid density
> changes at low angles. Does that need a shading function to apply to
> each facet or can you tell opengl: "the sun is over there, you work it
> out"?

Not sure, I've never yet felt the need to investigate OGL lighting :)

> Alternatively/as well how hard is it to put a texture map (of
> satellite image) onto the surface? (assuming I provide one already
> geolocated/cropped to this surface)? I assume that doing that would
> help give visual clues too. 

This would likely help, and texturing's a piece of piss.  The only thing
that might be tricky is getting the right bits of the image to show up
in the right place...

Another approach might be just be altering the grid's appearance somehow.

> Comparing with loch in fact I don't think there is any shading there -
> it just the draped satellite image that makes the view much more
> obvious to the brain.
>
> Why does turning on 'smoothed survey legs' produce transparency? 

The anti-aliased legs are done by alpha-blending the lines with the
background to remove jaggies, and turning on alpha-blending is what is
required for transparency too.  Of course the effects of the two could
be separated, but I'm very lazy.

Attached is another go that just colours the surface by height.



----- End forwarded message -----
Wookey
-- 
Principal hats:  Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/



More information about the Survex mailing list