Overhang Terrain Scene Manager - source released (page 5).

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
Post Reply
beaugard
OGRE Contributor
OGRE Contributor
Posts: 265
Joined: Sun Mar 25, 2007 1:48 pm
x 2

Overhang Terrain Scene Manager - source released (page 5).

Post by beaugard »

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:
Image
Image

mandatory screencaps (not a likely scene, admittedly):
Image
Image
Image
Image
Last edited by beaugard on Mon Nov 19, 2007 11:43 pm, edited 4 times in total.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

Downloading now.. :P

Wow - this really sounds too good to be true! Can't wait to get some time with this! Thanks for sharing! :D
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

I actually digged my own tunnel in real-time! :D

Awesome! :lol:
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
ajs15822
OGRE Expert User
OGRE Expert User
Posts: 570
Joined: Mon Jan 02, 2006 2:05 am
Location: Texas
x 2
Contact:

Post by ajs15822 »

Oh wow! This is incredibly fantastic, and so quick!

Maybe use some decal projection or equivalent for the 'paintbrush' and this would be perfect. :D
User avatar
Zeal
Ogre Magi
Posts: 1260
Joined: Mon Aug 07, 2006 6:16 am
Location: Colorado Springs, CO USA

Post by Zeal »

Oooohh.. Gonna play with this tonight.

Looks like it would be tricky to apply textures to the different areas though?
CheetahShrk
Kobold
Posts: 38
Joined: Wed Dec 13, 2006 4:52 am

Post by CheetahShrk »

Theres some sort of odd LOD bug in directx, do something to one of the pages, move away or foward and the page starts breaking up into a mess of polygons.
User avatar
ahmedismaiel
OGRE Contributor
OGRE Contributor
Posts: 217
Joined: Wed Jan 25, 2006 11:16 pm
Location: Redmond,WA

Post by ahmedismaiel »

this voxel demo is awesome ,what do u use marching cubes?
when we gonna see the code :D
User avatar
stoneCold
OGRE Expert User
OGRE Expert User
Posts: 867
Joined: Fri Oct 01, 2004 9:13 pm
Location: Carinthia, Austria
x 1

Post by stoneCold »

WOW :shock:
Kudos to you beaugard :!:

<---- Feels like Earthworm Jim now :D

Sadly I have to say though, that I get the named directX bug too ...

Image
my tweets | www.fuse-software.com | home of vektrix (Flash GUI for Ogre3D) and caspin (ActionScript 3 Virtual Machine Wrapper)
User avatar
pjcast
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2543
Joined: Fri Oct 24, 2003 2:53 am
Location: San Diego, Ca
x 2
Contact:

Post by pjcast »

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.
Have a question about Input? Video? WGE? Come on over... http://www.wreckedgames.com/forum/
User avatar
JohnJ
OGRE Expert User
OGRE Expert User
Posts: 975
Joined: Thu Aug 04, 2005 4:14 am
Location: Santa Clara, California
x 4

Post by JohnJ »

Wow, this is amazing, nice work! :D
Excellent work... now, someone needs to re-make the game "Dig" using this scene manager!
Or maybe even a 3D version of SimAnt :) I used to like playing that game, although I don't know if it would be as fun in 3D.
Nudel
Halfling
Posts: 79
Joined: Thu Mar 23, 2006 4:14 pm
Location: Vienna

Post by Nudel »

Thats pretty cool.
Another scene manager canditate for a new worms 3d. :D

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.
User avatar
Jerky
Orc Shaman
Posts: 791
Joined: Wed Mar 02, 2005 4:13 am
Location: Springville, Utah
Contact:

Post by Jerky »

Holy smokes. Just wait until Falagard notices this. He is going to freak ;).

This is definitely one to keep an eye on.
Erik Briggs (Jerky)
My Blog
Project Wish
Image
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post by PolyVox »

Wow, cool stuff! So what are you doing? You were talking before about using metaballs (or metashapes) and polygonising them - is this what you did in the end?

I can't try the demo cos I'm on an old computer for a few days, but people seem to find it pretty fast :D
beaugard
OGRE Contributor
OGRE Contributor
Posts: 265
Joined: Sun Mar 25, 2007 1:48 pm
x 2

Post by beaugard »

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 ;)
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post by PolyVox »

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 ;)
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!

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.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

Nice!

Interestingly it seems to work fine in DirectX for me - nVidia 6800 GS here.
beaugard
OGRE Contributor
OGRE Contributor
Posts: 265
Joined: Sun Mar 25, 2007 1:48 pm
x 2

Post by beaugard »

I'm more focused on developing technology than making games!
ditto! We would make a terrible team, then :)

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. :wink: 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.
beaugard
OGRE Contributor
OGRE Contributor
Posts: 265
Joined: Sun Mar 25, 2007 1:48 pm
x 2

Post by beaugard »

Interestingly it seems to work fine in DirectX for me - nVidia 6800 GS here.
What the hell! I have 6600... very mysterious. Sometimes it takes a while for the artifacts to appear - maybe you didn't see them yet?
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

beaugard wrote:btw, I am working on a tunneling game (ok, working on is a stretch... let's say "doing preparative research for").
Yeah, me too! Story of my programming life. :)
sinbad wrote:Interestingly it seems to work fine in DirectX for me - nVidia 6800 GS here.
I have the same visual flaws as StoneCold and beaugard - maybe because it's an ATI?
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Funcracker
Halfling
Posts: 43
Joined: Tue Mar 20, 2007 4:41 pm

Post by Funcracker »

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?
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post by PolyVox »

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?
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:

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...
Vectrex
Ogre Magi
Posts: 1266
Joined: Tue Aug 12, 2003 1:53 am
Location: Melbourne, Australia
x 1
Contact:

Post by Vectrex »

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.

Image
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post by PolyVox »

Vectrex 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.
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 defenses :)
beaugard
OGRE Contributor
OGRE Contributor
Posts: 265
Joined: Sun Mar 25, 2007 1:48 pm
x 2

Post by beaugard »

@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 :shock: ) I would create a tool combining the approach for the paper and pseudorandom noise.
User avatar
ahmedali
Gnome
Posts: 302
Joined: Fri Feb 20, 2004 8:52 pm
Location: Lahore, Pakistan

Post by ahmedali »

this is great fun In fact I think this approach is a better one than the current sculpting programs mudbox and zbrush
There are some pros and cons with this approach, but it can be easily replaced with more traditional way of sculpturing.


Since i didnt moved the camera, the text is bended outside.
Image
Post Reply