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
spoke
Greenskin
Posts: 121
Joined: Sun Oct 06, 2002 11:19 pm
Location: Spain
Contact:

Paging Landscape v2 - Comments / Questions / Suggestions

Post by spoke »

You can find an early version in ogreaddons. :?

Warning, some of the features need work, ans other are just not working right.

Fell free to use it, as far as I test it, it is free of mem-leaks.

I will be fixing broken features prior to start working on experimental ones. (They are enabled in the prerequisites.h file)

Anyway, If you think you can help with one or some of the missing features just yell, I will be with you ASAP. :wink:

Please fell free to comment, ask, suggest or help. :wink:
May the force be with you.

DrEvil
Halfling
Posts: 45
Joined: Fri Jan 02, 2004 6:07 am
Contact:

Post by DrEvil »

Exception PageData2D not supplied!

On further investigation it seems to be because the paginglandscape2.cfg defines the 2ddata as HeightFieldTC yet in the constructor of the PagingLandScapePage you only have if checks for HeightField and SplineField, no HeightFieldTC. Works when I change the heightfield to HeightField in the cfg.

What is HeightFieldTC? Incomplete feature?


edit:

Is there some setting thats wrong or something in the cvs version. The terrain blocks are huge, no more than like 800 polys worth of terrain on screen. Little too coarse. Are you using different heightmaps or something?

User avatar
spoke
Greenskin
Posts: 121
Joined: Sun Oct 06, 2002 11:19 pm
Location: Spain
Contact:

Post by spoke »

I will check it. (again) :wink:

HeightFieldTC must be there, check you have the class loaded in the project. (OgrePagingLandScapeData2D_HeightFieldTC.h & .cpp)

Can you put a screenshot? (I´m using the CVS terrain data files) :?
May the force be with you.

DrEvil
Halfling
Posts: 45
Joined: Fri Jan 02, 2004 6:07 am
Contact:

Post by DrEvil »

hmm

Code: Select all

if (mOptions->data2DFormat == "HeightField" )
	{
		mData = new PagingLandScapePageData2D_HeightField();
	}
	else if (mOptions->data2DFormat == "SplineField" )
	{
		mData = new PagingLandScapePageData2D_Spline();
	}
	else
	{
		mData = 0;
		Except(Exception::ERR_INVALIDPARAMS, "PageData2D not supplied!", "PagingLandScapePage::PagingLandScapePage" ); 
	}
Thats the exception it's hitting when the cfg file is set to HeightFieldTC. Theres no if check for HeightFieldTC. Is this the wrong file?

As for the terrain heres some screenshots.

Same screen, 2nd one with wireframe. Seem a little coarse?
http://www.bsproductions.net/foxbot/dl.php?91b39
http://www.bsproductions.net/foxbot/dl.php?d4605

User avatar
spoke
Greenskin
Posts: 121
Joined: Sun Oct 06, 2002 11:19 pm
Location: Spain
Contact:

Post by spoke »

Are you sure you are using V2 code?

From OgrePagingLandScapeData2DManager.cpp

Code: Select all

PagingLandScapeData2D* data;
if ( PagingLandScapeOptions::getSingleton().data2DFormat == "HeightField" )
{
	data = new PagingLandScapeData2D_HeightField();
}
else if ( PagingLandScapeOptions::getSingleton().data2DFormat == "HeightFieldTC" )
{
	data	= new PagingLandScapeData2D_HeightFieldTC();
}
else if ( PagingLandScapeOptions::getSingleton().data2DFormat == "SplineField" )
{
	data = new PagingLandScapeData2D_Spline();
}
Remember to add the plugin v2 to the plugins.cfg and remove v1, since both plugins will register using the same scene manager.

I add in OgreAddons a new sample project to use with this version of the plugin and new cfg files.

Check you are using the right ones to test the new version.
May the force be with you.

DrEvil
Halfling
Posts: 45
Joined: Fri Jan 02, 2004 6:07 am
Contact:

Post by DrEvil »

god dammit, my bad. I forgot to remove the old plugin from the file.

thx

DrEvil
Halfling
Posts: 45
Joined: Fri Jan 02, 2004 6:07 am
Contact:

Post by DrEvil »

ok, I've got a 2048x2048 heightmap I'm trying to run through mapsplitter

using the command mapsplitter test.png 256 1

It gets to test.7.4.png and then crashes

devil.dll!1000a20d()
msvcr71d.dll!_unlock_file(void * pf=0x00000100) Line 305 + 0x14 C
MapSplitter.exe!splitMap(char * filename=0x003824e8, int tile_spacing=256, int tile_size=257) Line 129 + 0x37 C++

User avatar
spoke
Greenskin
Posts: 121
Joined: Sun Oct 06, 2002 11:19 pm
Location: Spain
Contact:

Post by spoke »

Try using the front end app.

You can find it at:

ogreaddons\paginglandscape\MapSplitter\Tool_MapSplitterFontEnd.exe

Place the map splitter and the front end in ogre\common\bin\release

I use it from there and it works fine.
May the force be with you.

DrEvil
Halfling
Posts: 45
Joined: Fri Jan 02, 2004 6:07 am
Contact:

Post by DrEvil »

i tried that

outputdir and outputbase name are yellowed out and I can't click the button next to them, and when i hit run after selecting the image, 256, and 1 nothing happens

iq
Greenskin
Posts: 125
Joined: Mon Oct 20, 2003 8:25 pm

Post by iq »

Threw together a VC6 project and got it to compile just fine (CVS this morning) - thing is the demo doesn't seem to use HeightFieldTC at all (btw - from a first look at TC decoding it appears as an ordinary scale operation with a (theoretically) variable base height - am I missing something?)

Nice improvement so far, need a bit more time to play with the parameters and look for all the new goodies you hid in there ;)

User avatar
spoke
Greenskin
Posts: 121
Joined: Sun Oct 06, 2002 11:19 pm
Location: Spain
Contact:

Post by spoke »

@DrEvil, Can you give me the files? so I can test them.

@iq, yup, TC is more o less that.

There is a lot of work to consider it a relese:

Need to fix some bug, and found a better routine for loading/unloading pages, taking into account the visible renderables.

And finish some of the experimental features.
May the force be with you.

Guest

Post by Guest »

wow, amazing work spoke!

btw: make sure you put in

Code: Select all

timeUntilNextToggle = 0.5;
in all the if's where you check against that toggle, else it wont do much good ;)

i have one question though:

as i understand it [and by rendering in wireframe mode] each tile that is paged in is 16x16 triangles, with a tri count of 512 for each tile loaded in. can this tile size be changed easily?

if you have 2 situations, A and B, where A needs to render enourmous ammounts of land with a relatively low res [really scalled out] and B needs to render a relatively small ammount of land, but very high res [say A is a flying ship going over planet, while B is an rpg character walking over terrain, for example]

anyways, back to my point, can this be configurable? say i want to have the tiles be 8x8 or something for situation A. and inversely, if im in situation B i would like to use 32x32 triangle tiles, or larger

can this be done easily?

i notice that if you tweak the y scale too much the terrain gets very jaggy, and "stair like" and even weirder is when you go into wireframe mode and then "fly" through the top layer of triangles in the terrain, you can see another layer! these two "layers" seem to get really messed up the higher the y scale value goes. are you literally rendering the terrain twice? :shock: i must be missing something here, cause this sounds like a stupid question on my part :D

just noticed something while trying the plugin in opengl, it loads and unloads tons faster than in directx

User avatar
spoke
Greenskin
Posts: 121
Joined: Sun Oct 06, 2002 11:19 pm
Location: Spain
Contact:

Post by spoke »

Guest wrote: wow, amazing work spoke!
Thanks, man.
Guest wrote: btw: make sure you put in

Code: Select all

timeUntilNextToggle = 0.5;
in all the if's where you check against that toggle, else it wont do much good ;)
Ups! :oops:
Guest wrote: i have one question though:

as i understand it [and by rendering in wireframe mode] each tile that is paged in is 16x16 triangles, with a tri count of 512 for each tile loaded in. can this tile size be changed easily?
Exactly, this number is found by trial and error. This size looks right since it is big enough to allow the batch of triangles and it is small enough to allow a decent fill rate.
Guest wrote: if you have 2 situations, A and B, where A needs to render enourmous ammounts of land with a relatively low res [really scalled out] and B needs to render a relatively small ammount of land, but very high res [say A is a flying ship going over planet, while B is an rpg character walking over terrain, for example]

anyways, back to my point, can this be configurable? say i want to have the tiles be 8x8 or something for situation A. and inversely, if im in situation B i would like to use 32x32 triangle tiles, or larger

can this be done easily?
Changing the renderable size is not configurable in this version and it will not be.

But nothing stop you from recoding the renderable class and the index buffer class.

I may add some sort of LOD inside the renderable class, but I have to think a little about it.
Guest wrote: i notice that if you tweak the y scale too much the terrain gets very jaggy, and "stair like" and even weirder is when you go into wireframe mode and then "fly" through the top layer of triangles in the terrain, you can see another layer! these two "layers" seem to get really messed up the higher the y scale value goes. are you literally rendering the terrain twice? :shock: i must be missing something here, cause this sounds like a stupid question on my part :D
Try the new height field loader TC, it allow you to use the terrain with scale.y = 1, and having a good amount of data.

It is consider ALPHA code, since we need to edit the splitter tool to export the data in TC format.

Finding a good relation between horizontal scale and vertical scale need a lot of try and error, and most of the time it is related to the height field you are using.
Guest wrote: just noticed something while trying the plugin in opengl, it loads and unloads tons faster than in directx
Thats odd, maybe related to the speed during GL VBO creation time and DX one. :?
May the force be with you.

User avatar
IainC
Gnoblar
Posts: 3
Joined: Sun Jan 11, 2004 2:51 am
Location: Southampton, England
Contact:

Post by IainC »

Mua-ha-haa - RakNet-driven streaming landscape here I come :twisted:

I'm just loving my new strategy of maximum leverage of existing resources :D

Great work Spoke.
www.coldcity.com
coding, life

User avatar
spoke
Greenskin
Posts: 121
Joined: Sun Oct 06, 2002 11:19 pm
Location: Spain
Contact:

Post by spoke »

Thanks man, more to come. :wink:
May the force be with you.

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 »

just a little question about the MapSplitter:
Is it funtionall yet? I cannot choose the destination folder and the destionation name. And cut my heightmap "with the hand" is quite hard and long, isn't it? :D
Follow la Moustache on Twitter or on Facebook
Image

User avatar
spoke
Greenskin
Posts: 121
Joined: Sun Oct 06, 2002 11:19 pm
Location: Spain
Contact:

Post by spoke »

The MapSplitter is fully funtional, it will split the image in the source folder.

The FrontEnd have more options than currently suported by the tool.
May the force be with you.

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 »

well, I'll take a look, but nothing happens when i click on the "run" button...
Olaaaahh, I even forgot how to run softwares :lol: :lol: :lol: :lol: :lol:
Follow la Moustache on Twitter or on Facebook
Image

DrEvil
Halfling
Posts: 45
Joined: Fri Jan 02, 2004 6:07 am
Contact:

Post by DrEvil »

same thing with me the destination folder and name is not selectable in the front end, and even when I select a file and the parameters(256,1, heightmap), when I click run it does nothing.

User avatar
spoke
Greenskin
Posts: 121
Joined: Sun Oct 06, 2002 11:19 pm
Location: Spain
Contact:

Post by spoke »

Ok, make sure you have the frontend in the same folder than the map splitter.

The frontend is expecting the tool to be called "Tool_MapSplitter_r.exe".

Double check that, if it still does´t work, let me know and I will try to figure what happend. :wink:
May the force be with you.

DrEvil
Halfling
Posts: 45
Joined: Fri Jan 02, 2004 6:07 am
Contact:

Post by DrEvil »

ok, renaming it made it so it actually runs when I hit run, but the output directory and output name are still unselectable, though I guess thats not a big deal as long as run works.

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 »

It works here too.
Thx! :) :) :)
Follow la Moustache on Twitter or on Facebook
Image

User avatar
spoke
Greenskin
Posts: 121
Joined: Sun Oct 06, 2002 11:19 pm
Location: Spain
Contact:

Post by spoke »

Np, enjoy! :wink:
May the force be with you.

Guest

Post by Guest »

any update on this?

has there been progress on splatting or dynamic terrain?

User avatar
spoke
Greenskin
Posts: 121
Joined: Sun Oct 06, 2002 11:19 pm
Location: Spain
Contact:

Post by spoke »

Well, we are quite bussy right now, finishing some other stuff and adding other interesting functionality you will see, hopefully, soon, but we will return to this asap.
May the force be with you.

Locked