Page 1 of 1

Using two diffuse and emission maps

Posted: Tue Jul 31, 2012 10:53 am
by Smivs
Using this code in shipdata, I can only get one emission map working at a time. The diffuse maps are both specified in the .dat file and are appearing on the correct faces in-game. The second one (back) seems to be the default emission map which works, but if I remove the reference to it the 'front' emission map works. There are no log errors.
Am I trying to do the impossible here?

Code: Select all

                materials =
                          {
			  "smivs_brick_front.png" = 
                            { 
emission_map = "smivs_brick_front-em_map.png";
shininess = 10;
specular_color = ( 0.3, 0.3, 0.3, 1.0 );
                            };
			  "smivs_brick_back.png" = 
                            { 
emission_map = "smivs_brick_back-em_map.png";
shininess = 10;
specular_color = ( 0.3, 0.3, 0.3, 1.0 );
                            };
                          };

Re: Using two diffuse and emission maps

Posted: Tue Jul 31, 2012 11:04 am
by submersible
Smivs - are you trying this with trunk or some stable release? It looks sane to me.

Re: Using two diffuse and emission maps

Posted: Tue Jul 31, 2012 11:05 am
by Smivs
Yeah 1.76.1 not trunk. It's got me beat :?

Re: Using two diffuse and emission maps

Posted: Tue Jul 31, 2012 1:07 pm
by JensAyton
That should work fine, please provide test OXP.

Re: Using two diffuse and emission maps

Posted: Tue Jul 31, 2012 2:00 pm
by Smivs
Ahruman wrote:
That should work fine, please provide test OXP.
Thanks. PM on its way to you.

Re: Using two diffuse and emission maps

Posted: Tue Jul 31, 2012 10:05 pm
by JensAyton
The problem is with the script you forgot to mention. setMaterials() replaces the entire materials dictionary; you can’t just set part of it.

Re: Using two diffuse and emission maps

Posted: Tue Jul 31, 2012 10:12 pm
by Smivs
Ah, OK. :oops:
Thanks.