View unanswered posts | View active topics It is currently Mon Apr 29, 2024 12:16 am



Reply to topic  [ 10 posts ] 
 Custom Terrain Material (solved) 
Author Message
User avatar

Joined: Sun Jun 10, 2007 2:05 am
Posts: 426
Reply with quote
Post 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?


Last edited by Solace on Fri Jan 23, 2009 7:45 pm, edited 1 time in total.



Tue Jan 20, 2009 8:23 am
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post 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.


Tue Jan 20, 2009 12:56 pm
Profile
User avatar

Joined: Wed Dec 24, 2008 5:14 pm
Posts: 62
Reply with quote
Post 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


Tue Jan 20, 2009 1:24 pm
Profile
User avatar

Joined: Sun Jun 10, 2007 2:05 am
Posts: 426
Reply with quote
Post 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?


Tue Jan 20, 2009 6:45 pm
Profile
User avatar

Joined: Sun Jun 10, 2007 2:05 am
Posts: 426
Reply with quote
Post 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


Tue Jan 20, 2009 8:47 pm
Profile

Joined: Sat Jan 13, 2007 11:04 pm
Posts: 2932
Reply with quote
Post 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.


Tue Jan 20, 2009 9:46 pm
Profile
User avatar

Joined: Sun Jun 10, 2007 2:05 am
Posts: 426
Reply with quote
Post 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.


Tue Jan 20, 2009 9:50 pm
Profile
User avatar

Joined: Sun Jun 10, 2007 2:05 am
Posts: 426
Reply with quote
Post 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?


Wed Jan 21, 2009 1:07 am
Profile
User avatar

Joined: Sun Jun 10, 2007 2:05 am
Posts: 426
Reply with quote
Post 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.


Fri Jan 23, 2009 7:49 pm
Profile
User avatar

Joined: Wed Dec 24, 2008 5:14 pm
Posts: 62
Reply with quote
Post 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.


Sat Jan 24, 2009 10:57 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

Who is online

Users browsing this forum: No registered users


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.
Designed by STSoftware for PTF.
[ Time : 0.045s | 13 Queries | GZIP : Off ]