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: 10238
Joined: 24 Jan 2006, 21:12

Base Textures

Post by PicassoCT » 06 May 2016, 22:16

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.
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: Base Textures

Post by smoth » 07 May 2016, 01:08

What did I do? I don't know what this is about/for
0 x

gajop
Moderator
Posts: 3023
Joined: 05 Aug 2009, 20:42

Re: Base Textures

Post by gajop » 07 May 2016, 01:23

smoth wrote:What did I do? I don't know what this is about/for
Image
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: Base Textures

Post by smoth » 07 May 2016, 01:26

I am confused but there is nothing irregular there.
0 x

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

Re: Base Textures

Post by PicassoCT » 07 May 2016, 09:41

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.
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: Base Textures

Post by smoth » 08 May 2016, 04:50

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
0 x

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

Re: Base Textures

Post by PicassoCT » 08 May 2016, 11:52

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
0 x

User avatar
Karl
Panzerstahl Developer
Posts: 746
Joined: 01 Apr 2010, 21:05

Re: Base Textures

Post by Karl » 14 May 2016, 20:25

So that means you don't need a UV-mapped models anymore for this? Also does this shader work okayish/average on triangle faces?
0 x

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

Re: Base Textures

Post by PicassoCT » 14 May 2016, 21:15

Yes - smoth and gajop rock :D
0 x

User avatar
Karl
Panzerstahl Developer
Posts: 746
Joined: 01 Apr 2010, 21:05

Re: Base Textures

Post by Karl » 14 May 2016, 21:18

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.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14606
Joined: 17 Nov 2005, 02:43

Re: Base Textures

Post by Forboding Angel » 18 May 2016, 11:17

Add pics so we can verify that it happened?
0 x

User avatar
code_man
Posts: 260
Joined: 19 Jan 2014, 13:10

Re: Base Textures

Post by code_man » 24 May 2016, 17:40

I would love to test this asap.
0 x

Post Reply

Return to “Game Development”