My3DTools v.3.14 Updated

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
ZDimitor
Posts: 202
Joined: Fri Jul 16, 2004 3:27 am
Location: Russia

My3DTools v.3.14 Updated

Post by ZDimitor »

My3DTools v.3.14 Updated:

1) My3D Loader same as in Irrlicht 0.9
2) Fixed Mesh names exporting from MAX and Gile[s]
3) Fixed vertex normals exporting from Gile[s]

You can obtain it from http://my3dproject.nm.ru
Last edited by ZDimitor on Mon Apr 11, 2005 2:04 am, edited 1 time in total.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

great!

Is it external or ready to use and recompile the Irrlicht dll?

ps. Can you please update the links in your site? everything is still 3.13

edited: no problem, it's just a matter of replacing the links' 3.13 for 3.14 and everything downloads ok.

I'd be more interested in how it works with Irrlicht. Simply download the cpp and h files, place them in the source folder and rebuild the engine?
ZDimitor
Posts: 202
Joined: Fri Jul 16, 2004 3:27 am
Location: Russia

Post by ZDimitor »

Yes it is.
Replace files in Irrlicht source directory and recompile engine.

The links already updated.
TeTo

Post by TeTo »

ohhh, great work!!!

have you done a tutorials working with lightmap and materials???

will you done updated for include per-pixel or parallax mapping ( type material TANGHET) ??
TeTo

Post by TeTo »

Hello ZDimitor !!!

I have a idea for your export plugin and your loader.
before, sorry my english, i hope you can understand me

In an engine of videogame we can design a map , a players , lights , etc with a program 3D like 3d studio , now all is ok , right? but we need put "entities" too. A "Entity" is a object what when the player action it , that object eject some action. Example : A "entity" can be a door what when the player press button X (psx hehe) the door rotate about itself.

A "entity" can be too a ladder what the player can climb or a rope, for example.

the normal , when you design a videogame, you design all actions for player and all entities of the map. then the programmers do in c++ a engine what manager all question and the programmer do a editor map too. this editor is special because they can put the "entities" for your game too. example : the editor map multiplayer for splinter cell : Theory caos . You can design a map and put ropes, ladders , etc.

I am a suggestion for you ( it is only a suggestion). You can put in your plugin exporter a "generic bounding box" or a "generic point" what has associated a name.

And In your class loader you can put a virtual function what we can overwrite, for loader our class (for "entities") about the name associated of the "generic point" or "generic bounding box"

Example : In my game i need put a entity DOOR . Door is a entity what when the player press button near it , the door rotate.

I , write my door entity in a class c++ for my game.
then i used 3dmax for design my map and i put a point with a name "DOOR", then your exported plugin , exported it a special for.

In my code with irrlicht, i do a class derived your class loader , and overwrite the virtual function by other what when recived a "generic point with name DOOR" create my objtec DOOR. the other things of map must loader with your class loader.

then we could use the 3dmax for create our level edit indepent of the type of game.

well , i hope you can read this lies and tell me what you think about this question

Thanks!!!! :D
ZDimitor
Posts: 202
Joined: Fri Jul 16, 2004 3:27 am
Location: Russia

Post by ZDimitor »

2TeTo:

Read this
http://irrlicht.sourceforge.net/phpBB2/ ... c&start=60

There is a small discussion of the topic you speaking about. But you idea more painless to implement, i can add new method to My3DLoader, like:

Code: Select all

setEntityLoadCallback(
    void (*handler_function)(core::stringc entity_name, core::vector3df entity_position)
    )
Setting this callback funtion is solve you problem, when loader find meshes with special names, IrrEntity* it calls callback function from your code passing entity name and position into it, where you can do what you wants.

One problem - how you can get access to this new method, without using My3D as external loader?
TeTo

Post by TeTo »

hi ZDimitor!!!

thanks for your post reply!!!

sorry , but i dont understand one question, (hehe my english is very bad)
then,this callback funtion is not implemented right??

1)
I think what use the loader CMY3DMeshFileLoader can be a "base class" with a virtual funtion

"virtual bool createmyownobject(core::stringc entity_name, core::vector3df entity_position)"

2)

you can do a "virtual class entity" in your loader

#include "IMesh.h"

class Ientity: public Imesh
{

public:

Ientity()
AABB VolumenAction; // bounding box but for to action the entity

virtual OnEvent()=0; !!!!!!!!!!!!!!!!!!!!!!!!!!!!
};

3)
and in your loader CMY3DMeshFileLoader you can put a public array of IEntitys
core::array<IEntity> Entities;

4)
we can do a classes derivated of your IEntity :
Example:

class DOOR: public Ientity
{
private:
position, rotation,state;

public:
VIRTUAL OnEvent() !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
{
rotate(90 grades);
}

};


5)
then when i wrote a program with irrlicht i create a object derivated of your CMY3DMeshFileLoader Example

*-----------------------------------------------
#include CMY3DMeshFileLoader

class MYMAP: public CMY3DMeshFileLoader
{
mymap();
mymap();

createmyownobject(core::stringc entity_name, core::vector3df entity_position) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
{

if(name == "SPECIAL_DOOR")
createdoor(entity_position); !!!!!!!!!!!!!!!!!!!!!

if(name == "SPECIAL_LADDER")
createBox(entity_position); !!!!!!!!!!!!!!!!!!!!!

}
;

*---------------------------------------------

6)
void createdoor(entity_position)
{

Entities.add (new DOOR(entity_position);
}

7)

and, for you can manipulation the entities you can put a funtion:

IEntity * IsCollisionwithVolumenOfAction(vector3df position_player, float sizeplayer)
{
for(i=0;i< Entities.size()i++)
{
if(Entities.VolumenAtcion.Collision (postion_player, sizeplayer))
{
Entities.OnEvent(position_player);
}
}
return NULL;
}


SUMMARING: well , it is only a idea but i think it can be of utility

thank for hear me ZDimitor!!!
TeTo

Post by TeTo »

well, i think it is not necessary what we derived of your class loader CMY3DMeshFileLoader

if you add the funtion:

IEntity * setEntityLoadCallback( void (*handler_function)(core::stringc entity_name, core::vector3df entity_position) )

like you said it, we can do our funtion "createmyownobject" and set it,
because our callback funtion create a IEntity object:

IEntity * createmyownobject(core::stringc entity_name, core::vector3df entity_position) )

then in the loader funtion of CMY3DMeshFileLoader
1)
you can a special name like "SPECIAL_DOOR" then , the CMY3DMeshFileLoader call the funtion createmyownobject . This funtion create a derivated Object of IEntity , then your loader funtion add that IEntity to the array of Entities

2) if the mesh hasnt a special funtion it is loaded normally
ZDimitor
Posts: 202
Joined: Fri Jul 16, 2004 3:27 am
Location: Russia

Post by ZDimitor »

You dont understand me, I told About that:

File MY3DMeshFileLoader.cpp

I implementing new method

Code: Select all

void setEntityLoadCallback( 
    void (*handler_function)(core::stringc entity_name, core::vector3df entity_position) 
{
    EntityLoadCallback = handler_function;
}    
After that in My3DLoader code i parsing loading nodes names:

Code: Select all

core::stringc MeshName=meshHeader.Name; 
if (MeshName=="ENTITY_SPECIAL_NAME_DOOR" ||
    MeshName=="ENTITY_SPECIAL_NAME_TRIGGER" ||
    MeshName=="ENTITY_SPECIAL_NAME_SOMETHING_ELSE"
    ) 
{ 
    //here you a calculating position of dummie node
    core::vector3df pos = ...;

    //here we call our callback function} 
    if (EntityLoadCallback!=NULL)
        EntityLoadCallback(MeshName, pos )
}
Thats all! Nothing else need to do in loaders code, everything other operations you can complete in you handler function, for example like this:


file main.cpp

Code: Select all

// you emplementing this function
void EntityLoadFunction(core::stringc entity_name, core::vector3df entity_position)
{
    if (entity_name=="ENTITY_SPECIAL_NAME_DOOR")
    {
       // do what you wants
    }else
    if (entity_name=="ENTITY_SPECIAL_NAME_TRIGGER")
    {
       // do what you wants
    }else
    if (entity_name=="ENTITY_SPECIAL_NAME_SOMETHING_ELSE")
    {
       // do what you wants
    }
}

void main()
{
    ...
    
    // getting acces to the loader (you should think how to do this)
    CMY3DMeshFileLoader *my3dloader = ...

    // now setting entity loader function
    my3dloader->setEntityLoadCallback(EntityLoadFunction);

    // load you my3d scene
    IAnimatedMesh *amesh = scmgr->getMesh("My3DFile.my3d");

    ...
}
Thats all.

I think you method is to bit complex, MY3DMeshFileLoader class is just mesh loader, and i dont want to turn it into base class to game aplication.
TeTo

Post by TeTo »

thanks for your reply ZDimitor!!! i didnt understand you before, sorry
Only a question more... i am not very good with 3dmax , are you going to any minitutorials of how can we use 3dmax for do lightmap or "special entities" or others questions?? i have seen some pics of your work and they are very goods!!

:D :D thanks
TeTo

Post by TeTo »

sorry, only question more :oops: :oops: :D

are you going to add the materials for per pixel and parallex mapping in a near future??

:lol: :lol:
ZDimitor
Posts: 202
Joined: Fri Jul 16, 2004 3:27 am
Location: Russia

Post by ZDimitor »

Actually i don't know (about new materials), just because of my current video adapter (GF4MX) didn't allow use any shaders features, you talking about. Later of cause i'll did it.

About tutorials, i know that i must did them but it needs time.... :( and i have not it. If you have some questions ask here :)
Post Reply