Increased draw distance on MTM2

mtm2 and other sensible chat
Post Reply
User avatar
Kmaster
MTM2 Engineer
Posts: 1370
Joined: Fri Oct 10, 2003 6:19 pm
Location: Valparaíso, Chile.
Contact:

Increased draw distance on MTM2

Post by Kmaster »

I managed to increase the draw distance by changing the value of MONSTER.EXE memory addresses 0064CFB0, 0064CFB4 & 0097BC54 from 20 (100% visibility) to 40. 20 being not the total of tiles displayed but the distance between your truck and the horizon, represented in textures.

<center>
Normal
Image
Increased
Image

Normal
Image
Increased
Image
Image

Too many objects error
Image
</center>

As you can see, the number of tiles (or textures) displayed won't increase more than 1 or 2 rows, different thing happens with models, the game will display models that are farther than 20 tiles. (10 tiles farther probably). However, some tracks will become unraceable because of the on-screen object limit. (eg Farm Road). This works in software and hardware mode Direct3d rendeering. In hardware mode, some random snow-like balls will randomly appear in the sky while you have an increased draw distance. After ending a race, and starting a new one, all models and terrain of the track will be white. This is fixed by changing the screen mode.
You can edit the memory addresses to have an even smaller draw distance, like 5 or 6 tiles (25% visibility)

advice: memory editing is hacking and it is illegal for multiplayer tournaments

MTMG research center
User avatar
Fila
Member
Posts: 1460
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Increased draw distance on MTM2

Post by Fila »

You know... is it possible to combine this with the mtm2 render patch?

Like for example to try and get the models to show up at the default 20 tiles (or maybe 30 tiles) but keep the land visual tiles at 50?

Sure, you end up with the ugly objects popping out of nowhere but it could be a compromise.
Gamer121
Member
Posts: 38
Joined: Sun Jul 27, 2014 12:45 pm

Re: Increased draw distance on MTM2

Post by Gamer121 »

This is all in theory, as I can't rationalize a way to accomplish it easily via guessing in the hex-editor alone. Object's selected to be drawn are determined by the drawing distance automatically. Not saying this would be impossible, but you'd have to have find where it attempts to look at the draw distance and have it look at a different address that just so happens to be the value you need. (20, 25, 30, etc.)

This could possibly be accomplished via IDA, or Cheat Engine to find the value requiring modification. Using the method I covered in the other thread gives you the address it's pulling from, this might be the way in by looking at what else reads that address.
4x4 Evolution Revival Project
http://www.4x4evolution.com
User avatar
Fila
Member
Posts: 1460
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Increased draw distance on MTM2

Post by Fila »

The other thing... I doubt TRI still has the source code like they did with Evo...

Well that and the fact that TRI has been closed down, :/
Gamer121
Member
Posts: 38
Joined: Sun Jul 27, 2014 12:45 pm

Re: Increased draw distance on MTM2

Post by Gamer121 »

Honestly you might be surprised, just gotta find the right person. I sent an e-mail to the head programmer of Soda Off-Road Racing after figuring out what he works on now (iRacing) some oddball questions regarding model format. He sent back some useful bits I didn't know how to use at the time, and I still don't know how to (Pretty sure it's for processing a track). Take a look at the credits, and start talking to people you'd be surprised how willing many of them are willing to relive those younger times. Can get some pretty cool stories/history as well.
4x4 Evolution Revival Project
http://www.4x4evolution.com
User avatar
Slayer
Member
Posts: 1822
Joined: Sun Oct 16, 2005 4:39 pm
Location: Winnipeg Manitoba, Canada

Re: Increased draw distance on MTM2

Post by Slayer »

Since you guys are patching stuff.

Can you make mtm2 understand more than 99 pods?
Image
User avatar
Fila
Member
Posts: 1460
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Increased draw distance on MTM2

Post by Fila »

User avatar
Slayer
Member
Posts: 1822
Joined: Sun Oct 16, 2005 4:39 pm
Location: Winnipeg Manitoba, Canada

Re: Increased draw distance on MTM2

Post by Slayer »

So you gave up?
:D
Image
Gamer121
Member
Posts: 38
Joined: Sun Jul 27, 2014 12:45 pm

Re: Increased draw distance on MTM2

Post by Gamer121 »

I experienced a lot of random issues when I did. However it could be entirely possible I bumped up the wrong value. My primary focus is 4x4EvoR, I just wanted to test a theory and pass the knowledge on to hopefully improve MTM2. I wish I could put more energy into it, but I have too much on my plate as it is to focus on this.
4x4 Evolution Revival Project
http://www.4x4evolution.com
User avatar
Slayer
Member
Posts: 1822
Joined: Sun Oct 16, 2005 4:39 pm
Location: Winnipeg Manitoba, Canada

Re: Increased draw distance on MTM2

Post by Slayer »

Gamer121 wrote:I experienced a lot of random issues when I did. However it could be entirely possible I bumped up the wrong value. My primary focus is 4x4EvoR, I just wanted to test a theory and pass the knowledge on to hopefully improve MTM2. I wish I could put more energy into it, but I have too much on my plate as it is to focus on this.
No worries, it would be cool though if you do manage it. I'd expect it could at least reach 255. Although it might get really slow.
Image
Post Reply