Aimed at: beginner
Should I know this: of course you should, silly!
---
First of all: this tutorial only covers the render groups available for XNALara. I will make an additional tutorial with the new renders groups that XPS uses, once I learn a bit more about them (or add the info to this one, not sure yet).
XNALara (also XPS and GLLara) uses so-called 'render groups'. These are pretty much material settings that have their own number, depending on the textures used etc. You can change the render group for any given mesh, by changing the render group number. I will describe in this tutorial how this is done, and also which render groups we have for XNALara (XPS coming later) and how many textures are needed (and which ones).
The number of the render group comes at the very beginning of the line of the text which is the full mesh name. See this tutorial for more information, you should read that one first. You can change the render group by simply typing a different number in Notepad (then save and convert), or in Blender or in any other program that lets you export models in the .mesh.ascii format. Type the number at the very beginning of the mesh name. Attention: changing the number alone is not enough, you must also make sure that the number of required textures is correct (see below), otherwise the .mesh.ascii --> .mesh converter will crash or it won't load in XNALara.
Here is an example of a mesh, from the previous tutorial about Notepad (mesh starts with the blue marked line of text):
You can see that this mesh uses render group 24. This is a material that uses a diffuse texture (the colouring), a lightmap (baked ambient occlusion effect that's multiplied on top of the colours), a normal map (the 'bump' effect) and a specular map (for shine). So 4 textures. It will not work correctly if you use less or more than 4 textures, so pay attention. You also need to make sure that the order of the textures is correct, otherwise it will look wrong. Use the shine value or 'spec strength' (which is 1.0 in the example image) to determine how strong you want the specular effect to be. When you use a render group that supports spec maps, you can also use the spec map to control which part of the mesh needs shine and which part doesn't (this is very useful and will give you nice results). If the mesh is really simple, you can decide to pick a render group that doesn't use a spec map and use the shine value alone to make it more or less shiny. The shine will then be the same everywhere on the mesh and it will be simply 'white', while a spec map can be coloured if you like.
There are many render groups to pick from. It all depends on what you are looking for and how many textures you have to work with. Some models have 'minibumps', those are small normal maps that can be repeated on the mesh to give it a nice texture. In general: if you have the textures, use them!
Now I will list the groups that are used the most. There are others, but I think those are simply duplicates of other render groups or for some reason not very useful. Anyway, you can always check the full, complete list of render groups here. That's a table made by XNAaraL. You can see here how to use this table. Let's move on to the render groups:
Render group 1
- # of textures: 6 (diffuse - light - bump - mask - minibump1 - minibump2)
- alpha channel: no (so no transparency support)
- reaction to light settings: yes (no = shadeless)
- render group #_name_shine value_minibump 1 repeat factor_minibump 2 repeat factor_(camera target, optional)
- example:
Code: Select all
1_trousers_0.1_24_24
1 # uv layers
6 # textures
trousers_diffuse.png
0 # uv layer index
trousers_lightmap.png
0 # uv layer index
trousers_bump.png
0 # uv layer index
trousers_mask.png
0 # uv layer index
trousers_bump1.png
0 # uv layer index
trousers_bump2.png
0 # uv layer index
- # of textures: 3 (diffuse - light - bump)
- alpha channel: no
- reaction to light settings: yes
- render group #_name_shine value_minibump 1 repeat factor (no support)_minibump 2 repeat factor (no support)_(camera target)
- example:
Code: Select all
2_body_0.1_0_0
1 # uv layers
3 # textures
body_diffuse.png
0 # uv layer index
body_lightmap.png
0 # uv layer index
body_bump.png
0 # uv layer index
- # of textures: 2 (diffuse - light)
- alpha channel: no
- reaction to light settings: yes
- render group #_name_shine value_minibump 1 repeat factor (no support)_minibump 2 repeat factor (no support)_(camera target)
- example:
Code: Select all
3_backring_0.1_0_0
1 # uv layers
2 # textures
backring_diffuse.png
0 # uv layer index
backring_lightmap.png
0 # uv layer index
- # of textures: 2 (diffuse - bump)
- alpha channel: no
- reaction to light settings: yes
- render group #_name_shine value_minibump 1 repeat factor (no support)_minibump 2 repeat factor (no support)_(camera target)
- example:
Code: Select all
4_metal_0.6_0_0
1 # uv layers
2 # textures
metal_diffuse.png
0 # uv layer index
metal_bump.png
0 # uv layer index
- # of textures: 1 (diffuse)
- alpha channel: no
- reaction to light settings: yes (but no shine)
- render group #_name_shine value (no support)_minibump 1 repeat factor (no support)_minibump 2 repeat factor (no support)_(camera target)
- example:
Code: Select all
5_eyewhites_0.1_0_0
2 # uv layers
1 # textures
eyewhites_diffuse.png
0 # uv layer index
- # of textures: 2 (diffuse - bump)
- alpha channel: yes
- reaction to light settings: yes
- render group #_name_shine value_minibump 1 repeat factor (no support)_minibump 2 repeat factor (no support)_(camera target)
- example:
Code: Select all
6_hair2_0.1_0_0
1 # uv layers
2 # textures
hair_diffuse.png
0 # uv layer index
hair_bump.png
0 # uv layer index
- # of textures: 1 (diffuse)
- alpha channel: yes
- reaction to light settings: yes (no shine)
- render group #_name_shine value (no support)_minibump 1 repeat factor (no support)_minibump 2 repeat factor (no support)_(camera target)
- example:
Code: Select all
7_eyebrows_0.1_0_0
1 # uv layers
1 # textures
eyebrows_diffuse.png
0 # uv layer index
- # of textures: 3 (diffuse - light -bump)
- alpha channel: yes
- reaction to light settings: yes
- render group #_name_shine value_minibump 1 repeat factor (no support)_minibump 2 repeat factor (no support)_(camera target)
- example:
Code: Select all
8_fur1_0.1_0_0
1 # uv layers
3 # textures
fur1_diffuse.png
0 # uv layer index
fur1_lightmap.png
0 # uv layer index
fur1_bump.png
0 # uv layer index
- # of textures: 1 (diffuse)
- alpha channel: no
- reaction to light settings: no (shadeless)
- render group #_name_shine value (no support)_minibump 1 repeat factor (no support)_minibump 2 repeat factor (no support)_(camera target)
- example:
Code: Select all
10_eyepupils_0.1_0_0
2 # uv layers
1 # textures
eyepupils_diffuse.png
0 # uv layer index
- # of textures: 6 (diffuse - light - bump - mask - minibump1 - minibump2)
- alpha channel: yes
- reaction to light settings: yes
- render group #_name_shine value_minibump 1 repeat factor_minibump 2 repeat factor_(camera target)
- example: see group 1 for code
Render group 21
- # of textures: 1 (diffuse)
- alpha channel: yes
- reaction to light settings: no (shadeless)
- render group #_name_shine value (no support)_minibump 1 repeat factor (no support)_minibump 2 repeat factor (no support)_(camera target)
- example: see group 10 for code
Render group 22
- # of textures: 7 (diffuse - light - bump - mask - minibump1 - minibump2 - spec)
- alpha channel: no
- reaction to light settings: yes
- render group #_name_shine value_minibump 1 repeat factor_minibump 2 repeat factor_(camera target)
- example:
Code: Select all
22_suit_0.7_20_1
1 # uv layers
7 # textures
suit_diffuse.png
0 # uv layer index
suit_lightmap.png
0 # uv layer index
suit_bump.png
0 # uv layer index
suit_mask.png
0 # uv layer index
bump1.png
0 # uv layer index
bump2.png
0 # uv layer index
suit_spec.png
0 # uv layer index
Render group 23
- # of textures: 7 (same as 22)
- alpha channel: yes
- reaction to light settings: yes
- render group #_name_shine value_minibump 1 repeat factor_minibump 2 repeat factor_(camera target)
- example: see group 22 for code
Render group 24
- # of textures: 4 (diffuse - light - bump - spec)
- alpha channel: no
- reaction to light settings: yes
- render group #_name_shine value_minibump 1 repeat factor (no support)_minibump 2 repeat factor (no support)_(camera target)
- example:
Code: Select all
24_arms_0.8_0_0
1 # uv layers
4 # textures
body_diffuse.png
0 # uv layer index
body_lightmap.png
0 # uv layer index
body_bump.png
0 # uv layer index
body_spec.png
0 # uv layer index
- # of textures: 4 (same as 24)
- alpha channel: yes
- reaction to light settings: yes
- render group #_name_shine value_minibump 1 repeat factor (no support)_minibump 2 repeat factor (no support)_(camera target)
- example: see group 24 for code
Render group 26
- # of textures: 3 (diffuse - bump - environment)
- alpha channel: no
- reaction to light settings: 'no' (shadeless, but reflection effect becomes stronger when light intensity is lowered)
- render group #_name_reflection value (0.0 to 1.0)_minibump 1 repeat factor (no support)_minibump 2 repeat factor (no support)_(camera target)
- example:
Code: Select all
24_arms_0.8_0_0
1 # uv layers
3 # textures
metal_diffuse.png
0 # uv layer index
metal_bump.png
0 # uv layer index
environment.png
0 # uv layer index
- # of textures: 3 (same as 26)
- alpha channel: yes
- reaction to light settings: 'no' (shadeless, but reflection effect becomes stronger when light intensity is lowered)
- render group #_name_reflection value (0.0 to 1.0)_minibump 1 repeat factor (no support)_minibump 2 repeat factor (no support)_(camera target)
- example: see group 26 for code
Render group 28*
- # of textures: 6 (diffuse, bump, mask, minibump1, minibump2, environment)
- alpha channel: no
- reaction to light settings: yes
- render group #_name_reflection value (0.0 to 1.0)_minibump repeat factor (one value for both maps)_(camera target)
- example:
Code: Select all
28_jacket1_0.2_0.5_16.0
1 # uv layers
6 # textures
jacket_diffuse.png
0 # uv layer index
jacket_bump.png
0 # uv layer index
jacket1_mask.png
0 # uv layer index
jacket1_bump1.png
0 # uv layer index
jacket1_bump2.png
0 # uv layer index
environment.dds
0 # uv layer index
- # of textures: 6 (diffuse, bump, mask, minibump1, minibump2, environment)
- alpha channel: yes
- reaction to light settings: yes
- render group #_name_reflection value (0.0 to 1.0)_minibump repeat factor (one value for both maps)_(camera target)
- example: see group 28 for code
Examples above were mostly taken from Tomb Raider Underworld models (released by Dusan) or from mods that people made 'back in the day'. xD
Ok so you read all of the above ( ), but you're still not sure which group to pick for your mesh? Don't worry, the following information might help you out. First you need to figure out what you want the mesh part to look like in XNALara. Does it need minibumps? If yes, go for render group 1 or 2 (2 supports transparency, 1 doesn't) OR, in case you want to add a spec map as well, pick either group 22 or 23 (23 supports transparency). But you can also decide to pick group 28 or 29, in case you want to add a metallic kind of effect (reflection). Not so complicated now, is it? So that's how you work. If you don't want to add minibumps, but you do have nice spec maps to use, pick either group 24 or 25 (25 supports transparency). If you have something that's supposed to be made out of metal, you can pick a group that uses the metallic shader. But it might not always look so nice, so you got to experiment a bit. Also with the strength values for specularity and reflection, just try something and check the result in XNALara. If you don't like it, go back and change it, etc. etc. The shadeless groups are nice in case something is supposed to 'glow'. Lowering the intensity of the lights in XNA will make this effect even stronger, since the rest will become darker. Hope this helps. If you have any questions, feel free to ask below!
Thanks to: Dusan, XNAaraL, $AtlantiB$
---
Coming next:
- camera targets
- textures
- rigging a simple model from scratch
(cam targets first cuz it's easy hehe)