Using two diffuse and emission maps

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Using two diffuse and emission maps

Post 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 );
                            };
                          };
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
submersible
Commodore
Commodore
Posts: 264
Joined: Thu Nov 10, 2011 7:49 am

Re: Using two diffuse and emission maps

Post by submersible »

Smivs - are you trying this with trunk or some stable release? It looks sane to me.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Using two diffuse and emission maps

Post by Smivs »

Yeah 1.76.1 not trunk. It's got me beat :?
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Using two diffuse and emission maps

Post by JensAyton »

That should work fine, please provide test OXP.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Using two diffuse and emission maps

Post by Smivs »

Ahruman wrote:
That should work fine, please provide test OXP.
Thanks. PM on its way to you.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Using two diffuse and emission maps

Post 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.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Using two diffuse and emission maps

Post by Smivs »

Ah, OK. :oops:
Thanks.
Commander Smivs, the friendliest Gourd this side of Riedquat.
Post Reply