Base Textures

Base Textures

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Base Textures

Post by PicassoCT »

Hi this is a quick and dirty tutorial to DefaultTextures,

1. What are DefaultTextures ?
As the name allready says, they are basic Texture-shaders, bundled with base Content. Its all based on Smoths Lua-Texture-Shader.
There are four of them at the Moment:
  • Rubber
    Renders a Object as a black rubber like type
    Iron:
    Shows a object as a single piece of perfect iron.
    Color:
    Renders the whole piece, in the specified colour and second colour. Usefull for Gunports and Lights.
    PaintedMetall:
    Renders a piece, per quad as Coloured Textured surface, with the borders beeing abbrassed by use
    TeamPaintedMetall:
    Same as PaintedMetall but in Team Colour
Now how does this apply to your game?

First you need a model, thats several seperate pieces.
Do not specify a texture for your unit in UpSpring or Blender.
Now go into the Unitdef of the unit that uses the model.
Create a Tag called CustomParams={} if you did not see one allready.
Inser the following Code into the CustomParams Table.

Code: Select all

 CustomParams={
DefaultTexture={
   ["TankWhee2"]="Rubber",
   ["TankWhee1"]="Rubber",
   ["TankWhee3"]="Rubber",
   ["TankWhee4"]="Rubber",
   ["TankBody"]={type="PaintedMetall", colour={r=128,g=128,b=128}}
   ["TankTop"]="TeamPaintedMetall"
}
} 
The naming convention is fairly obvious. Its Piecename= TypeOfTextureShader to apply.
One final information- the painted Metall TextureShader is applied per Quad, which means, it will look better, if that part of the modell consists of relative huge polygons. Of course the same System can be applied to features, within the limitation, that every feature consists of just one piece.

DefaultTextureShaders are part of Spring 103.0 upwards.


Have fun making your own game. Its easy again.
PS: Will update with photos later.

Thanks goes to smoth and gajop.

If you got any questions, post them below.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Base Textures

Post by smoth »

What did I do? I don't know what this is about/for
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Base Textures

Post by gajop »

smoth wrote:What did I do? I don't know what this is about/for
Image
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Base Textures

Post by smoth »

I am confused but there is nothing irregular there.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Base Textures

Post by PicassoCT »

Getting beginners with more then tutorial videos on board- might be worth-while :D
And you contribooted with that per Piece-Texture-Shadder Smoth.
The glue-code has just not dryed yet.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Base Textures

Post by smoth »

The shader it's self was mostly peet and beherith. I just wrote the code to do the underworkings for color assignment etc. It's a lot of work and I did tweak the shader here and there but the shader was peet and behe

As far as peice shader, the thing where you attach model that was pressureline and jk I believe
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Base Textures

Post by PicassoCT »

We might get some of the ease of use back after all, that kicked spring into over-drive back then.
This Open MSPaint, put the files in a folder, hit the exe and play on it- easyness.

If someone can texture a model, by simply putting it into the Folder, naming the pieces and be done with it. Thats a archievment unlocked.

+1 for Base Textures becoming part of BaseContent
User avatar
Karl
Panzerstahl Developer
Posts: 746
Joined: 01 Apr 2010, 21:05

Re: Base Textures

Post by Karl »

So that means you don't need a UV-mapped models anymore for this? Also does this shader work okayish/average on triangle faces?
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Base Textures

Post by PicassoCT »

Yes - smoth and gajop rock :D
User avatar
Karl
Panzerstahl Developer
Posts: 746
Joined: 01 Apr 2010, 21:05

Re: Base Textures

Post by Karl »

Interesting... I think I will give it a go soon. So that shader thing if I understand right is already added in Spring 103? Very well, sounds like a upgrade from 3do texturing method.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Base Textures

Post by Forboding Angel »

Add pics so we can verify that it happened?
User avatar
code_man
Posts: 260
Joined: 19 Jan 2014, 13:10

Re: Base Textures

Post by code_man »

I would love to test this asap.
Post Reply

Return to “Game Development”