Imeshcvt in irrb doesn´t work

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
RobbyRob
Posts: 21
Joined: Fri Mar 02, 2007 4:30 pm
Location: Germany

Imeshcvt in irrb doesn´t work

Post by RobbyRob »

Hello,

RobbyRob has a little problem installing the imeshcvt plugin for blender getting this nice and fast binary mesh files;
I set the environment variables to IMESHCVT=c:\irrbutils\imeshcvt.exe and in the render menue I got the bottom "create binary meshes", so farwell, done,
exporting .irrmesh works great, but no .irrbmeshes will be created in my scenes file and the console says
input mesh: -v
output mesh 1.6
Error input mesh doesn´t exist,

the rest is really great work !!!

anybody an idea what happened or how to solve it

Thank´s for every support

RobbRob
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

Hello RobbyRob - It looks like you're using an older version of imeshcvt so you'll need to replace it with the latest version from: irrbUtils-0.4-win32.zip.
RobbyRob
Posts: 21
Joined: Fri Mar 02, 2007 4:30 pm
Location: Germany

Post by RobbyRob »

Hi pcOde.

thank you for your answer. I did it, but same result, I used the latest version, but there wan´t be an irrbmesh in my folder; it´s strange that the button is in the render menue, but no result, I will work on this problem, if anybody else has an idea, everything s appreciated

RobbRob :roll:
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

It may help if you email/pm me your "irrb.log" file. It's saved in the "Output Directory".
RobbyRob
Posts: 21
Joined: Fri Mar 02, 2007 4:30 pm
Location: Germany

Post by RobbyRob »

Hi PcOde again;

it´s nice that you care about my problem, so here is the .log file content:

Code: Select all

irrb log 0.4

[blender info]
             OS: Windows XP 5.1.2600
        Version: 249
    .blend File: C:\Dokumente und Einstellungen\Aurelius F. Stolka\Eigene Dateien\My 3D Models\surface_1.blend
    .blend Root: C:\Dokumente und Einstellungen\Aurelius F. Stolka\Eigene Dateien\My 3D Models
 Python Version: 2.6.2 final

[options]
   Create Scene: True
 Base Directory: C:\Dokumente und Einstellungen\Aurelius F. Stolka\Eigene Dateien\Irrlicht\WizardGame\Irr_Basic\data\scenes\
Scene Directory: C:\Dokumente und Einstellungen\Aurelius F. Stolka\Eigene Dateien\Irrlicht\WizardGame\Irr_Basic\data\scenes\
 Mesh Directory: C:\Dokumente und Einstellungen\Aurelius F. Stolka\Eigene Dateien\Irrlicht\WizardGame\Irr_Basic\data\scenes\mdl\
Image Directory: C:\Dokumente und Einstellungen\Aurelius F. Stolka\Eigene Dateien\Irrlicht\WizardGame\Irr_Basic\data\scenes\tex\
     meshOutDir: mdl
      texOutDir: tex
         Binary: False
 Export Cameras: False
  Export Lights: True
 Export Physics: False
Image Extension: Original
  Selected Only: False
   Irrlicht Ver: 1.6
  iwalktest Env: C:\Python25\iwalktest -i "$1" -a "$2"
   imeshcvt Env: C:\Python25\imeshcvt -v
  iwalktest Cmd: C:\Python25\iwalktest -i "C:/Dokumente und Einstellungen/Aurelius F. Stolka/Eigene Dateien/Irrlicht/WizardGame/Irr_Basic/data/scenes/Scene.irr" -a "C:/Dokumente und Einstellungen/Aurelius F. Stolka/Eigene Dateien/Irrlicht/WizardGame/Irr_Basic/data/scenes/"

[scene info]
Scene Name:Scene
Visible Layers: [1]

[animation info]
fpsbase: 1.0000
    fps: 25
 sFrame: 1
 eFrame: 250

[ipo info]
IPO's: []
Key's: []

[action info]

[object info]
Object (0): Name=Lamp.001, Type=Lamp, Layers=[1]
Object (1): Name=Plane, Type=Mesh, Layers=[1]
Object (2): Name=Lamp, Type=Lamp, Layers=[1]
Object (3): Name=Camera, Type=Camera, Layers=[1]

[Mesh - ob:Plane, me:Plane]
Restrict Display: False
Restrict Render: False
UV Layers (1): UVTex
Primary UV Layer: None
Double Sided: True
Mesh VertexColors: False
Mesh Key: None
Mesh ipo: None
Modifiers:
   Name: MeshDeform, Type: unknown
Armatures: None
rbflags:14000
pflags: ['PROP']
isSoftBody: False

[Image]
imageName: surface_tex.tga.001
org fullFileName: C:\Dokumente und Einstellungen\Aurelius F. Stolka\Eigene Dateien\Irrlicht\WizardGame\Irr_Basic\data\scenes\tex\surface_tex.tga
fullFileName: C:\Dokumente und Einstellungen\Aurelius F. Stolka\Eigene Dateien\Irrlicht\WizardGame\Irr_Basic\data\scenes\tex\surface_tex.tga
dirname: C:\Dokumente und Einstellungen\Aurelius F. Stolka\Eigene Dateien\Irrlicht\WizardGame\Irr_Basic\data\scenes\tex
fileName: surface_tex
fileExt: .tga
bImage.depth: 24
bImage.source: 1-still
bImage.packed: 0
bImage.lib: None
exists on disk: 1
result0: tex\surface_tex.tga
result1: C:\Dokumente und Einstellungen\Aurelius F. Stolka\Eigene Dateien\Irrlicht\WizardGame\Irr_Basic\data\scenes\tex\surface_tex.tga

[Buffers]
Count: 1
   uvmat:surface_tex.tga.001:00100 : UVMaterial

[stats]
Export Complete - 4.91 seconds - 23:08:30 01/22/10
1 Object(s)
1 Mesh
2 Light(s)
0 Image(s)
8690/4288 Verts/Tris
thank you

Robert
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

Remove the "-v" in your IMESHCVT environment variable. It should be:

IMESHCVT=C:\Python25\imeshcvt.exe
RobbyRob
Posts: 21
Joined: Fri Mar 02, 2007 4:30 pm
Location: Germany

Post by RobbyRob »

Dear pcOde,

it´s as simple as can be; the reason for the error is python itself, blender console says it could not find "mesh input" and my file path starts with "Dokumente und Einstellungen" but python doesn´t forgive any empty space in the file names;
so I changed to python\scenes\mdl and the binary was created succesfully,

yes we can, thank´s again for any support

Robert
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

So there were a couple of things happening here. The first was the "-v" parameter erroneously included in the environment variable. irrb automatically adds the version parameter when invoking imeshcvt and this is why you were originally seeing:

Code: Select all

input mesh: -v
output mesh 1.6
Error input mesh doesn´t exist,
The second problem is a bug in irrb in that the irrb->imeshcvt call isn't taking into account spaces in the "Output Directory'. This had been fixed in 0.5.

Thanks for bringing this to my attention RobbyRob.
RobbyRob
Posts: 21
Joined: Fri Mar 02, 2007 4:30 pm
Location: Germany

Post by RobbyRob »

Hello pcOde,

it´s me again, now I tried to implement irrbmesh into my code, but I but I have some trouble with this code fragment in the irrBMeshWriter.cpp

Code: Select all

void CIrrBMeshWriter::updateMaterialLayer(const video::SMaterial& material,u8 layerNumber, irr::core::stringc& textureName, struct IrrbMaterialLayer_1_6& layer)
        {
            if(layerNumber > 3)
                return;

            memset(&layer,0,sizeof(layer));

            textureName = material.TextureLayer[layerNumber].Texture->getName().getPath().c_str();
            layer.mBilinearFilter = material.TextureLayer[layerNumber].BilinearFilter;
            layer.mTrilinearFilter = material.TextureLayer[layerNumber].TrilinearFilter;
            layer.mAnisotropicFilter = material.TextureLayer[layerNumber].AnisotropicFilter;
#if IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR <= 6
            layer.mTextureWrap = material.TextureLayer[layerNumber].TextureWrap;
#elif IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR == 7
            layer.mTextureWrap = material.TextureLayer[layerNumber].TextureWrapU;
#endif
            memcpy(&layer.mMatrix,material.TextureLayer[layerNumber].getTextureMatrix().pointer(),sizeof(f32)*16);
        }
the errors are:
getPath : is not a member of irr::core::string<T>
left of .c_str must have class/struct/union type
[/code]

So I guess I am missing a header file, but I don´t know, where getPath is included;
I included all the headers which are neccessary for the fileloaders and writers and check it double,

do you have an idea, what went wrong?

Thank you for your help,

RobbyRob
RobbyRob
Posts: 21
Joined: Fri Mar 02, 2007 4:30 pm
Location: Germany

Post by RobbyRob »

Hi again,

now I can answer the question myself, it is very easy, just cancel getPath(), because this method does not exist and the compiler is quite satisfied;
now my program runs perfectly and I fall in love with these binary meshes, very fast and accurate, great job pcOde...

and now I go to bed, because it´s late, I am 46 and I have to do a hard job tomorrow, :lol:

till soon

RobbyRob
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

My bad, obviously I didn't test against 1.6 and it looks like getPath() was added after that. The quickest fix for you would be to update to the 1.7 release of Irrlicht. If that's not an option, I should be able to modify it for 1.6 within the next couple of weeks.

Also I'd like to reiterate that the .irrbmesh format is still experimental. In fact, I don't like the code for handling structural changes between versions so that's going to be removed/replaced. Still working it out in my head...
Post Reply