Game Development Community


#1
07/25/2007 (11:06 am)
I can not use this command:

%obj.addSkinModifier(%slot, %skinLocation, %skinName, %maskName, %color1, %color2, %color3, %color4);

what is the meaning of %maskName?

I run below command, it does not work.

%obj.addSkinModifier(0, "p", "base", "mask", "255 255 255 255", "255 0 0 255");

Thank you for your help!
#2
07/25/2007 (11:18 am)
MaskName is a name for "mask" image, that resource uses to read channel information from.
As I can see from your command, you have on a model texture:
base.p.jpg, so you need to have a mask.p.jpg, and in this case you specifiy directly "mask" as an option.
You can have several masks for a single base-texture. Then you specify directly the name of it e.g. mask2, mymask, etc
#3
08/28/2007 (3:32 am)
Your Article seems idiot proof...but i still messed it up!!!

im using torque 1.4.2 and VC++2005EE

all the trouble seems to be in bitStream.cc

c:\torque\sdk\engine\core\bitstream.cc(349) : error C2027: use of undefined type 'ColorI'
        c:\torque\sdk\engine\core\stream.h(44) : see declaration of 'ColorI'
c:\torque\sdk\engine\core\bitstream.cc(349) : error C2228: left of '.red' must have class/struct/union
c:\torque\sdk\engine\core\bitstream.cc(350) : error C2027: use of undefined type 'ColorI'
        c:\torque\sdk\engine\core\stream.h(44) : see declaration of 'ColorI'

~~~blah blah blah same error different line~~~

c:\torque\sdk\engine\core\bitstream.cc(405) : error C2027: use of undefined type 'ColorF'
        c:\torque\sdk\engine\core\stream.h(45) : see declaration of 'ColorF'
c:\torque\sdk\engine\core\bitstream.cc(405) : error C2227: left of '->alpha' must point to class/struct/union/generic type

any ideas?

PS: thanks for making this, this is exactly what i need( once i find out how i screwed it up :P)
#4
09/10/2007 (8:40 pm)
Im sorry, does anyone have any thoughts? if its obvious i apologize im new to C++ ( C by trade)
#5
09/10/2007 (8:43 pm)
It looks like just a .h file isn't being #included. no C++ magic/screwyness going on, i would guess.
#6
12/02/2007 (8:45 am)
I'm getting the same problem as Nathan, can anyone help?
#7
12/02/2007 (9:59 am)
I seem to get 140 compile errors from audio.cc, I didn't even edit it. Any help?
#8
12/04/2007 (11:23 pm)
Well its not everyday I get to look smart so let me throw this one out there. There was something forgotten that I did a short bit of tracking down.

In bitStream.h

after

#include "core/crc.h"

add

#include "core/color.h"
#9
12/05/2007 (7:35 am)
However, my "smart"ness has failed me. Has anyone gotten this thing to work? I throw all of the commands at it in the manner it says too and it just looks at me.

My last attempt was with:

%obj.addSkinModifier(0, "eliminator", "base", "base", "0 255 0 255", "0 0 0 255");

I figured this would at least add a black mask to it, nope nothing. Also yes the "base" texture is all green 0 255 0.
#10
12/05/2007 (9:58 am)
I could not get this to work either. I admit I got frustrated and gave up when I read the header on the TDN site that said the code needed a lot of work.. If it doesnt work I'm not sure why it's there as a resource :/
#11
12/05/2007 (11:54 am)
Yeah thats why I am just going ahead and updating Jeremy Snyder's Colorizing Textures resource based upon the code he had shown since all of the file download links are dead and I haven't been able to reach him to get the 1.5 copy.
#12
12/05/2007 (1:15 pm)
Anyone know why I get 140 compile errors from audio.cc when I put the code in? I didn't even touch it though.
#13
12/05/2007 (1:21 pm)
You changed bitstream.h, which audiodatablock.h calls. You don't have to touch audio.cc when you touch its dependencies.
#14
12/07/2007 (4:28 pm)
Well this is what I get in the console now:

==>2668.addSkinModifier(0, "elminator", "base", "0 0 0 0");
packing skins! 1
preparing: base.elminator 0 0 0 0
Can't open mask! base.elminator 0 0 0 0
DEBUG: ModifySkins: No existing skin in use!
DEBUG: ModifySkins: No existing skin in use!

OK why?
#15
12/08/2007 (12:20 am)
OK to further the confusion for me it seems it is not loading my texture for my vehicle properly even though it shows perfectly in the game. This is what I see in the console (had to use a picture because the special characters seem to tick off this forum):

i72.photobucket.com/albums/i192/DTDA/logentry.jpg
What is happening to the portion that should be "base"?
#16
12/08/2007 (9:37 am)
I know it's a poo load of work but if someone who has this working could update the TDN site with the necessary changes that would rock :)

Thanks
#17
12/09/2007 (10:24 pm)
Yeah something is wrong with the code. I tried echo(2668.getSkinName()); and it gave me "base" which is correct. That means the primary part of the engine that is supposed to detect the skins works, and (YAY!!) its not my vehicle.
#18
02/04/2010 (3:41 am)
If anyone looks, I made a note on the wiki that
//skinModifiers
   if ( newBaseHandle.isValidString())
   {
      newBaseName = newBaseHandle.getString();
      // fail if no skin specified
      if (newBaseName == NULL)
         return;
   }
   else
      newBaseName = defaultBaseName;

should actually be

//skinModifiers
   if ( newBaseHandle.isValidString())
   {
      saveBaseName = newBaseHandle.getString();
      // fail if no skin specified
      if (newBaseName == NULL)
         return;
   }
   else
      saveBaseName = defaultBaseName;