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

Midtown Madness 2 Central > City Editing > [TCTT] How to add grass effect
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: [TCTT] How to add grass effect Reply with quote

Local references:
- Program
- How to create simple city
- How to add your own object to city
- How to add grass effect
- Objects description
- Description of configuration files

-----------------------------------------------------

This instrucion shows how to add grass effect to your city. This tutorial bases on simply city which you should make first.

Introduction

In your city you use textures for grass, water, etc. But they are only textures. The game doesn't know that mc_grass.tga should acts as grass and mc_water.tga as water. We must define it. There is list of standard maping (textures to behaviour) in city\materials.csv which is used by standard cities. In additional cites we can use standard textures or we can to add our own maping. Because there can be only one materials.csv file, if you make new one, the other will be overwrite - it causes mods conflicts. Fortunately there is easy solution. I recommended you to use MM2 GameLoader which can manage additional materials in easy way. Just download it and copy to the game directory. From now, you should run MM2GameLoader.exe instead of Midtown2.exe

Grass in our own city

You made city and saved it as sample_city.ar. You have simple_city_grass.tga texture that should act as grass. When you put sample_city.ar into the game directory and run MM2GameLoader.exe nothing changes. You have to add maping. To do it, run notepad and type:
Code:
simple_city_grass,grass

then save it as sample_city.csv. Copy that file to the game directory and run MM2GameLoader. Now you should have grass in your own city.

The same is about water. Here is list of standard beviours (effects):
Code:

mtl deepwater {
  elasticity: 0.500000
  friction: 0.650000
  effect: none
  sound: 0
  drag: 0.500000
  width: 0.550000
  height: 0.060000
  depth: 100.0000
  ptxindex: -1 -1
  ptxthreshold: 0.25 0.5
}
mtl _default {
  elasticity: 0.900000
  friction: 0.900000
  effect: none
  sound: 0
  drag: 0.000000
  width: 0.000000
  height: 0.000000
  depth: 0.0000
  ptxindex: 4 -1
  ptxthreshold: 0.25 0.5
}
mtl grass {
  elasticity: 0.900000
  friction: 0.900000
  effect: none
  sound: 2
  drag: 0.0
  width: 0.450000
  height: 0.040000
  depth: 0.100000
  ptxindex: 1 2
  ptxthreshold: 0.25 0.5
}
mtl water {
  elasticity: 0.190000
  friction: 0.680000
  effect: none
  sound: 1
  drag: 0.119000
  width: 2.420000
  height: 0.0000
  depth: 0.10000
  ptxindex: -1 6
  ptxthreshold: 0 0
}
mtl dirt {
  elasticity: 0.000000
  friction: 0.750000
  effect: none
  sound: 0
  drag: 0.000000
  width: 0.200000
  height: 0.010000
  depth: 0.000000
  ptxindex: -1 -1
  ptxthreshold: 0.25 0.5
}
mtl sand {
  elasticity: 0.900000
  friction: 0.90000
  effect: none
  sound: 0
  drag: 0.000000
  width: 0.450000
  height: 0.050000
  depth: 0.10000
  ptxindex: 1 5
  ptxthreshold: 0.25 0.5
}
mtl cobblestone {
    elasticity: 0.900000
  friction: 0.900000
  effect: none
  sound: 0
  drag: 0.000000
  width: 0.000000
  height: 0.000000
  depth: 0.0000
  ptxindex: 4 7
  ptxthreshold: 0.25 0.3
}
mtl wood {
  elasticity: 0.030000
  friction: 0.950000
  effect: none
  sound: 0
  drag: 0.000000
  width: 0.010000
  height: 0.000000
  depth: 0.000000
  ptxindex: -1 -1
  ptxthreshold: 0.25 0.5
}


Try to use one of them. Of course you can also try to add your own definition. Just create sample_city.mtl with your mtl.

If you want more information about materials, please search the forum.

Summary

This small tutorial shows how connect material to bevaiour in easy way without conflict with additional mods. I hope it will help you to add nice effects to cities you are making Smile
_________________
... You only have to know how to prepare query, google will do the rest ...
... My software ...
... Guide to Punctuation ...
Post 27 Apr 2006 07:09 pm
View user's profile Send private message Visit poster's website
Display posts from previous: Post new topicReply to topic

Page 1 of 1 All times are GMT


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