mPageLoadQueue::find_nearest return NULL

paiden

03-03-2006 16:27:14

The method

mPageLoadQueue.find_nearest(pos);


in PagingLandScapePageManager::processLoadQueues()

always returns NULL.

Why?
How can I solve this problem?

tuan kuranes

03-03-2006 16:33:03

Is that on all cases, even with big number of pages ?
Did you try with canyon terrain ?

paiden

03-03-2006 16:38:03

Only tried it with ps_height_1k

tuan kuranes

03-03-2006 16:42:22

Well ps_height_1k has surely all pages (4) loaded at start.
So load queue is always empty.

paiden

03-03-2006 16:46:54

But LoadQueue::empty() returns false, because it has 3 elements.
:?:

tuan kuranes

03-03-2006 16:55:23

Need to debug find_nearest().
What is strange is that it's the same method to that is used for tiles/renderables find and it works otherwise canyon loading won't give that nice spiral order loading result...

I'll check asap, I can't right now due to other job pending, so feel free to have you have a look.

paiden

03-03-2006 17:00:56

OK, will try to find the error myself.
One last thing, is there any manual or somethink like that. You know some kind of doxygen generated documentation... .

tuan kuranes

03-03-2006 17:28:45

You know some kind of doxygen generated documentation... .

You can generate doxygen documentation.
I personnally use Doxys : http://www.doxys.dk/homepage/Download/D ... ption.html
which don't need any config file.

But feel free to contribute a doxygen script.

tuan kuranes

03-03-2006 17:41:15

mmm seems that uint mindist = -1;should be uint mindist = 0; in OgrePagingLandScapeQueue.h:164...

tuan kuranes

03-03-2006 17:53:26

but that's not the method called.

I cannot reproduce your problem or I misunderstood it.
If mPageLoadQueue.find_nearest(pos) was returning null it would raise assert, so that never happens.
If you debug in release mode, beware that it doesn't always give correct values in debugger and so. Release debug is more about call stack and graph info than variables values.

paiden

03-03-2006 19:13:35

The problem was the camera-position.

The position was ~ x=1.35e+038 y=0.00000 z = 1.35e+038
Because of that the variable res had the value #1.000INF. so no tile of the 3 tiles in the queue was returned by the method.

But I'm still having problems.
I think they are exist, because im having 4 viewports and 4 cameras in one scene (there are 4 cameras for one scene because I'm programming a Level Editor)

cam 1-3: orthogonal projection
cam 4: perspectivic projection

The problem above could be solved by setting the cam-positions after calling setWorldGeometry.

Now the problem is, that i can't see anything in one of the viewports.

The perspective-viewport-camera has the position:

x = 600
y = 15000
z = 550

clipdistance_near = 10
clipdistance_far = 35000

But nothing is displayed on the screen.

any ideas?

tuan kuranes

03-03-2006 20:32:44

As I've successfully use many camera at once without problems. I'm not sure it's plsm2 related...

And If you left only the camera that doesn't work ?

paiden

03-03-2006 22:47:38

This screen shows the scene with all viewports with camera=

x = 50.0f;
y = 50.0f;
z = 50.0f;



The next screen shows the same scene but with camera=

x = 50.0f;
y = 14000.0f;
z = 50.0f;



As you can see, "normal" meshes are rendered, but not so the terrain.
(ATM i don't know why nothing is rendered in the Top-Viewport [the upper left one])

my PLSM-config:


DefaultMap=testlevel

#all maps used by tataco
testlevel=testlevel_png_4k4_16b

#Resorce-GroupName
GroupName=TATACO_LEVELS


the level-config:

GroupName=TATACO_LEVELS

LandScapeFileName=ps_height_1k
FileSystem=E:\Development\G... SOME PATH ... vel\
FileSystem=E:\Development\Ga.. SOME PATH ... \materials\programs
FileSystem=E:\Development\G.. SOME PATH ... \materials\scripts
FileSystem=E:\Dev.. SOME PATH ... \materials\textures



Width=2
Height=2

ScaleX=1
ScaleY=1
ScaleZ=1

Deformable=yes
VertexCompression=yes

VertexProgramMorph=yes
VertexNormals=yes

NumTextureFormatSupported=18
TextureFormatSupported0=Image
TextureFormatSupported1=BaseTexture
TextureFormatSupported2=BaseTexture2
TextureFormatSupported3=InstantBaseTexture
TextureFormatSupported4=InstantBaseTextureEdit
TextureFormatSupported5=Splatting
TextureFormatSupported6=Splatting2
TextureFormatSupported7=Splatting2Edit
TextureFormatSupported8=Splatting4
TextureFormatSupported9=Splatting6
TextureFormatSupported10=Splatting7
TextureFormatSupported11=Splatting7Edit
TextureFormatSupported12=BaseTexture
TextureFormatSupported13=BaseTexture2
TextureFormatSupported14=InstantBaseTexture
TextureFormatSupported15=Splatting3
TextureFormatSupported16=Splatting5
TextureFormatSupported17=SplattingShader

TextureFormat=Image
ImageFilename=ps_texture_1k
TextureExtension=png

TextureStretchFactor=2

NumMatHeightSplat=4
MaterialHeight1=15
MaterialHeight2=50
SplatFilename0=splatting_sand.png
SplatFilename1=splatting_grass.png
SplatFilename2=splatting_rock.png
SplatFilename3=splatting_snow.png

HorizontalVisibiltyComputing=yes

BaseCameraViewpoint.x=41000.0f
BaseCameraViewpoint.y=674000.0f
BaseCameraViewpoint.z=8531.0f

Baselookat.x=0.0f
Baselookat.y=0.0f
Baselookat.z=0.0f


and ogre-log (relevant only):

23:17:22: Finished parsing scripts for resource group TATACO_LEVELS
23:17:22: Creating viewport on target 'GeLeMo -v00.01 Debug', rendering from camera 'TopCam', relative dimensions L: 0.00 T: 0.00 W: 0.50 H: 0.50 ZOrder: 0
23:17:22: Viewport for camera 'TopCam', actual dimensions L: 0 T: 0 W: 471 H: 315
23:17:22: Creating viewport on target 'GeLeMo -v00.01 Debug', rendering from camera 'FrontCam', relative dimensions L: 0.50 T: 0.00 W: 0.50 H: 0.50 ZOrder: 1
23:17:22: Viewport for camera 'FrontCam', actual dimensions L: 471 T: 0 W: 471 H: 315
23:17:22: Creating viewport on target 'GeLeMo -v00.01 Debug', rendering from camera 'LeftCam', relative dimensions L: 0.00 T: 0.50 W: 0.50 H: 0.50 ZOrder: 2
23:17:22: Viewport for camera 'LeftCam', actual dimensions L: 0 T: 315 W: 471 H: 315
23:17:22: Creating viewport on target 'GeLeMo -v00.01 Debug', rendering from camera 'PerspectiveCam', relative dimensions L: 0.50 T: 0.50 W: 0.50 H: 0.50 ZOrder: 3
23:17:22: Viewport for camera 'PerspectiveCam', actual dimensions L: 471 T: 315 W: 471 H: 315
23:17:22: Added resource location 'E:\Development\Games\TaTaCo\VS\TacticalTankOperations\TacticalTankOperations\media\levels\testlevel\' of type 'FileSystem' to resource group 'TATACO_LEVELS'
23:17:22: Mesh: Loading testsphere.mesh.
23:17:22: Texture: ps_texture_1k.0.1.png: Loading 1 faces(PF_B8G8R8,1024x1024x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,1024x1024x1.
23:17:22: Texture: Detail3.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
23:17:22: Texture: ps_texture_1k.1.1.png: Loading 1 faces(PF_B8G8R8,1024x1024x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,1024x1024x1.
23:17:23: Texture: ps_texture_1k.0.0.png: Loading 1 faces(PF_B8G8R8,1024x1024x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,1024x1024x1.
23:17:23: Texture: ps_texture_1k.1.0.png: Loading 1 faces(PF_B8G8R8,1024x1024x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,1024x1024x1.
23:19:17: *-*-* OGRE Shutdown
23:19:17: *-*-* OGRE Shutdown
23:19:17: Unregistering ResourceManager for type Compositor


any suggestions?

tuan kuranes

04-03-2006 09:00:09

only one FileSystem was supported at a time.
Was unclear, there... I added multiple FileSystem or Zip resource support in CVS.

Perhaps it came from here.

paiden

06-03-2006 11:33:50


Perhaps it came from here.


No.
Still having same problem.

tuan kuranes

06-03-2006 12:05:24

I have no idea there...

Did you try with only one camera at 0,0,0 ?