EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   General::General Discussion (https://www.eqemulator.org/forums/forumdisplay.php?f=586)
-   -   many many thanks (https://www.eqemulator.org/forums/showthread.php?t=31326)

zeiksz 05-18-2010 05:50 AM

many many thanks
 
hi!

i dont know whom and where exactly to address with my thanks, so i write it in general - maybe it gets forwarded.

so after many error 404 and other broken link stuff i was able to gather enough information to create an s3d viewer program (for maps at moment, my next move is to make actors work) what can show full zone on screen and such. in this work this forum was the biggest help - many peeps were writing about s3d and wld format, what helped a lot and i want to thank to these peeps.

thank yas
Péter

ps: i am programmer, my goal with cracking out these stuff is to make my own eq1, with a better engine then quake 2, and to probably to share. some retro is always fun.

if it counts as advertisement please kick this post: the work in progress stages with my work is at http://www.youtube.com/watch?v=NdCrMT1dNcI

and once again: thanks for those who worked hard to crack these formats and made me available to make a viewer this far in a week or two - i got life and work and such, i would not have a chance at all to do cracking

thanks thanks thanks /salute
:)

Derision 05-18-2010 01:07 PM

Nice work.

Quote:

Originally Posted by zeiksz (Post 188052)
my next move is to make actors work

I assume you already have a copy of Windcatcher's great .WLD reference:

http://ignum.dl.sourceforge.net/proj...1.1/wlddoc.pdf

I spent several weeks, a couple of years ago, looking at NPC models in .S3D files and wrote a python program to animate them.

http://www.rama.demon.co.uk/s3danim/s3d.py

And a required include file:

http://www.rama.demon.co.uk/s3danim/eqglib.py

The python script has many dependencies, OpenGL, pygame, and other assorted modules, plus my python code is horrible, as all I was really doing was trying to figure things out rather than write nice code.

That being said, assuming you have Python and all the dependent modules installed, that script will animate Nagafen.

http://www.rama.demon.co.uk/s3danim/naggy.jpg

You will need to edit the file to point to where your arena_chr.s3d file is located. Search for this line and edit as appropriate:
Code:

S3DFile = "M:\\Titanium\\arena_chr.s3d"
Once you execute it and the static model of Nagafen appears, just press the V or B keys to cycle through each of his animations (attacking, dying, walking etc).

As I said, the code is horrible, but at least it might help a little in your project. If you have any questions about the code, I probably won't be able to help much as I haven't looked at it in 2 years, and while I understood how it all worked at the time, I can't remember anything about it now :)

zeiksz 05-18-2010 01:36 PM

thank you very much for this info. i had no doc about wld file format except some source codes in c++, delphi and visual basic - so i started my stuff in c# (lol why not make it harder) wpf, and tried to merge the knowledge others gathered. is hard - wpf is new to me as well as 3d programming.

now at least i can learn why and what is all this wld all about, i learned a few while debugging in c# and such to make things work and get where now i am lucky to be, but i think the real knowledge is in the doc.

the program you made is great and never feel bad about how things look if they work. if someone like me wants to keep working with it then he will make it look better or badder anyways :) i will check it out - i need lotsa info about how the mobs animate and maybe i get info about player skeleton - i did read somewhere that thing is very complicated

thanks again for the great info, and have a nice day! :)
Péter

zeiksz 11-24-2010 03:20 AM

:)
 
I have good progress in zone viewer. Actually I am making a viewer, that converts stuff to C# + XNA to make a nice EQClient for my taste... long story...

Still I have a problem, and if the experienced brains here could help, that would be k3wl: my problem is that lot of placeable objects do not appear, and I do not know from where to get the coordinates and references for them. I readed the info in WLD 1.1 file reference (what is cool), and had some chance to peek into source codes without I could not do almost anything, but I surely am missing something.

Are these objects perhaps in different place like (example video) tutorial.wld+objecets.wld vs tutorial_obj.wld? *sigh* I bet it is so damn simple that I will slap my own face when I realize what I missed, but it seems I can not see the tree from the forest.

So do ya have an idea?

Sample video from my viewer versus eqzone.exe is here:
http://www.youtube.com/watch?v=jyeK6xv6jlU

Thanks in advance!
Péter

Derision 11-24-2010 02:55 PM

The code in azone2 might help you out.

The placeable object locations are defined in Type 0x15 fragments in the .wld. The relevant code that processes them is in utils\azone2\wld.cpp ...
Code:


FRAG_CONSTRUCTOR(Data15) {
  struct_Data15 *hdr = (struct_Data15 *) buf;
  Placeable *plac = new Placeable;
  Placeable **pl;

  plac->x = hdr->trans[0];
  plac->y = hdr->trans[1];
  plac->z = hdr->trans[2];

  plac->rx = hdr->rot[2] / 512.f * 360.f;
  plac->ry = hdr->rot[1] / 512.f * 360.f;
  plac->rz = hdr->rot[0] / 512.f * 360.f;

  plac->scale[0] = hdr->scale[2];
  plac->scale[1] = hdr->scale[1];
  plac->scale[2] = hdr->scale[1];

  plac->model = (int) &wld->sHash[-(int)hdr->ref]; // Object name, e.g. LADDER20_ACTORDEF

  pl = new Placeable *[wld->model_data.plac_count + 1];
  memcpy(pl, wld->model_data.placeable, sizeof(Placeable *) * wld->model_data.plac_count);
  if(wld->model_data.plac_count)
    delete[] wld->model_data.placeable;
  pl[wld->model_data.plac_count] = plac;
  wld->model_data.placeable = pl;
  ++wld->model_data.plac_count;
}

As you can see, the type 0x15 fragment contains the location, rotation, scale and also the name of the object model.

The actual mesh for the object is defined in a type 0x36 fragment, so if you look in wld.cpp, under the code for FRAG_CONSTRUCTOR(Data36), you will see that the mesh is also
assigned a name:
Code:

model->name = (char *) &wld->sHash[-frag_name];
So to draw the placeable objects, you need to iterate through the list of 0x15 fragments, use the model name in the 0x15 fragment to find the mesh/polygons for that object
in the list of 0x36 fragments, and then apply the translation/rotation/scale values in the 0x15 fragment to each polygon.

void QTBuilder::AddPlaceable(... in utils\azone2\azone.cpp has the code to apply the transformations in the correct order.

The ladder and gate models that you highlight in your video are these two (output from azone2):
Code:

Processing azone.ini for placeable models.
azone.ini entry found for this zone. Including 2 models.
Including Placeable Object  17 using model  15 (MISTGATE_DMSPRITEDEF).
Including Placeable Object  18 using model  15 (MISTGATE_DMSPRITEDEF).
Including Placeable Object  77 using model  13 (LADDER20_DMSPRITEDEF).
Including Placeable Object  78 using model  13 (LADDER20_DMSPRITEDEF).


zeiksz 11-24-2010 04:47 PM

duh!
 
Man, now I feel dumb.

Not because my code for using Data15, etc. items was wrong - I used the same method like you mentioned.. but I simply forgot an old code, when I cached down S3D content onto disk - so... the problem is that I used all the same OBJECTS.WLD file for every zone. This is why only 26 models existed and only 1 was found in tutorial - the campfire.. that is the only model, that exists in that OBJECTS.WLD: airplane's.

So.. I hope I get good result when I get the .WLD from the correct file and not from filecache.

Edit: yep, that was the problem, and wasted days on such triviality :) Thanks for help - now I am off to find out about transparency.

zeiksz 07-21-2011 07:48 AM

Eyes
 
Derision! Did you have problems with eyes? Actually I got good progress in this hobby eq-client of mine, and doing NPC models ATM.

I just saw by gnoll that he had no eyes on head :) Are those bad texture coordinates or one of the "bones" is before the eye or positioned badly. Also thought that it is about one of the textures should be transparent before the eye or so (so you see blinking?)

The attached picture is the "no animation" phase of the model. Got no animations working - yet. My hope the problem will solve itself by implementing animations, but just wanna be sure, that I am on good progress, or I should fix something with these eyes ASAP before proceeding further.

Any experience?

http://img841.imageshack.us/img841/8441/gnoll.png

Derision 07-21-2011 02:33 PM

I just plugged southkarana_chr.s3d in the Python code I posted earlier in the thread and told it to render the GNN model (Gnoll) and it has eyes:

http://www.rama.demon.co.uk/gnn.jpg

As I said before, it's been a long time, so I can't remember enough to offer you any advice on where you might be going wrong :)

zeiksz 07-22-2011 07:07 PM

Hmmm.. compared to your rendered model mine has changes.. the chest piece is brown-black and not solid black "leather like" like yours. And the leather belt looks different too, so perhaps it is texture coordinates then.. will have to check. Thank ya again for help :)

zeiksz 07-23-2011 04:16 AM

Can not edit my post, so just a note and a thank you: it was texture coordinate, somewhy second is to be negative - perhaps difference between opengl and directx; no idea, but now works and no such huge difference.. I mean.. I could not unleash eyeless gnolls on this world :)
Have a nice day ;)

zeiksz 04-17-2012 01:51 AM

Spell effects?
 
Hi again :)

So, I am progressing pretty well in my project, even by doing it in free time and having long pauses, but got another problem that includes old spell effects.

Do you guys have any information where I can get coordinates of spell-particles flying around and about their animation?

BTW if you like, please check out my videos about the progress at http://www.youtube.com/zeiksz . "Only" gravity, spell effects and network code is left (and maybe the rest I don't even dare to imagine).

Thanks in advance!
Péter

Tyen05 09-12-2012 07:27 PM

Bumping for great justice.

WRU spell effects

PixelEngineer 09-12-2012 10:55 PM

Never saw this post before this. Glad to see you are still working on the project. I see you are using XNA. I am writing my own EQ engine as well and utilizing OpenGL for cross platform support. Do you have your source available? In my limited time, I have gotten models loading and am working on animations.

Keep at it!

Cheers

zeiksz 01-17-2013 05:49 AM

Pahh
 
That's it for me. They say, that having a baby changes everything, and I think it goes for me too. Now I no longer have that much of time :), so I decided to give up the "make a game like EQ1 was" project of mine.

I decided however to give away exported stuff and exporter as well, so others can pick up this glove.

I hope someone can make a game addicting as much as pre-luclin EQ1 was.

Will close this soon with the download link of exporter (models, animation, textures, etc.)

c0ncrete 01-17-2013 11:57 AM

congratulations!


All times are GMT -4. The time now is 03:51 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.