About Store Forum Documentation Contact



Post Reply 
Esenthel Object File Format
Author Message
Brainache Offline
Member

Post: #1
Esenthel Object File Format
Hey there,

Could you possable post the file format for Esenthel's .obj object files? I want to create an item editor for my game that uses customized drop downs for stats, effects, etc.. that can save to Esenthel objects using the custom parameters...


Thanks!
12-29-2008 01:21 AM
Find all posts by this user Quote this message in a reply
lucifer1101 Offline
Member

Post: #2
Re: Esenthel Object File Format
thats a good idea, would you possibly release it when completed...

Im an official Esenthel Nooblet
12-29-2008 03:35 AM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #3
Re: Esenthel Object File Format
Hi,
There's no need for that.
It would be much simpler if you'd operate on Game::ObjParams class object (this is the class which is written into .obj file) then you can use ObjParams::save/load methods to save/load .obj file

for example

ObjParams op; // create object parameters variable

// setting type
op.flag|=OBJ_OVR_TYPE; // enable overriding type (marking this will use the type of this object params instead of the 'base' type)
Set(op.type,"OBJ_ITEM"); // set

// setting object base
op.base=Objs("obj/item/base.obj");
op.updateBase();

// setting mesh
op.flag|=OBJ_OVR_MESH;
op.mesh=Meshs("obj/item/axe/0.mesh");

// creating custom parameters
Param &param=op.param.New();
param.x=...;

// parameters sorting is required after setting all parameters
op.sortParams();

// save
op.save("test.obj");


NOTE:
in current SDK release Param class doesn't have a clearing constructor, so if you wan't to use manual parameter creation please use op.param.NewZ(); (I'll add the clearing constructor into the next SDK so then op.param.New(); should be enough)
12-29-2008 06:19 PM
Find all posts by this user Quote this message in a reply
Brainache Offline
Member

Post: #4
Re: Esenthel Object File Format
Hey there - this doesnt quite get me where I want to be:

What I am after, is the ability to create objects while not in the Esenthel engine. For example: On an laptop that doesnt have a shader 2.0 card... to be able to create content via an item editor that saves .obj files that can then be placed into the Data directory...
12-29-2008 07:24 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #5
Re: Esenthel Object File Format
I've got 2 ideas about the case:

1) you can perform all of your codes in InitPre (saving object) this method runs always even if the video card isn't SM2.0 compatible

2) I could write loading ObjParams file from a text file, so you could edit the objects in a text file, and later load them via later created 'Bool ObjParams::loadTxt(Char *name)' method

let me know if idea #1 is enough for you, if not I'll work on idea #2
12-29-2008 07:32 PM
Find all posts by this user Quote this message in a reply
Brainache Offline
Member

Post: #6
Re: Esenthel Object File Format
Hmm.. I like the first option, but I could have sworn I've treid that ( I was going to do this very thing ) and got the shader 2.0 error anyway...

Is it possable to create a console or win32 gdi application that uses the esenthel library but does not initialize the graphics engine?
12-29-2008 07:54 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #7
Re: Esenthel Object File Format
InitPre is called before any DirectX usage and detection
once you return from the InitPre engine loading proceeds to DirectX so you'll get the message ("no shader")
but you can call Exit before InitPre returns, this way the application will simply exit
InitPre()
{
// do your codes here

Exit(); // exit before returning
}

you can even create a OS Window, create a standard Message Loop if you wan't to
12-29-2008 08:46 PM
Find all posts by this user Quote this message in a reply
Brainache Offline
Member

Post: #8
Re: Esenthel Object File Format
Great... I've gotten a console working without initilizing the graphics engine... that'll get me started....

Thanks again!
12-29-2008 10:27 PM
Find all posts by this user Quote this message in a reply
Brainache Offline
Member

Post: #9
Re: Esenthel Object File Format
I am not having any success getting a win32 windows app to start w/o initializing the graphics engine.

When including the <windows.h> header, it is reporting error messages in the Microsoft SDK (winnt.h file)

I can compile the same simple hello world type of window w/o the esenthel project with no difficulties... any suggestions?

Thanks!
12-30-2008 09:29 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #10
Re: Esenthel Object File Format
have you looked at the documentation, section
"Programming\Headers" ?
12-31-2008 11:56 AM
Find all posts by this user Quote this message in a reply
Brainache Offline
Member

Post: #11
Re: Esenthel Object File Format
Aha... I had not... Thanks!
12-31-2008 02:02 PM
Find all posts by this user Quote this message in a reply
Brainache Offline
Member

Post: #12
Re: Esenthel Object File Format
Allrighty - I've got the library running in a win32 api application exactly like needed to make the item editor, etc...

Next question... is it possable to run an Esenthel 3d window within the winapi application?... for example, if I wanted to mimic some of world editor's features by showing the terrain and allowing the user to place an item in the world...

Thanks!
12-31-2008 08:03 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #13
Re: Esenthel Object File Format
You mean for cards without SM2.0 support?
12-31-2008 08:09 PM
Find all posts by this user Quote this message in a reply
Brainache Offline
Member

Post: #14
Re: Esenthel Object File Format
Nope.. this would be valid 2.0 cards...

ie: if this app is run on a good card - it would have this feature, otherwise it would not...
12-31-2008 08:29 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #15
Re: Esenthel Object File Format
So make a typical WinApi window (with all OS default Gui objects) and inside it a 3d viewport showing Esenthel based codes?
If it's what you mean then I think it would be too complicated.


It would be much easier if you:

1. create all guis inside your application using Esenthel Engine functionality, mixing it with 3d viewports is simple

or

2. create your WinApi based program, which doesn't use 3D graphics.
But when 3D is needed your tool would spawn an additional .exe (which is a typical Esenthel application), and this would run in a separate window.
12-31-2008 09:06 PM
Find all posts by this user Quote this message in a reply
Post Reply