Data Realms Fan Forums
http://forums.datarealms.com/

Custom Terrain Material (solved)
http://forums.datarealms.com/viewtopic.php?f=1&t=13546
Page 1 of 1

Author:  Solace [ Tue Jan 20, 2009 8:23 am ]
Post subject:  Custom Terrain Material (solved)

Ok, I think I more-or-less think I have it figured out, the one thing I'm not sure of is... how do I make the computer know I want to use the custom material when I paint it into the bmp, vs any other material? Does it just go off the color, and what happens if I accidentally pick a color already being used?

Author:  Duh102 [ Tue Jan 20, 2009 12:56 pm ]
Post subject:  Re: Custom Terrain Material

You have to go by the index. The color palette is tied directly to the materials definitions, so use the color with the same index as what you defined.

Author:  GopherLemming [ Tue Jan 20, 2009 1:24 pm ]
Post subject:  Re: Custom Terrain Material

I've had real problems with this.

As far as I can tell from posts and tutorials around the forum, you go through the materials.ini and choose an index which isn't taken. You then code the material in your "name of scene".ini, as demonstrated on "air" (index 0). The color in the code is how the material appears in game (unless you use a texture). The Index shows which color you use to paint the material in the .bmp eg: index 32 would be the first color on the third line of the palette.bmp in base.rte (the .bmp is 16 pixels wide and the first is counted as 0)

This is wrong though, as whenever I try it the material is extremely soft or extremely hard and it never seems to be the color I set in the code, so I'd appreciate someone pointing out where in this process I'm going wrong

Author:  Solace [ Tue Jan 20, 2009 6:45 pm ]
Post subject:  Re: Custom Terrain Material

Duh102 wrote:
use the color with the same index as what you defined.

Well the only problem there is that most of the colors are already being used by a material. If I pick, say, a shade of green and it turns out that some random base material already uses it, does it just prefer my definition of that the color means?

Author:  Solace [ Tue Jan 20, 2009 8:47 pm ]
Post subject:  Re: Custom Terrain Material

Sorry for the doublepost, but I hit a fairly decent sized snag and I just dunno what do do. I was trying to make gold to spray in the map that'd have a texture... it shows up, it's diggable for gold, it... doesn't use a texture. Any clue what's wrong?
Code:
AddMaterial = Material
   Index = 2460
   PresetName = MGold
   Bounce = 0.1
   Friction = 0.85
   StructuralIntegrity = 35
//   DensityKGPerVolumeL = 19.3
   DensityKGPerPixel = 0.02834952
   GibImpulseLimitPerVolumeL = 15
   GibWoundLimitPerVolumeL = 0.1
   Priority = 10000000
   Color = Color
      R = 225
      G = 229
      B = 0
   UseOwnColor = 0 //Also it doesn't work as 1
   SettleMaterial = 2
   TextureFile = ContentFile
      Path = Lands.rte/GoldTex.bmp

Author:  numgun [ Tue Jan 20, 2009 9:46 pm ]
Post subject:  Re: Custom Terrain Material

I think that texture only applies if you paint a map with that material.
Otherwise it wont have a texture since its just pixels.

I dont think you can make it have a texture I'm afraid. What is the texture like?
Is it rocks of gold or dust of gold? If its the first one, make the sprayer spew gold boulders/rocks instead of pixel shower.

Author:  Solace [ Tue Jan 20, 2009 9:50 pm ]
Post subject:  Re: Custom Terrain Material

No, I mean I actually am painting a map with that, and it shows up as a uniform color instead of using the texture.

Author:  Solace [ Wed Jan 21, 2009 1:07 am ]
Post subject:  Re: Custom Terrain Material

Sorry again... but I'd really like the help here... x.x I just don't get it. I'm looking at working maps with custom textures, and the color in the map seems to have nothing to do with either the color defined in the material, or the color referenced by it's index.

Bonus question: Do texture files need to be in palate?

Author:  Solace [ Fri Jan 23, 2009 7:49 pm ]
Post subject:  Re: Custom Terrain Material

Sorry for the tripost, but I don't think I can delete my posts and I found the answer that me and Gopher where looking for.

GopherLemming wrote:
I've had real problems with this.

As far as I can tell from posts and tutorials around the forum, you go through the materials.ini and choose an index which isn't taken. You then code the material in your "name of scene".ini, as demonstrated on "air" (index 0). The color in the code is how the material appears in game (unless you use a texture). The Index shows which color you use to paint the material in the .bmp eg: index 32 would be the first color on the third line of the palette.bmp in base.rte (the .bmp is 16 pixels wide and the first is counted as 0)

This is wrong though, as whenever I try it the material is extremely soft or extremely hard and it never seems to be the color I set in the code, so I'd appreciate someone pointing out where in this process I'm going wrong

Ah, it turns out there's one more weirdish step to do... you have to actually open the palete of the scene (not the one in base.rte) in question (different in different programs, mine was under image mode), find the index (most of which are black), and change it to the color you defined, then paint it. One note that I found out: change the color in the palate before you paint it. If you painted that color before, you have to get rid of it and then repaint. (Paintbucket comes in handy there.)

Two disclaimers, I don't know if the color you chose has to be in palate, and I don't know if the texture (if you're using one) has to be either.

Author:  GopherLemming [ Sat Jan 24, 2009 10:57 am ]
Post subject:  Re: Custom Terrain Material

Thanks for posting the solution Solace. I don't think that Paint is capable of bringing up the palette, but I'm sure GIMP is, so i'll experiment next time I boot up my work laptop in ubuntu.

As for the "in palette" question, I can't guarantee it's right, but I found this in the scene tutorial:

Lord Tim wrote:
So, this means that you have to use a non-palette'd image for the scene's .bmp


Weather that refers to the standard scene palette or the sprite palette is anyones guess. Something else to try when I get time to experiment.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/