Custom materials in PLSM2?

alex_dergian

21-08-2006 09:26:46

I thought passably this could be done until I realized each page has its own settings and the map config files in plsm2 set the settings for every page when I want to set the settings for the texture material each page, is this possible? If so how would I go about doing it, in the abstract or example.

tuan kuranes

21-08-2006 13:39:51

http://www.ogre3d.org/wiki/index.php/Pa ... ture_Modes

alex_dergian

26-08-2006 07:49:59

Provide the Plugin the material script you want to use using CFG file or setOption mechanism. Inside the material script you provide, just use keyword inside material scripts : Splatting, Alpha, Coverage, Horizon, Image, Light and those keywords will be dynamically replaced by the related page texture (Coverage will become coverage.1.2.0.png if page X is 1 and page Z is 2 and Coverage keyword is read for the first time in this material technique.)(case sensitive.)

Best may be to have a look on plsm2 provided texture mode material scripts to read some samples on how to do that.


The key word repacing is done by using the keywords in the custom met script do i have to hard code plsm2 plugin to read my met file or can i in the maps cfg file, and in the cfg what do i tell it the standered CustomMaterialName=metfilename ?

Then i noticed the keywords have 3 numaric placments the last one im guessing if for the metiral itself? Well if it is there a way to use my own splat file and just look up alpha.0.0.m not alpha.0.0.0 since im guessing all the splats will be pre decided in the maps cfg which is what i want to avoid, so i can place 8 splats with normal maps. Thanks ahead of time.

tuan kuranes

26-08-2006 09:29:38

- no hard code, use the cfg file to specify you material. (TextureMode=)

- Three numbers X, Z and number of occurrence. if you use a 8 splat + normal map that would end in file up to mymapname.alpha.X.Z.7.png. you can provide your own files, provided you respect the numbering.