Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (744)
Games in Android Showcase (225)
games submitted by our members
Games in WIP (825)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Terrain engine  (Read 2011 times)
0 Members and 1 Guest are viewing this topic.
Offline Max Pesce

Junior Devvie




Nil tam arduum quod non ingenio vincas


« Posted 2003-05-24 09:40:26 »

Hi.

I'm currently porting a terrain engine from C++/DX to Java3D.
I'm trying using a SimpleUnivers and an array grid representing the ground. It runs fine (graphically) on Java, but it's sluggish (11fps) compared with C++/DX (80fps). I know that the problem is in the code (not in Java3D!), in fact I've not yet translated the culling routines.

Now, I've not great experience with Java3D, so I'm not sure is possible to cull land "tiles" (group op polygons) using the SceneGraph.

In the DX version, I created a culling routine based on viewing frustum. This routine creates a list of visible polygons (every cicle) and then draws them on screen.

May I should simple use Immediate mode (as in PureImmediate demo), or there's a way to mix Immediate mode with the SimpleUniverse?

Many Thanks

Offline Herkules

Senior Devvie




Friendly fire isn't friendly!


« Reply #1 - Posted 2003-05-24 10:00:16 »

We just composed our terrain of tiles.  Size is about 1/4 of the viewing distance. Each tile is a shape on its own attached to the terrain group.

Culling is done by Java3D as a common scenegraph service. No need to fool around with the viewing frustrum.

And no problem to achieve 80fps. (okok, depending on terrain resolution of course....) Smiley

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline Max Pesce

Junior Devvie




Nil tam arduum quod non ingenio vincas


« Reply #2 - Posted 2003-05-24 10:13:30 »

Great!  Grin

But the only way is to split the map in tiles and attach every tile to the SceneGraph?

If I use only a "mesh" Java is unable to do culling for me, it is right?

Many thanks!

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Herkules

Senior Devvie




Friendly fire isn't friendly!


« Reply #3 - Posted 2003-05-24 10:18:50 »

I think it's possible.

The ROAM stuff from j3d.org e.g. need to do similar things. They analyze the terrain with respect to the frustrum and generate the shape to be rendered.


HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline Vrml_Java_Animator

Senior Newbie




Web Animation with VRML,  Java3d & pure Java


« Reply #4 - Posted 2003-05-24 22:09:06 »

Terrain Rendering with Java3d has worked well, look:



| View terrains with DEM Terrain Viewer,
|
|    free source code is available.
|
|  Uses Java3d, configured as an application, not a web applet.
|
http://www.frontiernet.net/~imaging/terrain_rendering.html

A Great Example from Germany ( with free source code ! )
features dynamic LOD, motion, and toggling from solid to mesh:

The vis.informatik.uni-stuttgart.de folks have an excellent demonstration
of Terrain Generation & Rendering with some of the best modern methods
( links below )


Web Demo with Free Source code
------------------------------

Real-Time Generation of Continuous Levels of Detail for Height Fields
---------------------------------------------------------------------
| Features of the algorithm:
|
| * Continuous Level of Detail (i.e. dynamic mesh).
| * Top-Down approach.
| * Geomorphing.
| * Quadtree based (i.e. fast; easy view frustum culling).
|
| [ * also feature solid surface - wire mesh toggle ]
|
http://wwwvis.informatik.uni-stuttgart.de/javatevi/data/StudArbAus_MB.ps

Terrain Visualization with Java 3D ( Web Demo + Sourcecode )
---------------------------------- ~~~~~~~~~~~~~~~~~~~~~
 http://wwwvis.informatik.uni-stuttgart.de/javatevi
-
http://wwwvis.informatik.uni-stuttgart.de/javatevi/Hawaii/index.html
-
http://wwwvis.informatik.uni-stuttgart.de/javatevi/data/TeVi.tgz

-
http://wwwvis.informatik.uni-stuttgart.de/eng/research/fields/current/chemvis/


Quote


| Hi.
|
| I'm currently porting a terrain engine from C++/DX to Java3D.
|
| I'm trying using a SimpleUnivers and an array grid representing the ground.
| It runs fine (graphically) on Java, but it's sluggish (11fps)
| compared with C++/DX (80fps).
|
| I know that the problem is in the code (not in Java3D!),
|  in fact I've not yet translated the culling routines.
|
| Now, I've not great experience with Java3D, so I'm not sure
|  is it possible to cull land "tiles" (group op polygons) using the SceneGraph.
|
| In the DX version, I created a culling routine based on viewing frustum.
| This routine creates a list of visible polygons (every cicle) and
| then draws them on screen.
|
| May I should simple use Immediate mode (as in PureImmediate demo),
|  or there's a way to mix Immediate mode with the SimpleUniverse?
|
| Many Thanks
|


The image is 12,1565 bytes.

 I spared no expense in time or money to compress the image
to an optimimum level to achieve the perfect comprimise of
detail vs. image size ( and thus imposing unbearable download delays ).

-- Paul, Java Developer & Web Animator
----------------------------------------------
Imaging the Imagined: Modeling with & a Keyboard


Imaging the Imagined: Modeling with VRML, Java & Math
-------------------------------------------------------------------
Pages: [1]
  ignore  |  Print  
 
 

 
Ecumene (149 views)
2017-09-30 02:57:34

theagentd (214 views)
2017-09-26 18:23:31

cybrmynd (300 views)
2017-08-02 12:28:51

cybrmynd (288 views)
2017-08-02 12:19:43

cybrmynd (296 views)
2017-08-02 12:18:09

Sralse (291 views)
2017-07-25 17:13:48

Archive (968 views)
2017-04-27 17:45:51

buddyBro (1094 views)
2017-04-05 03:38:00

CopyableCougar4 (1669 views)
2017-03-24 15:39:42

theagentd (1428 views)
2017-03-24 15:32:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!