Go Back   EQEmulator Home > EQEmulator Forums > OpenZone > OpenZone:: Q&A

OpenZone:: Q&A Support forum for OpenZone help

Reply
 
Thread Tools Display Modes
  #1  
Old 05-20-2005, 11:12 AM
Windcatcher
Demi-God
 
Join Date: Jan 2002
Posts: 1,175
Default

I don't see how it would be a problem. I might change the syntax just a little bit so I could make use of the existing parser, but I think that something like that would be a snap.
Reply With Quote
  #2  
Old 05-20-2005, 12:22 PM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,474
Default ascii import

That's most excellent news

I have a home brewed DX7 world editor I made last year and it's extremely fast for 3D. It outputs the ascii object list and if it works with OZ, I will modify it to have a better user interface and then upload it for everyone to try.

It'll be interesting to see what sort of zones we can make with more tools that work together!

George
Reply With Quote
  #3  
Old 05-20-2005, 07:59 PM
Windcatcher
Demi-God
 
Join Date: Jan 2002
Posts: 1,175
Default

I'll get working on it this weekend. I just finished reskinning all of the icons on the main window and added menu options to switch either the menu or toolbar icons to 16x16, 24x24, 32x32, or 64x64 (yes, I made them all -- I'm finally getting some use out of that version of CorelDraw I bought six or seven years ago). The look of OpenZone should be a lot more pleasing...
Reply With Quote
  #4  
Old 05-23-2005, 09:53 AM
Windcatcher
Demi-God
 
Join Date: Jan 2002
Posts: 1,175
Default

Okay, here is the syntax of importing .3DS objects via an ASCII file:

Code:
Mesh
  Name    meshname
  Loc     x,y,z
  Heading rx,ry,rz
  Size    sx,sy,sz
  3DSFileName fully-qualified path and file name
End
It's basically just an extension of OpenZone's .SCN file format where it recognizes a new token: 3DSFILENAME. Here is an example that I used to test it (meshimport.scn):
Code:
LongName 3DS Max Import Test
ShortName importtest
ZoneType Outdoor
Mesh
  Name    Mesh1
  Loc     0, 0, 0
  Heading 0, 0, 0
  Size    1, 1, 1
  3DSFileName D:\Borland\Delphi6\Projects\OpenZone\3ds\knot.3ds
End
Mesh
  Name    Mesh2
  Loc     2000, 0, 0
  Heading 0, 0, 0
  Size    1, 1, 1
  3DSFileName D:\Borland\Delphi6\Projects\OpenZone\3ds\knot.3ds
End
Mesh
  Name    Mesh3
  Loc     4000, 0, 0
  Heading 0, 0, 0
  Size    1, 1, 1
  3DSFileName D:\Borland\Delphi6\Projects\OpenZone\3ds\knot.3ds
End
Mesh
  Name    Mesh4
  Loc     6000, 0, 0
  Heading 0, 0, 0
  Size    5, 5, 5
  3DSFileName D:\Borland\Delphi6\Projects\OpenZone\3ds\knot.3ds
End
.SCN files are case IN-sensitive. The NAME, LOC, HEADING, and SIZE tokens have to come first in the MESH object. You would import the objects to an existing zone by clicking Edit...Insert scene... rather than opening the scene as you normally would ("Insert Scene..." opens an .SCN file and adds its contents to your zone).

The HEADING token rotates an object around the X, Y, or Z axes, where X points north-south, Y points east-west, and Z points up-down. It always rotates around Z first, then around X and Y. To yaw an object 5 degrees about the Z axis, for example, you would specify it as HEADING 0,0,5 (all angle units are in degrees, not radians).

The import code is smart in that it caches any meshes you import in this manner, so importing the same object hundreds of times should be fairly efficient. Unless there are any more requests, I'll package it and put out a release this week.
Reply With Quote
  #5  
Old 05-23-2005, 11:23 AM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,474
Default ascii import

That's excellent. I will look forward to that release.

In the meantime, I've made about 40 static zone objects such as trees,cut trees,ruins,buildings,altars, etc.. (sample previews coming)

These will fit themes for desert and swamp based zones for now. I anticipate to make about 500 objects in all.

With the pending OZ release I will attempt to create a zone with these objects to see any difficulty in exporting to 3DS using .PNG or .BMP textures.

So far, transparent textures for trees do not import into OZ well. I cannot figure out the method to create transparent textures i.e black is see-through.
I tried .PNG with alpha channel's and that did not work either, nor did an attempt with OZ's toolbar converter. stumped!

My 3Dworld editor works very well with .X and .3DS, so what I'll do is show some screenshots of it in action. Whether the objects (in my editor)will 'spawn' in the same locations as in OZ is unclear, but that will be something I will feverishly work on.

Regarding the humanoid models and non-humanoid models, I will attempt to make a simple elipsoid human model and add bones as you mentioned. Once we agree on bone placement and assorted issues, I will start the real deal of making monster mesh's.

George
Reply With Quote
  #6  
Old 05-23-2005, 02:47 PM
Windcatcher
Demi-God
 
Join Date: Jan 2002
Posts: 1,175
Default

Importing .3DS objects with masked textures is tricky. The reason is that the client has to have a special bit set when a texture is masked (e.g. tree leaves). The way KhaN has been doing it is to create the zone, save it to .SCN, and then edit the .SCN file in a text editor for those special textures. Tree leaves, for instance, have to have their "masked" property set to true, and they also have to have their "solid" property set to false so the client will let players pass through them (it's another special polygon property that the client looks for).

OpenZone has a dialog under Edit...Change polygon properties... that lets you set the "solid" property, but not the "masked" property. I've added a setting that lets you change the "masked" property, and I've added a toolbar button to make accessing the dialog easier (second to last button, right next to the help button).

OpenZone can convert a 24-bit non-alpha-masked .BMP texture to a 32-bit alpha-masked BMP texture under File...Convert to transparent bitmap... It pops up a dialog that lets you enter input and output texture file names. It works by looking at the pixels in each corner of the texture and choosing the one that's most prevalent as the mask color. This is useful, for instance, if you have magenta as your mask color and you need the mask information to be in the alpha channel instead. If you already have an alpha-masked texture then you don't need to use this feature.

If you want to go the text-edit route to change the .SCN file, you need to know the formats of the TRIANGLE, TRIANGLETEX, RECTANGLE, and RECTANGLETEX tokens:

Code:
TRIANGLE x1, y1, z1, x2, y2, z2, x3, y3, z3, texturename, transparent, semitransparent, solid, color, hascolor, tag, hastag, angle, hasangle, masked, hasmasked, hasnormal, nx1, ny1, nz1, nx2, ny2, nz2, nx3, ny3, nz3

TRIANGLETEX x1, y1, z1, x2, y2, z2, x3, y3, z3, tx1, tz1, tx2, tz2, tx3, tz3, texturename, transparent, semitransparent, solid, color, hascolor, tag, hastag, angle, hasangle, masked, hasmasked, hasnormal, nx1, ny1, nz1, nx2, ny2, nz2, nx3, ny3, nz3

RECTANGLE x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4, texturename, transparent, semitransparent, solid, color, hascolor, tag, hastag, angle, hasangle, masked, hasmasked, hasnormal, nx1, ny1, nz1, nx2, ny2, nz2, nx3, ny3, nz3, nx4, ny4, nz4

RECTANGLETEX x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4, tx1, tz1, tx2, tz2, tx3, tz3, tx4, tz4, texturename, transparent, semitransparent, solid, color, hascolor, tag, hastag, angle, hasangle, masked, hasmasked, hasnormal, nx1, ny1, nz1, nx2, ny2, nz2, nx3, ny3, nz3, nx4, ny4, nz4
Most likely you'll be dealing with TRIANGLETEX tokens. If hascolor/hastag/hasangle/hasmasked is FALSE then it means that OpenZone is to ignore the color/tag/angle/masked setting. If hasnormal is FALSE, then the normal values aren't present.

I'm looking into the possibility of allowing you to set these properties for all polygons with a certain texture. I'll update my post here if I can pull it off.

EDIT: Okay, the edit polygon properties now has a checkbox at the very bottom that, if checked, will cause OpenZone to scan every object in your zone and change all matching polygons instead of just the one you select. This will only work for imported objects (not scripted objects, for example), and will warn you whenever you check it. Also, if you are using it to change a polygon's texture, it's really easy to select the new texture but forget to add it to the texture list and the dialog will warn you if you forget to do so.

The gist of all this is that you could click on a polygon with tree leaves, open the edit polygon properties dialog, check the "change all" box, check the "masked" and "player can pass through" boxes, click Ok, and OpenZone will change the settings for ALL polygons with that texture.

Last edited by Windcatcher; 05-23-2005 at 11:35 PM..
Reply With Quote
  #7  
Old 05-26-2005, 11:46 AM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,474
Default scene format

The scene format looks interesting. What the difference between
TRIANGLE, RECTANGLE (I assume are quads) and the TRIANGLETEX formats?

When I'm creating my 3DS objects, I export non triangulated mesh' and although I got OZ to import a house, it took quite a bit of trial to make the textures appear. Is it imperative for the textures to be n^2? i.e 128x128 and 128x512 are ok?

I already have about 100 objects textured, with many of the custom themed textures already finished. The swamp, desert and mayan themed ones are done. So before I export the whole lot for you, I will need to figure out exactly what 3DS does not allow (and allows). i.e triangulated, object hierarchy etc..

This is quite a learning curve for me, but alas I'm pretty persistent in making this work.

I also just realised that I could model the entire zone in 3DStudio and export that to OZ - any thing I should be aware of there?

Later,
George
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 05:56 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