Jump to content

Photo

Tutorial: Skin Texturing

LEGO Racers Tutorial Skin Texturing BMP Modding

  • Please log in to reply
73 replies to this topic

#46
alan

alan

    Map Creator

  • Donators
  • PipPipPipPip
  • 382 posts

Yes, I know, just wanted to tell lu9 that it actually worked (maybe he should have used another browser).



#47
MrElephant

MrElephant

    Modder

  • Members
  • PipPipPip
  • 55 posts

Hey Jimbob it looks like you have done a lot of work here while I was gone.  I see now you can even edit commander colds uniform that I wasnt able to do before for some reason. ( I forget the reason now).  Anyways I am going to review this tutorial. It seems more informative than it was before.



#48
Nitegeist

Nitegeist

    Member

  • Members
  • PipPip
  • 20 posts
Quick question- do we know how the alpha channel works?
I mean, how do i know what pixels are transparent while i edit the texture?

For example: i took this texture
Spoiler

This is what it looks like in-game
Spoiler

I simply blew up the size to 1024x1024, and got this
Spoiler


Now, there are holes all over, but i frankly was expecting the alpha channel to disappear completely, and i was pleasantly surprised to see it still there and properly scaled.

Again, how does the alpha channel work? Knowing that, a lot of textures could be greatly improved (for example, the red horse helmet-thing on Basil's car and the fence in the background that look like crap now. Also notice how simply scaling up the helmet texture makes the alpha edges smoother)
Also, i guess we can't get varying degrees of transparency, right?

#49
JimbobJeffers

Good question Nitegeist!

 

To get the bad news out of the way, you can't have semi-transparency. Pixels are either clear or filled. This is because the game defines transparency by assigning each individual texture with a certain RGB colour code to use for transparency. For instance, Basil the Batlord's hat above uses a certain shade of black as its transparency colour. When the game loads the texture, it searches for the specific RGB colour used for transparency and displays them as clear pixels instead in-game.

 

However, the good news is this does mean that you can choose what colour is used for transparency, and thus what parts of the texture are transparent. The RGB colour code required for a pixel to be transparent is defined in the relevant binary file - I can't remember which ones, having a quick look through now I can't find them, but I'm sure they're there somewhere. You can obviously just use the default colour though if it's easier than editing the binary files. This means you can easily create HD versions (like you have) with the transparency still working correctly, just make sure you don't anti-alias the image but instead use hard edges.

 

On a side note, Basil's helmet splits the texture into squares rather than accurate shapes, meaning that you can give him twin flags instead of dragon wings :D Most helmets do this, although I'm not sure about Achu's.

 

I hope that's helped!


  • jamesster, alan and RobExplorien thanked this

#50
RobExplorien

However, the good news is this does mean that you can choose what colour is used for transparency, and thus what parts of the texture are transparent. The RGB colour code required for a pixel to be transparent is defined in the relevant binary file - I can't remember which ones, having a quick look through now I can't find them, but I'm sure they're there somewhere.

 

Maybe I found something relevant to the transparency subject:

 

Please Login or Register to see this Hidden Content



 

Found in the BODYPART.TDB file in the PARTDB archive (in MENUDATA). Not all entries have k_2C though, but this can be added in every entry if desired. I suppose that the RGB or HSB is listed under k_2C, taking it that 217 would be red/hue, 252 green/saturation and 252 blue/brightness in this case.

 

EDIT: Darn code won't list correctly.

EDIT2: It works! (using RGB color codes)


  • alan thanked this

#51
Nitegeist

Nitegeist

    Member

  • Members
  • PipPip
  • 20 posts
YES! Awesome!

k_2C // Transparent Color // CONFIRM THIS ONE 217 252 252

217/252/252 is an RGB value.

i set it to 252/0/252 for BB_hat and used the same color in the bmp file for the alpha channel...
Spoiler



...and this is what it looks like in-game. Perfect!
34o3oqu.png

#52
JimbobJeffers

Thanks for finding that Rob! I should have remembered seeing it there from yesterday when I was looking through...

 

Nice work there on Basil, Nitegeist.

 

 

I guess we can now do stuff like this:

Spoiler


  • jamesster and alan thanked this

#53
RobExplorien

Whoo, awesome, especially the Skeleton, though I don't know what's up with his legs.



#54
JimbobJeffers

I might add this to the tutorial in the OP tomorrow then, if it'd be handy.



#55
jamesster

Oh wow, it never occurred to me that things like that could be possible. Awesome.

#56
Brickulator

Brickulator

    Rolling round in tangerines

  • Donators
  • PipPipPip
  • 199 posts

Please Login or Register to see this Hidden Content

 

I was literally thinking about how to make a Rayman skin today :P This is an awesome discovery.



#57
JimbobJeffers

I'm sure you'd do a better job than... Whatever it is I produced.

 

On a side note, I just noticed that I posted this tutorial on the day the world was supposed to end.



#58
alan

alan

    Map Creator

  • Donators
  • PipPipPipPip
  • 382 posts

Really a good work! You one step further into modding Lego Racers. New possibilities have revealed, thank you two!



#59
le717

Wait, wait. So we can now make semi-transparent textures? Yeeeehaw! Quick! Update this tutorial with clear directions on how to do it! ;P



#60
jamesster

Wait, wait. So we can now make semi-transparent textures? Yeeeehaw! Quick! Update this tutorial with clear directions on how to do it! ;P

To get the bad news out of the way, you can't have semi-transparency. Pixels are either clear or filled.





Also tagged with one or more of these keywords: LEGO Racers, Tutorial, Skin, Texturing, BMP, Modding