9 posts / 0 new
Last post
qwertyasdfgh
qwertyasdfgh's picture
Moderator
Offline
Last seen: 14 hours 33 min ago
Joined: 12/15/2011 - 05:50
Karma: 1910
[Tutorial] Fixing collision meshes for Morroblivion (Basic)

Getting started.

To follow this tutorial you'll need to download and install the following programs:

The main part.

In this tutorial I'll be using file 'meshes\morro\i\InUVUSUintUcornerU01.nif' as an example. It is part of interior tileset for velothi architecture.

1. Upon lauching Blender you'll see the following:

2. Square in the middle is default cube shape, which needs to be deleted. Hit X to delete and confirm with Left-Click:

3. Now that we got this out of the way, Select File->Import->NetImmerse\GameBryo

Navigate to the folder where our nif file is located, select it and click Import NIF. Use the following import settings:

4. Once our file is imported, observe it in 3D view:

Basic controls are the following:
Mouse Wheel Up\Down - Zoom In\Out
Hold Middle Mouse Button - rotate camera around the model
Right-Click - select object
Tab - swith between Object Mode and Edit Mode

We are interested in collision part of the model - it is displayed as transparent 3D grid, as opposed to the rest of the model, displayed in grey. Select it:

Then press Ctrl+I to invert your selection and H to hide everything, except the collision shape:

5. Now it's time to fix up our collision. This is the most basic tutorial, so we won't change its shape at all.

Select our collision object and go to Object panel at the bottom:

In the Draw section change Drawtype from Bounds to Shaded and remove the Wire option in 'Draw extra':

At this point our mesh should look something like this:

Now go into Editing panel (F9), click on 'Set Smooth' once and remove the 'Double Sided' option:

Mesh should now look something like this:

You'll notice that some parts of the mesh are of light grey color and others are dark, almost black. This shows the direction normals are currently faced. Our goal is to make all of them face in the direction we want.
Hit Tab to go into Edit Mode:

Here we'll have 2 hotkeys:

Ctrl+N - recalculate normals outside
Ctrl+Shift+N - recalculate normals inside

Which of them to use depends on the model in question. Essentially, normals should be faced in the same direction as collision, so in our example everything inside should be light grey and everything outside - dark.
If we were working with, for example, exterior building or furniture this would've been the opposite.

So, press Ctrl+Shift+N and confirm:

Voila:

Sometimes you won't get the desired result having all verticles selected at once. In this case you'll need to recalculate normals for parts of the mesh separately. The quick way to select part of the mesh is to select 1 verticle and then press and hold Ctrl + Num+

Once all normals face in correct direction, exit Edit Mode by pressing Tab again.

6. Not that we've fixed the collision, it's time to go back and reverse some of our previous steps.

Go to Object panel (F7) again, set Drawtype back to 'Bounds' and select 'Wire' in 'Draw extra'

Our model should again look like this:

Now Press Alt+H to show our previously hidden parts of the mesh.

7. Press A (twice) to select everything and click File->Export->NetImmerse\Gamebryo

Select folder, name your model and click 'Export Nif'. Use the following export settings:

In this case we are using 'Stone' material, but you might need to use a different one.

Now you can open the exported model in NifSkope. If you did everything right, you'll see something like this:

Edited by: qwertyasdfgh on 03/03/2015 - 09:16
rekom23
rekom23's picture
Member
Offline
Last seen: 5 years 5 months ago
Joined: 02/08/2014 - 13:54
Karma: 51
Ok i've tried with this file

Ok i've tried with this file : C:\PROGRA~2\Steam\SteamApps\common\Oblivion\Data\meshes\morro\i\inUarU10.nif

And did this (attached). Is this correct?

This isn't totally clear for me :

Sometimes you won't get the desired result having all verticles selected at once. In this case you'll need to recalculate normals for parts of the mesh separately. The quick way to select part of the mesh is to select 1 verticle and then press and hold Ctrl + Num+

Is it normal that, there're only a few .nif in the Oblivion\Data\meshes\morro\i\ ? (And i don't have the file you took as an exemple ?)

 

AttachmentSize
Binary Data export.nif94.64 KB
qwertyasdfgh
qwertyasdfgh's picture
Moderator
Offline
Last seen: 14 hours 33 min ago
Joined: 12/15/2011 - 05:50
Karma: 1910
Oh, right. You'll need to

Oh, right. You'll need to unpack Morrowind_ob - Meshes.bsa, I totally forgot to mention this. Alternatively, I can just send you some meshes.

The file you attached seems to be alright. However, this is one of the models for Ald'Ruhn Manor Disrict I posted in the other thread - that's why it was loose in you Data folder and not in the BSA.

One thing - please give exported models the same filename as the originals, otherwise it would be hard to replace them.

About this:

Sometimes you won't get the desired result having all verticles selected at once. In this case you'll need to recalculate normals for parts of the mesh separately. The quick way to select part of the mesh is to select 1 verticle and then press and hold Ctrl + Num+

Imagine if collision mesh has several parts, for example, walls, floor and some decorations. And when you select all of that and recalculate normals you can't get a consistent result - if you recalculate 'inside' walls and floor face the right direction, but decorations are not. And if you recalculate 'outside'  it's the other way around.

In this situation you'll have to select walls and floor first and calculate normals for them, and then do the same thing for decorations.

This is not actually that common, but can sometimes happen with complex models.

Hope that clears up things a little.

rekom23
rekom23's picture
Member
Offline
Last seen: 5 years 5 months ago
Joined: 02/08/2014 - 13:54
Karma: 51
Ok, good for me send me .nif

Ok, good for me send me .nif (it's better simple ones for me ) (I'll rename them the same way)

Brainslasher
Brainslasher's picture
Contributor
Offline
Last seen: 2 years 3 months ago
Joined: 05/19/2013 - 11:46
Karma: 715
These are meshes with a few

These are meshes with a few fixed stair collisions.

AttachmentSize
File morroblstaircoll.rar182.46 KB
qwertyasdfgh
qwertyasdfgh's picture
Moderator
Offline
Last seen: 14 hours 33 min ago
Joined: 12/15/2011 - 05:50
Karma: 1910
Could you give some more

Could you give some more details on these? What tileset are they from and what did you do to them?

Also, if you're going to work on static collisions, please either PM me or post in this thread beforehand.

Brainslasher
Brainslasher's picture
Contributor
Offline
Last seen: 2 years 3 months ago
Joined: 05/19/2013 - 11:46
Karma: 715
They're the meshes beginning

They're the meshes beginning with InUCUstair. I simply followed this tutorial after seeing that in the original meshes the collision was above the staircase which could result in problems like this. Sorry about posting in the wrong thread.

qwertyasdfgh
qwertyasdfgh's picture
Moderator
Offline
Last seen: 14 hours 33 min ago
Joined: 12/15/2011 - 05:50
Karma: 1910
Are you saying that you have

Are you saying that you have the same problem as in this topic?

Brainslasher
Brainslasher's picture
Contributor
Offline
Last seen: 2 years 3 months ago
Joined: 05/19/2013 - 11:46
Karma: 715
No, not that I remember. But

No, not that I remember. But judging from his screenshot it can and did happen and looking at the mesh shows a collision plane in the exact spot it happened. Following this tutorial removes this collision plane. Oblivion is a strange game sometimes and not all bugs are reproducable, not even in his game apparently.