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

Sticklove Fountain of Knowledge

Post by Love2Raid »

We have a lot of talented, experienced XNALara users in here and also a lot of new users who are eager to learn more, so why not share what we all know? :)

You can use this thread if you want to share random bits of useful info about XNALara/modding/Blender etc. without the need of making a new thread for it, or even post full tutorials. There doesn't have to be a logical order, some can be for beginners and others for more advanced users. A lot of people might already know what you want to share, but that's totally okay. There will be more people out there who don't, and are looking for exactly that information. The more 'basic' things in particular are not easy to find, since there just isn't one place where one can find everything. Most knowledge was shared in various threads (on TRF, or other forums) and by sending eachother private messages. So this thread can be used to collect all kinds of short tutorials and tricks that someone needs to know to be capable of making at least decent XNALara ports. There is no use in keeping it all to yourself, all of us will eventually move on to other things. It would be a shame if the knowledge went with us. 'Sharing is caring.' :evillaugh:

All entries will be collected and put in the second post of this thread, so that everyone will be able to easily find them without the need of searching through the entire thread. It could still be useful to do that anyway, there might be some interesting discussion. ;)

Feel free to share your knowledge here, but there are some rules that you MUST follow (otherwise I'll delete the entry):
- entries should only be about things related to XNALara modding and porting, not about other things like rendering etc.!!
- the tip/tutorial/trick must be written by YOURSELF and not someone else
- it's totally OK if you inspired it on a tutorial by another person, but in that case you should credit them (and don't just copy-paste)
- make sure you properly tested whatever trick you want to share, it should actually work and be useful in a way
- explain yoursef clearly, less-experienced users should understand what you are talking about
- use images (if necessary)
- take the time to check if your info hasn't already been covered by another member

Don't worry about the fact that some of your entries might be really basic, that is entirely the point. You also don't have to post full tutorials, an entry could for example cover how to get rid of 'double vertices' only, only containing a few lines of info. That's totally fine. As long as it is complete. There is no need to take it too far either, though, like explaining everything about Blender's UI and hotkeys in every entry about Blender, lol. You can expect people to know that already. If not, feel free to cover that in a separate entry. Only include the things that are necessary for that specific trick/tutorial/whatever.

I'll just go ahead and thank XNAaraL and AtlantiB right now, since they taught me most of what I know, haha. :hug2:

Hope it will end up being useful! :high:
User avatar
Love2Raid
Moderator
Posts: 6103
Joined: Sat Aug 18, 2012 6:10 am
Custom Rank: w

Sticklove Fountain of Knowledge - List of Entries

Post by Love2Raid »

Entries

- XNALara .mesh.ascii file in Notepad by Love2Raid
- Additional Maps - Normal Maps 1 by .:Someone:.
- Fixing rotated faces in UV map by Love2Raid
- Render groups in XNALara by Love2Raid
- Rigging a simple model - part I by Love2Raid

---

I will probably rearrange them in a more logical way later, but for now we only have this so they're just in order of appearance. :P

N.B.
It can be a good idea to read the following discussion as well (not just the tutorial post).
User avatar
Love2Raid
Moderator
Posts: 6103
Joined: Sat Aug 18, 2012 6:10 am
Custom Rank: w

XNALara model file in Notepad ('.mesh.ascii')

Post by Love2Raid »

Type of entry: theoretical information
Aimed at: beginner
Should I know this: of course you should, silly!
---

XNALara works with .mesh files. These are binary files. If you want to edit the model (or just view) in Notepad, you will need a .mesh.ascii file. Things will make a lot more sense to you then, haha. So go ahead and convert the file to .mesh.ascii, if you haven't got one already.

Now open this in Notepad.

Image

The file starts with the number of bones (red rectangle). You can see that the model in the picture has 330 bones. A list of all bones follows after that. The first one will be the root ground, then comes the bone that's parented to that (root hips), and then the one that's parented to that one. Usually there are 2 bones parented to the root hips: the pelvis bone and the spine lower bone (if they have been named like that). You see that the spine lower comes first here, followed by the 'children' of this bone. When you scroll downwards, you will eventually see the pelvis one too, after the entire upper part of the armature. Anyway, every bone has 3 lines of information. First comes the bone name, the second line contains the 'parent index' (something about the bone's place in the 'hierarchy'), and third some info about the position of the bone (in 3D).

I will go down now till the end of the list of bone info. You can do this by using Ctrl+F and typing the following text: 'meshes'.

Image

You can see that after the list of bones, one single line with the number of meshes follows (red). Say if you wanted to remove a mesh with Notepad, you would have to edit that number as well. Anyway, after that come the meshes themselves. They will be sorted by render group and name (if you use version 2.3 of the exporter script, or higher).

The mesh starts with the following information in one line (blue), with an underscore in between:
  1. render group
  2. name of the mesh
  3. shine value
  4. number that controls how many times the first 'mini bumpmap' is repeated on the mesh
  5. number that controls how many time the second mini bumpmap is repeated on the mesh
  6. camera target information
Make sure the mesh name doesn't contain any underscores. (I will cover render groups, mini bumps and cam targets later, for sure. But not now.)

After this line, comes the texture information. First the number of UV layers. As far as I know, XNALara only supports one. So it's always 1.
Then the number of textures. This depends on how many you have assigned, of course, and on the render group. It should be the right amount for that render group. I will cover that later as well.
Next you see the textures, in the right order, each followed by a single line: '0 # uv layer index'. This is always the same line. You can see that the exact location of the textures on my pc is written in the file. This is actually not necessary, since XNALara can find the textures no matter what the path in the file is (as long as the textures are inside the model folder). Only the name of the texture (including file extension) matters (yellow). After the textures, there is one line with info about the number of vertices. The more detailed the mesh, the higher this number. XNALara can't handle meshes that have 0 vertices, so if you see one of those, remove it. There is also a maximum, 32000 if I'm not mistaken...

After that, it's a looooooooong list of numbers that I don't really understand either, but it must mean something, lol. :XD:

You'll know when you've reached the end of one mesh part when the numbers start to look like this:

Image

If it doesn't end that way... well, it's not right, haha. You can easily go from mesh to mesh by using Ctrl+F, searching for 'tex'. This will save you a lot of scrolling, lol...

After you've made your edits, simply save and convert back to .mesh. If the converter crashes, you've done something wrong, lol!! :P


Well, that's pretty much it. Very basic info, but essential for anyone who wants to do more with XNALara than just posing and rendering. If you've got any questions, let me know and I might add some more info if necessary. :)
PoophairJones
Posts: 1068
Joined: Wed Oct 17, 2012 5:09 am
Custom Rank: Baebsae
Location: Idk where am i?
Contact:

Re: Sticklove Fountain of Knowledge

Post by PoophairJones »

this thread is a nice idea actually :D
May i join? Wanted to write up some hints about additional maps anyway xD
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 »

Sure, why not? The more, the merrier! :D

I'll change the title of the thread once you've posted your first contribution. :P
Anyone is free to join! :D

I'll try to write something about render groups and cam targets today.
User avatar
semory
Site Admin
Posts: 7755
Joined: Sat Aug 04, 2012 7:38 pm
Custom Rank: Kitty pu tu tu lay!
Location: Torrance, CA

Re: Sticklove Fountain of Knowledge

Post by semory »

sings, "more more more, more more more, more more more more, more more more..." yay, and hopefully make it easy enough for a simpleton noob like myself to understand :herp: the thing i've never understood is the bone naming conventions.
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 »

I'll cover that too, soon. :)
PoophairJones
Posts: 1068
Joined: Wed Oct 17, 2012 5:09 am
Custom Rank: Baebsae
Location: Idk where am i?
Contact:

Additional Maps - Normal Maps 1

Post by PoophairJones »

Additional Maps - Normal Maps 1
I am taking this directly from TRF and put it here.
It is how i bake my base normal maps. In most cases i edit them heavily afterwards and even combine them with others.
I will explain my full normal map technique sometime else with a good example.
Here you have the basic baking in blender, wich gives you 'true' normal maps that may be buggy though.
I will give some fixing hints at the end.

Hope someone finds this useful =)

Bakeing Normal Maps in Blender

Base Edits
1. Load a model into Blender and duplicate the part you want to create normal maps for. (I recommend to do it one by one even if you want to create normals for all of them)
You duplicate a mesh with Shift+D and simply click again so it stays at the exact same position as the other mesh:

Image
^Two meshes layered over each other.

Creating the High Poly Mesh
2. Select one of the Meshes and go to edit mode. You have to smooth-Subdivide it. Select everything and press W,4 (or just W and select what i selected in the pic below)
We have to subdivide because the normal maps will be filled with the difference (read it's called tangent space, tangent normals are the ones every model around here uses). If you'd just try to bake normals with two same meshes it will come out purple only without anything else on it, because there's no difference.
I recommend to subdivide twice (might slow your Pc down, so maybe move all other meshes to a other layer first) since the difference between both is higher then and the output looks better.

Image

Just click OK on this one:
Image

The output is this:
Image

Fixing the High Poly Mesh
3. The high poly mesh will look weird. Details stand out, even details you don't want to be there (those unwanted details would also be on the normal map wich looks stupid). That's why we'll use Sculp mode to fix that.
Hide the Low poly mesh, select the high poly one and go to sculp mode, use the settings i used below:

Image

Paint over the whole mesh, till the unwanted details are gone (also do it in side view). It'll look like this:
Image

Bake the Normal Map
4. Unhide the low poly mesh. Deselect all. Select the high poly mesh and AFTER that the low poly one (order is IMPORTANT!!!). Go to the usual lightmap bake options and choose what i chose here:
Image

Then simply click on BAKE and wait a little ^_^your result is in the UV editor and you can save it.
Image

Result (esp on mirrored meshes) might be buggy.
Fixing methods:
- Paint buggy parts (lip inners (usually displayed green-yellowish on your baked map) in a normal map purple
- use blur (DOA5 body normals)
- Do not bake for hairs (doesnt work...as lightmaps don't work too)
- DOA5: One subdivide is enough

Like said above i will write new ones wich explain how to get more detailed normals (wrinkled for eg)

Cheers
.:Someone:.
User avatar
iheartibuki
Moderator
Posts: 6552
Joined: Sun Aug 19, 2012 9:59 am
Custom Rank: Fappy Bird
Location: The Land of the Free
Contact:

Re: Sticklove Fountain of Knowledge

Post by iheartibuki »

Sandy, the series of numbers in the mesh.ascii files are probably for triangular positions, since there are always 3 on the same line. What I don't know is if those positions are relative or absolute, but judging by the recurrence of the same numbers they're probably relative positions. Just a theory though.

Great tutorials, everyone! :D
"TheyÔÇÖre not only moron but also Galapagosian Lolita Complexed Chicken."

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 »

^
Could be, idk lol. :)
I don't know anyone who is capable of editing the actual mesh geometry in Notepad, lol. And if there are then they're like Neo or something. :XD: It's just a random mess to me. :fdat:

Thanks so much for that, Someone, looks great. I'll edit the thread title + OP asap. :D
Post Reply