Paging Landscape v2 - Comments / Questions / Suggestions

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Locked
User avatar
psiegel
Kobold
Posts: 28
Joined: Sun Aug 29, 2004 5:51 pm
Location: Boston, MA
Contact:

Post by psiegel »

But clearly in ogreaddons/paginglandscape/Samples/PagingLandScape2/include/PagingPagingLandscape.h is the line:

Code: Select all

#include "OgrePanelOverlayElement.h"
And this file does exist in the cvs head, just not in hastur. Which makes me think this was coded against the cvs head. But if so, how are the developers compiling the cvs head when ExampleFrameListener.h is throwing so many errors? Perhaps I just jumped into this at a very poor time, and once ExampleFrameListener.h is fixed all my problems will be solved?

Paul

MadLion
Halfling
Posts: 97
Joined: Wed Aug 25, 2004 8:14 am
Location: Germany

Post by MadLion »

@Tuan Thanks, i checked out the last changes from cvs and this error is fixed.
Now the samples don't compile. Maybe i don't have all changes and have to wait until tomorrow. I will see.

Edit:
I did a deeper look. The problem is the uint() in Samples/PagingLandScape2/include/PagingLandScape.h. I removed it and replace same uint with Ogre::uint. Now it compiles but linking fails.

Code: Select all

g++ -g -O2 -o PagingLandScape2 PagingLandScape.o  -L/usr/local/lib /usr/local/lib/libOgreMain.so /usr/lib/libfreetype.so -lCg -L/usr/lib /usr/lib/libSDL.so-lasound -L/usr/X11R6/lib -lX11 -lXext -lpthread /usr/local/lib/libILU.so -L/home/madlion/downloads/DevIL-1.6.7/src-IL/src /usr/local/lib/libIL.so -lpng -ltiff /usr/lib/libmng.so /usr/lib/libjpeg.so -lz -lm -ldl
PagingLandScape.o(.gnu.linkonce.t._ZN28PagingLandScapeFrameListenerD1Ev+0x52): In function `PagingLandScapeFrameListener::~PagingLandScapeFrameListener()':
../../../Samples/PagingLandScape2/include/PagingLandScape.h:366: undefined reference to `Ogre::PagingLandscapeListenerManager::getSingleton()'
PagingLandScape.o(.gnu.linkonce.t._ZN28PagingLandScapeFrameListenerD1Ev+0x5a):../../../Samples/PagingLandScape2/include/PagingLandScape.h:366: undefined reference to `Ogre::PagingLandscapeListenerManager::removeListener(Ogre::PagingLandscapeListener*)'
PagingLandScape.o(.gnu.linkonce.t._ZN28PagingLandScapeFrameListenerD0Ev+0x52): In function `PagingLandScapeFrameListener::~PagingLandScapeFrameListener()':
../../../Samples/PagingLandScape2/include/PagingLandScape.h:366: undefined reference to `Ogre::PagingLandscapeListenerManager::getSingleton()'
PagingLandScape.o(.gnu.linkonce.t._ZN28PagingLandScapeFrameListenerD0Ev+0x5a):../../../Samples/PagingLandScape2/include/PagingLandScape.h:366: undefined reference to `Ogre::PagingLandscapeListenerManager::removeListener(Ogre::PagingLandscapeListener*)'
PagingLandScape.o(.gnu.linkonce.t._ZN28PagingLandScapeFrameListenerC1EPN4Ogre12RenderWindowEPNS0_6CameraEPNS0_5LightEPNS0_9SceneNodeEbb+0x423): In function`PagingLandScapeFrameListener::PagingLandScapeFrameListener(Ogre::RenderWindow*, Ogre::Camera*, Ogre::Light*, Ogre::SceneNode*, bool, bool)':
../../../Samples/PagingLandScape2/include/PagingLandScape.h:350: undefined reference to `Ogre::PagingLandscapeListenerManager::getSingleton()'
PagingLandScape.o(.gnu.linkonce.t._ZN28PagingLandScapeFrameListenerC1EPN4Ogre12RenderWindowEPNS0_6CameraEPNS0_5LightEPNS0_9SceneNodeEbb+0x42b):../../../Samples/PagingLandScape2/include/PagingLandScape.h:350: undefined reference to `Ogre::PagingLandscapeListenerManager::addListener(Ogre::PagingLandscapeListener*)'
collect2: ld returned 1 exit status
make[1]: *** [PagingLandScape2] Fehler 1

User avatar
psiegel
Kobold
Posts: 28
Joined: Sun Aug 29, 2004 5:51 pm
Location: Boston, MA
Contact:

Post by psiegel »

Ok, I've got things building finally. I did this by checking out ogrenew fresh from cvs, then copying the contents of ogreaddons/paginglandscape into ogrenew, except that I excluded the Samples/Common/include directory from oagreaddons/paginglandscape. Also, I had to modify the Plugins.cfg file in paginglandscape to remove the Plugin_GuiElements entry.

Of course, this doesn't mean things are working. I can launch the demo, but I get the following error:

Code: Select all

Resource gcanyon_height_4k2k.4.8.png not found.
I searched through my Media directory (and any zips within) and found no such file, so I'm not surprised the demo can't find it. Any idea where this file is hiding out?

Paul

User avatar
neocryptek
Gnome
Posts: 335
Joined: Sat Mar 01, 2003 11:21 pm
Location: Idaho, USA
Contact:

Post by neocryptek »

Tried running mapslitter to generate said files?

This was mentioned earlier in the thread I believe.

-N30

User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

@crashy : thx for the report i'll look into that. (and thx for all the bug reports!)

@Madlion : try adding in makefile.am of demo's src :
PagingLandScape2_LDADD = -lOgreMain -l$(top_srcdir)/PlugIns/PagingLandScape2/lib/PagingLandScape2.lib (and tell us if it works so that I can commit it.).

And yes it should be faster, specially on big landscape, as before the pagemanager was looping over all pages, always notifying them, and now it only loops on loaded visibles page camera by camera. (on canyon pages that's lopping on 9 pages instead of 256 for each camera. (with adjacent page = 1))


@psiegel : thx for pointing that out. We have to do something with those example*.h files. if you want easy media files for the demo download the old demo at http://tuan.kuranes.free.Fr/Ogre.html and copy the canyon media subdirectory in your ogre media. Anyway, one day you'll have to use mappsplitter.

Anyone using vc6 can tell me if he had compiled without having to modify source files ? or/and post me the *.dsp files so that I can commit them ?

And I forgot to post a TODO :

- Add a Current Page/tile listener hooks (so that use) and/or a tile LOD level listener hook.
- GetRealHeight interpolation fix
- Realtime normal map for shaders updating.
- no-shaders splatting coverages texture updates
- Base texture Shaders (no splatting.)
- Tile loading upon distance and vis to camera instead of dumb queues
- Base texture generation theming using cfg files (desert, green land, mars, etc...).
- Adding a GUI to mapsplitter.
- Octree scene manager inheritance
- Deformation Texture Blitting andd recompution only on deformed part of texture (needs Ogre dx9 blits image function to be able to blits part of image to do So).
- Make Vertex Compression works (see http://www.ogre3d.org/phpBB2/viewtopic.php?t=6599 ) so far it works on ATI but not on Nvidia.

Anyone that wants to take a part is welcome ;)
Just tell us here to avoid duplicates works.
(sorry not having done that earlier, Falagard)

MadLion
Halfling
Posts: 97
Joined: Wed Aug 25, 2004 8:14 am
Location: Germany

Post by MadLion »

@tuan Yes i will do if i'm back home and tell you if it works. Thanks so far.

User avatar
psiegel
Kobold
Posts: 28
Joined: Sun Aug 29, 2004 5:51 pm
Location: Boston, MA
Contact:

Post by psiegel »

@tuan:
I downloaded the old demo from your link, and right out of the zip it works great. However, copying the media files worked not so great. I still get the error "Resource gcanyon_height_4k2k.4.8.png not found." I checked the media files, and that file definitely does not exist. I do see gcanyon_height_4k2k.HN.4.8.png, but I don't see a file without the "HN".

I would try using the mapsplitter tool, but I don't have gcanyon_height_4k2k.png to work on.

So I switched my paginglandscape2.cfg file to use ps_height_1k instead of gcanyon_height_4k2k. I also changed the size to 4x4. Sure enough, I get an error that says "Resource ps_height_1k.2.2.png not found." Checking the ps_height_1k directory, I see ps_height_1k.Base.2.2.png, ps_height_1k.Coverage.2.2.png, and ps_height_1k.HN.2.2.png, but no ps_height_1k.2.2.png.

This time though, I do have ps_height_1k.png, so thought I might try running the mapsplitter tool. That too failed. My output gets as far as:

Code: Select all

FileSystem Archive Codec for ps_height_1k/ created.
normal Map Calc : ..............................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
...
Width : 1025  Height : 1025  Bypp : 4
ps_height_1k.HN.
And then I hit a runtime error and crash. Here's the tail of my MapSplitter.log file:

Code: Select all

08:38:48: FileSystem Archive Codec for ps_height_1k/ created.
08:38:54: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: Codec::getCodec
Description: Cannot find codec for extension . 
File: c:\code\sandbox\ogrenew\ogremain\src\ogrecodec.cpp
Line: 46
Stack unwinding: <<beginning of stack>>
Any thoughts? I'd really love to get this running in a debugger so I can really see how the code works. Thanks.

Paul

User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

@psiegel :

- HN files can be used with "data2dformat=HeightfieldN" in paginglandscape2.cfg (read this file and his comments with attention, it would help.)

- however here is some original files : http://www.cc.gatech.edu/projects/large ... index.html (you're looking after the two at the end ) you can get whole earth using those files, with little converting work. ( ftp://e0dps01u.ecs.nasa.gov/srtm/ ) see http://vterrain.org file definition for more on that.

- I guess your error comes from the mapsplitter maptool.cfg file surely missing :
LandScapeExportExtension=png

User avatar
Troglodit
Gremlin
Posts: 160
Joined: Tue May 25, 2004 2:18 pm
Location: Ukraine/Ternopil
Contact:

Post by Troglodit »

2Falagard:
Morrowind probably uses texture splatting. It's similar to what you described, except one large alpha texture is stretched over the entire terrain (or a piece of the terrain if the terrain is split up like it is in Paging Landscape).
I am absolutely sure that Morrowind using the square tiles, not texture splatting.

Look:

Image

Image

In some places on terrain tiles successfully slyly hide by over lightmap (one lightmap per page),
But if to look closely it can be seen:

Image

Image

User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

@Troglodit : Are you speaking of that http://www.nevrax.org/docs/tile_bank.html ?

It's from a GPL library, you can even check how they do that : http://nevrax.org/docs/

( if one has time to read and explaint their overhangs bezier terrain mesh... i'm interested !)

It seems complex (texture coordinates calculation), less hardware friendly (more textures and texture coordinates cannot be shared across pages), uglier (visible squares ) to me...

So Why do you prefer this method exactly ?

User avatar
psiegel
Kobold
Posts: 28
Joined: Sun Aug 29, 2004 5:51 pm
Location: Boston, MA
Contact:

Post by psiegel »

@tuan:

And now I'm a little further along. You were right about maptool.cfg missing the LandScapeExportExtension value. I put that in and the tool seems to work fine now. I see in paginglandscape2.cfg the data2dformat field, but find no description of what the different values mean or when one would be more appropriate than another. If there are any docs around this you could point me to, I'd be interested in reading them. I do find it a bit odd that this setting does not line up with the data2dformat setting in maptool.cfg. (Which is set to Heightfield). I tried setting the maptool.cfg value to HeightfieldN and that causes it to crash. I did discover that setting HeightMap=yes in maptool.cfg seems to export the correct files for using data2dformat=Heightmap in the paginglandscape2.cfg.

But that's a bit of a tangent. My problem now is that the demo crashes without any interesting failure dialogs or info in Ogre.log. I tried running it through the debugger, and here's my stack trace:

Code: Select all

msvcp71d.dll!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::size()  Line 1109 + 0x3	C++
 	msvcp71d.dll!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & _Right={...}, unsigned int _Roff=0, unsigned int _Count=4294967295)  Line 591 + 0x8	C++
 	msvcp71d.dll!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & _Right={...})  Line 586	C++
 	msvcp71d.dll!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::operator=(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & _Right={...})  Line 468	C++
 	OgreMain_d.dll!Ogre::Material::operator=()  Line 78 + 0x15	C++
 	OgreMain_d.dll!Ogre::Material::clone(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & newName={...})  Line 168	C++
>	Plugin_PagingLandScapeSceneManager2.dll!Ogre::PagingLandScapeTexture_InstantBaseTexture::_loadMaterial()  Line 128 + 0x12	C++
 	Plugin_PagingLandScapeSceneManager2.dll!Ogre::PagingLandScapeTexture::load(unsigned int mX=2, unsigned int mZ=2)  Line 64 + 0xd	C++
 	Plugin_PagingLandScapeSceneManager2.dll!Ogre::PagingLandScapeTextureManager::load(const unsigned int & texX=2, const unsigned int & texZ=2)  Line 289 + 0x19	C++
 	Plugin_PagingLandScapeSceneManager2.dll!Ogre::PagingLandScapePage::loadTexture()  Line 151	C++
 	Plugin_PagingLandScapeSceneManager2.dll!Ogre::PagingLandScapePage::load(Ogre::SceneNode & PagingLandScapeRootNode={...})  Line 170	C++
 	Plugin_PagingLandScapeSceneManager2.dll!Ogre::PagingLandScapePageManager::updatePaging(Ogre::PagingLandScapeCamera * cam=0x0b798bd0)  Line 322	C++
 	Plugin_PagingLandScapeSceneManager2.dll!Ogre::PagingLandScapeSceneManager::_updateSceneGraph(Ogre::Camera * cam=0x0b798bd0)  Line 159	C++
 	OgreMain_d.dll!Ogre::SceneManager::_renderScene(Ogre::Camera * camera=0x0b798bd0, Ogre::Viewport * vp=0x0b7996f0, bool includeOverlays=true)  Line 768 + 0x14	C++
 	OgreMain_d.dll!Ogre::Camera::_renderScene(Ogre::Viewport * vp=0x0b7996f0, bool includeOverlays=true)  Line 390 + 0x2a	C++
 	OgreMain_d.dll!Ogre::Viewport::update()  Line 184	C++
 	OgreMain_d.dll!Ogre::RenderTarget::update()  Line 107	C++
 	OgreMain_d.dll!Ogre::RenderWindow::update()  Line 62	C++
 	OgreMain_d.dll!Ogre::RenderSystem::_updateAllRenderTargets()  Line 96 + 0x24	C++
 	OgreMain_d.dll!Ogre::Root::_updateAllRenderTargets()  Line 858 + 0x18	C++
 	OgreMain_d.dll!Ogre::Root::renderOneFrame()  Line 626	C++
 	OgreMain_d.dll!Ogre::Root::startRendering()  Line 612 + 0x8	C++
 	Demo_PagingLandScape2.exe!ExampleApplication::go()  Line 58 + 0xe	C++
 	Demo_PagingLandScape2.exe!WinMain(HINSTANCE__ * hInst=0x00400000, HINSTANCE__ * __formal=0x00000000, char * strCmdLine=0x00141f37, HINSTANCE__ * __formal=0x00000000)  Line 53 + 0x8	C++
 	Demo_PagingLandScape2.exe!WinMainCRTStartup()  Line 390 + 0x39	C
 	kernel32.dll!7c816d4f() 	
 	kernel32.dll!7c8399f3() 	
Any idea what's gone wrong now?

Paul

User avatar
psiegel
Kobold
Posts: 28
Joined: Sun Aug 29, 2004 5:51 pm
Location: Boston, MA
Contact:

Post by psiegel »

More info:

I think I got passed the above problem by changing the TextureFormat value from InstantBaseTexture to BaseTexture. Not sure really what this value means, but I noticed in the crash that the material attempting to be cloned was InstantBaseMaterial.2.2.

However, now I'm crashing when attempting to load PagingLandscape2.DebugOverlay. Might this be missing from the media files I've got? Not sure where to look for it.

Paul

User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

About HN files, there's a mapsplitterreadme.txt in paginglandscape root directory...

Data2DFormat=HeightField exists.
data2dformat=Heightmap does not exists.

In ogreaddons there's a media/paginglandscape/ that should be in your resources.cfg. (media/paginglandscape/splat would be a good idea too.)
in those directories there's an updated paginglandscape.overlay that defines "PagingLandscape2.DebugOverlay" and basetexture.material that defines "InstantBaseMaterial". If not, update your cvs ogreaddons repository.

[edit]don't hesitate to edit your old posts and delete the pasted errors to lighten a bit the long unreadable thread.[/edit]

User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

@crashy : ColorMap tilesize fixed in CVS.

MadLion
Halfling
Posts: 97
Joined: Wed Aug 25, 2004 8:14 am
Location: Germany

Post by MadLion »

@tuan Ok now am adding
PagingLandScape2_LDADD = -lOgreMain $(top_builddir)/PlugIns/PagingLandScape2/src/Plugin_PagingLandScape2.so
to ogreaddons/paginglandscape/Samples/PagingLandScape2/src/Makefile.am and link works but running it doesn't work. I'm getting
./PagingLandScape2
./PagingLandScape2: error while loading shared libraries: ../../../PlugIns/PagingLandScape2/src/Plugin_PagingLandScape2.so: cannot open shared object file:No such file or directory
now.
I'm a bit confused why is direct link needed? How does it work before? I don't understand it.

User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

@Madlion : the terrainlistener interface needs to be linked directly... There was no listener before. That's a new feature.

*.so ? There's no *.lib ? (search if a PlugIns/PagingLandScape2/src//.lib/ or PlugIns/PagingLandScape2/src//.libs/ subdirectory if you cannot find it.)

Until I find a fix you can also comment out the use of the listener, it's needless in the demo, it's just here to show how it works...

MadLion
Halfling
Posts: 97
Joined: Wed Aug 25, 2004 8:14 am
Location: Germany

Post by MadLion »

Correct me if i'm wrong, but are .lib not only on windows?

Ok i removed the listener and now i get

Code: Select all

An exception has occured: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 4
Function: PagingLandScapeData2D_HeightField::_load
Description: Error: Declared World size <> Height Map Size..
File: OgrePagingLandScapeData2D_HeightField.cpp
Line: 303
Stack unwinding: <<beginning of stack>>
*-*-* OGRE Shutdown

User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

PageSize in paginglandscape2 must be same size as width and height of each heightmap page. (default is 257, means that each *.x.y.png representing a heightmap should have 257x257 size)

Did you compile and use mapsplitter ?

(in Tools ogreaddons paginglandscape subdirectory )
If you don't succeed in generating needed heightmap files using mapsplitter tool, download some already generated file at http://tuan.kuranes.free.fr/Ogre.html

User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

And .lib exists on linux and windows.

Crashy
Google Summer of Code Student
Google Summer of Code Student
Posts: 997
Joined: Wed Jan 08, 2003 9:15 pm
Location: Lyon, France
x 48
Contact:

Post by Crashy »

@Kuranes: Ok for Colourmap, I'll try it soon :)
Follow la Moustache on Twitter or on Facebook
Image

User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2060
Joined: Thu Feb 26, 2004 12:11 am
Location: Toronto, Canada
x 3
Contact:

Post by Falagard »

Trogdolit - that could be any number of techniques.

It could be (and probably is) texture splatting with a lower resolution alpha map (each one of those squares is probably a pixel in the alpha map) and using bilear/trilenear filtering of the 3d card to automatically achieve the blending between the areas.

It could be vertex blending, where it is rendered in multiple passes, using vertex alpha for the blending.

It could be tile based as you suggest, but I think it's unlikely.

If I had some time to play, I could show you exactly the same thing in my engine using simple texture splatting (which is the most hardware friendly of the techniques, and gives you better results because you can decide what resolution you want it to be.

Clay

User avatar
Troglodit
Gremlin
Posts: 160
Joined: Tue May 25, 2004 2:18 pm
Location: Ukraine/Ternopil
Contact:

Post by Troglodit »

2 tuan kuranes
It seems complex (texture coordinates calculation), less hardware friendly (more textures and texture coordinates cannot be shared across pages), uglier (visible squares ) to me...

So Why do you prefer this method exactly ?
Yes, but this technique allows to realize the unlimiteg amount of soils in one page.
And Paging Landscape on this stage -- only 4 :? , RGBA (if I do not wrong).
If to assume that in the future an author will change the technology encoding (RGBA) and will
use (for example)
15 grayscale maps for displaying 15 types of soil on one page (15 splatting textures !!! :shock: ), I
think this will be less friendly hardware, by what method,
than which I offer. :wink:

And and squares can be distinguished only with high distance. Besides they can be masked by lightmap :wink: .[Screen 3]


2Falagard:
It could be (and probably is) texture splatting with a lower resolution alpha map (each one of those squares is probably a pixel in the alpha map) and using bilear/trilenear filtering of the 3d card to automatically achieve the blending between the areas.
Then why does lightmap have more high resolution (screen 3), than alphamap ?
and Very strange this one pixel coincides exactly with one repetition of texture . :roll:
The developers of Morrowind can change a little in fact resolution of alphamap
and this bug would be destroyed ! :wink:

User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2060
Joined: Thu Feb 26, 2004 12:11 am
Location: Toronto, Canada
x 3
Contact:

Post by Falagard »

Yes, but this technique allows to realize the unlimiteg amount of soils in one page.
And Paging Landscape on this stage -- only 4 Confused , RGBA (if I do not wrong).
As I explained in another post, I have paging landscape working with unlimited textures in one page, but I still limit it to 5 for my own purposes. 5 textures can be done in 2 passes, plus an extra pass for the lightmap (3 total) in pixel shader 1.1.

For 5 textures, I take 4 grayscale alpha maps and merge them into 2 alpha maps, storing them in the B and A channels of the RGBA texture, which can then be accessed by pixel shader 1.1.
Then why does lightmap have more high resolution (screen 3), than alphamap?
It's possible that Morrowind has done tiling as you say. I have the morrowind editor, I should play with it to see what the terrain texturing looks like. Regardless, I think that the next Morrowind engine (have you seen screenshots of the next game?) wouldn't use the same technique.

I know of this game which had a great terrain editor written before GeForce 3's were released. The technique it used was vertex alpha for blending, so as the user "painted" textures onto the terrain, it would allow up to 3 textures on a single polygon, and control the alpha for each texture. Problem is that now that the game wants to have much more detailed terrain (a higher resolution, more polygons) this is less hardware friendly because you either need to keep 3 vertex buffers for the entire terrain, or you need to avoid using vertex buffers altogether and dynamically upload vertices to the card each frame. So it had to be written to use... guess what? Texture splatting technique.

Here are some screenshots of my own game with 5 textures using texture splatting technique, using Ogre's paging landscape scene manager. The 3rd one shows 5 textures, but it's pretty subtle (which I intended).

Dirt
Gray sand
Rock
Grass
Leaves

http://www.larabie.net/ogre/LOT-08-12-2004-01.jpg
http://www.larabie.net/ogre/LOT-08-12-2004-02.jpg
http://www.larabie.net/ogre/LOT-08-12-2004-03.jpg

Clay

Crashy
Google Summer of Code Student
Google Summer of Code Student
Posts: 997
Joined: Wed Jan 08, 2003 9:15 pm
Location: Lyon, France
x 48
Contact:

Post by Crashy »

I signalize another "bug" (this is not really a bug ) while using the Image technique(Yes I know, PGSLM is most thougt for splatting, but I prefer the Image): when splitting the heightfield, the texture is exported to the same format as the heightmap. So if I use raw, the texture become Raw whatever the input format.....
But when the terrain is loading, the engine cannot open the raw file of texture

Function: D3D9Texture::_loadNormTex
Description: Unable to load texture from colourMapTG.2.2.Raw.
File: \OGRE\ogrenew\RenderSystems\Direct3D9\src\OgreD3D9Texture.cpp
Line: 571
Stack unwinding: <<beginning of stack>>
18:47:42: Error loading texture colourMapTG.2.2.Raw. Texture layer will be blan
I think I should add a "colourmap format" parameter int the splitter.cfg and paginglandscape2.cfg.
If you think it is not very difficult to do, I'll try myself. Just say me the respective functions to modify in the splitter (I know it PagingLandScapeTexture_Image::_loadMaterial() andPagingLandScapeOptions::load for the plugin).

Edit: Ok done for the plugin, lets look at the splitter.
Follow la Moustache on Twitter or on Facebook
Image

User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2060
Joined: Thu Feb 26, 2004 12:11 am
Location: Toronto, Canada
x 3
Contact:

Post by Falagard »

PGSLM is most thougt for splatting, but I prefer the Image
I think the paging landscape scene manager is for whatever you want to use it for. Personally, I use the Image technique to do splatting ;-)

Clay

Locked