#0 

23-12-2007 21:24:38

tomy300
Petit nouveau
Date d'inscription: 23-12-2007
Messages: 3

J’ai un petit souci avec le terrain d’irrlitch

Voici le code source

terrain = smgr.AddTerrainSceneNode(
            "height2.bmp", null, -1,
            new vector3d(0, 0, 0), new vector3d(1, 1, 1),
            new vector3d(100, 10f, 100),
            IrrlichtNETCP.Color.White, 8, TerrainPatchSize.TPS33);

            terrain.SetMaterialFlag(MaterialFlag.Lighting,false);
            terrain.SetMaterialType(MaterialType.DetailMap);
            terrain.SetMaterialType(MaterialType.Lightmap);


            terrain.SetMaterialTexture(0, driver.GetTexture("color.bmp"));
            terrain.SetMaterialTexture(1,driver.GetTexture("detail1.jpg"));
            terrain.SetMaterialTexture(2, driver.GetTexture("Shadow.jpg"));


voila … Je dispose de mon Highmap de 256x256 color map la même grosseur and detailmap même grosseur…. Le problème maintenant Irrlitch semble pas prendre en considération la grandeur de mon highmap  en résumer on dirait qu’irrlitch affiche qu’une partie de
mon Highmap ou ces peut-être le scalemap de irrlich ?

Hors ligne


#1 

23-12-2007 21:40:04

Copland
Modérateur
Lieu: ZarbiLand
Date d'inscription: 22-09-2006
Messages: 657
Site web

Tu définis deux fois d'affilé setMaterialType donc forcément ça ne peux pas fonctionner wink.
Il te faut faire
setMaterialType
setMaterialTexture
setMaterialType
setMaterialTexture


Config : I5 2400, ATI HD6870 1Go DDR5, 4Go DDR3.
Single Boot : Windows Seven.

Hors ligne


#2 

23-12-2007 22:38:59

tomy300
Petit nouveau
Date d'inscription: 23-12-2007
Messages: 3

D'accord smile j'ai fait comme tu as dis

ca ne fonctionne pas plus

ces quoi cette option ? TerrainPatchSize

Hors ligne


#3 

23-12-2007 22:59:42

Copland
Modérateur
Lieu: ZarbiLand
Date d'inscription: 22-09-2006
Messages: 657
Site web

veux-tu bien remettre ton code, tu as dû te tromper et ne pas faire comme je t'ai dit je pense wink


Config : I5 2400, ATI HD6870 1Go DDR5, 4Go DDR3.
Single Boot : Windows Seven.

Hors ligne


#4 

24-12-2007 01:01:48

tomy300
Petit nouveau
Date d'inscription: 23-12-2007
Messages: 3

terrain = smgr.AddTerrainSceneNode(
                "height2.bmp", null, -1,
                new vector3d(0, 0, 0), new vector3d(1, 1, 1),
                new vector3d(100, 9f, 100)
                ,IrrlichtNETCP.Color.White, 10, TerrainPatchSize.TPS9);
         
            terrain.SetMaterialTexture(0, driver.GetTexture("color.bmp"));
            terrain.SetMaterialFlag(MaterialFlag.Lighting,false);


            terrain.SetMaterialType(MaterialType.DetailMap);
            terrain.SetMaterialTexture(1, driver.GetTexture("detail1.jpg"));
           

            terrain.SetMaterialType(MaterialType.Lightmap);
            terrain.SetMaterialTexture(2, driver.GetTexture("Shadow.jpg"));


voila ca fonctionne le probleme etait TerrainPatchSize

ces TerrainPatchSize.TPS9 pour ma texture les autres ne fonctionne pas

Hors ligne


#5 

24-12-2007 12:30:06

Copland
Modérateur
Lieu: ZarbiLand
Date d'inscription: 22-09-2006
Messages: 657
Site web

TerrainPatchSize bein comme son nom l'indique c'est la taille d'un patch du terrain, à savoir que ton terrain est découpé en plusieurs Patchs de plusieurs vertexs.
Par contre j'avais mal compris ta question, je pensais que c'était juste les textures qui ne s'affichaient pas correctement.


Config : I5 2400, ATI HD6870 1Go DDR5, 4Go DDR3.
Single Boot : Windows Seven.

Hors ligne


Options Liens officiels Caractéristiques Statistiques Communauté
Corrections
irrlicht
irrklang
irredit
irrxml
xhtml 1.0
css 2.1
Propulsé par FluxBB
Traduit par FluxBB.fr
Analysé par
880 membres
1424 sujets
11113 messages
Dernier membre inscrit: mandrifidy
41 invités en ligne
Aucun membre connecté
RSS Feed