Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Tools

Archive::Tools Archive area for Tools's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-06-2004, 07:01 AM
sandy
Hill Giant
 
Join Date: Oct 2002
Posts: 212
Default 0x36 fragments for mobs

help =)
I don't understand how to read a 0x36 fragment to render a piece of a mob model

the skeleton tree, the piece index, the piececount, the number of vertices per piece ... all this is ok
but how do i get the polygons and textures for each piece ? that's what i don't understand ? =(
__________________
Sandy
Reply With Quote
  #2  
Old 08-06-2004, 04:19 PM
Windcatcher
Demi-God
 
Join Date: Jan 2002
Posts: 1,175
Default

First you should look at the source to DZoneConverter (you can get it in the same download area as OpenZone). It does a proper job of loading many (though not all) mob models.

Rendering mob models always starts with an 0x14 fragment. You can follow that to a 0x10 fragment which contains the skeletal structure of the model. That will eventually link to 0x12 and 0x36 fragments. The 0x36 fragment contains the raw vertex and poly information but before rendering you have to use the information in the 0x12 fragments to figure out how each skeletal piece is oriented.

You see, the 0x10 fragment contains a list of references to 0x13 fragmens, where each 0x13 fragment corresponds to exactly one piece of the skeleton. Each 0x13 fragment refers to exactly one 0x12 fragment. In the 0x10 fragment, each of the entries in its list points to one or more entries, such that the skeleton is actually a hierarchical tree. It generally starts with the central torso and branches out recursively until it ends at the extremities. DZoneConverter renders them by recursively following the skeleton piece references in the 0x10 fragment.

For each piece you go from the 0x10 list entry to the corresponding 0x13 and then to the 0x12 fragment. Each 0x12 fragment describes how that skeletal piece (e.g. a forearm) is positioned and oriented relative to its parent piece (e.g. a forearm's parent would be the bicep -- the bicep's parent would be the chest). Positional and orientational information is *cumulative* (so if you move or rotate the bicep, all skeletal pieces that descend from it, like the forearm and hand, move and rotate as well). In the end, the information in the 0x12 fragments amount to three-dimensional transformations that have to be applied to the raw vertex data in the 0x36 fragment before rendering the model.

There are a number of ways to do the actual render. One way, for instance, is to copy all the raw vertices and then walk the skeleton, adjusting all vertices in each skeletal piece as you encounter it. Then, once you've gone through the entire skeleton, render the model with the new vertex data instead of the raw data in the 0x36 fragment. That's only one way to do it and is just a simple example. I don't remember how DZoneConverter does it off the top of my head but you should give it a look.

WC
Reply With Quote
  #3  
Old 08-07-2004, 03:18 AM
sandy
Hill Giant
 
Join Date: Oct 2002
Posts: 212
Default

then to render the meshes, for each polygon, we have to look for which piece countains each vertex to apply the corresponding translations and rotations ?
right ?
__________________
Sandy
Reply With Quote
  #4  
Old 08-08-2004, 04:04 AM
Windcatcher
Demi-God
 
Join Date: Jan 2002
Posts: 1,175
Default

That's correct. As you encounter each piece, use the Data6 area of the 0x36 fragment to change only those vertex values for that piece.

WC
Reply With Quote
Reply


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:02 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3