|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
OpenZone:: Q&A Support forum for OpenZone help |
 |
|
 |

05-23-2005, 02:47 PM
|
Demi-God
|
|
Join Date: Jan 2002
Posts: 1,175
|
|
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..
|
 |
|
 |
 |
|
 |

05-26-2005, 11:46 AM
|
Forum Guide
|
|
Join Date: Sep 2003
Location: California
Posts: 1,474
|
|
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
|
 |
|
 |

05-26-2005, 03:16 PM
|
 |
Dragon
|
|
Join Date: Mar 2004
Location: France, Bordeaux.
Posts: 677
|
|
In gaming industry, there are some rules :
- Always use power of 2 textures.
- Always use Tri's.
So far i think that if your objects are quads, OZ should convert them to tri's (but WC would need to confirm).
If you are modeling under 3DSmax and importing into OZ, there are a few things you should know
- Blinn Specular Light should be black
- Blinn Transparency only works at 0% - 50% - 100%
- You can import lights used into 3DSmax (1u=8EQm)
- You can setup Water/lava/PVP by setting a cube named as for example OZ_WATER01
- And lots more im sure WC added into help file 
More generally you do almost all, but place objects 
__________________
|
 |
|
 |

05-26-2005, 03:17 PM
|
Demi-God
|
|
Join Date: Jan 2002
Posts: 1,175
|
|
I'm not sure about everything that .3DS supports, but OpenZone's .3DS import expects everything to be composed of triangles.
You're right about RECTANGLE/RECTANGLETEX being quads. The -TEX variants allow you to specify texture coordinates, while the non-TEX ones force OpenZone to use it's own algorithm to guess at decent texture coordinates. Obviously, if you're importing from an external source, I strongly recommend using the -TEX variants. The non-TEX ones are mainly for OpenZone's use since many of its scripts don't generate texture coordinates and have to rely on its internal algorithm.
All of my 3D software use OpenGL, which requires that textures be a power of 2 on each side. They don't have to be square, but they have to be, for example, 64, 128, 256, 512, etc. on a given edge.
KhaN has taken the route of modeling entire zones and then importing them as a giant .3DS file. It's possible, but has some minor limitations. The main one is that the .3DS format doesn't have a way of setting the "masked" and "solid" flags I mentioned above, so it means setting them after the import. These flags are critical for objects like trees where solid has to be set to FALSE so players don't bump into their leaves (and the masked flag is critical so the masked-out parts of the textures will be transparent). The new features in OpenZone 5.6 under Edit Polygon Properties should make those easier (until then, the only real way was to do a search-and-replace on the .SCN file to set the flags for a given texture).
Importing entire zones also means that OpenZone doesn't know which mesh is the "ground" mesh, so if you place objects in the zone after importing it, OpenZone might have trouble keeping them on the ground (when OpenZone generates its own ground it can make sure that trees, for instance, always adhere to the ground). It's not an issue if you don't plan on adding anything from OpenZone's internal library after you import your zone or, if you do, if you plan on placing objects precisely.
If you only want to import and immediately export to .S3D, then the only issue is the "solid" and "masked" flags (and possibly the transparent/semitransparent flags), which can globally be set for a given texture from the Edit Polygon Properties dialog.
Last edited by Windcatcher; 05-26-2005 at 11:19 PM..
|
 |
|
 |

06-03-2005, 09:11 AM
|
Forum Guide
|
|
Join Date: Sep 2003
Location: California
Posts: 1,474
|
|
ASCII Import Issues
I managed to write an exporter for my world editor and the .scn file looks fine.
What I cannot figure out is how to import it into an Existing zone I set up. What happens when I file/open the import.scn in OZ, the previous zone dissapears and the imported one appears with just the objects and no zone.
Is there a way to import onto an existing prepared zone?
Thanks
GeorgeS
|

06-03-2005, 11:12 AM
|
Demi-God
|
|
Join Date: Jan 2002
Posts: 1,175
|
|
Yup. Click Edit...Insert Scene. It should do the trick...
If you have any problems, let me know...and if you have any nice shiny screenshots, those are fine too (wink).
P.S. Have you tried the File...Convert to transparent bitmap option?
|

06-03-2005, 12:05 PM
|
Forum Guide
|
|
Join Date: Sep 2003
Location: California
Posts: 1,474
|
|
Works!
Excellent WC!
So far so good, my world editor now correctly exports the .scn (except for the slight issue i'm having with Z-heights being offset a bit.)
...but position and heading work!
Once I get the Z-height issue worked out, I will submit the program. Since I am actively working on it, I might as well create a help.pdf as well.
But before that, I will have screenshots of it with several zones! I'm actually pretty amazed I made it this far.
The world editor was being made for an offline eq-like game, but I realised that those games take a lot of time to code.
After I get another hundred objects made for the editor, I will start on monsters. Already made some good textures, and have my sketchpad ready for the monster texturing (I color by hand on real paper and scan the textures in)
GeorgeS
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 06:22 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |