Sticklove Fountain of Knowledge

Post your XNALara tutorials here!

Moderators: Dazzy, Runa

User avatar
Love2Raid
Moderator
Posts: 6103
Joined: Sat Aug 18, 2012 6:10 am
Custom Rank: w

Render groups for XNALara

Post by Love2Raid »

Type of entry: theoretical information
Aimed at: beginner
Should I know this: of course you should, silly!
---
~INTRODUCTION~
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):

Image

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 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
Render group 2
  • # 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
Render group 3
  • # 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
Render group 4
  • # 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
Render group 5
  • # 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
Render group 6
  • # 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
Render group 7
  • # 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
Render group 8
  • # 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
Render group 10
  • # 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
Render group 20
  • # 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
Render group 25
  • # 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
Render group 27
  • # 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
Render group 29*
  • # 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
*Groups 28 and 29 require shaders v3.0, meshes might show up invisible for some people. Keep this in mind.
Examples above were mostly taken from Tomb Raider Underworld models (released by Dusan) or from mods that people made 'back in the day'. xD

~CHOOSING THE APPROPRIATE RENDER GROUP~
Ok so you read all of the above ( :shock: ), but you're still not sure which group to pick for your mesh? :sweat: 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? :D 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)
User avatar
Straight Edge
Posts: 20
Joined: Sat Aug 02, 2014 9:38 am
Custom Rank: Steward

Re: Sticklove Fountain of Knowledge

Post by Straight Edge »

Thanks very much for all the useful tutorials you have all generously shared. :D

I was wondering if anyone can write or direct me towards one that can explain how to correct this?
Image

The one on the left is my epic fail attempt at converting a model with hair to look like the one on the right. I'm still new to all this and learned while browsing various threads at TRF that loading the textures and setting transparency isn't enough. Something about removing double faces but found nothing that elaborated further upon this. Any help would be appreciated.
User avatar
Dazzy
Site Admin
Posts: 10369
Joined: Sat Aug 18, 2012 3:15 am
Custom Rank: WestAllen best ship.
Location: With Grant Gustin :ggl:
Contact:

Re: Sticklove Fountain of Knowledge

Post by Dazzy »

Thats a UV problem, its common on Mortal Kombat 9 models, and can be very confusing for starters in porting D:
Image
All I wanna do, is come runnin' home to you, come runnin' home to you.
And all my life I promise to, keep runnin' home to you, keep runnin' home to you.
User avatar
Straight Edge
Posts: 20
Joined: Sat Aug 02, 2014 9:38 am
Custom Rank: Steward

Re: Sticklove Fountain of Knowledge

Post by Straight Edge »

I see. So merging the hair meshes together, removing doubles and materials, selecting all vertices and repositioning them over the diffuse map in the UV/Image Editor should do the trick?
User avatar
Dazzy
Site Admin
Posts: 10369
Joined: Sat Aug 18, 2012 3:15 am
Custom Rank: WestAllen best ship.
Location: With Grant Gustin :ggl:
Contact:

Re: Sticklove Fountain of Knowledge

Post by Dazzy »

Not really, the vertices are assigned to the wrong place on the uv map, you would need to move each of the faces on the uv map to the correct place.
Image
All I wanna do, is come runnin' home to you, come runnin' home to you.
And all my life I promise to, keep runnin' home to you, keep runnin' home to you.
User avatar
Straight Edge
Posts: 20
Joined: Sat Aug 02, 2014 9:38 am
Custom Rank: Steward

Re: Sticklove Fountain of Knowledge

Post by Straight Edge »

Oh boy. Sounds like a real pain and a lot of guess work. :?

Thanks for your help though, I best start practicing some more.
User avatar
UCVick
Posts: 14
Joined: Mon Aug 25, 2014 2:57 pm

Re: Sticklove Fountain of Knowledge

Post by UCVick »

woah thanks now I have a lot useful information to read thanks
User avatar
Love2Raid
Moderator
Posts: 6103
Joined: Sat Aug 18, 2012 6:10 am
Custom Rank: w

Tutorial: rigging a simple model - part I

Post by Love2Raid »

Type of entry: tutorial
Aimed at: beginner (with knowledge of Blender's user interface)
Should I know this: if you're interested in rigging
---

This is the first part of a tutorial series that I want to write about basic rigging. Very basic. :pi: The object that we will be rigging this time is a simple rope, as requested by daventry.

Alright, here we go then. First we have to import a static rope model in Blender. I'm just going to create a cylinder object for this tutorial, because finding and downloading one would take much more time. :lol:
rigging_part1_1.jpg
OK, it's time to create an armature (skeleton)! :cheer: Hit the Space bar. Go to Add, Armature and click on it.
rigging_part1_2.jpg
A bone was created at the point of the cursor (which I moved out of the way for this picture). It looks a bit like a cone, the base is the pivot of the bone (the point around which it rotates).
rigging_part1_3.jpg
Make sure the bone is in the correct position. In Edit mode, you rotate the entire thing (R, Y, 90 followed by Enter) and drag it to the right place at the start of the rope. If you enable the X-Ray function, you can see the bones through the mesh. Very useful.
rigging_part1_4.jpg
Click on Stick if you prefer the bones looking like sticks. (Because Sticklove!! :fyea: )
rigging_part1_5.jpg
Click on the end of the bone (right dot) and drag it towards the end of the rope, stretching the bone. If you hit G, followed by either X, Y or Z, you can lock the direction you move the dot in to the respective axis, which can be very useful. By the way, don't edit (resize or move) the skeleton in Object mode. This can cause problems in XNALara/XPS.
rigging_part1_6.jpg
Once you're done, you can rotate the view to check the result from all angles.
rigging_part1_7.jpg
So, we added one long bone. Not really what we were going for, is it? Time to subdivide this baby! Select the bone (you are still in Edit mode), go to Armature and then Subdivide (or hit W, followed by 1).
rigging_part1_8.jpg
You can do this as many times as you want. If you have a very detailed rope model (high polycount), you can create many bones to increase the usefulness of it. It is completely pointless to add a lot of bones to a low-poly model!! (The boneweight is added to the vertices. Every vertex can 'carry' weight that corresponds to up to 4 different bones ('vertex groups'), no more (and the total weight must be 1) if you want it to work properly in XNALara/XPS.) I subdivided the rope 3 times, resulting in a skeleton with 8 bones.
rigging_part1_9.jpg
One thing. We created this simple armature by adding one bone, adjusting it and then subdividing this one bone to get more of them. You could also start with adding a bone at one end of the rope and then you could click on the dot at the end of it, hit the E button and drag with the mouse to extrude a new bone from the first one. But why go through all that trouble, when there's a much easier and faster way? ;)

Right, so we have a rope and we have an armature. Let's rename the bones. There are several ways to do this, I recommend using the Outliner window. Hold the Ctrl button and click on the name of the bone you want to rename with the left mouse button (LMB). You can now delete the name and type a new one. Click again anywhere with LMB once you're done to confirm. Do this for all the bones. (NB: You can also rename the bones after the weights have been added to the object.)
rigging_part1_10.jpg
rigging_part1_11.jpg
Enable Names to see the names of the bones in the 3D window:
rigging_part1_12.jpg
Final step: add weights to the rope model so that the bones will deform it when rotated/moved (i.e. it will become 'poseable'). You can paint all the weights on it yourself, if you want, but I won't cover that in this tutorial. For this type of model, it is a lot easier (and faster xD) to let Blender do the job. First, click on the rope. (Make sure the object has no weights/vertex groups at all, otherwise it will not work. Check the picture below.) Then hold the Shift button while you click on the armature. Do it in this order. Now go to Object, Parent, Make Parent (Ctrl + P), click on (Make Parent to) Armature and finally, pick the (Create Vertex Groups from) Bone Heat option, which is the 'auto-rig' function.
rigging_part1_13.jpg
rigging_part1_14.jpg
rigging_part1_15.jpg
Now all you have to do is wait for Blender to calculate and add the weights and voilà, you just rigged a rope model! Go ahead and test it in Pose mode. If anything is off, you can always manually fix the bugs with weight painting (not going to explain how that works, right now).
rigging_part1_16.jpg
(This armature has 16 bones. Turned out 8 weren't enough, lol.)

Good luck! If you have any questions or recommendations, please reply in this thread. :)
You do not have the required permissions to view the files attached to this post.
User avatar
Love2Raid
Moderator
Posts: 6103
Joined: Sat Aug 18, 2012 6:10 am
Custom Rank: w

Re: Sticklove Fountain of Knowledge

Post by Love2Raid »

daventry wrote:Your Tutorial is Fantastic, two questions though. :D

Doesent XPS11 Auto Weight (Weight Paint) the Model when you Export with generic_item.mesh.ascii(Ext), hence no need for an explanation in Weight Painting in witch i dont get anyway since i see the Model in Blender with a Blue/Red Color. :oops:

How exactly do i check the Vertex Group/Armature in the end, since to me the Bones move outside of the Model in witch i assume i have either too many bones or too little for my Low Poly Model. I gave it 8 Bones. :?

What i did
http://s21.postimg.org/o7etkvh2t/Screen_Shot01.jpg
http://s21.postimg.org/n6ekvr039/Screen_Shot02.jpg
http://s21.postimg.org/jbb6t6gxh/Screen_Shot03.jpg
http://s21.postimg.org/jpciss111/Screen_Shot04.jpg
http://s21.postimg.org/dporp4g8l/Screen_Shot05.jpg
http://s21.postimg.org/qicvp1rud/Screen_Shot06.jpg

Result Model
https://www.sendspace.com/file/jjk29v
Thanks! I don't see what the problem is, you did very well. The model works fine:

Image

This low-poly model has a good amount of bones (although you could still add one more to each end, as you can see in the 'wireframe' image above). If you want more bones, you're going to have to increase the polycount of the model. If you want to do that, you might as well add a higher resolution diffuse texture (this one looks awful) and create a normal map and spec map, while you're at it. I know it's supposed to be a worm, but some extra work might just make it look a little less disgusting. :P
daventry
Posts: 126
Joined: Wed Aug 28, 2013 7:07 am
Location: South Africa

Re: Sticklove Fountain of Knowledge

Post by daventry »

You can do this as many times as you want. If you have a very detailed rope model (high polycount), you can create many bones to increase the usefulness of it. It is completely pointless to add a lot of bones to a low-poly model!! (The boneweight is added to the vertices. Every vertex can 'carry' weight that corresponds to up to 4 different bones ('vertex groups'), no more (and the total weight must be 1) if you want it to work properly in XNALara/XPS.)

add weights to the rope model so that the bones will deform it when rotated/moved (i.e. it will become 'poseable'). You can paint all the weights on it yourself

This armature has 16 bones. Turned out 8 weren't enough

Give the Model a higher resolution diffuse texture and create a normal map and spec map
How and when do you check if the Model has the correct weights and vertices and bones and Polycount, because after i heat the Model with the Armature and go to Pose Mode for testing, the Bones move out from the Model instead of with the Model.

When Exporting with generic_item.mesh(Ext) Blender gives me a diffuse texture normal map spec map, but how do i make them Higher.

Since i dont understand Weight Painting, i just leave it allone and let XPS Weight Paint the Model for me.

I made a Tutorial to make myself understand better, so please go there and scroll down to the part about Rig it Yourself.
http://www.xnalara.org/viewtopic.php?f= ... 994#p68994

Image
Image
Post Reply