Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics.
Do not post support topics here.

Reply
 
Thread Tools Display Modes
  #1  
Old 11-24-2010, 03:20 AM
zeiksz
Fire Beetle
 
Join Date: Sep 2007
Posts: 9
Default :)

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
Reply With Quote
  #2  
Old 11-24-2010, 02:55 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

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).
Reply With Quote
  #3  
Old 11-24-2010, 04:47 PM
zeiksz
Fire Beetle
 
Join Date: Sep 2007
Posts: 9
Default 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.
Reply With Quote
  #4  
Old 07-21-2011, 07:48 AM
zeiksz
Fire Beetle
 
Join Date: Sep 2007
Posts: 9
Default 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?

Reply With Quote
  #5  
Old 07-21-2011, 02:33 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

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:



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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

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


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3