MTM2.com

A forum for mtm2 discussion
FAQ :: Search :: Members :: Groups :: Register
Login
It is currently Fri Nov 22, 2024 6:24 am



Post new topic Reply to topic  [ 66 posts ]  Go to page 1, 2, 3, 4  Next   
Author Message
 Post subject: MTM2 Render Distance Patch
PostPosted: Sun Sep 28, 2014 10:18 am 
Member

Joined: Sun Jul 27, 2014 12:45 pm
Posts: 38
Looked into bumping up the pod limit, but the game was pretty unstable much beyond 99. But I did accomplish a little bit with the old hexeditor, it will require editing monster.ini.

Changelog:
-Changed zone.com link to voobly.com this is where the people are.
-Bumped up maximum render distance from 20 to 50 units.
-Bumped up maximum vertex count in trid3d.dll from 8000 to 12000

http://4x4evolution.net/Downloads/MTM2% ... %20001.rar

Findings:
Code:
Monster.exe
103EA4 - Maximum Visible Tiles (Default 20)
121AB9 - Maximum face count, enviroment mapping (Default 1024)

Trid3d.dll
23E2 - Max Verts (Default: 8000)

_________________
4x4 Evolution Revival Project
http://www.4x4evolution.com


Last edited by Gamer121 on Mon Sep 29, 2014 8:37 am, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: MTM2 Render Distance Patch
PostPosted: Sun Sep 28, 2014 12:12 pm 
Member
User avatar

Joined: Mon Jul 02, 2001 2:01 pm
Posts: 1426
Location: Lost in Translation
Hmmm.

I wonder if bumping up the vertex count is the solution to the "too many objects" error.

Yesterday after we talked I realized that Kmaster tried to increase the view distance, which he manage to do but he ran into the problem of having too many objects on screen and the game erroring out (another limitation of the way TRI created the engine).

viewtopic.php?t=6663


Top
 Profile  
 
 Post subject: Re: MTM2 Render Distance Patch
PostPosted: Sun Sep 28, 2014 1:30 pm 
Member
User avatar

Joined: Mon Jul 02, 2001 2:01 pm
Posts: 1426
Location: Lost in Translation
Edit: Click pics to view full size.

Ok So I gave the patch a try. I have to say... I've no idea how to drive anymore because I'm too busy looking at ALL THAT ROAD in front of me :D

Anyway, here's a few pics.





Comparing to how it normally looks.

Image

So then I thought about something else. Going back to Kmaster's post I decided to try Arizona Dreaming with 8 trucks. Now in the regular game I had to limit the amount of trucks to either 4 or 5 otherwise the game would error out. This is what happened.





Note, especially in the second picture the amount of information on the screen. All the trucks are there (some are hidden by objects but they are there), there's a few huge objects in sight and, most importantly, alot of groundboxes. This particular area has been a huge problem for me when I created the track and more than 5 trucks would never pass through here. And yet now...

Gamer, I think you might have just fixed one of the fundamental issues that trackmakers had with this game since... 1998.




Top
 Profile  
 
 Post subject: Re: MTM2 Render Distance Patch
PostPosted: Sun Sep 28, 2014 5:14 pm 
MTM2 Engineer
User avatar

Joined: Fri Oct 10, 2003 6:19 pm
Posts: 1350
Location: Valparaíso, Chile.
This is pure gold. Thank you Gamer, this one will probably will fix the problems I had whilie racing in my own track Enocell City 2, mostly the "Up & Down Town" track.

Not only that, but you fixed one of the most annoying limitations this game had. There are other limitations, like the number of animated models that could be rendered at once or the continous sounds that could be played, but these are minor. Limits that I would like to see gone are models, textures and ground boxes limit but yeah, you're already doing that in Evo haha. Maybe you could teach me how did you find those memory registers and how do you save those modified exe so I could fix them myself heh. Thanks again


Top
 Profile  
 
 Post subject: Re: MTM2 Render Distance Patch
PostPosted: Sun Sep 28, 2014 6:08 pm 
Member
User avatar

Joined: Mon Jul 02, 2001 2:01 pm
Posts: 1426
Location: Lost in Translation
I'm gonna try it out on a few more tracks. If there's no major issues I'm going to add this patch to the website.


Top
 Profile  
 
 Post subject: Re: MTM2 Render Distance Patch
PostPosted: Sun Sep 28, 2014 6:41 pm 
Member
User avatar

Joined: Mon Jul 02, 2001 2:01 pm
Posts: 1426
Location: Lost in Translation
OK, so I tested Enocell City and Alpine's Certifiably Crazy. Two heavy tracks on models and groundboxes.

Went ahead and tried 7 AI trucks and guess what. No crashes!!! There are times when the game begins to stutter (when all the trucks are within the rendering distance and the track is heavy on objects/groundboxes) for a few seconds until you clear the area but otherwise so far so good.


Top
 Profile  
 
 Post subject: Re: MTM2 Render Distance Patch
PostPosted: Sun Sep 28, 2014 9:37 pm 
Member
User avatar

Joined: Mon Jul 02, 2001 2:01 pm
Posts: 1426
Location: Lost in Translation
Found a drawback to this patch... which is actually pretty understandable. Tracks with alot of objects will not go together very well with high detail custom trucks. The number of vertexes will just be too much for the game engine to run smooth (I've tried it with a single truck). With the stock trucks it works wonderful.

It's a minor thing really, since for racing people use stock trucks anyway. Just wanted to let people know.


Top
 Profile  
 
 Post subject: Re: MTM2 Render Distance Patch
PostPosted: Sun Sep 28, 2014 11:27 pm 
Member

Joined: Sun Jul 27, 2014 12:45 pm
Posts: 38
KMaster the method I used was the following. It can be done with mental guesswork via hex editor alone, however unknown values are a challenge. Fortunately you can use the error strings to trace them back. The render distance I had to keep modifying values until I got the intended result, vertex limit I needed IDA because no-one appeared to know the exact number. Note this is not the method currently employed on 4x4EvoR, as of patch 003 and beyond.

There are two methods that I know to use without source code:
1. Guess and check. (Tedious, need to know the value)
2. Use IDA to reverse engineer it, and find said value using a solid reference point.
3. Combination of both. (Find the value by guessing, get more information about it in IDA)

Software required:
-IDA 5.0 Freeware (Used to breakdown the game executable)
-Any hex-editor of your choice

How I found the vertex limit:
1. Open Monster.exe in IDA, wait for it all to process
2. Search for the error message (Text search)
3. Use this string to find the comparison command, the value should be next to it. (I don't know assembly, terminology could be wrong)
4. Use the hex viewer to determine the offset in the .exe that needs changed.
5. Open the hex editor and change the value to a usable amount. High values will cause crashes.


The example below is for the environment mapping issue with high poly trucks.
Image
Image

_________________
4x4 Evolution Revival Project
http://www.4x4evolution.com


Top
 Profile  
 
 Post subject: Re: MTM2 Render Distance Patch
PostPosted: Mon Sep 29, 2014 1:52 pm 
Member
User avatar

Joined: Mon Jul 02, 2001 2:01 pm
Posts: 1426
Location: Lost in Translation
I'm just thinking out loud here.

I wonder if a wide screen resolution could be hacked this way. nGlide works awesome but it still forces you to use 4:3, unless you want a stretched image.


Top
 Profile  
 
 Post subject: Re: MTM2 Render Distance Patch
PostPosted: Mon Sep 29, 2014 4:52 pm 
MTM2 Engineer
User avatar

Joined: Fri Oct 10, 2003 6:19 pm
Posts: 1350
Location: Valparaíso, Chile.
Fila wrote:
OK, so I tested Enocell City and Alpine's Certifiably Crazy. Two heavy tracks on models and groundboxes.

Went ahead and tried 7 AI trucks and guess what. No crashes!!! There are times when the game begins to stutter (when all the trucks are within the rendering distance and the track is heavy on objects/groundboxes) for a few seconds until you clear the area but otherwise so far so good.


Yes, the game beings to stutter in the main park, probably because of the number of 256x256 textures. The problems of not having a LOD-system in the game engine. Also my game crashed when I tried Voodoo Island with 7 stock AI trucks, after the second turn.


Top
 Profile  
 
 Post subject: Re: MTM2 Render Distance Patch
PostPosted: Mon Sep 29, 2014 5:16 pm 
Member
User avatar

Joined: Mon Jul 02, 2001 2:01 pm
Posts: 1426
Location: Lost in Translation
I can't reproduce the crash. Do you have Reflections on? (the water based ones, not truck reflections)


Top
 Profile  
 
 Post subject: Re: MTM2 Render Distance Patch
PostPosted: Wed Oct 01, 2014 3:46 am 
Member
User avatar

Joined: Mon Jul 02, 2001 2:01 pm
Posts: 1426
Location: Lost in Translation
I've managed to crash the game while racing Razzle Dazzle at the same spot several times. Gives too many objects error.

In other news, 7 years later I realized I forgot to add shadows to in the track...


Top
 Profile  
 
 Post subject: Re: MTM2 Render Distance Patch
PostPosted: Fri Oct 03, 2014 2:03 pm 
Member

Joined: Sun Jul 27, 2014 12:45 pm
Posts: 38
After I'm done updating EvoR's replay system with patch 009C. I'll take a crack at it, biggest issue is trying to figure out how high I can go as well, as there is no way of telling how high until some wierd stuff starts to happen.

(Like if I set the enviroment mapping face limit too high, it will cause the water follows you glitch)

_________________
4x4 Evolution Revival Project
http://www.4x4evolution.com


Top
 Profile  
 
 Post subject: Re: MTM2 Render Distance Patch
PostPosted: Sat Oct 04, 2014 9:35 am 
Glow Ball
User avatar

Joined: Tue Feb 02, 1999 7:00 pm
Posts: 23
A couple thoughts.

Run some tests on a couple of mumra's tracks. When OP made track view mumhra's stuff was ripe with a-typical situations.

http://www.mtm2.com/MTM2/Tracks/tracks. ... rch=mumhra

Might want to test on tracks that have a lot of underground sections to see how the out-of-sight stuff impacts performance.

----

Viewing distance would be a nice touch if it could tie into garage settings so it could be adjusted more easily on a per track basis. Don't know how feasible that is but I mention it for the sake of mentioning it.

----

Nice work. Looks promising.


Top
 Profile  
 
 Post subject: Re: MTM2 Render Distance Patch
PostPosted: Sat Oct 04, 2014 1:02 pm 
Member
User avatar

Joined: Mon Jul 02, 2001 2:01 pm
Posts: 1426
Location: Lost in Translation
Good note about underground. When the game crashes on Razzle Dazzle it's exactly when you approach the underground part.

Edit: Though I think it's simply the object overload, so the underground part really doesn't matter much. Alpine Certifiably Crazy is definitely ripe with objects and ground boxes and there are short areas where the game starts to stutter but doesn't crash. Razzle Dazzle is the only one so far. I'll try some mumhra tracks and see what happens.


Top
 Profile  
 
 Post subject: Re: MTM2 Render Distance Patch
PostPosted: Sat Oct 04, 2014 7:50 pm 
Member

Joined: Sun Jul 27, 2014 12:45 pm
Posts: 38
Is it possibble, yes. However the only way I'd know how to manage it would be by directly editing/acessing the game's memory. Similar to how a lot of cheat utilities work, it's not optimal, but it can easily do the job. However, I'm not sure as to what extent Voobly does cheat detection (If at all on MTM2), and this could trigger it falsely. Using IDA to reverse engineer the game further is possible as well, but it will take A LOT of man-hours, and extreme difficulty.

If I had access to the same material as 4x4evo to work with this would be trivial. But I don't so it's unlikely I'll put effort into as my focus is on EvoR given it's already greater capabilities.

_________________
4x4 Evolution Revival Project
http://www.4x4evolution.com


Top
 Profile  
 
 Post subject: Re: MTM2 Render Distance Patch
PostPosted: Sun Oct 05, 2014 4:38 am 
MTM2 Engineer
User avatar

Joined: Fri Oct 10, 2003 6:19 pm
Posts: 1350
Location: Valparaíso, Chile.
Fila wrote:
I can't reproduce the crash. Do you have Reflections on? (the water based ones, not truck reflections)



yes I think I have everything enabled except truck reflections.


Top
 Profile  
 
 Post subject: Re: MTM2 Render Distance Patch
PostPosted: Sun Oct 05, 2014 8:08 am 
Member
User avatar

Joined: Mon Jul 02, 2001 2:01 pm
Posts: 1426
Location: Lost in Translation
I'm not having the regular reflections on, that might be why I can't reproduce the crash (since the track has water reflections).


Top
 Profile  
 
 Post subject: Re: MTM2 Render Distance Patch
PostPosted: Sat Oct 18, 2014 12:34 pm 
Member
User avatar

Joined: Sun Oct 16, 2005 4:39 pm
Posts: 1822
Location: Winnipeg Manitoba, Canada
This brings back memories. I haven't gotten framerates like this since 1998.
I have to learn how to drive all over again.
Image

Is there a way to reduce it a bit? I seem to be hitting a hardcore CPU bottleneck.
I tried dropping the ini to 40 and it just changes back to 50 when I run the game.

_________________
Image


Top
 Profile  
 
 Post subject: Re: MTM2 Render Distance Patch
PostPosted: Sun Oct 19, 2014 3:10 pm 
Member
User avatar

Joined: Mon Jul 02, 2001 2:01 pm
Posts: 1426
Location: Lost in Translation
That's weird. I got no problem hitting over 120 fps unless in the obvious places where the game engine stutters briefly because of too many objects rendered.

Are you running any custom trucks (is your truck more than a repaint)? Custom trucks don't play too well with the patch. Especially the more detailed ones. I've only been able to run the render patch correctly using 8 stock trucks.

Edit: Also I see you have the water reflections turned on. This is a problem. You need to turn it off otherwise the game calculates all the objects twice (and they are already increased). Above your post Kmaster crashes the game using water reflections, 7 AI stock trucks and on Voodoo Island.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 66 posts ]  Go to page 1, 2, 3, 4  Next   


Who is online

Users browsing this forum: No registered users and 30 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group