Is Ogre suitable for DTMS and TINS?
-
- Gnoblar
- Posts: 6
- Joined: Sun Jan 13, 2008 6:34 pm
Is Ogre suitable for DTMS and TINS?
Greetings
I just stumbled across this project in my quest to find a suitable package to 'view' digital terrain models. I come from a back ground in land surveying and during the course of my work I often have to build DTMs and TINs utilizing AutoCAD. The files and data I produce are collections of triangles stored as data structures containing only the double value of the triangle vertices, in real world coordinates.
Would Ogre be a suitable platform to load these DTMS into? What I have in mind is developing something where I can 'walk' across my surface and look for possible erros and such. Any suggestions or comments are greatly appreciated.
I just stumbled across this project in my quest to find a suitable package to 'view' digital terrain models. I come from a back ground in land surveying and during the course of my work I often have to build DTMs and TINs utilizing AutoCAD. The files and data I produce are collections of triangles stored as data structures containing only the double value of the triangle vertices, in real world coordinates.
Would Ogre be a suitable platform to load these DTMS into? What I have in mind is developing something where I can 'walk' across my surface and look for possible erros and such. Any suggestions or comments are greatly appreciated.
- xavier
- OGRE Retired Moderator
- Posts: 9481
- Joined: Fri Feb 18, 2005 2:03 am
- Location: Dublin, CA, US
- x 22
-
- Gnoblar
- Posts: 6
- Joined: Sun Jan 13, 2008 6:34 pm
Ok the Terrain Demo is almost exactly what I am after but after looking at the wiki and the docs I guess i'm overlooking a method to add a lot of single triangles.
The data i'll be importing will look like
x,y,z 'start triangle 1
x,y,z
x,y,z
x,y,z 'start triangle 2
x,y,z
x,y,z
The models I work with may have anywhere from a few hundred to maybe fifty thousand triangles. Any suggestions on the best way to get this data into ogre?
The data i'll be importing will look like
x,y,z 'start triangle 1
x,y,z
x,y,z
x,y,z 'start triangle 2
x,y,z
x,y,z
The models I work with may have anywhere from a few hundred to maybe fifty thousand triangles. Any suggestions on the best way to get this data into ogre?
- Falagard
- OGRE Retired Moderator
- Posts: 2060
- Joined: Thu Feb 26, 2004 12:11 am
- Location: Toronto, Canada
- x 3
- Contact:
- johnhpus
- Platinum Sponsor
- Posts: 1186
- Joined: Sat Apr 17, 2004 2:49 am
- x 3
I haven't used the terrain system much, so I don't know how to input geometry other than to use a heightmap. It seems like you could find an answer in the source.
If you don't care about whatever features using the terrain system adds, you could just build an Ogre mesh using ManualObject. You could also make the conversion part of a command line tool.
If you don't care about whatever features using the terrain system adds, you could just build an Ogre mesh using ManualObject. You could also make the conversion part of a command line tool.
- Kojack
- OGRE Moderator
- Posts: 7157
- Joined: Sun Jan 25, 2004 7:35 am
- Location: Brisbane, Australia
- x 534
- johnhpus
- Platinum Sponsor
- Posts: 1186
- Joined: Sat Apr 17, 2004 2:49 am
- x 3
The terrain sample does this by using a scene query. Unfortunately, except in the case of the terrain scene manager, a scene query will return information about where it collided with a bounding box, not the actual mesh.
So three suggestion. Write your own collision system, figure out how to make the terrain scene manager use your mesh data, or use something like Newton or Opcode (both of which have Ogre related wrappers, OgreNewt and OgreOpcode).
So three suggestion. Write your own collision system, figure out how to make the terrain scene manager use your mesh data, or use something like Newton or Opcode (both of which have Ogre related wrappers, OgreNewt and OgreOpcode).
-
- Greenskin
- Posts: 122
- Joined: Thu Jun 02, 2005 3:24 pm
Easy, just like in the terrain demo, cast a ray down, but this time instead of taking the WorldFragment just take the distance to whatever is hit first (in this case just some triangle) and lower the camera by that distance.
Edit: Oh crap, that's right, Ogre doesn't do triangle level raycasting, been working with other stuff to much recently .
Edit: Oh crap, that's right, Ogre doesn't do triangle level raycasting, been working with other stuff to much recently .