Jump to content

Texture Mask Question


Chilibird

Recommended Posts

Howdy all,

My map is actually starting to take shape. I can't say that Terragen is the most 'intuitive' way to design a terrain, but it's coming together (I'm gonna check out the others mentioned in the manual, see if any are easier to use). At the moment, I only have a very basic map together. More realisim, ect, will be added once I get the dang thing working.

Right now, until I figure out how to set Terragen up to give me a decent texture mask (The manual mentions using terragen to do it, but I have yet to find out how to do it. If anyone can clear that up, it would be much appreciated.) I've been using a very very basic jpg file. Basically, the green is where land is, and the blue where water is. I've got the corrisponding detail textures set in my scenario file.

The thing is, once I drag everything into the data folder, and try to run it through the scenario menu, it gets to 'loading texture masks' and Dropteam freezes and crashes. I'm running OS X 10.4.7.

I looked at my files, and there didn't appear to be anything wrong with em. Both the texture, and texture mask files are 2048 X 2048 pixels, and they are both named and defined correctly. The texture is a .tif, and the texture mask is a .jpg, if that makes a difference.

Any idea what might be causing this? It only happens with my scenario, not any of the normal maps.

Cheers,

Ice

Link to comment
Share on other sites

Download Dark_au's QuickFrac from on the forum here. He has a feature that allows you to create sections of the .scenario file that contain placement of physical objects, trees, and also create inventories for both teams, if desired. It's pretty slick. All you need to do is load in your .raw file and make sure the vertex spacing is correct before you start.

Link to comment
Share on other sites

until I figure out how to set Terragen up to give me a decent texture mask (The manual mentions using terragen to do it, but I have yet to find out how to do it. If anyone can clear that up, it would be much appreciated.)
OK, here's a primer on using Terragen to create your mask.

For this example I'm using the Black Pearls scenario that I recently uploaded just because I have it handy. You might want to download that scenario and look at it while looking at this example.

The idea is to use red, green, and blue to represent your 3 major terrain types. In Black Pearls, those correspond to rock, grass, and dirt, respectively (so rock is red, grass is green, and dirt is blue).

Here's what the base texture looks like:

BlackPearlsTextureScaled.jpg

and here's the Terragen surface to get that base texture:

Surface1.jpg

The sub surfaces called "lighter rock", etc. are all based on slopes, elevations, etc. as usual in Terragen. Once your surface that generates the base texture is all setup, you simply change it in order to create your "mask" material.

Since rock is red for this scenario's mask, I went into the "gray rock" parent surface, and into both the "lighter rock" and "darker rock" child surfaces and made them bright red with ZERO bumpiness (and also ZERO for mimics terrain, because we don't want ANY bumps at all):

Surface2.jpg

By "bright red" I mean 255 for red, 0 for green, and 0 for blue.

Then I went into the "dirt" subsurface and made it bright blue with ZERO bumpiness. Finally, bright green for the "rock plants" subsurface.

Now go to the sunlight panel and make sure the sun is directly overhead, give it a very high strength like 350%, and turn OFF all shadow casting: SunlightPanel.jpg

In the sky/haze panel, be sure to turn off all haze and fog (you should do this when rendering your base texture, too, not just for the mask):

HazePanel.jpg

Now you're ready to render the final mask image:

Mask.jpg

Notice how the red, green, and blue correspond with the different terrain types (see some other scenarios like Haven for even more stark masks where it's easier to see the hills vs. flats). The 3 colors smoothly blend together when changing from one type to another which is exactly what you want. Hard transitions would be unnatural. Those places where you see, for example, yellow in the mask are places where the user will see both rock (red) and grass (green) mixed together - which is a good thing!

Let me know if this makes sense or if you need any further clarification.

EDIT: After you render the final mask image, be sure to take it into an image editor (I use The Gimp but photoshop or paintshop pro, etc. work fine) and reduce ALL colors so that the brightest colors in your mask are about 75 or so. If you don't do this then your mask will make all of your terrain type detail textures 100% opaque, meaning they will completely obscure the underlying base texture. You want your detail textures to be transparently overlaid with the base texture underneath. So here's how the FINAL mask for this example looks:

Mask2.jpg

[ August 14, 2006, 11:45 PM: Message edited by: ClaytoniousRex ]

Link to comment
Share on other sites

Thanks clay, that helped tremendeously smile.gif

I'm almost done with with my map. It's really starting to look nice.

The one odd thing is that when I fire a HE round, the game freezes and crashes when it impacts the terrain. Only on this map, the ones included with the game do not crash. Is there something I may be forgetting that is causing this?

*edit* Upon further testing, it appears that only the 120MM + rounds cause a crash. The 20MM HE rounds that come from vehicles such as the mercury do not cause a crash.

[ August 15, 2006, 08:09 PM: Message edited by: IcemanUSA ]

Link to comment
Share on other sites

Originally posted by IcemanUSA:

*edit* Upon further testing, it appears that only the 120MM + rounds cause a crash. The 20MM HE rounds that come from vehicles such as the mercury do not cause a crash.

76mm and below don't 'terraform'. Does the cutter digging crash things too?
Link to comment
Share on other sites

Originally posted by aittam:

got to design beautiful things with Terragen but then? Do I understand correctly that is just the mask that has to go on top of something else? created with what? (mac compatible)

and after how do I place trees and structure?

I found Terragen to be essential in making my map. From the Texture mask, to the texture itself, to the positioning of trees, ect, I've used Terragen in every step. I too, am on a Mac (OS X 10.4) so I can't use some of the pre-existing stuff, so I kinda had to create my own 'standards' to try this stuff. I'm sure having it available to other mac users/mappers that show up here will be a tremendeous help. I'll put up a 'Mac-Users Mapping Tutorial' in a bit. Maybe on the Wiki?

As for the terraform/cutter thing.. lemme give it a shot, I'll post back in a bit.

*Update- Yep, the Cutter causes the same crash. I can't seem to track down anything that would be causing this. Any ideas?*

[ August 16, 2006, 12:06 PM: Message edited by: IcemanUSA ]

Link to comment
Share on other sites

The quote below is the pertaining section of my scenario file.

<ElevationsFilename>BattleCreek.raw</ElevationsFilename>

<TextureFilename>Battlecreek.jpg</TextureFilename>

<VertexSpacing>20.0</VertexSpacing>

<ElevationScale>0.01</ElevationScale>

<WidthVertices>257</WidthVertices>

<HeightVertices>257</HeightVertices>

As far as I know, there is no problem? Just to check, I resized the .raw to 512, changed the corrisponding tags in the scenario file, and tried again, with the same results.

As far as I know, there shouldn't be any reason I'm crashing. It only happens with this scenario, and all of my terrain types are diggable, so it's not like it's getting confused...

Link to comment
Share on other sites

yep got the demo, i'm not really willing to put money into this untill i don't get at least a map working, 'ill give a try to the other too; thanks!

edit: ok i can do the 513 no problem!

what i really do not understand too well are submask, i can create child layers w/o problem but:

1) how do I spread them, I mean how do I decide where they should fall?

2) how do I create the detailed terrains tha tiles the first rough layer?

edit2:

bumpiness is up to my right?

sun position too? 'cause i'm working on a scenario where shadows casting could play a role in hiding vehicles

[ August 17, 2006, 01:03 AM: Message edited by: aittam ]

Link to comment
Share on other sites

Originally posted by aittam:

yep got the demo, i'm not really willing to put money into this untill i don't get at least a map working, 'ill give a try to the other too; thanks!

edit: ok i can do the 513 no problem!

what i really do not understand too well are submask, i can create child layers w/o problem but:

1) how do I spread them, I mean how do I decide where they should fall?

2) how do I create the detailed terrains tha tiles the first rough layer?

edit2:

bumpiness is up to me right?

sun position too? 'cause i'm working on a scenario where shadows casting could play a role in hiding vehicles

Link to comment
Share on other sites

Thanks Hub if it's impossible I'll give up, not a problem to get nice .raw files at 513x513 and also to generate child layers's fine, just I do not understand how to spread the red, green and blue as it seem possible in Clay explanation.............

irfan wasn't osx compatible last I check, anyways I've all the most updated image processing software.

Fine for the sun position,I'll keep it north.

Link to comment
Share on other sites

×
×
  • Create New...