[ Midtown Madness 2 Central ] [ Midtown Madness 2 Central ]

Midtown Madness 2 Central > Post Your Project > ZM PKG filter modifications
Goto page 1, 2, 3  Next
View previous topic | View next topic
Author
Message Post new topicReply to topic
Maxoff
MM2C Addict

Joined: 11 Nov 2004
Posts: 560
Location: Poland

Status: Offline


Post subject: ZM PKG filter modifications Reply with quote

Introduction:
Classic Madness changes many things in standard cities. Some time ago we tried to change also parked cars but without success.

Facts:
Today I tried again, but whenever I changed giz_pcar01_l_.pkg (or giz_pcar02_l_.pkg,giz_pcar03_l_.pkg) the game crashed. That was annoying Sad I was curious what is so special in that files. There are normal PKG files contain H,M,VL, BREAK01_L and BREAK01_H. Nothing sepcial. ZModeler creates proper PKG file with all that parts too.

Reason:
But there is small different between original and new PKG files - parts order. It took me few hour to discover that order is important. MM2 need parts in standard order:
    H
    M
    L
    VL
    BREAK01_L
    BREAK02_H

ZModeler saves it as:
    BREAK01_L
    H
    M
    L
    VL
    BREAK02_H

and it causes problem. You can select export type as car, dashboard or trailer, the result is still the same (check source code of filter for details).

Conclusion:
PKG filter wasn't developed to create buildigs and items for cities. It doesn't support object names like H,M,L,VL (without BODY_, TRAILER_, etc). This probably also causes problems with breakable objects in city, but I haven't tested it yet.

Solution:
How to fix it ?? I've changed PKG filter, I've added another type of exporting dedicated for buildings and other items for cities:



You can download new filter here. It also supports vehicle reflections and references to external objects (I'll explain later how to use it)
_________________
... You only have to know how to prepare query, google will do the rest ...
... My software ...
... Guide to Punctuation ...


Last edited by Maxoff on 30 Dec 2005 10:14 am; edited 1 time in total
Post 28 Dec 2005 08:53 pm
View user's profile Send private message Visit poster's website
Richard P
Half-Snapped Towing

Joined: 22 Aug 2005
Posts: 922
Location: Sudbury, Ontario

Status: Offline


Post subject: Reply with quote

you are a modern day genius and programming wizard, what would we do without you?
_________________
Post 28 Dec 2005 09:38 pm
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
fre_ber
triangle fan
Moderator

Joined: 15 Jul 2002
Posts: 2399
Location: ZZ9 Plural Z Alpha

Status: Offline


Post subject: Reply with quote

Very nice, perhaps you can fix the other errors in that export filter as well.

Enjoy a kiwi if you feel like it.
_________________

"He who re-invents the wheel, understands much better how a wheel works."

<[4D]JoeShmo> what we have here, is a failure.. to communicate
Post 28 Dec 2005 11:31 pm
View user's profile Send private message Visit poster's website
Maxoff
MM2C Addict

Joined: 11 Nov 2004
Posts: 560
Location: Poland

Status: Offline


Post subject: Reply with quote

fre_ber wrote:
perhaps you can fix the other errors in that export filter as well.

For example?
_________________
... You only have to know how to prepare query, google will do the rest ...
... My software ...
... Guide to Punctuation ...
Post 29 Dec 2005 10:25 am
View user's profile Send private message Visit poster's website
fre_ber
triangle fan
Moderator

Joined: 15 Jul 2002
Posts: 2399
Location: ZZ9 Plural Z Alpha

Status: Offline


Post subject: Reply with quote

Oh, I don't remember exactly, but I think that several issues has been pointed out. One thing, I think that the management of paint jobs is way off. I was just thinking that, with the current facts about the file format, the ZModeler plugin could be greatly improved.
_________________

"He who re-invents the wheel, understands much better how a wheel works."

<[4D]JoeShmo> what we have here, is a failure.. to communicate
Post 29 Dec 2005 04:03 pm
View user's profile Send private message Visit poster's website
Stereo
Senior Dismember
Moderator

Joined: 22 Jul 2002
Posts: 4023
Location: London, Ontario

Status: Offline


Post subject: Reply with quote

When you use it to export traffic, the last paintjob is not used.
Traffic also require a set list of objects, luckily ZModeler seems to know the right order, but it could be improved by not exporting objects that aren't on that list Razz
Currently the wheel LODs need to be placed at the origin to appear correctly.

That's all I can think of right now Neutral
_________________
Hi!
I can bend minds with my spoon.

A member of Team Graduation 2004/05!
Post 29 Dec 2005 07:49 pm
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Yallis
Professional Sucker
Moderator

Joined: 20 Jul 2002
Posts: 693
Location: city.psdl

Status: Offline


Post subject: Reply with quote

Stereo wrote:
Currently the wheel LODs need to be placed at the origin to appear correctly.

Because ZM don't make proper MTX files?

I also have a vague memory of the exporter not removing duplicated vertices, crashing on unknown subfile names, etc.
_________________
Post 30 Dec 2005 04:02 am
View user's profile Send private message Visit poster's website
Richard P
Half-Snapped Towing

Joined: 22 Aug 2005
Posts: 922
Location: Sudbury, Ontario

Status: Offline


Post subject: Reply with quote

my problem with the filter is that it takes average 15 tries to import the cars, if im lucky, it happens sooner. but it tkae multiple shots, it just closes. or even let it import midnight club 1 cars...hint hint
and the wheel lod thingy, is that the reason why my traffic mods wheels are all over the place?
_________________
Post 30 Dec 2005 04:07 am
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Yallis
Professional Sucker
Moderator

Joined: 20 Jul 2002
Posts: 693
Location: city.psdl

Status: Offline


Post subject: Reply with quote

Richard P wrote:
or even let it import midnight club 1 cars...hint hint

Well, that's because MM2 and MC PKGs are incompatible. MC use a different, optimized primitive for drawing triangles, triangle strips, while MM2 use seperate triangles only.
_________________
Post 30 Dec 2005 04:21 am
View user's profile Send private message Visit poster's website
Maxoff
MM2C Addict

Joined: 11 Nov 2004
Posts: 560
Location: Poland

Status: Offline


Post subject: Reply with quote

Richard P wrote:
my problem with the filter is that it takes average 15 tries to import the cars

Today tip Smile
    To import cars, tryo to use ZModeler 1.05c, then save as z3d and load into ZModeler 1.07b. Old ZModeler doesn't have any problem with file importing.

Richard P wrote:
is that the reason why my traffic mods wheels are all over the place?

Because you didn't center axis of wheels before export.


Yallis wrote:
Because ZM don't make proper MTX files?

What do you mean?


About plugin:

1. I've fixed import function, now it doesn't crash so often, but I think that it isn't importer bug, it's rather ZModeler memory management bug.

There are two functions to add object to list: AddObject(object) and InsertObject(object,position). When you use first one, program crashes randomly. When you use second (InsertObject(object,0)), it works and I don't know what. Only problem with second function is that, the list is reverse (it always sets object at first place on the list)

2. There isn't limit to 10 colors anymore

3. I've added support for TEX, TGA, BMP and JPG textures. During import, it checks which file exists (Texture\xxx.tex, Texture\xxx.tga, Texture\xxx.bmp ora Jpg\xxx.jpg) and loads proper one. Of course you need also plugin to read TEX and JPG files.
_________________
... You only have to know how to prepare query, google will do the rest ...
... My software ...
... Guide to Punctuation ...
Post 30 Dec 2005 10:12 am
View user's profile Send private message Visit poster's website
fre_ber
triangle fan
Moderator

Joined: 15 Jul 2002
Posts: 2399
Location: ZZ9 Plural Z Alpha

Status: Offline


Post subject: Reply with quote

Great job, Maxoff. This is what I'm talking about. All these semingly small changes makes a big difference. Wink

About the wheels - in the plugin for RS3D I am slowly working on I plan to make the wheel objects with a special tag. This tag will make the exporter automatically create an mtx file and use local coordinates to store the object while, for normal objects, just save the points in the global coordinate system.

Another feature that I think is missing is the xref part of PKG's, I.e. the ability to reference external objects. Or is that in there?
_________________

"He who re-invents the wheel, understands much better how a wheel works."

<[4D]JoeShmo> what we have here, is a failure.. to communicate
Post 30 Dec 2005 12:37 pm
View user's profile Send private message Visit poster's website
Richard P
Half-Snapped Towing

Joined: 22 Aug 2005
Posts: 922
Location: Sudbury, Ontario

Status: Offline


Post subject: Reply with quote

i use z modeler 107b, and it crashes when i hit import, usually does this 10-50 times before the model opens. and the wheels on my traffic mod spin great on their axis, but there way out of place, i think zmod make incorrect mtx files
_________________
Post 30 Dec 2005 03:29 pm
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Maxoff
MM2C Addict

Joined: 11 Nov 2004
Posts: 560
Location: Poland

Status: Offline


Post subject: Reply with quote

fre_ber wrote:
About the wheels - in the plugin for RS3D I am slowly working on I plan to make the wheel objects with a special tag. This tag will make the exporter automatically create an mtx file and use local coordinates to store the object while, for normal objects, just save the points in the global coordinate system.

I have to find out how to make it in ZModeler.

fre_ber wrote:
Another feature that I think is missing is the xref part of PKG's, I.e. the ability to reference external objects. Or is that in there?

Maxoff wrote:
It also supports vehicle reflections and references to external objects (I'll explain later how to use it)

Smile

Richard P wrote:
i use z modeler 107b, and it crashes when i hit import, usually does this 10-50 times before the model opens

Like I wrote try to use ZModeler 1.05c

Richard P wrote:
i think zmod make incorrect mtx files

I don't think that PKG filter causes problem in this case. We've made many cars (including traffic cars) and we've never had that problem, but we always user "center axis" before export Smile
_________________
... You only have to know how to prepare query, google will do the rest ...
... My software ...
... Guide to Punctuation ...
Post 30 Dec 2005 04:20 pm
View user's profile Send private message Visit poster's website
Richard P
Half-Snapped Towing

Joined: 22 Aug 2005
Posts: 922
Location: Sudbury, Ontario

Status: Offline


Post subject: Reply with quote

i do the center axis, the traffics wheels are in improper places, but roll nicely, and wheres zmodeler 1.05c?
_________________
Post 30 Dec 2005 04:25 pm
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
fre_ber
triangle fan
Moderator

Joined: 15 Jul 2002
Posts: 2399
Location: ZZ9 Plural Z Alpha

Status: Offline


Post subject: Reply with quote

Maxoff wrote:
It also supports vehicle reflections and references to external objects (I'll explain later how to use it)

Oh, missed that, but still Yallis has improved that spec. I found it a bit difficult to keep the latest spec in a discussion forum, so some time ago I set up a site for it. The most up to date specification that I know of is here. Discussion about the formats should still be done here in the forum, though.
_________________

"He who re-invents the wheel, understands much better how a wheel works."

<[4D]JoeShmo> what we have here, is a failure.. to communicate
Post 30 Dec 2005 05:20 pm
View user's profile Send private message Visit poster's website
Display posts from previous: Post new topicReply to topic

Page 1 of 3 All times are GMT
Goto page 1, 2, 3  Next


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Home - MM2C.com - Contact - Staff & Seniors - FAQ - Community Rules - Syndication


Powered by phpBB © 2001, 2005 phpBB Group