| Author | Message | 
        
			| lazyfaith 
					Joined: Wed Jan 03, 2007 2:05 pm
 Posts: 174
   |   Custum material issues in sceneOn a map i am trying to make my custom material does not load and show, instead its a sort of yellowish colour instead of the set texture. Can someone please fix it and tell me what's wrong with it so i don't do this again. I have given it it's own index number, i've changed it's colour for the mat of the scene .bmp and can't think of what's wrong, please help me. THanks 
 
 | 
		
			| Mon Jun 09, 2008 5:18 pm | 
					
					   | 
	
	
		|  | 
	
			| meloen 
					Joined: Tue Jun 19, 2007 2:51 pm
 Posts: 85
 Location: in photoshop, in a corner; ordening pixels
   |   Re: Custum material issues in sceneyour material.ini shows that your trying to use index collor number 963, and there are only 256 mat collors. and also: you made it black, i am sure the game cant see the diffrence between all the other black collors. 
 
 | 
		
			| Tue Jun 10, 2008 9:22 am | 
					
					   | 
	
	
		|  | 
	
			| lazyfaith 
					Joined: Wed Jan 03, 2007 2:05 pm
 Posts: 174
   |   Re: Custum material issues in sceneOh, the index is to do with the colour used in the mat file? I thought it was just a way of defining it instead of the instance name. What should i do to solve it? 
 
 | 
		
			| Tue Jun 10, 2008 5:05 pm | 
					
					   | 
	
	
		|  | 
	
			| Roy-G-Biv 
					Joined: Mon Feb 12, 2007 12:46 am
 Posts: 1765
 Location: ..............
   |   Re: Custum material issues in scenelazyfaith wrote: Oh, the index is to do with the colour used in the mat file? I thought it was just a way of defining it instead of the instance name. What should i do to solve it?Look at the Material file. And some lines should say: //Index ### Not defined. (Replace ### with a number of your choice.) And then change the Index line of you mat to.... Index = ### (Once again, Replace ### with a number of your choice.) PS: Index = 9999999 would only work if it's for actors/objects.
 
 | 
		
			| Tue Jun 10, 2008 6:16 pm | 
					
					   | 
	
	
		|  | 
	
			| meloen 
					Joined: Tue Jun 19, 2007 2:51 pm
 Posts: 85
 Location: in photoshop, in a corner; ordening pixels
   |   Re: Custum material issues in sceneno, its harder then just changing the number to a random value, first one question to lazyfaith, do you have photoshop? if so here is how to make a custom material:
 go to your map.bmp in photoshop and go to "image -> mode -> collortable", you can see all the collors here in indexed order, if you want to add your own material: just press on one of the black squares and choose a collor you want to use. write the collor "RBG" code down and the indexed number, and then use the collour to draw in your map, and use the indexed collor in your code.
 here is a pic to clear things up:
 
 
 Attachments: 
			File comment: click to zoom in
		
			 explanation.jpg [ 334.52 KiB | Viewed 5009 times ] | 
		
			| Tue Jun 10, 2008 10:15 pm | 
					
					   | 
	
	
		|  | 
	
			| Lord Tim 
					Joined: Fri Apr 27, 2007 4:55 pm
 Posts: 1178
 Location: America!
   |   Re: Custum material issues in sceneThe bottom of this post explains exactly how the custom material process works. If you can call it working.http://datarealms.com/forum/viewtopic.p ... 74#p202674
 
 | 
		
			| Tue Jun 10, 2008 11:16 pm | 
					
					   | 
	
	
		|  | 
	
			| lazyfaith 
					Joined: Wed Jan 03, 2007 2:05 pm
 Posts: 174
   |   Re: Custum material issues in sceneThanks, that definately solved the problem of it just being a yellowish colour. But now i have a new one, instead of the texture i want it to be it is the word default in black thousands of times on a red background, any help?  
 
 | 
		
			| Thu Jun 12, 2008 5:21 pm | 
					
					   | 
	
	
		|  | 
	
			| meloen 
					Joined: Tue Jun 19, 2007 2:51 pm
 Posts: 85
 Location: in photoshop, in a corner; ordening pixels
   |   Re: Custum material issues in scenelazyfaith wrote: Thanks, that definately solved the problem of it just being a yellowish colour. But now i have a new one, instead of the texture i want it to be it is the word default in black thousands of times on a red background, any help?  sorry, the indexed numbers start at 0 not 1, so just lower the number of your [material] index by one
 
 | 
		
			| Fri Jun 13, 2008 9:03 am | 
					
					   | 
	
	
		|  | 
	
			| lazyfaith 
					Joined: Wed Jan 03, 2007 2:05 pm
 Posts: 174
   |   Re: Custum material issues in sceneworks perfectly. Thanks all of you. This can be locked now. 
 
 | 
		
			| Sat Jun 14, 2008 7:54 pm | 
					
					   | 
	
	
		|  | 
	
	
		|  |