How do you get a custom metial to read more then one pass?

alex_dergian

02-10-2006 01:20:35

I have had a issue for quite some time dealing with the custom metiral stuff, so i figured mabey i wasn't explaning it well, the issue is not that i can load a texture it is that the map will not load mor ethen one alpha map so i took some pictures here is the code of the metiral file so you can see if there might be a error
material aero/kazular
{
lod_distances 280000

technique
{
lod_index 0
pass
{
ambient 1.0 1.0 1.0
diffuse 1.0 1.0 1.0
texture_unit
{
// We will use the dirt dds
texture defalt.dds
// Scale the texture so, that it looks nice
scale 0.28 0.28
// Only blend colour
colour_op_ex source1 src_texture src_texture
}
}

pass
{
ambient 1.0 1.0 1.0
diffuse 1.0 1.0 1.0
scene_blend alpha_blend
texture_unit
{
texture grass_jungel.dds
scale 0.30 0.30
}
texture_unit
{
texture Alpha 2d unlimited alpha
tex_address_mode clamp
colour_op_ex blend_diffuse_alpha src_current src_texture
}
}

//pass
//{
// ambient 1.0 1.0 1.0
// diffuse 1.0 1.0 1.0
// scene_blend alpha_blend
// texture_unit
// {
// texture grass_clover.dds
//
// scale 0.38 0.38
// }
// texture_unit
// {
// texture Alpha 2d unlimited alpha
// tex_address_mode clamp
// colour_op_ex blend_diffuse_alpha src_current src_texture
// }
//}

}
}

the screen shot of the game when i use that code as is

the screen shot when i remove the comment

you notice it uses the same alpha map rather then getting the next one i have tryed calling the map a new name test.Alpha.0.0.1.png but it dose the same thing, it just isn't looking for the next alpha at all and to prove this here is the log of the action
04:51:47: Win32Input8: DirectInput OK.
04:51:47: D3D9 : Loading 2D Texture, image name : 'defalt.dds' with 2147483647 mip map levels
04:51:47: D3D9 : Loading 2D Texture, image name : 'grass_jungel.dds' with 2147483647 mip map levels
04:51:47: Texture: test.Alpha.0.0.0.png: Loading 1 faces(PF_A8B8G8R8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,512x512x1.
04:51:47: D3D9 : Loading 2D Texture, image name : 'grass_clover.dds' with 2147483647 mip map levels
04:52:05: *-*-* OGRE Shutdown

So there is my issue what am i doing wrong thanks in advance oh and ask a question if i sound confusing

alex_dergian

02-10-2006 01:29:21

Yes and here is the folder of files as you can see they are both there


and here is what is in my config file#File Information
GroupName=Maps
LandScapeFileName=test
Data2DFormat=HeightFieldRaw
LandScapeExtension=Raw
RawHight=257
RawWidth=257
PageSize=257
#TextureConfigs
NumTextureFormatSupported=2
TextureFormatSupported0=aero/nillSupport
TextureFormatSupported1=aero/kazular
TextureFormat=aero/kazular
TextureStretchFactor=2
FileSystem=test
Width=1
Height=1
ScaleX=1000
ScaleY=250
ScaleZ=1000
VertexCompression=yes
VertexProgramMorph=yes
NumMatHeightSplat=9
MaxPixelError=8
MaxAdjacentPages=3
MaxPreloadedPages=4
VisibleRenderables=80
NumRenderablesLoading=100
VertexNormals=yes
HorizonVisibilityComputing=yes
VertexLit=yes

tuan kuranes

02-10-2006 12:52:03

I still didn't find time to debug that, sorry, but it's on my list.

Meanwhile don't hesitate to place some breakpoint in ogrepaginglandscapetexture.cpp and check where that happens...

alex_dergian

02-10-2006 17:45:27

I ran some checks to see if the error was in plsm2 or my met files and what i did was rename the Alpha keyword to my real texture names and it worked but then the next issue came up now how do i load for more then one page? I can't, so is there a keyword i have to place in the config to tell it to look for more then one alpha keyword cause what is happining is it is using the same replace for both keywords and not moving the numbering up, i think i need to tell it there is more then one texture but how or what parase do i use in the map config to tell it that there is to be more textures?

tuan kuranes

02-10-2006 17:49:14

I've found the bug in PLSM2, but I need some time to fix it.