[DotNet-OSGeo] RE: 3D display

Michael P. Gerlek mpg at flaxen.com
Wed Jun 1 18:55:50 EDT 2011


Well, I don't actually use Draw.Point - from within D3D, I set up an array
of points in a vertex buffer and render them using POINTLIST.  Which is the
same thing, essentially, I think.

 

-mpg

 

From: dotnet-bounces at lists.osgeo.org [mailto:dotnet-bounces at lists.osgeo.org]
On Behalf Of Carsten Troelsgaard
Sent: Wednesday, June 01, 2011 3:27 PM
To: dotnet at lists.osgeo.org
Subject: RE: [DotNet-OSGeo] RE: 3D display

 

 
I asked in on the Draw.Point becourse I havn't used it myself and am puzzled
on what Michael uses it for. I'm bound to the facetted effect you get from
vertices with color and normal. The bmp below is painted as a model with
textured vertices .. it's example-code that I cannot replicate becourse I
get lost in the Xna pipeline. But I could swap my own heightfield into it 
 
http://cid-382e99b169b58267.office.live.com/self.aspx/Gimmi/snap.bmp
 
It's got the blurred effekt that I don't want. If zoom and other input is
swift, I can live with an 'unnormal' facetted look. I alwayes stayed away
from using textures, becourse it's just one step away from shifting focus
from a well-defined comprehensieve tema to a look-alike reality. I'm
somewhat artistic educated too (arthandwork), and it's my experience that
you can make people imagine anything .. provided you have their confidence.
It sounds personal, but it's not. Cheeting has to be very professional if it
has to be. I hope that I can convey an impression of a 'modelle' world ..
which ought not be too difficult. I assume that it's going to a background
to some specific tema. My cheeting in real drawing would be eqvivalent to
adding a fog-factor to enhance the focus.
 
The zoom in will have a limit either way one go about it. If I did have
unproblematic access to aeial photography, I probably would use it none the
less .. along with shaded facettes.  
I've failed to use Models. I'll have to revert to all DirectX features to
get to create and save one - or build it with an external tool. The way that
heightFields are transmitted in ie tif, I'm not sure that I get a display
gain by putting it in a model, but it would be a snug one to save and load. 
 
Carsten
 
 
 
Ted wrote:
 
Yes.  I have also found that trying to make 3D systems behave like
cartographic systems is not very rewarding.  Performance wise, it works much
faster with simply defined colored vertices as points, rather than using
textured billboards.  If the billboards are allowed to have geographic
scaling, that is they get larger when you zoom in, then performance is
usually ok, but you have 6 vertices for each point.  The same texture can be
reused, so mostly you are looking at memory bloat from the additional
vertices.  If, on the other hand, you simply want the fancy symbol to remain
about the same pixel size, you are talking about rebuilding the vertex model
each time the user zooms in or out.  This is computationally expensive and
impractically slow for larger numbers of points.  Completely nonviable for
point clouds.  However, you could always use simple vertices until you zoom
into a certain point, and then for a small number use the billboard
strategy.

If you are creating your triangles from a terrain map, then yes, we have
done draping and it works pretty well.  The recommendation I have in the
draping case is to give up on the notion that the point symbol should have
about the same pixel size continuously as you zoom in and out.  That way,
you only create one texture and then you can zoom in, zoom out, rotate and
everything else using very fast GPU operations.  When you zoom in close
enough the texture becomes pixelated, so you might want different models for
different scales like we talked about before.  Once you zoom in past a
certain point, you swap out your low-res vertex/texture for a higher
definition model that is only for a small region.  Building the model took
some time for us, but only because we were creating it directly from
shapefiles.  In reality you would want to pre-construct the models
(vertex/texture pairings) and save them using DirectX formats so that
everything would work quickly while you are running things.  In practice,
people want to be able to change the vector content, so you might want to
just stick with simple colored vertex points and lines.

Ted



On Wed, Jun 1, 2011 at 12:28 PM, Michael P. Gerlek <mpg at flaxen.com> wrote:

> Not that it matters, but wouldn't a point .. presumably painted as a small
square .. always face toward the screen, where
> two triangles representing a square has 'proper' facing and culling.

Yeah, I looked into that idea too some time ago, when I was trying to use
WPF/Silverlight directly to render a point cloud.  The technique is called
"billboarding", and it is a horrible way to render points...  It bloats your
point budget, and the appearance is really bad at various scales.  Using the
GPU's native notion of a point is *much* better.

-mpg



_______________________________________________
DotNet mailing list
DotNet at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/dotnet

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/dotnet/attachments/20110601/193f4a32/attachment.html


More information about the DotNet mailing list