[prob] resource not found, and other things.

Crashy

28-10-2006 22:42:59

Hello.

I've just seen a strange behaviour. Everything works good, but as soon as I make this:

MaterialPtr mat = MaterialManager::getSingleton().getByName("ImagePagingDecompress");
mat->getTechnique(0)->getPass(0)->getTextureUnitState(5)->setTextureName("skyScattering");


I've this message in the log file, for all textures of my terrain:

Error #: 8
Function: ResourceGroupManager::openResource
Description: Cannot locate resource geornTexture.5.5. in resource group PLSM2 or any other group..


That's weird because the right texture is displayed correctly on the terrain!

But in the other hand, the texture unit I'm trying to set becomes blank. It is a rendered texture made like this:

TexturePtr mTexture = TextureManager::getSingleton().createManual( "skyScattering",
"PLSM2", TEX_TYPE_2D,
64, 64, 0, PF_R8G8B8A8, TU_RENDERTARGET );

Same thing if the resource group is DEFAULT_RESOURCE_GROUP_NAME



I think it is a resource group problem, but I cannot find where. :?

PS:The rendered texture is correct, I just tried it on an object.

tuan kuranes

30-10-2006 08:53:44

What PLSM2 version ?
When you make those call ?
What's "geornTexture.5.5. " ? is that the color texture of terrain ?
Did you try with a "standard" (non RTT) textures ?

Crashy

30-10-2006 12:40:14

Oooooups sorry not to have given all informations.

I'm using the version currently on your website.

GeornTexture.x.y.png are the base color texture for the terrain.

This call is made in the "createScene" method. I never load a new terrain after this call.

And it works fine for a standard texture.

tuan kuranes

31-10-2006 08:02:42

if you're using SDK version, it had a bug on multipass material, perhas that's your case ?

Crashy

02-11-2006 16:11:03

Okay I've found the bug!

The texture was named SkyScattering

I just replaced it by SkyScattering.png (even if it is not a png file, just a RTTEX), and it worked fine.

Notice that the problem was also dividing framerate by 2 .