About Store Forum Documentation Contact



Post Reply 
IOPath
Author Message
Corrado Offline
Member

Post: #1
IOPath
Hello,

1) Any news about high-speed draw on low-poly objects ?

2) About the Mesh Editor : its possible to have more than one iopath to find gfx/mtrl ?
It will be better to have this also into the code (i know i can change with IOPath(), but will be better to have multiple IOPath)

Corrado
03-16-2009 10:54 AM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #2
Re: IOPath
Hi,

1) It is on my list.

2) No, it is not possible. But you may add data pak's to your code, which will work as additional "iopath"
03-16-2009 01:54 PM
Find all posts by this user Quote this message in a reply
Corrado Offline
Member

Post: #3
Re: IOPath
Hello,

1) LowPoly high speed : tks i wait.

2) About changing path :
In my code -> no problem.

The main problem is that cause i have to store the files.mesh and files.gfx/.mtrl in different directories and i wish to maintain the possibility
to work with your MeshEditor.

Into the Mesh Editor : if its not possible to give multiple IOpath, i think i can solve with a C++ program that do this :
read the file.mesh, copy the relatives files.gfx and files.mtrl in other directories and resave the file.mesh with the new paths for
the .mtrl (so i think the MeshEditor can read the .mesh with the correct .mtrl).
But i dont know how read from the file.mesh the linked name of the .mtrl and .gfx and how resave the file.mesh with the changed path for the .mtrl.

Or maybe you have a better solution...

Tks
Corrado
03-16-2009 04:57 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #4
Re: IOPath
If you have a set of files (OBJ, MTRL, GFX, MESH) in one folder like
data/obj/item/0.obj
data/obj/item/0.gfx
data/obj/item/0.mtrl
data/obj/item/0.mesh

then they store inside them references to "0.mesh" "0.mtrl" "0.gfx" (instead of "data/obj/item/0.obj", ..)

so if you have all files in one directory, you can safely move them all together later to another directory.

Quote:The main problem is that cause i have to store the files.mesh and files.gfx/.mtrl in different directories and i wish to maintain the possibility
to work with your MeshEditor.
Why is that?

You should keep files already in the locations as which they will be in the final game release.

Suggested directory hierarchy is like in the SDK sample data
the main folder for objects is "obj", followed by general object type/class
like
data\obj\chr
data\obj\item
03-17-2009 02:53 PM
Find all posts by this user Quote this message in a reply
Corrado Offline
Member

Post: #5
Re: IOPath
tks for your suggestion, but my game contains a lot of meshs, materials, gfxs, ...
so i have multiple dir for these data and i cant store with the name 0.gfx/0.mtrl...

Corrado
03-17-2009 03:24 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #6
Re: IOPath
you can either store them this way:
data\obj\item\sword\king's sword\0.obj
data\obj\item\sword\king's sword\0.mesh
data\obj\item\sword\king's sword\0.gfx

or this way:
data\obj\item\sword\king's sword.obj
data\obj\item\sword\king's sword.mesh
data\obj\item\sword\king's sword.gfx

for the engine it doesn't really matter
03-17-2009 04:05 PM
Find all posts by this user Quote this message in a reply
Corrado Offline
Member

Post: #7
Re: IOPath
in my game i have :

1) .gfx/.mtrl : One DIR with some tematics SUBDIR.
2) .mesh : over 20 DIR, each with some tematics SUBDIR.
A totally of thousands of .gfx/.mtrl and .mesh
This structure is OK for my game because i have a lot of data and my graphics people prefer to organize in this way (all the .gfx/.mtrl togheter and
into others DIR the .mesh)

No problem about the program code, i can set IOPath for each .mesh

But : if i want to use your MeshEditor : how tell to him that i have the .meshs in various DIR and the .gfxs/.mtrls in others DIR ?
03-17-2009 04:41 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #8
Re: IOPath
I don't quite understand,

in code you need to set the IOPath to your general data path, where inside you have your all game data files IOPath("Data").

in the Mesh Editor and World Editor at the program start you need to set the same path which is used in the codes IOPath, for example "d:\my game\data"

and that's it.

once a mesh/mtrl/gfx file in the data folder will be referenced by some other file (like a mtrl references gfx), you may not change the file name or path, because the material references the gfx by its path.
03-17-2009 04:58 PM
Find all posts by this user Quote this message in a reply
Corrado Offline
Member

Post: #9
Re: IOPath
im sorry for my poor english but i dont understood your msg.

Into my code : all its OK : before to load .mesh i set the correct IOPath()

Into Mesh Editor : if i load .mesh NOT load the .mtrl/.gfx because the .mesh and the .gfx/.mtrl they are into differents DIR

Cause :
The Mesh Editor will load only :
a)The .mtrl into the same DIR of the .mesh
B)The .mtrl into the IOPath()
Into Mesh Editor i wish to have many IOPath() togheter because my .mtrl are into differents DIR (not all in the same dir)
03-17-2009 05:18 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #10
Re: IOPath
1. Please select your game data folder, for example "d:\my game\data"
2. launch Mesh Editor, and select the path "d:\my game\data"
3. edit your materials to point to gfx's which are located in "d:\my game\data" or its any sub-folder
4. edit your meshes to point to materials which are located in "d:\my game\data" or its any sub-folder
5. when running the game set its IOPath to "d:\my game\data" (in the final release it'll be converted to PAK, and PakAdd will be used instead of IOPath)

This is the only way.
03-17-2009 06:09 PM
Find all posts by this user Quote this message in a reply
Corrado Offline
Member

Post: #11
Re: IOPath
4. edit your meshes to point to materials which are located in "d:\my game\data" or its any sub-folder

how do this ?
"edit your meshes to point to materials"

The Mesh Editor point to the materials located in the same dir of the .mesh + in the IOPath() dir
(I have the materials in two different dir)
03-18-2009 12:34 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #12
Re: IOPath
it doesn't matter in what folder precisely are your files, as long it's inside your game data.

you can have materials in
"d:\my game\data\mtrl"
"d:\my game\data\mtrl_2"
"d:\my game\data\obj\mtrl"
"d:\my game\data\obj\custom_object"

it doesn't matter

Quote:(I have the materials in two different dir)
please paste their full path names.

What exactly is the problem?
03-18-2009 01:03 PM
Find all posts by this user Quote this message in a reply
Corrado Offline
Member

Post: #13
Re: IOPath
Hello,

1) IOPath : i solved the problem : i will put all the game textures in the same dir, but can i know where are stored the materials names in the mesh class ?

2) About the low-poly high speed draw : have you any news ?

Tks
Corrado
03-19-2009 01:15 AM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #14
Re: IOPath
1. when having a
Material *material;
you can check it's file name by command:
Materials(material);

2. I'll post news when they'll be ready, I still have some things to do before that.
03-19-2009 10:11 AM
Find all posts by this user Quote this message in a reply
Corrado Offline
Member

Post: #15
Re: IOPath
Tks i wait
03-19-2009 10:50 AM
Find all posts by this user Quote this message in a reply
Post Reply