 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Jim Guest
|
Posted: Sun Nov 21, 2004 10:13 pm Post subject: Terrain Rendering |
|
|
Anyone point me in the direction of a non OpenGL way to do Terrain
Rendering. This is not for animation, other than rotation, so optimal
speed is not a necessity. It just needs to work on any video card and
version of Windows. DirectX is fine but I have not found exactly what
I am looking for yet. Most DirectX sites seem to be quite old.
Jim
--
www.mustangpeak.net
|
|
| Back to top |
|
 |
Tomaz Koritnik Guest
|
Posted: Mon Nov 22, 2004 7:32 am Post subject: Re: Terrain Rendering |
|
|
Hi
What kind of a terraing would you like to render? Do you want to paint each
pixel with color based on terrain height at that position? Like when height
0 color is light green, at 1000 meters goes from brown to maybee orange and
at 3000 meters becomes white. This is quite simple to acomplish using
gradients.
regards
Tomaz
"Jim" <jimdk (AT) mindspring00 (DOT) com> wrote
| Quote: |
Anyone point me in the direction of a non OpenGL way to do Terrain
Rendering. This is not for animation, other than rotation, so optimal
speed is not a necessity. It just needs to work on any video card and
version of Windows. DirectX is fine but I have not found exactly what
I am looking for yet. Most DirectX sites seem to be quite old.
Jim
--
www.mustangpeak.net
|
|
|
| Back to top |
|
 |
Eric Grange Guest
|
Posted: Mon Nov 22, 2004 10:54 am Post subject: Re: Terrain Rendering |
|
|
| Quote: | This is not for animation, other than rotation, so optimal
speed is not a necessity. It just needs to work on any video card and
version of Windows.
|
You could try with OpenGL + MESA 3D (software OpenGL).
If you really want to run anywhere with exactly the same aspect,
software rendering may be your only option.
Eric
|
|
| Back to top |
|
 |
Jim Guest
|
Posted: Mon Nov 22, 2004 1:00 pm Post subject: Re: Terrain Rendering |
|
|
Hi,
| Quote: | What kind of a terraing would you like to render? Do you want to
paint each pixel with color based on terrain height at that position?
Like when height 0 color is light green, at 1000 meters goes from
brown to maybee orange and at 3000 meters becomes white. This is
quite simple to acomplish using gradients.
|
Yes that would be fine. I am not looking for ultra realistic
texturing. I want to be able to "create a landscape" to see how model
railway track fits into the scene.
Something like this:
http://www.trackplanning.com/meshes/index.htm
The control to create the landscape here is limited so I want to
1) learn about this technology
2) create a more controllable landscape application
Also the Fractal trees are interesting, is there an info for this out
there?
Thanks,
Jim
--
www.mustangpeak.net
|
|
| Back to top |
|
 |
Jim Guest
|
Posted: Mon Nov 22, 2004 1:02 pm Post subject: Re: Terrain Rendering |
|
|
Hi,
| Quote: | You could try with OpenGL + MESA 3D (software OpenGL).
If you really want to run anywhere with exactly the same aspect,
software rendering may be your only option.
|
I looked at that but it appears that it only can be down-loaded in
source form and you need a C++ compiler to build it. Am I missing
something?
Jim
--
www.mustangpeak.net
|
|
| Back to top |
|
 |
Jim Guest
|
Posted: Mon Nov 22, 2004 1:48 pm Post subject: Re: Terrain Rendering |
|
|
Hi Eric,
| Quote: | They come in the form of an "opengl32.dll" which you basicly place in
your application directory, the application will then use MESA
instead of the Windows or hardware drivers.
|
Ok, got it but same issue. When I try to run the OpenGL Framework and
Framework2 demos I get a "WGL_ARB_extenstions_string" not found error.
What fails is here:
procedure TDotTempWindow.FormCreate(Sender: TObject);
var
err: Integer;
begin
try
FDC := GetDC(Handle);
dotInitDC(FDC);
FRC := wglCreateContext(FDC);
if FRC = 0 then
begin
err := GetLastError;
raise EDotException.CreateFmt('Couldn''t create temporary
context.'
+ #10 + '%d: %s', [err,
dotWin32ErrorString(err)]);
end;
wglMakeCurrent(FDC, FRC);
***********************
<<<< FAILS
wglGetExtensionsStringARB :=
wglGetProcAddress('wglGetExtensionsStringARB');
if not Assigned(wglGetExtensionsStringARB) then
raise EDotException.Create('WGL_ARB_extensions_string not found!');
***********************
<<<< FAILS
if not glext_LoadExtension('WGL_ARB_pixel_format') then <<<< FAILS
raise EDotException.Create('WGL_ARB_pixel_format not found!');
except on E: Exception do
begin
MessageDlg(E.Message, mtError, [mbOK], 0);
Halt(1);
end;
end;
end;
--
www.mustangpeak.net
|
|
| Back to top |
|
 |
Eric Grange Guest
|
Posted: Mon Nov 22, 2004 2:07 pm Post subject: Re: Terrain Rendering |
|
|
| Quote: | I looked at that but it appears that it only can be down-loaded in
source form and you need a C++ compiler to build it. Am I missing
something?
|
Several precompiled binaries for the 4, 5 and 6 versions are available here:
http://sourceforge.net/project/showfiles.php?group_id=29749
They come in the form of an "opengl32.dll" which you basicly place in your
application directory, the application will then use MESA instead of the
Windows or hardware drivers.
Eric
|
|
| Back to top |
|
 |
Jim Guest
|
Posted: Mon Nov 22, 2004 2:32 pm Post subject: Re: Terrain Rendering |
|
|
Hi,
| Quote: | OpenGL Framework and Framework2 demos
Sorry, don't know about these...
|
No I am sorry these are from OpenGL not GLScene. Downloading now.
Thanks.
jim
--
www.mustangpeak.net
|
|
| Back to top |
|
 |
Jim Guest
|
Posted: Mon Nov 22, 2004 2:45 pm Post subject: Re: Terrain Rendering |
|
|
| Quote: | No I am sorry these are from OpenGL not GLScene.
|
Yes it was Delphi3D and the Delphi OpenGL Toolkit. I need to make
some coffee and wake up!
Jim
--
www.mustangpeak.net
|
|
| Back to top |
|
 |
Eric Grange Guest
|
Posted: Mon Nov 22, 2004 3:00 pm Post subject: Re: Terrain Rendering |
|
|
| Quote: | Ok, got it but same issue. When I try to run the OpenGL Framework and
Framework2 demos I get a "WGL_ARB_extenstions_string" not found error.
|
Unless you require pixel buffers or fragment/vertex programs,
you shouldn't need WGL_ARB_extensions_string, maybe you're
starting from code that is intended to make use of recent hardware
and its features?
| Quote: | OpenGL Framework and Framework2 demos
|
Sorry, don't know about these...
There are some terrain demos in GLScene (http://glscene.org) which
range from basic heightfield to ROAM real-time tessellation.
Eric
|
|
| Back to top |
|
 |
Eric Grange Guest
|
Posted: Mon Nov 22, 2004 3:39 pm Post subject: Re: Terrain Rendering |
|
|
| Quote: | No I am sorry these are from OpenGL not GLScene.
|
I googled the 'TDotTempWindow' and if I'm not mistaken you were
using the 'Dot' library from Delphi3D, so you may want to report
the issue there, but IIRC Dot is intended for OpenGL 1.5+, so it's
unlikely Tom will want to support older OpenGL revisions.
Eric
|
|
| Back to top |
|
 |
Jim Guest
|
Posted: Mon Nov 22, 2004 4:20 pm Post subject: Re: Terrain Rendering |
|
|
Hi,
| Quote: | There are some terrain demos in GLScene (http://glscene.org) which
range from basic heightfield to ROAM real-time tessellation.
|
Amazing. Can you give me a push in the right direction? I want to
define an area, make it a rectangle for now, and I want to be able to
dynamically create/modify the height data for the map. Is the Shaded
Terrain Demo the type of rendering I want? Or the Terrain Demo? Which
ever is the right way to go do you know of any good web resources on
the subject?
Thanks,
Jim
--
www.mustangpeak.net
|
|
| Back to top |
|
 |
Jim Guest
|
Posted: Mon Nov 22, 2004 5:14 pm Post subject: Re: Terrain Rendering |
|
|
Hi again,
| Quote: | Well, it depends on what exactly you're after (in terms of terrain
size, performance, interactivity and texturing/coloring), and in what
form your terrain data comes (as a grid of samples? sparse DB points?
gigabyte-sized dataset? etc.)
|
Look at my response to Tomaz to see what I am up to. The height map
will be controlled by the user to make it "look right". What I want it
to do is be a visualization tool for creating model scenery.
Jim
--
www.mustangpeak.net
|
|
| Back to top |
|
 |
Eric Grange Guest
|
Posted: Mon Nov 22, 2004 5:48 pm Post subject: Re: Terrain Rendering |
|
|
| Quote: | Amazing. Can you give me a push in the right direction? I want to
define an area, make it a rectangle for now, and I want to be able to
dynamically create/modify the height data for the map.
|
Well, it depends on what exactly you're after (in terms of terrain size,
performance, interactivity and texturing/coloring), and in what form
your terrain data comes (as a grid of samples? sparse DB points?
gigabyte-sized dataset? etc.)
Most simple approach is the one in graphheightfield or fxy, if your
terrain size is limited, using a heightfield can also be the most
efficient way.
If you got something more complex in terms of size, you might have
to investigate ROAM rendering, as meshesterrain, synthterr
or shadedterrain, but be aware these are a notch above in complexity.
For interactive terrain navigation, there are more advanced demos,
but these don't fit your need as far as I understood them.
| Quote: | Is the Shaded Terrain Demo the type of rendering I want? Or the Terrain Demo?
|
Both use ROAM, "terrain" uses a static texture to paint the terrain,
shaded terrain uses dynamic lighting (bumpmapping) and paletting,
if you want to be fast on all hardware, you'll probably want to avoid
texturing however.
| Quote: | Which ever is the right way to go do you know of any good web resources on
the subject?
|
There are many ressources on the subject, the most extensive ressource
is probably http://www.vterrain.org/ (not Delphi specific though).
For more specific question, you can post on the GLScene newsgroups
news://forums.talkto.net/glscene.general
with details on your exact requirements, odds are someone may have
faced a similar problem.
Eric
|
|
| Back to top |
|
 |
Eric Grange Guest
|
Posted: Tue Nov 23, 2004 8:33 am Post subject: Re: Terrain Rendering |
|
|
| Quote: | Look at my response to Tomaz to see what I am up to. The height map
will be controlled by the user to make it "look right". What I want it
to do is be a visualization tool for creating model scenery.
|
Depending on the terrain resolution, a heightfield could be enough then,
as you could specify color per sample instead of using texturing.
Also, for such a simple case of texturing, you should be okay with
hardware acceleration.
Eric
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|