[help] texturing modes

Captain_Deathbeard

24-11-2005 16:46:42

I am having great trouble getting my terrain textured. I realise the textures are not loaded dynamically yet and you will add this feature, but I cant get most of the texture modes to work.

This is what happens for me, in my own app and in the demo. I have tried DX9 and openGL:

splatting - Texture is strange and speckled, nothing like it should be, looks low res, mashed.
splatting2 - crashes
splatting 3 + Image(opengl)- bright yellow with black stripes
Image(DX) - white
splatting4,6,7 - crashes
splatting5 - In the demo its only covered with splatting_rock.jpg, but in my own app (a simple load terrain, nothing else) its bright green and blue, according to height
splattingshader - pure solid black
basetexture, instantbasetexture, and instantbaseshadow - all crash


My graphics card is a 256mb geforce 7800GT so it should be able to handle any advanced shaders. So my question is what am I doing wrong? or is it the PLSM that is at fault (im using the release binary, not CVS)?

tuan kuranes

25-11-2005 08:34:33

CVS or SDK ?

Did you generates basemaps, alpha maps and coverage maps using mapslittter ?

Captain_Deathbeard

25-11-2005 14:11:40

yes its got alpha, base, coverage, and texture generated by the mapsplitter. its the sdk version.

tuan kuranes

28-11-2005 15:45:53

binary demo works but not the source version ?

Textures are loaded dynamically, only splatting texture names aren't changed dynamically. (CVS version does that now.)

Do Ogre.log tell something about missing textures ?

Captain_Deathbeard

01-12-2005 22:13:05

Theres a number of weird things in ogre.log. This is when I ran splatting3, which made the terrain black and yellow stripes. First there is missing textures for L.0.0.png etc. Why is it looking for L?

My terrain is called "one". I dont know what one.L.x.x.png is.


-----------------------------------
Details:
-----------------------------------
Error #: 8
Function: ResourceGroupManager::openResource
Description: Cannot locate resource one.L.0.3.png in resource group PLSM2..
File: c:\softwaredevelopment\c++\ogresdk\ogrenew_vc71\ogremain\src\ogreresourcegroupmanager.cpp
Line: 501
Stack unwinding: <<beginning of stack>>
21:42:28: Error loading texture one.L.0.3.png. Texture layer will be blank. Loading the texture failed with the following exception: An exception has been thrown!



Also some small errors when loading the material files, dont know if these are help to you:


21:42:07: Parsing script DecompressSplatShader.program
21:42:07: Parsing script DecompressVertex.program
21:42:07: Parsing script SplatShader.program
21:42:07: Parsing script IPLSM_BaseTexture.material
21:42:07: Parsing script IPLSM_Image.material
21:42:07: Error in material IPLSM_Image at line 23 of IPLSM_Image.material: Bad colour_op_ex attribute, wrong number of parameters (expected 3 to 10)
21:42:07: Parsing script IPLSM_Splatting1.material
21:42:07: Error in material IPLSM_Splatting1 at line 36 of IPLSM_Splatting1.material: Unrecognised command: alpha_rejection
21:42:07: Error in material IPLSM_Splatting1 at line 62 of IPLSM_Splatting1.material: Unrecognised command: alpha_rejection
21:42:07: Error in material IPLSM_Splatting1 at line 88 of IPLSM_Splatting1.material: Unrecognised command: alpha_rejection
21:42:07: Error in material IPLSM_Splatting1 at line 113 of IPLSM_Splatting1.material: Unrecognised command: alpha_rejection
21:42:07: Parsing script IPLSM_Splatting2.material
21:42:07: Error in material IPLSM_Splatting2 at line 36 of IPLSM_Splatting2.material: Unrecognised command: alpha_rejection
21:42:07: Error in material IPLSM_Splatting2 at line 62 of IPLSM_Splatting2.material: Unrecognised command: alpha_rejection
21:42:07: Error in material IPLSM_Splatting2 at line 88 of IPLSM_Splatting2.material: Unrecognised command: alpha_rejection
21:42:07: Error in material IPLSM_Splatting2 at line 113 of IPLSM_Splatting2.material: Unrecognised command: alpha_rejection
21:42:07: Parsing script IPLSM_Splatting3.material
21:42:07: Parsing script PagingLandScape.material
21:42:07: Parsing script PagingLandScapeTemplate.material
21:42:07: Parsing script Splatting.material
21:42:07: Parsing script Splatting2.material
21:42:07: Parsing script Splatting3.material
21:42:07: Parsing script Splatting4.material
21:42:07: Parsing script Splatting5.material
21:42:07: Error in material SplattingMaterial5 at line 75 of Splatting5.material: Invalid vertex_program_ref entry - vertex program Splatcg/VP has not been defined.
21:42:07: Error in material SplattingMaterial5 at line 97 of Splatting5.material: Invalid fragment_program_ref entry - fragment program Splatcg/FP has not been defined.

CrxGames

01-12-2005 23:05:48

I get, and just ignore those, changed when I decided to change the materials and fix those simple errors, I think those commands are in Dagon.

tuan kuranes

02-12-2005 13:18:44

YEs CVS version and next SDK version will correct those.

Captain_Deathbeard

03-12-2005 22:16:35

Okay but do you have any idea why most of the texture modes are crashing? They are mostly windows crashes "this program has encountered a problem and needs to close". Is it possible its only my computers fault? Or do others get this problem too?

tuan kuranes

05-12-2005 09:15:35

No idea.
You're the first to report that.
Check cfg files for not corresponding cfg and .gen.cfg files. (could be a different TextureStretchFactor between generation and utilization)

Captain_Deathbeard

05-12-2005 14:54:44

Aha! thankyou it worked - I had different texture stretch factors, I diddnt know this was something to look out for.

All of the splatting modes now work but the basetexture modes are giving assertion errors. basetexture, basetexture2, instantbasetexture, and instantbasetextureshadowed all have the same problem.

The assertion error says:
"file:....ogresharedptr.h
expression:pRep"

when I debug the location they all come out at the same spot in the materials relevant .cpp file. It always looks similar to this:


if (mMaterial.isNull())
{
mMaterial = MaterialManager::getSingleton().getByName("BaseMaterial");
// Create a new texture using the base image
mMaterial = mMaterial->clone(matname); <-----here


but obviously slightly different for each one. Always happens on a material->clone() function

Thanks for all your help so far tuan, I really want to use PLSM, I actually switched engines just for this so I cant wait to start using it fully.

tuan kuranes

05-12-2005 16:05:21

You're missing the *.material files containing basetexture, basetexture2, instantbasetexture, and instantbasetextureshadowed material definitions.

it's in Media/paginglandscape for SDK or Media/paginglandscape2 for CVS
and it should be referenced in the resources.cfg in the executable directory.

Captain_Deathbeard

05-12-2005 16:39:53

ah I see, do you know those materials are not in the SDK zips?

tuan kuranes

05-12-2005 16:57:01

source or binary ?

just checked, they're in.
(the 7z files ?)

Captain_Deathbeard

05-12-2005 19:20:53

yeah the 7z files, i tried both but there arent any files i dont have already, I've only got IPLSM_BaseTexture.material, I found BaseTexture.material in the CVS and that fixed it.

tuan kuranes

06-12-2005 13:29:47

what decompressor do you use ?

Captain_Deathbeard

06-12-2005 23:43:48

I use 7-zip.