Jump to content

Art Contribution - Technical Help Q&A


MrLux
 Share

Recommended Posts

Spoiler

I there, I'm taking the liberty to post this thread because I tend to have a lot of question that pop into my head while I'm doing the contributions, and when I started I was a little confuse to where to gather information to start as soon as possible the 'art' part. Tell me if it's redondant. I plan to update this first post with answer and knowledge gathered on various post that I read and also to make sure it's the desired way. So expect it to be a little empty for now. I assume some understanding of 3D terms, but I'm open to make a dictionary to allow complete beginners a way of contribution.

-------------------------------------------------------------------
Modelling

Spoiler
  • What are the limitations for the models in terms of polycount?
Quote

See the Guideline for extensive info. 

For reference, small animals is up to fox/chicken size; medium up to dog/wolf/deer; and large bigger than that.

Polycount in models is really triangles count, as models need to be constituted of only triangles for the engine.

  •  Does the model have to be water thigh?
Quote

No, to the contrary. Check the low-poly tips and you well see polycount is more important. Beware in animated models, loose geometry must be correctly weight painted to fit the animations.

  • One mesh with high polycount or one mesh with low polycount and many props?
Quote

For what are props see Export to the Engine; Actors & Templates section.

It's better to have more poly in a mesh than to have more props. Even if props are exchangeable and allow variation of content and rapid overall revision, they imply additional drawcalls in the game. So to use with moderation when doing mesh with high poly count.

 

-------------------------------------------------------------------
UV-layout

Spoiler
  •  Should I pack my uv on an extreme lightmap and be done with it ?
Quote

No. The unwrapping of the uv should allow color correction and texture manipulation afterwards, so unwrapping in a texture artist friendly way is better. For AO map designed to be applied onto buildings, as they are unique, that type of unwrapping is good, allowing maximum information and minimum distortion.

The use of texture atlas also doesn't allow any type of unwrapping. It should be done with the atlas in mind.

  • How to optimise my uv ?
Quote

Mostly think ahead and figure where the texture are similar enough to use the same uv space. Mirror a face, or just turning it by 90deg is often enough to make variation on tethered wall pattern. On buildings look at the atlas already in use for the civilisation. It will allow you to see what types of details and patterns are available.

For organic models, to gain space symmetric uvlayout (uvlaout only half of the model and mirror it. working with a mirror modifier in blender until the very end is a good workflow) is a good choice, both by doubling the available resolution of the model and halving the time to texture it.

 

 

-------------------------------------------------------------------
Texturing

Spoiler
  • How large are the textures allowed to be?
Quote

See the the guide on textures for extensive info. 

- additional info pending

 

  •  What type of textures are in use?
Quote

The engine shaders can read normal, specular, baseColor (as in albedo plus baked AO) and Ambient occlusion information.

Height map are packed in the alpha channel of the normal map.

Specular is a RGB file allowing the full game of colors.

Specular is also used as a mask for coloring player information into the texture. Specular map will be tinted with the player/config specified color.

 

  • Should all my models use all textures available?
Quote

Depends on the size of the object, sometimes diffuse is enough.

On an animated mesh (units, animals, etc) Ao is not usable and should be backed into the diffuse.

Normal maps are only supported on animated mesh with qpushkinning=true in the config file. That will then limit the number of bones to 64, instead of 255. 

 

  • Can the engine make use of combined textures in RGBA channels?
Quote

No, in the habitual sense. The engine does not read a Specular/Displacement/Metallic/Ambien Occlusion map on a RGBA file.

However, the alpha channel in the normal map is used for parallax occlusion mapping. And the alpha channel of the specular channel allow for a inner glow effect.

 

 

 

 

-------------------------------------------------------------------
Rigging

Spoiler

 

  •  What are the limitations of my rig?
Quote

255 bones is the maximum number of bones the engine can use in a skeleton (inclusion of non deform and helper bones is not verified in that limit). If the skinning option is true for the model (to allow use of normal map), then the maximum number of bones is reduced to 64.

 

 

 

 

-------------------------------------------------------------------
Animation

Spoiler

 

  • Under which fps value should I make my animations ?
Quote

- pending

 

 

 

-------------------------------------------------------------------
Export to the Engine; Actors & Templates

Spoiler
  • What is an actor?
Quote

In short, Actor is the name of the .xml file that will give all the info to the engine to render correctly the model, it's animations and it's textures. Without an actor file the engine can't read the information in texture and dae files.

This great article will explain better what they are and how to use them.

  •  What format do 0AD use?
Quote

For the models, Collada DAE file is the required format.

For textures, png format is wanted. The engine will convert them into dds for optimisation sake.

Animations are also exported into Collada DAE file.

  •  What is a prop and that prop point?
Quote

In short props point are an empty in the mesh that give the actor file the coordinates to integrate another actor (so another different mesh) at that place, that actor being called a prop.

This Q&A explains all of it.

  •  What are the naming conventions for the whole thing?
Quote

This explains the naming convention in full

In short:

<general>1_<civ>1_<type>_<extra>_<variation>_number2

Note 1: if the folder of the file already as a path explicit of the general purpose and the civilisations, don't put it in the name.

Note2: number should be two digits and are optional. eq: _01

 

 

-------------------------------------------------------------------

 

Edited by MrLux
1st batch of answers
  • Thanks 1
Link to comment
Share on other sites

So my first question are:

Should I lightpack my uv and be done with it ? I've seen the ao texture doing that, but not the rest. I know for buildings it's normal as we use atlases and they need carefull use of uv. But what about unique textures. I'm not knowledgeable of game art logic (yet) so I was wondering why.

Should all my models use all textures available? Should I make normal, spec, albedo and ao maps for everything?

Can the engine make use of combined textures in RGBA channels? I presume you are familiar with it, but since I didn't see anywhere that type of texture packing I was wondering why?

Link to comment
Share on other sites

Should I lightpack my uv and be done with it ?

I assume you mean Smart UV Project/ Lightmap Pack options of unwrapping in Blender. If that's the case, ambient occlusion is generally the only one that needs that as it's gonna be one texture per model (Although you can sometime manage to use the same texture, eg baking props with the main mesh)

In general unique texture should be retexturable in photoshop for skins, so if you use lightmap or smart uv project that's literally impossible.

1 hour ago, MrLux said:

Should all my models use all textures available? Should I make normal, spec, albedo and ao maps for everything?

Depends on the size of the object, sometimes diffuse is enough. Also note that you can't use AO with animated mesh and you need to bake it into the diffuse, and that normal maps only are supported with animated mesh if you add gpuskinning=true to your config file (That's also what limits the number of bones to 64, else it's 255) I'm not sure the helper bones count into that 64 I think it's only those with weights.

1 hour ago, MrLux said:

Can the engine make use of combined textures in RGBA channels? I presume you are familiar with it, but since I didn't see anywhere that type of texture packing I was wondering why?

Actually I'm not sure, can you show me an example ?

1 hour ago, MrLux said:

normal, spec, albedo and ao

Also note that Albedo is for PBR engines, and that most of the time we need to bake light information in the diffuse, because 0 A.D uses a spec/norm/diff rendering

 

Specular is not limited to black and white, you can also use colors. Transparency used with specular and the glow material creates an inner glow (as in you won't see light on other surfaces)

Transparency on normal maps creates a parallax effect.

AO Maps should not have an alpha channel, although it is supported and does nothing.

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

If we bake ao into the diffuse, why do buildings have an Ao map ?


This is a example of a packed texture. It's for a pbr material but the idea is that the specular texture (in this case all is black and white) is in the red channel, roughness in the green, displacement (or height) in the blue and ao in the alpha. Then the shader gets from those channels the information, instead of getting it off 4 different textures. It helps reducing the size. In our case, i guess specular is tricky because it can be colored but if not, ao, specular and maybe height could be packed in one texture instead of having 3.

Spoiler

 

861289793_T_Birck_SRDAO-Copy.png.5b4e4ef70403d4917427151a7936369a.png

 

 

Quote

Transparency on normal maps creates a parallax effect.

sorry, don't compute. I mean I really don't get it.

 

edit: Thanks, but I didn't know 0AD had a discord. Where is the link ?

Edited by MrLux
Link to comment
Share on other sites

3 minutes ago, MrLux said:

If we bake ao into the diffuse, why do buildings have an Ao map ?

We only do when we need to. You can't bake AO on a texture atlas :) You could bake a new texture from the Atlas but then you'll lose all the advantages of the texture atlas, about performance and reusability

3 minutes ago, MrLux said:

sorry, don't compute. I mean I really don't get it.

We use the alpha channel as the height channel :) That's the only case of texture combination I know.  Shaders would have to be edited in order to process the others.

 

Link to comment
Share on other sites

1 minute ago, Stan` said:

We only do when we need to. You can't bake AO on a texture atlas :) You could bake a new texture from the Atlas but then you'll lose all the advantages of the texture atlas, about performance and reusability

Where I'm not getting it it's how to express multiple uvmap in the engine, because ao uv use and diffuse use are not on the same uvmap

1 minute ago, Stan` said:

We use the alpha channel as the height channel :) That's the only case of texture combination I know.

Ahhh, yeah of course. So for the other types, no use?

Link to comment
Share on other sites

1 minute ago, MrLux said:

Ahhh, yeah of course. So for the other types, no use?

Not that I know of.

1 minute ago, MrLux said:

Where I'm not getting it it's how to express multiple uvmap in the engine, because ao uv use and diffuse use are not on the same uvmap

The engine only knows those two for now. The shaders are told to use UV1 for diffuse and UV2 for AOmap you cannot override this. You're limited to one material per model

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...