Overhang Terrain Scene Manager - source released (page 5).
-
- OGRE Contributor
- Posts: 265
- Joined: Sun Mar 25, 2007 1:48 pm
- x 2
Overhang Terrain Scene Manager - source released (page 5).
Hi there!
A while ago I in this discussion http://www.ogre3d.org/phpBB2/viewtopic.php?t=30491 I talked about an approach to creating overhangs in terrain... (basically a kindof neat way to add overhangs to heightmap in realtime) well this is the sum of my efforts to show off the idea. I don't have much free time so it is not as polished as I would have liked it to be... even for a proof-of-principle test. It's basically a hacked Terrain SM, LOD is handled in the simplest way possible, etc. There are some glaring bugs, I'm sure you'll find one or two of them.
Ah, two more caveats: first, in dx9 there are seams between pages - while openGL works fine, and second, everything is hard-coded, so changing terrain.cfg might lead to unexpected results.
Still, I think it is a promising approach - I have a lot of ideas on how to make it a lot more efficient, pretty, etc. Also - it's just a lot of fun to play around with as it stands.
EDIT:
I added triplanar texturing as in Cascades DX10 demo (suggested by esuvs... thanks) and the ability to change the size of the editor gizmo (to make bigger holes).
EDIT2:
Now changing size of the gizmo works better, and I updated to Ogre 1.4.4 (was using 1.4.1). Can anyone check if this fixes any of the issues (ATI)?
download here (binary, for now...):
http://www.mediafire.com/?6r4miw4pytx
EDIT3:
Source code is now available:
http://martin.enge.googlepages.com/Over ... anager.zip
controls:
left MB: remove geometry
right MB: add geometry
mouse wheel: move "editor gizmo" back/forward
P : increase size of gizmo (new, now working properly)
L : decrease size of gizmo (new, now working properly)
New screens:
mandatory screencaps (not a likely scene, admittedly):
A while ago I in this discussion http://www.ogre3d.org/phpBB2/viewtopic.php?t=30491 I talked about an approach to creating overhangs in terrain... (basically a kindof neat way to add overhangs to heightmap in realtime) well this is the sum of my efforts to show off the idea. I don't have much free time so it is not as polished as I would have liked it to be... even for a proof-of-principle test. It's basically a hacked Terrain SM, LOD is handled in the simplest way possible, etc. There are some glaring bugs, I'm sure you'll find one or two of them.
Ah, two more caveats: first, in dx9 there are seams between pages - while openGL works fine, and second, everything is hard-coded, so changing terrain.cfg might lead to unexpected results.
Still, I think it is a promising approach - I have a lot of ideas on how to make it a lot more efficient, pretty, etc. Also - it's just a lot of fun to play around with as it stands.
EDIT:
I added triplanar texturing as in Cascades DX10 demo (suggested by esuvs... thanks) and the ability to change the size of the editor gizmo (to make bigger holes).
EDIT2:
Now changing size of the gizmo works better, and I updated to Ogre 1.4.4 (was using 1.4.1). Can anyone check if this fixes any of the issues (ATI)?
download here (binary, for now...):
http://www.mediafire.com/?6r4miw4pytx
EDIT3:
Source code is now available:
http://martin.enge.googlepages.com/Over ... anager.zip
controls:
left MB: remove geometry
right MB: add geometry
mouse wheel: move "editor gizmo" back/forward
P : increase size of gizmo (new, now working properly)
L : decrease size of gizmo (new, now working properly)
New screens:
mandatory screencaps (not a likely scene, admittedly):
Last edited by beaugard on Mon Nov 19, 2007 11:43 pm, edited 4 times in total.
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Downloading now..
Wow - this really sounds too good to be true! Can't wait to get some time with this! Thanks for sharing!
Wow - this really sounds too good to be true! Can't wait to get some time with this! Thanks for sharing!
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
I actually digged my own tunnel in real-time!
Awesome!
Awesome!
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- ajs15822
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
- Contact:
-
- Kobold
- Posts: 38
- Joined: Wed Dec 13, 2006 4:52 am
- ahmedismaiel
- OGRE Contributor
- Posts: 217
- Joined: Wed Jan 25, 2006 11:16 pm
- Location: Redmond,WA
- stoneCold
- OGRE Expert User
- Posts: 867
- Joined: Fri Oct 01, 2004 9:13 pm
- Location: Carinthia, Austria
- x 1
WOW
Kudos to you beaugard
<---- Feels like Earthworm Jim now
Sadly I have to say though, that I get the named directX bug too ...
Kudos to you beaugard
<---- Feels like Earthworm Jim now
Sadly I have to say though, that I get the named directX bug too ...
my tweets | www.fuse-software.com | home of vektrix (Flash GUI for Ogre3D) and caspin (ActionScript 3 Virtual Machine Wrapper)
- pjcast
- OGRE Retired Team Member
- Posts: 2543
- Joined: Fri Oct 24, 2003 2:53 am
- Location: San Diego, Ca
- x 2
- Contact:
This is too cool
Excellent work... now, someone needs to re-make the game "Dig" using this scene manager! I may end up using this for my game - that is, depending on what type of license you end up releasing under.
Excellent work... now, someone needs to re-make the game "Dig" using this scene manager! I may end up using this for my game - that is, depending on what type of license you end up releasing under.
Have a question about Input? Video? WGE? Come on over... http://www.wreckedgames.com/forum/
- JohnJ
- OGRE Expert User
- Posts: 975
- Joined: Thu Aug 04, 2005 4:14 am
- Location: Santa Clara, California
- x 4
-
- Halfling
- Posts: 79
- Joined: Thu Mar 23, 2006 4:14 pm
- Location: Vienna
Thats pretty cool.
Another scene manager canditate for a new worms 3d.
It could also become a pretty usefull tool for creating caves, if refined a little. Creating caves can be a pain in the ass in most 3D Applications.
Another scene manager canditate for a new worms 3d.
It could also become a pretty usefull tool for creating caves, if refined a little. Creating caves can be a pain in the ass in most 3D Applications.
Last edited by Nudel on Mon May 28, 2007 11:07 am, edited 3 times in total.
- Jerky
- Orc Shaman
- Posts: 791
- Joined: Wed Mar 02, 2005 4:13 am
- Location: Springville, Utah
- Contact:
- PolyVox
- OGRE Contributor
- Posts: 1316
- Joined: Tue Nov 21, 2006 11:28 am
- Location: Groningen, The Netherlands
- x 18
- Contact:
-
- OGRE Contributor
- Posts: 265
- Joined: Sun Mar 25, 2007 1:48 pm
- x 2
I have no idea what the bug when using dx is about. As I said, I see it too... although not as bad as in stoneColds screen. Maybe someone with good knowledge about dx vs openGL can take a guess? The tunneled terrain tiles are simpleRenderables (dynamicrenderables, actually) with indexed triangle lists. Oddly enough, I never saw this when using the same techniques with other metarenderables (before starting to work with the terrain). Also, I did not see it when using fixed-function instead of cg.
About the tech: it is more-or-less exactly as I outlined in the thread - metaballs + metaterrain. It is based on some code demoing the dynamicRenderable class - It might be DWORDs, but there is no author mentioned in the files and I got it a year ago or something, so I am not sure who to give tribute. The overall architecture is changed, things added, etc, but some of the really hairy bits (datagrid -> indexed geometry...) are almost unaltered for now.
btw, I am working on a tunneling game (ok, working on is a stretch... let's say "doing preparative research for"). Only, it's will be descent with geomod. Descent I/II are my favorite games (still play them, through d2x-xl http://www.descent2.de/) and I hated it that there was never descent IV with geomod. I didn't even play Red Faction seriously just for spite
About the tech: it is more-or-less exactly as I outlined in the thread - metaballs + metaterrain. It is based on some code demoing the dynamicRenderable class - It might be DWORDs, but there is no author mentioned in the files and I got it a year ago or something, so I am not sure who to give tribute. The overall architecture is changed, things added, etc, but some of the really hairy bits (datagrid -> indexed geometry...) are almost unaltered for now.
btw, I am working on a tunneling game (ok, working on is a stretch... let's say "doing preparative research for"). Only, it's will be descent with geomod. Descent I/II are my favorite games (still play them, through d2x-xl http://www.descent2.de/) and I hated it that there was never descent IV with geomod. I didn't even play Red Faction seriously just for spite
- PolyVox
- OGRE Contributor
- Posts: 1316
- Joined: Tue Nov 21, 2006 11:28 am
- Location: Groningen, The Netherlands
- x 18
- Contact:
That's exactly my idea too! With my voxel scene manager I've been thinking a Descent clone would be a great showcase. I don't know if I'll ever get round to making it though - I'm more focused on developing technology than making games!beaugard wrote:btw, I am working on a tunneling game (ok, working on is a stretch... let's say "doing preparative research for"). Only, it's will be descent with geomod. Descent I/II are my favorite games (still play them, through d2x-xl http://www.descent2.de/) and I hated it that there was never descent IV with geomod. I didn't even play Red Faction seriously just for spite
Btw, I noticed you have some textureing problems - textures get 'stretched' on vertical geometry. Presumably the UV coordinates are derived from a vertex's 2D position? In my scenemanager I'm using 3D textures to fix this but they are a pain to generate. Eventually I'm planning on supporting 2D textures using some kind of 'projective' approach which takes into account the direction a surface is facing. Have you thought about what your going to do?
I'm sure our projects will have a certain degree of overlap - though yours seems more focused on large outside areas while i'm more thinking about indoor scenes.
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
-
- OGRE Contributor
- Posts: 265
- Joined: Sun Mar 25, 2007 1:48 pm
- x 2
ditto! We would make a terrible team, thenI'm more focused on developing technology than making games!
About the textures: yes, I am using 3d-textures, too, as well as procedural noise. For terrain it is not so easy, because the texture would be too big.... it might help visual quality to use 3d textures for detail textures. Or to "tag" vertices (vertex colors) as part of a preprocessing step (which would be easy) to determine blending between surface texture and 3d-texture. The only problem with that is that I would rather not add more data to the vertices - there are a lot of them...
Anyhow, a more fundamental problem is that I have no interest in landscapes for my research. I am planning to use several "octaves" of overlapping 3d-textures. And I want a pure tunnel game - didn't like descent III with those stupid canyons. I just did this as an example of adding new metashapes, and because there seems to be a genuine need/interest for this for a lot of people.
btw, esuvs, I am currently looking at tools for creating tiling 3d textures procedurally... haven't found any so I think I'll have to write one - possibly as a stand-alone tool. What are you using?
Last edited by beaugard on Mon May 28, 2007 12:21 pm, edited 1 time in total.
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Yeah, me too! Story of my programming life.beaugard wrote:btw, I am working on a tunneling game (ok, working on is a stretch... let's say "doing preparative research for").
I have the same visual flaws as StoneCold and beaugard - maybe because it's an ATI?sinbad wrote:Interestingly it seems to work fine in DirectX for me - nVidia 6800 GS here.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
-
- Halfling
- Posts: 43
- Joined: Tue Mar 20, 2007 4:41 pm
This is simply amazing! I just created some floating isles in mid air
Thanks for sharing this with us beaugard, this gives me some new ideas!
Ow and I wanted to mention that I have no problems in DX9 either, using anVidia Geforce 7600 GS. It might be an ATI related problem, but seeing as you (beaugard) have a nVidia card as well.. Perhaps this is a memory issue?
Thanks for sharing this with us beaugard, this gives me some new ideas!
Ow and I wanted to mention that I have no problems in DX9 either, using anVidia Geforce 7600 GS. It might be an ATI related problem, but seeing as you (beaugard) have a nVidia card as well.. Perhaps this is a memory issue?
- PolyVox
- OGRE Contributor
- Posts: 1316
- Joined: Tue Nov 21, 2006 11:28 am
- Location: Groningen, The Netherlands
- x 18
- Contact:
I agree this is a problem - I've thought about it quite a lot but haven't done anything about it yet. There are plenty of tool for procedually generating 2D textures but not 3D ones. I have a few ideas:beaugard wrote:btw, esuvs, I am currently looking at tools for creating tiling 3d textures procedurally... haven't found any so I think I'll have to write one - possibly as a stand-alone tool. What are you using?
Firstly this research looks very promising - it's basically a way of generating 3D textures from 2D ones. http://johanneskopf.de/publications/solid/index.html The results look good (but they always do in papers!) and it says there is a texture library and application 'coming soon'. Definatly worth keeping an eye on, or maybe reimplementing it if nothing come out.
My second idea is to use the 3D material editors built into most 3D applications, like Maya or Blender. The idea here is that I would create a nice material, apply it to a plane, and place a camera directly above. Rendering this would give one slice through the material. I then set up an animation which moves the slice and camera through the material and generates a few hundred images. These are then your slices which you can stack together to form the 3D texture.
I think this approach has a lot of potential because these programs have powerful editors. The biggest problem from my brief experimentation was that I'm not sure which (if any) noise functions are tilable- important for textures. But I know there are ways of making 2D textures tilable, maybe the same works for 3D.
Another thing worth bearing in mind is the ATI's RenderMonkey program has an option to export shaders as volume textures (.dds format) which can be directly used in Ogre. Haven't really tried this though.
Lastly, like you say, it would be possible to build you own editor or at least a frontend to something like libnoise.sourceforge.net. I think this will be a last resort though...
Hopefully something there helps! I'm sure this is one area where we could share work so if I do anything I'll let you know. It's not a priority though...
-
- Ogre Magi
- Posts: 1266
- Joined: Tue Aug 12, 2003 1:53 am
- Location: Melbourne, Australia
- x 1
- Contact:
- PolyVox
- OGRE Contributor
- Posts: 1316
- Joined: Tue Nov 21, 2006 11:28 am
- Location: Groningen, The Netherlands
- x 18
- Contact:
Looking at that screenshot, you have way too much time on your hands! But I still think this concept is cool for a game where you can actually build your own defensesVectrex wrote:this is great fun In fact I think this approach is a better one than the current sculpting programs mudbox and zbrush. You should seriously consider making a basic sculpting program that can save out the mesh.
-
- OGRE Contributor
- Posts: 265
- Joined: Sun Mar 25, 2007 1:48 pm
- x 2
@esuvs
That seems to be a really cool paper! I especially like that they mention synthesis of solids with multiple channels (bumpmap, specular map). This is something I have thought about without finding a really good solution previously. I'll have to read it more carefully later, though... I'm at work and spending too much time on this already.
About using maya/blender/etc. - yes, I thought about it too, and had the same problems with tiling. The thing is, a lot of these algorithms are not so difficult to change into tiling ones (you can basically change the way distance is calculated to allow tiling and you're there...), but there is no demand for the feature, since it is for offline rendering and quality is more important than speed.
The RenderMonkey idea is really neat, as well. The only problem is that then I still have to fix tiling... and I'm thinking maybe it is easier to do this in c++ than rendermonkey.
I looked into libnoise as well, as well as the blender noise functions, they would both do the job. Maybe I'll take a stab at it during vacation...
In the ideal programming world (without career, kids, friends, etc ) I would create a tool combining the approach for the paper and pseudorandom noise.
That seems to be a really cool paper! I especially like that they mention synthesis of solids with multiple channels (bumpmap, specular map). This is something I have thought about without finding a really good solution previously. I'll have to read it more carefully later, though... I'm at work and spending too much time on this already.
About using maya/blender/etc. - yes, I thought about it too, and had the same problems with tiling. The thing is, a lot of these algorithms are not so difficult to change into tiling ones (you can basically change the way distance is calculated to allow tiling and you're there...), but there is no demand for the feature, since it is for offline rendering and quality is more important than speed.
The RenderMonkey idea is really neat, as well. The only problem is that then I still have to fix tiling... and I'm thinking maybe it is easier to do this in c++ than rendermonkey.
I looked into libnoise as well, as well as the blender noise functions, they would both do the job. Maybe I'll take a stab at it during vacation...
In the ideal programming world (without career, kids, friends, etc ) I would create a tool combining the approach for the paper and pseudorandom noise.
- ahmedali
- Gnome
- Posts: 302
- Joined: Fri Feb 20, 2004 8:52 pm
- Location: Lahore, Pakistan