Kmaster's conversions

Downloads: https://www.mtm2.com/~tracks/tracks.php
User avatar
Kmaster
Member
Posts: 1626
Joined: Fri Oct 10, 2003 6:19 pm
Location: Valparaíso, Chile.
Contact:

Re: Kmaster's conversions

Post by Kmaster »

Fila wrote: Sat Nov 28, 2026 12:01 am Kmaster, I'm tightening some rules right now in the engine but we should figure out to make the converter play nicely with the engine. Right now it continuously converts models by different rules and places them either in mid-tier for FPS or worse, in the per-frame tier (which is uploading and rendering the model every single frame).

In monster.ini, under the [Graphics] section add objPathTint=1 which will colour every object in the world in 3 ways:

Green - instanced, the fastest tier. Any object that is not moveable has to be here with the exception of objects with glass/mesh material as they need special rendering. (foliage material goes here in instanced)
Blue - resident cache... middle speed tier. This is reserved only for objects that move (such as the trucks, trains etc)
No colour - it's reuploaded and drawn every single frame. This is what the original game did and what tanks the FPS the hardest. Glass/Mesh material faces (so not the whole model, just the face) go here because they need special rendering and the mesh needs special draw order.

All those trees should be using foliage.
I made a further change (the tightening some rules) that will instance all the objects did by your converter but if the converter changes values again, that means it's going to slip through the cracks again. That's why I was recommending to use the values found inside binedit as they are taken straight from the engine.

I'd like to, but I don't have the source of the latest BinEdit. The only BinEdit source I have is from Mal's 2006 changes, from before materials existed, so it has no material presets. That's why the converters write their own material values instead of BinEdit's. Today they write:

-Cut-out faces (trees, fences, signs): LIT | ALPHATEST | TWOSIDED, with no translucency. So the trees aren't marked as foliage, as you noticed.
-See-through faces (glass): LIT | BLEND | TWOSIDED | NOZWRITE.
-Two-sided solid faces: LIT | TWOSIDED.
I've read this https://www.mtm2.com/~mtmg/misc/MATERIAL_GUIDE.md material guide, which lists the flags each preset sets:

-Foliage: Lit, Alpha test, Two-sided, Translucent.
-Glass: Lit, Gouraud, Blend, Reflect, Fresnel, No Z-write, with reflectivity 0.35, Fresnel bias 0.08, Fresnel strength 2.5, base alpha 0.35 and specular power 32.
-Mesh: Glass plus "Texture alpha = solid".
So our trees are missing Translucent, and our glass is missing Gouraud, Reflect, Fresnel and the numbers. I'll change the converters to match those flag sets.

What the guide doesn't have is what the file actually stores, and that's what I need to match the engine exactly. Could you send me:

-the bit value of each flag, as in engine/3D.H (above all Gouraud, Reflect, Fresnel, Translucent and Texture alpha = solid, which I don't have);
-the Foliage preset's translucency value and how it's stored in the material record (I read it as the top 16 bits of the last word, with the alpha reference in the low 16);
-what changed in the 27 Nov BinEdit update to fix the conversion trees, since the guide may not show it yet;
-anything else the engine checks when it picks the tier.

If that's easier, a small BIN saved from the current BinEdit with one face per preset would work too. An agent can read the values straight from it.

Once I have them, I'll keep those values in one shared place that all my converters use, so a later converter can't mess up again. Then I'll run the tracks with objPathTint=1 and check where each object lands.
User avatar
Fila
Member
Posts: 2332
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Kmaster's conversions

Post by Fila »

Hopefully I don't run out of tokens tonight to finish tightening the rules but I am adding your blend value that you used for CTARCADE to the instanced path (some of the others already instance fully except for those that I am tightening the rules right now).
User avatar
Fila
Member
Posts: 2332
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Kmaster's conversions

Post by Fila »

Sorry, not gonna finish tonight. This deeper dive got me into moving objects around those tiers and found gaps that I previously ignored (back from the original dx9 port). Good news is that nothing affects what you have to do for the converter but before I call it final I want to make sure everything is settled and works correctly.
User avatar
Fila
Member
Posts: 2332
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Kmaster's conversions

Post by Fila »

Once I finish tweaking the rumble AI a little more, the next hotfix has added rules for the current tracks so they don't really need fixing other than the Z fighting issue. I've made the changes to the engine so it can deal with a TWOSIDED object, but TWOSIDED + back face doesn't know how to deal with it.
User avatar
Kmaster
Member
Posts: 1626
Joined: Fri Oct 10, 2003 6:19 pm
Location: Valparaíso, Chile.
Contact:

Re: Kmaster's conversions

Post by Kmaster »

heres a CT Arcade map updated with your rules: https://drive.google.com/file/d/1eJli6n ... sp=sharing
User avatar
Kmaster
Member
Posts: 1626
Joined: Fri Oct 10, 2003 6:19 pm
Location: Valparaíso, Chile.
Contact:

Re: Kmaster's conversions

Post by Kmaster »

I just released a new Carma 2 track: Mr Jolly Fairground
This was probably one of the most fun and challenging tracks. with a loop, fire rings, water canals, animals and a roller coaster. I had to modify Scare Devil last checkpoint straight so it goes thru the fire rings, since the wooden warehouse wont break and .. just because we were missing all the action in this straight!
Captura de pantalla 2026-12-02 a la(s) 1.38.51 a.m..jpg
The fences are non-collidable just because to keep the amount of collidables low and not kill the physics engines (CP4 or OMTM2)

I converted a few animales so you can go near em and say hi. Some tricks like the loop are impossible to do, But I managed to get to the last ring of fire, among other stuff. All tracks are finishable.

I also found a bug in CP4 latest beta, the canal water is not static, it follows the players camera position.

the canal water material is constant see-through pane, LIT | BLEND = 0x0005, with baseAlpha 0.75, nothing else. the water isn't its own object, it is part of scenery pieces per race , type 7 static props, 0 mass and not rotated.
These canal pieces are static, not movable, train or keyframe models, so the rule against blending on moving models doesn't apply.
Textures: FFWATER3.RAW, FFWATER4.RAW and FFWATER5.RAW.

how does it look on OMTM2 v075 (openMetalCrush rust port build 3)
Captura de pantalla 2026-12-02 a la(s) 1.43.19 a.m..jpg
how does it look on CP4 beta .54 hotfix3
Captura de pantalla 2026-12-02 a la(s) 1.23.26 a.m..jpg
Captura de pantalla 2026-12-02 a la(s) 1.23.45 a.m..jpg
Captura de pantalla 2026-12-02 a la(s) 2.02.47 a.m..jpg
am i missing something here?
You do not have the required permissions to view the files attached to this post.
User avatar
Fila
Member
Posts: 2332
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Kmaster's conversions

Post by Fila »

Water was my bug.
Post Reply