MY3D export problem

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
LEFRANCAIS
Posts: 28
Joined: Wed Oct 08, 2003 9:09 am
Location: Annecy - FRANCE

MY3D export problem

Post by LEFRANCAIS »

Hello,

I try the MY3d exporter from ZDimitor:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=4417]
and it's an excellent work.
All is OK when i load only one file.But with two files,textures of the second file are not good, they are the textures of the first file.(my poor english...)

thx for help
ZDimitor
Posts: 202
Joined: Fri Jul 16, 2004 3:27 am
Location: Russia

Post by ZDimitor »

Hmmm!!! I don't try to load more than one my3d meshes before.
I'll try to fix this problem.
LEFRANCAIS
Posts: 28
Joined: Wed Oct 08, 2003 9:09 am
Location: Annecy - FRANCE

Post by LEFRANCAIS »

Thx ZDimitor.
I hope you can solve this because your exporter is very cool.
ZDimitor
Posts: 202
Joined: Fri Jul 16, 2004 3:27 am
Location: Russia

Post by ZDimitor »

I found the problem, to fix it you must in the begin of function createMesh(io::IReadFile* file) add this string:

Code: Select all

IAnimatedMesh* CMY3DMeshFileLoader::createMesh(
                io::IReadFile* file
                ) 
{
   // add this string
   MaterialEntry.clear();
   ...
}
LEFRANCAIS
Posts: 28
Joined: Wed Oct 08, 2003 9:09 am
Location: Annecy - FRANCE

Post by LEFRANCAIS »

ok
I will try this.
I think you are a good 3dmax plugin programmer,so i have another question:
there is a problem with the export of the normals.This problem already exist with 3ds export and not with X export.
Only one normal is exported with one triangle and not one normal per vertex.So the model look like flat shading.

To see the difference, you can draw juste one sphere ,export in .MY3d then export in .X.
To solve this,i must recompute each normal for each point.
It's work but it's extremely slow.And i must make this operation each time i launch the program.
So my question: can you recompute the normals with your exporter?

and thx for the fixed bug.
congratulation for your work.
ZDimitor
Posts: 202
Joined: Fri Jul 16, 2004 3:27 am
Location: Russia

Post by ZDimitor »

Yes I can (I can compute them manually or I can use MAX normals),
but if you are using lightmapped scenes, you don'y need normals at all.

Code: Select all

    struct SMyVertex
    {   SMyVertex () {;}
        SMyVertex (SMyVector3 _Coord, SMyColor _Color, SMyVector3 _Normal)
            :Coord(_Coord), Color(_Color), Normal(_Normal) {;}    
        SMyVector3 Coord;
        SMyColor   Color;  // not implemented yet in 3dsmax exporter
        SMyVector3 Normal; // not implemented yet in 3dsmax exporter
    } PACK_STRUCT;
As you can see the struct SMyVertex contain Normal info, just in current version i not use it yet.
LEFRANCAIS
Posts: 28
Joined: Wed Oct 08, 2003 9:09 am
Location: Annecy - FRANCE

Post by LEFRANCAIS »

but if you are using lightmapped scenes, you don'y need normals at all.
You are right.
But if i use a lot of mesh, i MUST apply a texture for all the mesh.
I make a huge terrain with a lot of tree. I use lightmap for terrain texture but not
for the tree texture and not for the leaf of the tree.
So, with MY3d, my terrain is splendid but my tree are flat shading.

That why i tell you if you can export the "real normals" and not the "3ds normals".

thx ZDimitor.
angel80

about your terrain

Post by angel80 »

can u post a screenshot of your terrain with the lightmap from MY3D???
Thx
Post Reply