Scape: Terrain editing on the GPU [Src+Demo now available!]

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!
N0vember
Gremlin
Posts: 196
Joined: Tue Jan 27, 2009 12:27 am
x 24

Re: Scape: Terrain editing on the GPU [Src+Demo now availabl

Post by N0vember »

Well it doesn't have a default constructor, it wants a material and a number of instances, I guess the material is easy but the number of instances may be a tricky parameter that depends on some capabilities ?
The instance number is just used at this line :
assert(instanceIndex < getSupportedInstanceCount());
So it's just a limit.
Looking into HeightfieldOperationGPUPage, it seems the tickActive function will fire until there are still brush instances in the list, and getSupportedInstanceCount just determine the max number that will be processed during one tick.

Maybe it had default values that got lost in the way ?
frostbyte
Orc Shaman
Posts: 737
Joined: Fri May 31, 2013 2:28 am
x 65

Re: Scape: Terrain editing on the GPU [Src+Demo now availabl

Post by frostbyte »

yeah, i also suspect code on github is not the compiled code...
i think maybe it just needs to add explicit default constructor() inhertance all way down to the base...
but i don't really know, haven't looked at the code too much...
the woods are lovely dark and deep
but i have promises to keep
and miles to code before i sleep
and miles to code before i sleep..

coolest videos link( two minutes paper )...
https://www.youtube.com/user/keeroyz/videos
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Scape: Terrain editing on the GPU [Src+Demo now availabl

Post by jacmoe »

Bitbucket .. or did you find one on the hub? :)
/* 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:

Re: Scape: Terrain editing on the GPU [Src+Demo now availabl

Post by jacmoe »

It is odd that getFirstHeightfieldBuffer is nowhere to be found.
And that GPU2DOperationQuadBrush could work with a seemingly non-existing default constructor.
..
It was compiled with vc9, the original code, btw.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
frostbyte
Orc Shaman
Posts: 737
Joined: Fri May 31, 2013 2:28 am
x 65

Re: Scape: Terrain editing on the GPU [Src+Demo now availabl

Post by frostbyte »

sorry.... bitbucket...
the woods are lovely dark and deep
but i have promises to keep
and miles to code before i sleep
and miles to code before i sleep..

coolest videos link( two minutes paper )...
https://www.youtube.com/user/keeroyz/videos
N0vember
Gremlin
Posts: 196
Joined: Tue Jan 27, 2009 12:27 am
x 24

Re: Scape: Terrain editing on the GPU [Src+Demo now availabl

Post by N0vember »

I found the answer :)
This file simply was never compiled. Because it can't.
I looked in v1.0 source and the file is not part of the VC solution. Probably the same in current source ?

(EDIT) Check, it's not there either in the v1.1 VC solution.
A quick find tells us the "HeightfieldOperationGPUPage" class is not referenced anywhere in the solution

So it was probably a work in progress or a stub that got renamed, but it's not needed to compile the source.

(EDIT 2) To push the investigation further, I think it was a stub of what then became HeightfieldOperationTaskPageGPUBrush, you can see in the code and inheritance hierarchy.
So yeah, you don't need it, and I think the feature is there, just in another class !
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Scape: Terrain editing on the GPU [Src+Demo now availabl

Post by jacmoe »

Thanks for the hint.
I painstakingly compared the dirs and the project includes and has now renamed/removed them.
Awesome! :)
/* 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:

Re: Scape: Terrain editing on the GPU [Src+Demo now availabl

Post by jacmoe »

I would have hung myself in desperation without your help NOvember. :D
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
frostbyte
Orc Shaman
Posts: 737
Joined: Fri May 31, 2013 2:28 am
x 65

Re: Scape: Terrain editing on the GPU [Src+Demo now availabl

Post by frostbyte »

NOvember. +1 for saving jacmoe's life... :lol:
too sensitive for this cruel cruel world...
the woods are lovely dark and deep
but i have promises to keep
and miles to code before i sleep
and miles to code before i sleep..

coolest videos link( two minutes paper )...
https://www.youtube.com/user/keeroyz/videos
frostbyte
Orc Shaman
Posts: 737
Joined: Fri May 31, 2013 2:28 am
x 65

Re: Scape: Terrain editing on the GPU [Src+Demo now availabl

Post by frostbyte »

hmmm: what about all the libs that integrate with ogre:terrain? eg: hydrax,recast,bullet, terrain lod, light/shadow etc..
anyway this terrain renderer can represent/disguise itself as regular ogre terrain?
Last edited by frostbyte on Wed Jan 28, 2015 5:30 am, edited 1 time in total.
the woods are lovely dark and deep
but i have promises to keep
and miles to code before i sleep
and miles to code before i sleep..

coolest videos link( two minutes paper )...
https://www.youtube.com/user/keeroyz/videos
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Scape: Terrain editing on the GPU [Src+Demo now availabl

Post by jacmoe »

First: it's for Ogitor, not Ogre.
Second: Ogitor will read and write in Ogre Terrain format. Or any format you want.
You don't need to worry about what runs under the hood.
It won't break anything. :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
frostbyte
Orc Shaman
Posts: 737
Joined: Fri May 31, 2013 2:28 am
x 65

Re: Scape: Terrain editing on the GPU [Src+Demo now availabl

Post by frostbyte »

You don't need to worry about what runs under the hood.
not worried but i would love to see this inside apps/games as well..
i can think of some cool effects... 8)
so again in case you missed me editing my post:
anyway this terrain renderer can represent/disguise itself as regular ogre terrain?
Last edited by frostbyte on Wed Jan 28, 2015 5:42 am, edited 1 time in total.
the woods are lovely dark and deep
but i have promises to keep
and miles to code before i sleep
and miles to code before i sleep..

coolest videos link( two minutes paper )...
https://www.youtube.com/user/keeroyz/videos
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Scape: Terrain editing on the GPU [Src+Demo now availabl

Post by jacmoe »

It should be able to since it's just a renderable.
And it doesn't need to be paged.
You can read about it here:
http://www.decarpentier.nl/scape-render
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
frostbyte
Orc Shaman
Posts: 737
Joined: Fri May 31, 2013 2:28 am
x 65

Re: Scape: Terrain editing on the GPU [Src+Demo now availabl

Post by frostbyte »

already started...thanks...i'll stop nagging( for now... ) :)

edit: ok, found a hint in a previous post...
I have no plans to integrate Scape into Ogitor, as my time on Scape is already limited and I know nothing about the Ogitor or Ogre::Terrain. But it should be doable, as design-wise Scapes's terrain renderer (in the Engine/HeightfieldGeom folder) is largely decoupled from the terrain editor. The first thing that would have to be created is a way to sharing the internal buffer, requiring Ogitor to use the HeightfieldBuffer, Scape to use Ogitor's version of it, or (perhaps preferably) creating a new version of HeightfieldBuffer that acts like an efficient adapter to Ogitor/Terrain's representation. But, again, I've no experience with Ogitor/Terrain so I might be completely wrong here, and I don't plan to do this myself. But if someone else would want to give it a go, I might be able to give a few more pointers.
the woods are lovely dark and deep
but i have promises to keep
and miles to code before i sleep
and miles to code before i sleep..

coolest videos link( two minutes paper )...
https://www.youtube.com/user/keeroyz/videos
User avatar
duststorm
Minaton
Posts: 921
Joined: Sat Jul 31, 2010 6:29 pm
Location: Belgium
x 80
Contact:

Re: Scape: Terrain editing on the GPU [Src+Demo now availabl

Post by duststorm »

The ogitor team picking this up again: music to my ears! :)
Developer @ MakeHuman.org
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Scape: Terrain editing on the GPU [Src+Demo now availabl

Post by jacmoe »

Progress:
2015-02-11_23-07-20.jpg
Running under Ogre 1.10 ('default'), CPU and GPU brushes works ;)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
nevarim
Gnoll
Posts: 675
Joined: Mon Jul 05, 2010 6:16 pm
Location: Pavia Italy
x 4
Contact:

Re: Scape: Terrain editing on the GPU [Src+Demo now availabl

Post by nevarim »

great work :D
i'm a noob until proven otherwise :D
used in my project ;) and thanks to everyone :D
Ogre 3d
Mygui
Skyx
Hydrax
MOC
CCS
User avatar
Herb
Orc
Posts: 412
Joined: Thu Jun 04, 2009 3:21 am
Location: Kalamazoo,MI
x 38

Re: Scape: Terrain editing on the GPU [Src+Demo now availabl

Post by Herb »

@jacmoe - Do you have these changes somewhere on bitbucket to play with yet? I see the old bitbucket repo without changes since 2012 here (https://bitbucket.org/gdecarpentier/scape). Any plans on adding this repo (or forking it) on the ogreaddons with your changes?

[EDIT] - Sorry, I see the Scape repo now under ogreaddons, so I'll poke at that!

I'm interested in playing with this more. Is this a completely different terrain format than the current Ogre Terrain? Or is it Ogre Terrain with different algorithms generating the terrain data only? I'm guessing it's the first.
Post Reply