Simple Paged Terrain [v2.00 Released! Page 21]

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!
User avatar
HexiDave
OGRE Expert User
OGRE Expert User
Posts: 1538
Joined: Sat Jan 14, 2006 8:00 pm
x 1

Post by HexiDave »

Well, good news/bad news on the editor.

Bad news: For whatever reason, I cannot get SPT's terrain material to reload after lost device on DirectX. I resize the window, everything else in Ogre works fine and renders fine, but the terrain just goes black (this is with or without the light-map).

Good news: It's DirectX! Who cares? It's not stopping the cross-platform work, so we've still got OpenGL:

Image

Resizes and works fine - not noticing any speed issues and no ridiculous Device Lost stuff. I'm sick of trying to work around DirectX, so OpenGL it is for the editor.

This does NOT mean, however, that SPT will not function under DirectX in your application. It's possibly a driver issue, but it might be a bug (my material is pretty bizarre) so it'll get sorted eventually. It only crops up when the device is lost in .NET (and maybe when you resize in normal situations).


Back to work on the interesting bits.
User avatar
Nicki
Gnoblar
Posts: 8
Joined: Sat Jun 07, 2008 8:06 pm
Location: Germany

Post by Nicki »

Which Gui you take ??

I Use CEGUi in my Editorversion
WXWidget i dont became to work :-(

or is this original WinFormat ?? (i only have express edition :-(

Im working on the Textures @ moment... but with dds i can't paint on Terrain... only PNG works ... but Buggy :-(

This is realy a great Code... i like it to work with it ;-)
User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
x 16

Post by KungFooMasta »

What causing the device to be lost?
Creator of QuickGUI!
User avatar
HexiDave
OGRE Expert User
OGRE Expert User
Posts: 1538
Joined: Sat Jan 14, 2006 8:00 pm
x 1

Post by HexiDave »

Ya, I'm using .NET Forms from Managed C++ and, using Mono, I can run it on other platforms aside from Windows.

The thing about DDS textures is that you'd build the texture the way you want, then compress it to DDS using something like Nvidia's texture-tools library (http://code.google.com/p/nvidia-texture-tools/wiki/FAQ). It's on my to-do list for SPT anyways, so I'll have code at some point for that.
KungFooMasta wrote:What causing the device to be lost?
I don't know - anything that causes the window to resize or it becomes hidden in some way. I can't tell if I need to beat it to the punch-line and disable Ogre (in the WindowsListenerUtilities thing, WM_ACTIVATE seems to flip the switch on Ogre to avoid, but I'm not sure).

I'll have the code up within the next day, so you'll be able to pick it apart.
ppClarity
Gremlin
Posts: 194
Joined: Sat Sep 02, 2006 12:27 am
x 2

Post by ppClarity »

KungFooMasta wrote:What causing the device to be lost?
The device lost issue has been dealt with in the wxOgre widget. See this thread: http://www.ogre3d.org/phpBB2/viewtopic.php?t=20652 . Yes, unfortunately you need to slog through several pages. Maybe a forum search on "device lost" will help locate the discussion faster.
HexiDave wrote:Ya, I'm using .NET Forms from Managed C++ and, using Mono, I can run it on other platforms aside from Windows.
Apologies for the skepticism, but has this been demonstrated? Linux and Mac? When I checked last year, Mono was years away (if ever) from being considered a serious and stable execution environment.


Dave, not to distract you from your work, what would it take to port the editor to C++ and wxWidgets? My primary development platform is Linux, and if I wind up using your editor, I will most definitely need to write some plugins to manage my work-flow. I do not have an environment to produce Managed code. Please don't read that as a demand, if it doesn't happen it just means I have to write my own or pay somebody else to :D
User avatar
HexiDave
OGRE Expert User
OGRE Expert User
Posts: 1538
Joined: Sat Jan 14, 2006 8:00 pm
x 1

Post by HexiDave »

I was gonna check that out at some point, but I'm budgeting my time - the source code isn't going anywhere, so when there's time I'll try to make DirectX happy. Until then, I'm giving it the finger and going on my merry way.


As for wxWidgets, I just went .NET because it was the most available and usable thing I had. Never worked with wxWidgets and I'm not that interested in learning how to work with it right now.

I haven't yet tested with Mono, but the little compatibility-checking tool gave my app a clean bill of health. It seems pretty good, but I haven't gotten to testing on other operating systems yet.

That said, all the functionality will be external to the editor - meaning, the editor is just going to be calling functions within SPT and helper classes, so when the documentation is ready it should be easy to use the systems in your own editors.

Sometime tonight or tomorrow I should have a test copy of the editor ready to test on Linux/Mac, so the people that have offered to test will give it a shot.



Edit: Ah, nevermind - Mono doesn't support Managed C++ with mixed code. Well, that kind of ruins the whole thing.
User avatar
Nicki
Gnoblar
Posts: 8
Joined: Sat Jun 07, 2008 8:06 pm
Location: Germany

Post by Nicki »

The thing about DDS textures is that you'd build the texture the way you want, then compress it to DDS using something like Nvidia's texture-tools library (http://code.google.com/p/nvidia-texture-tools/wiki/FAQ). It's on my to-do list for SPT anyways, so I'll have code at some point for that.
Thank for the Link Hexi.. i will see what can i do :-)
Perhaps i work with PNG ... here i have learn from the ETM ... here works the programmer with png too...

The WXOgre ...?! i only have problems with it... with Vista & VisualExpress2009 i have permanent errors ... or no errors but freezes... perhaps i buy the standart edition von Visual ... with the MFC..

@ Hexi .. come the code with the "Brushes" with the editor ??
User avatar
HexiDave
OGRE Expert User
OGRE Expert User
Posts: 1538
Joined: Sat Jan 14, 2006 8:00 pm
x 1

Post by HexiDave »

I'll include some brushes and I'm hoping to have a brush editor, but I'm trying to think of my next move since Mono is completely worthless for what I'm doing. I need to find the idiot that built the compatibility program and beat them to death.
User avatar
denreaper
Greenskin
Posts: 105
Joined: Wed May 31, 2006 10:52 pm

Post by denreaper »

We were going to construct an editor in our project anyway... Maybe we could just help you build yours using an in-game GUI? (or are you looking for some sort of GUI that it can render inside of?)

By the way, I did make a fallback technique for the highlands material when testing it so it could run on this horrendously old video card. Furthermore, I don't use any atmosphere stuff... Could any of this have something to do with it?
User avatar
HexiDave
OGRE Expert User
OGRE Expert User
Posts: 1538
Joined: Sat Jan 14, 2006 8:00 pm
x 1

Post by HexiDave »

I'm gonna try to download your project now and see what's going on. Usually errors like that occur when a pointer is bad, so I'm guessing something is getting called out of order.

Anything I should know about in order to get it running?

Edit: Gah, the projects for Visual Studio are out of date (has the old SPT dependencies and doesn't use relative paths), so I don't think I'll be able to build this thing properly.

Have you tried it without creating or using SPT? I know that sounds stupid, but it'll help me isolate if it's an SPT issue or not - all the code I looked at seemed like it should work.
User avatar
HexiDave
OGRE Expert User
OGRE Expert User
Posts: 1538
Joined: Sat Jan 14, 2006 8:00 pm
x 1

Post by HexiDave »

Alright, after fiddling with wxWidgets and the editor, as well as going over my code, I've got to say I'm sticking with .NET for this editor. It does mean Windows-Only for this current editor, but ALL of the functionality will be available from SPT regularly, so any editor you wish to build should function the same way.

It's just that I'd basically be starting from scratch (don't forget that I built that noise editor which cost me many days of work) and I'm not going to be getting as much out of this as I put in if I restart. I still have to work on OgrePlanet and I'm basically out of time and out of funds, so I'm pretty much screwed at this point.

If I had known that Mono was going to fail so badly, I would have gone with wxWidgets - misleading documentation on their site led me to believe it'd be a snap to get a .NET application loaded with it. Send all your hate mail and death threats to them, please.
User avatar
steven
Gnoll
Posts: 657
Joined: Mon Feb 28, 2005 1:53 pm
Location: Australia - Canberra (ex - Switzerland - Geneva)

Post by steven »

HexiDave wrote:Alright, after fiddling with wxWidgets and the editor, as well as going over my code, I've got to say I'm sticking with .NET for this editor. It does mean Windows-Only for this current editor, ...
I am working on a wxWidgets editor: OGEd (when I am not working on other stuff)

It is now pluggable and could be used as base for a cross-platform SPT editor. I would help of course.
Would this interest you?
User avatar
HexiDave
OGRE Expert User
OGRE Expert User
Posts: 1538
Joined: Sat Jan 14, 2006 8:00 pm
x 1

Post by HexiDave »

Looks like it would be a really good base for when I do have time to build a cross-platform editor, but I have to stick with .NET for now due to time constraints.

Appreciate the offer though (and I'll be happy to help anyone who wants to integrate SPT's editor functionality into it).
User avatar
steven
Gnoll
Posts: 657
Joined: Mon Feb 28, 2005 1:53 pm
Location: Australia - Canberra (ex - Switzerland - Geneva)

Post by steven »

HexiDave wrote: I have to stick with .NET for now due to time constraints.
No problem I understand that :)
ppClarity
Gremlin
Posts: 194
Joined: Sat Sep 02, 2006 12:27 am
x 2

Post by ppClarity »

HexiDave wrote:I still have to work on OgrePlanet and I'm basically out of time and out of funds, so I'm pretty much screwed at this point.
Ouch, sorry about tossing the spanner in the works.
Alright, after fiddling with wxWidgets and the editor, as well as going over my code, I've got to say I'm sticking with .NET for this editor. It does mean Windows-Only for this current editor, but ALL of the functionality will be available from SPT regularly, so any editor you wish to build should function the same way.
That's reasonable.
User avatar
HexiDave
OGRE Expert User
OGRE Expert User
Posts: 1538
Joined: Sat Jan 14, 2006 8:00 pm
x 1

Post by HexiDave »

ppClarity wrote:
HexiDave wrote:I still have to work on OgrePlanet and I'm basically out of time and out of funds, so I'm pretty much screwed at this point.
Ouch, sorry about tossing the spanner in the works.
That comment wasn't directed at you, it was just a general statement - YOU did nothing wrong.
User avatar
cdleonard
Goblin
Posts: 266
Joined: Thu May 31, 2007 9:45 am

Post by cdleonard »

This work is very impressive. It's amazing how much effort you put into this.

I want to use SPT together with Caelum. SPT has some nice atmospheric scattering code; would you mind if I tried to "borrow" it for Caelum? I know the license says I can do whatever I want; but I should still ask nicely :).

My idea is to convert SPT's terrain fogging shaders to a compositor which takes the depth buffer as an input. The advantage of such a compositor is that it does not require any material/shader changes to use (those can be very painful). It could also be faster because there's no overdraw. It would work with other terrain engines as well.

From what I can gather you're creating a cube map and an atmospheric depth texture in C++ code. I'd have to copy that code in Caelum and offer it as an alternative to Kencho's skydome (which is based on bitmap resources).

Anything I am missing?

BTW; A post in this thread from a few pages ago said development goes on in svn at https://ogreaddons.svn.sourceforge.net/ ... rain/trunk. Is that still so? The latest change is from 09/07; do you do most of your work on your own computer?

EDIT: BTW; I have an interesting bug with SPT in vista. I get a "driver crashed but recovered" message (no equivalent in XP); in both D3D and OpenGL. I can "fix" it by removing USE_PS_3 in Lightmap.material; or lowering the profile. Any ideas?
User avatar
HexiDave
OGRE Expert User
OGRE Expert User
Posts: 1538
Joined: Sat Jan 14, 2006 8:00 pm
x 1

Post by HexiDave »

No idea about Vista - just reaffirms my belief they rushed it out the door.

And, yes, you're more than welcome to take the code out and transplant it. I had tried working on a screen-space version, but, again, I ran out of time to work on it. Honestly, though, you'd be better off using a screen-space version of the full scattering method - this one looks a bit strange when seeing the sun "through" the mountains.

I do most of the work on SPT on my PC and then do commits when it seems like a good time to update. I'll probably be doing an update in a little while - I just got backed up yesterday due to a couple really stupid issues.
SSERG
Kobold
Posts: 25
Joined: Wed Mar 26, 2008 10:14 pm

Post by SSERG »

I use Vista too...

I never had an crash with it ...
Caleum or an night day rytmus are realy great...

I have use the SPT light @ moment ... (see Key J)

i have use CEGUI and an Slider ... you have to Change all 3 variables.

the FPS goes extremly down... i don`t have test a better way... perhaps this month i take more Time into this..
User avatar
cdleonard
Goblin
Posts: 266
Joined: Thu May 31, 2007 9:45 am

Post by cdleonard »

HexiDave wrote:And, yes, you're more than welcome to take the code out and transplant it. I had tried working on a screen-space version, but, again, I ran out of time to work on it. Honestly, though, you'd be better off using a screen-space version of the full scattering method - this one looks a bit strange when seeing the sun "through" the mountains.
What full scattering method?
JosephTheGrim
Gnoblar
Posts: 9
Joined: Sat May 07, 2005 12:23 am

Post by JosephTheGrim »

Hey, how are some of you folks compiling this on Linux?

I'm using Ubuntu8.04 and ogre from SVN...using C::B on Linux, I import the solution file from the scripts dir and edit the paths (usr/local/include/Ogre, /usr/local/lib) and add libOgreMain.so as a library. I also remove the defines for WIN32.

I keep coming across this error no matter what I do:
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crt1.o||In function `_start':|
(.text+0x18)||undefined reference to `main'|

I've compiled and run some of the ogre demos fine, though I think through the command line, not through C::B on linux. Any idea what's going on here?
User avatar
HexiDave
OGRE Expert User
OGRE Expert User
Posts: 1538
Joined: Sat Jan 14, 2006 8:00 pm
x 1

Post by HexiDave »

SSERG: As of right now, the light-mapper in Shader Model 3 is quite expensive - I'll have a CPU-based light-mapper added soon as an alternative. As it is, if you want to skip light-mapping, just comment out the "profiles" line in the PS3 program version of the light-map program file.

cdleonard: Well, any atmospheric scattering method should work - there's plenty out there. You generally just unproject the depth to a world-position (check out what nullsquared is doing with his stuff in screen-space) and perform your calculations.

JosephTheGrim: Ah, wish I could help you there. I really don't know much about Linux. Someone I know is working on it as their project is being developed mostly on Linux, so I'll probably have something helpful soon.


I apologize for the delays, but I'm trying to get as much done as possible and there's quite a lot to do and not a lot of time to do it. The editor looks pretty typical, but I'll get some screenshots of that soon.

Until then, here's a video of inside the editor window:
http://vimeo.com/1365617

That's all brush based editing. Once the editor is more full-featured I'll get some shots of it.



On an unrelated note, does anyone know how to adjust shader program compile arguments without having to re-serialize the material to disk and reload? I got pretty far with it, but as soon as I reload anything, it resets all the compile arguments - only way I can see getting it to work would be to output it to disk, and even then I'm not sure.
User avatar
denreaper
Greenskin
Posts: 105
Joined: Wed May 31, 2006 10:52 pm

Post by denreaper »

JosephTheGrim wrote:Hey, how are some of you folks compiling this on Linux?

I'm using Ubuntu8.04 and ogre from SVN...using C::B on Linux, I import the solution file from the scripts dir and edit the paths (usr/local/include/Ogre, /usr/local/lib) and add libOgreMain.so as a library. I also remove the defines for WIN32.

I keep coming across this error no matter what I do:
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crt1.o||In function `_start':|
(.text+0x18)||undefined reference to `main'|

I've compiled and run some of the ogre demos fine, though I think through the command line, not through C::B on linux. Any idea what's going on here?
Looks like something is messed up involving the entry point. Maybe you should check to see how C::B is trying to output it? (console application, lib, etc.)

Here's how I build it to a static lib:

Code: Select all

g++ -c ../src/*.cpp -I../include -I/usr/local/include/OGRE
ar q libSPT2.a *.o
ranlib libSPT2.a
cp libSPT2.a ../../lib
cp libSPT2.a /usr/local/lib
rm libSPT2.a
rm *.o
User avatar
xadhoom
Minaton
Posts: 973
Joined: Fri Dec 28, 2007 4:35 pm
Location: Germany
x 1

Post by xadhoom »

HexiDave wrote:Until then, here's a video of inside the editor window:
http://vimeo.com/1365617

That's all brush based editing. Once the editor is more full-featured I'll get some shots of it.
Looks good with your visible brush now. *thumbs up*
To better experience the height during paint it could help to show the wireframe e.g. in the range of the brush until the shadows are calculated...
User avatar
HexiDave
OGRE Expert User
OGRE Expert User
Posts: 1538
Joined: Sat Jan 14, 2006 8:00 pm
x 1

Post by HexiDave »

I know what you mean and I have a plan for it, but I haven't had time to test it. The editor is coming along nicely, but I had to spend way more time coding supplemental stuff than I anticipated. It's one of those things that you go "Ya, I need to do this, that and the other thing and I'm done", but "this" turns into 10 pages of code, "that" turns into a bunch of bugs, and "the other thing" is a compiler that runs on the souls of the damned.

That said, I'm really happy with how things have started to turn out. Today is a big day because I get to take all that supplemental crap and make something fun with it. I can edit materials in real time, load brushes, edit terrain, switch between material schemes, save customized materials and a bunch more. It still needs some Spring-cleaning, but that's not a big concern at the moment.

If all goes well, I'll get my noise editor added and get height-map saving implemented. I should also have texture editing (for splat maps) in as well, which means I'll officially be able to go from a blank height-map and no material and build an entire terrain inside the editor and save it for ready use. Then I'll upload the monstrosity to SVN and take a day off. I should have my reserves back and I'll get that documentation in and finish expanding the terrain shaders. Then I get back to playing with OgrePlanet.