Terrain generation/following

Hi,

I’m looking for a terrain generation/following package (like the old j3d package (http://www.j3d.org/tutorials/collision/terrain.html ) used to handle).

I tried to use it, and the terrain generation works fine. But there are issues regarding the terrain following part (with Picking and TriangleStripArray).

  • Did someone have the same issue? Did he fix it?

  • Is it better to use the Xj3d package for terrain following? Is it mature enough?

  • Are people working on this part on the java3d project (java3d-core-util )?

  • Do you know some related java3d project?

I would appreciate any tips/information regarding terrain generation/following.

Thanks a lot,

Franck

I wrote the tutorial and all the code you’re talking about. Can you explain what problems you’re having with the code? In our usage of it, we’ve not had any problems, so I’m interested in hearing about and fixing up anything you may have come across - particularly if you can create a decent test case. There’s a huge amount of code spread across a number of packages with that terrain following code, so narrowing it down to one particularl class or method call would be very helpful.

The same j3d.org code is the core of Xj3D’s terrain following system, so you wouldn’t gain anything by using it.

hi,

thanks for your reply.
Well my main issue is related to terrain following (‘NavigationProcessor.checkTerrainFollowing()’) and especially the way to get an intersection with GeometryArray.INTERLEAVED. This is located in IntersectionUtils.rayTriangleStripArray():
here is the code:
if((vtx_format & GeometryArray.INTERLEAVED) != 0)
throw new IllegalArgumentException(“We can’t handle interleaved geometry yet”);

so obviously it has been done on purpose…

is there a work around o get the intersection with GeometryArray.INTERLEAVED?

thanks,
Franck

There is, but someone is going to have to write the code for it. If you want to do that, then please send it to us. Right now we don’t have the cycles to work on it, so someone else will have to write the code for it if they want it.

I have an ASE Loader that will allow you to follow terrain and check line collision against geometry. If you’re interested in having a look, the address is: http://home.no.net/tabusd/.

The source code is also there, so it shouldn’t be too hard to get the ideas and if necessary convert/modify it to fit your needs.

-Trond

thanks Trond,

I’m gonna check it out right now, and will let you know about issues if i have difficulties to integrate it in my game (http://cazapool3d.sourceforge.net/cazapooljws/Pool.html)

Franck