[DotNet-OSGeo] RE: 3D display

Michael P. Gerlek mpg at flaxen.com
Tue May 31 11:42:41 EDT 2011


For a year now, I have had a dream of making a really slick DirectX-based 3D
viewing engine for geo applications.  The work I've done in the past, and
the work you're doing now, is all stuff that the DirectX "experts" have done
a million times and we are just reinventing their wheel.  Since I do mostly
lidar these days, I'd love to make a solid, canonical open source library
for 3D, but I've just not had the time/funding for it yet.

 

-mpg

 

 

 

From: dotnet-bounces at lists.osgeo.org [mailto:dotnet-bounces at lists.osgeo.org]
On Behalf Of Carsten Troelsgaard
Sent: Monday, May 30, 2011 1:45 PM
To: dotnet at lists.osgeo.org
Subject: [DotNet-OSGeo] RE: 3D display

 

 
Hi Michael 
Thanks for the informative response.
 
> 3D, but it really depends on what you need to do. Simple
rendering/viewing?
 
Yes, I think that it comes down to this. Making a crude topography appear on
the screen is a good start for getting to work on a lot of topics that
relates to the topography. I admit that I'm hooked on delicious appearances,
But .. as for transferring data through the net, vectors as in a topologic
grid, passes a lot of info pr bit compared to bitmap image data. The
abillity to interact with it as a viewer (flyby and such) makes the
perception of the topological data unsurpasable by other media. 
As a geologist of education, I have a watchfull eye on the posibillities of
displaying subsurface geology, but I would probably run short of proper data
to use. (If I should get involved in bitmap-texturing it would be in the
context of conveying subsurface geological visual presentations - but it has
a low priority for now)   

> Custom display controls? Integration with other geo tools and libraries?
> 
> You have a few options for doing your own 3D display on Windows, and again
> it depends on what your needs are:
> 
> * DirectX / D3D
> 
> - DirectX/D3D is great, but is doesn't have .NET bindings, so you have
> to code the engine in C++ and use interop from C#

I use the Visual Studio Express. It has a C++ IDE. Yes .. I would still miss
DirectX3D in that editor. I think that I tried to do an integration of this
editor with something referred to as the "Windows SDK". .. it usually leads
to a plain new reinstall of the Express tools .. The MSDN library on the
Windows SDK has all the stuff about DirectX3D that I spent a little year of
learning and would like to stick to becourse of that. Leaving the
net-framework may mean that I'll have to learn how to deploy ... so far I've
made small tools that produces one single .exe that simply works when copied
from the pile of files that the Express IDE produces. 
 
> - SlimDX is a really nice open source C# API that sits on top of the
> DirectX C++ API, so using SlimDX you can skip the interop and code
directly
> in C#

Either way I do it, I'll have to come to terms with the fact, that I won't
get anywhere without dependancies .. being it directX3D, Xna or OpenGL. 
 
> - if you want to use WPF with DirectX underneath, you can use SlimDX as
> well, although it takes some work to get the D3DImage class to behave (my
> own SlimDXControl package is one solution for this problem)
> 
> * WPF or Silverlight
> 
> - this would be very appealing, but you can't represent points directly,
> only polygons, so if you want to do raw point clouds this isn't an option;
> also, if you're trying to do tens of thousands of vertices, it will start
to
> slow down
> 
> - the latest release of Silverlight has started to add 3D primitives, but
> again you can't do points and you often can't scale into thousands of
> objects
> 
> * XNA
> 
> - I know the least about this option; XNA is really designed as a game
> API, and my quick look a couple years ago made me stay away because I
didn't
> have either the raw power of using DirectX directly or the flexibility of
> actual UI framework like WPF/Silverlight
> 
> * OpenGL
> 
> - powerful and low-level, like DirectX, but also lacking a native C# API
> 
> - there are some C# bindings libraries out there, but I've no experience
> with them
> 
> 
> So, it comes down to these questions:
> 
> - do you want to program in C++, C#, or a mix?
 
I have an idea that I can make a 'lean an mean' C++ form as a basis, but I'm
not done on pondering about the slow-down. I can display 700*700 vertices
with an annoying slow performance; and 800*800 will not be accepted. I think
that I use the 'fixed pipeline' as I cannot make the code for multiple
vertex-lists work. The vertices are turned into triangles .. that would be
100.000 triangles .. far less than I anticipated though it's plenty enough
to have a decent look. There are different approaches to deal with these
issues. 
 
http://cid-382e99b169b58267.photos.live.com/self.aspx/Billeder/ng%5E_2.jpg
 
I'm getting the hang of C#. There's no intelli-sense so I have all the
reason I need to be slow. The coding that lies behind the image above uses
the parts of DirectX3D that I know .. most of the Xna stuff is one big
haystack that hangs together, so it's been difficult to sort the subset out,
but it's been much like making a form in C# with a different sort of code in
the Paint-event (it IS a C# form).   

> - do you want a low-level library which supports points like
> DirectX/OpenGL, or do you want a higher level polygonal framowork like
WPF?
> - do you want to jus trun on a Windows desktop, or do you want to be able
> to port your engine to Windows Phone, Linux, etc?

There won't be any WPF and I prefer a proper screen for display, so desktop
it is. I had some issues with Silverlight, so it's out too.
 
Michael, I don't hope that I have abused your attention.
 
Carsten

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/dotnet/attachments/20110531/28e72020/attachment.html


More information about the DotNet mailing list