0
$\begingroup$

I've ripped several models from a PSP game, and I noticed that nearly all of them (except for the organic models) essentially duplicate the model, one with the normal textures, and one with either black, gray, or purple textures, which I assume are used for some sort of particles-based specularity effect.

Thus far, I've had to manually pick out the faces with the particles texture and delete them, which can become quite tedious when you're working with nearly 8K faces. (Note that a group of only 5 to 10 faces is its own object when I initially import the .obj file.)

I am wondering if there's a way to systematically remove the unwanted particle textures. I've tried joining all of the objects then removing double vertices, but it appears as though the correct textures that are kept or deleted are arbitrary as I get a splotchy model.

Note that if I right click on a face with a particles texture, I end up selecting the face behind it with the normal textures, and vice versa.

http://pasteboard.co/2up5MRE6.png This is an image of a model with some normal textures visible and some particles textures visible.

http://pasteboard.co/2up3BZR3.png This is an image of the same model after I've selected a few particles textures, which makes the proper textures visible.

So, down to my question. Is there a way to have Blender accurately target the particles faces? As far as I know, the object names are just model_<number> with no real pattern. Each object has only one material, though if I join all of the models to get one then there are thousands of material slots.

(Note that the models I rip are purely for personal use as I'm currently a modeling student and want to learn from professionals. As far as I know it's perfectly legal as long as I'm not using pirated software or games, which I'm not.)

$\endgroup$
  • $\begingroup$ If you hadn't seen it Daniel Salazar just explained a similar problem which may give a bit more understanding of what is happening and offers an easy solution obj.data.validate(). While this does remove the duplicated faces it doesn't offer the ability to decide which face to keep so may remove the face using the texture that you want to keep. $\endgroup$ – sambler Dec 6 '15 at 11:50
2
$\begingroup$

The black, white or grey images are most likely masks, for example a specular mask will define where the specular is high (white) and where there is no specular (black) with grey being in the middle. These 'maps' can also be used to adjust many settings like transparency, emission, mirror... instead of having one value used over the entire model.

The blue/purple images are normal maps. To get low poly objects looking detailed it is common to sculpt or model a high poly version and then bake the difference into a normal map to get a visually similar result with less geometry, these maps predominantly have a distinct blue to purple colouring.

To the issue of removing duplicate faces - if you know the material used on faces that you want to delete then you can select all the faces using that material and delete them. The technique to apply different materials to parts of a model should explain how to select faces used by a material. You could also select the faces used by the material you want to keep then invert the selection with ⎈ CtrlI and delete those faces.

As you mention many materials in use, you may also want to use python to go through them all. If you want to keep one or two materials and delete the others then a small script like this might help.

import bpy
import bmesh

me = bpy.data.objects['model2808'].data
bm = bmesh.new()
bm.from_mesh(me)

for f in bm.faces:
    if objmats[f.material_index].name != 'Material.002':
        bm.faces.remove(f)

bm.to_mesh(me)
bm.free()
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.