2
$\begingroup$

I've recently finished exporting and texturing a bunch of psk meshes from a game in blender. My current plan is to cover these meshes in collision models and then export/compile them to a map editor (the hammer editor) where I will make a map using these custom models. I've never used blender before so this has been an interesting experience for me.

However I have run into a potential problem.

The main worry I have at this present moment is with the vegetation textures. Textures such as leaves and grass carry a black outline (pictured below) this outline is quite chunky and because of my little experience with blender I have no idea whether it will carry over once I export/compile the model.

enter image description here

As you can see below the texture I'm using does not contain this black outer

Texture Used

This happens albeit to a lesser extent on grass too...

Grass

Can anyone tell if there's something I need to do to fix this or even if it needs fixing at all. I checked the game files and the meshes and textures had the same file names and match each other in the UV editor.

enter image description here

$\endgroup$
6
  • 2
    $\begingroup$ It looks like the alpha is being represented as black. In material properties tab, scroll down until you see "blend mode" and "shadow mode" change them both from "opaque" to anything else. You'll see what the different ones do when you change them. $\endgroup$ Commented Jul 2, 2020 at 17:57
  • $\begingroup$ Hi and thanks for responding. I've changed the Blend mode to "Alpha Clip" and the shadow mode to the "None". Although the leaves seem brighter, the black alpha is still there. Will this still be a problem? $\endgroup$
    – CHED
    Commented Jul 2, 2020 at 18:16
  • $\begingroup$ How are your materials set up? What do your nodes look like? I see your basecolor texture has an alpha component that has to be connected. Have you done this? $\endgroup$ Commented Jul 2, 2020 at 18:17
  • $\begingroup$ I'm unsure how to completely fill you in here but ill do my best. My active material index consists of only 1 material. I'm going to edit my post now to add a photo of what the mesh looks like in edit mode, in the UV viewer. I'm unsure of what a base colour texture and an alpha component are so therefore I don't know if I've connected them or not. $\endgroup$
    – CHED
    Commented Jul 2, 2020 at 18:27
  • $\begingroup$ Why do you need to care about shading in blender when your game engine is hammer ? This is clearly a shading issue do to either the material or eevie's properties. $\endgroup$
    – Yvain
    Commented Jul 2, 2020 at 18:50

1 Answer 1

1
$\begingroup$

From the image of your texture, it looks like the BaseColor has a built in alpha component. If that is the case, you must connect it like this in addition to changing the blend modes:

Alpha

$\endgroup$
3
  • $\begingroup$ Thanks for this.My surface is Diffuse BSDF however and therefore doesn't have an alpha input. Will this need to be changed. I don't mind if it does.. $\endgroup$
    – CHED
    Commented Jul 2, 2020 at 18:41
  • $\begingroup$ Changed it to Principled BSDF and it works. No more black outline for me!!! $\endgroup$
    – CHED
    Commented Jul 2, 2020 at 18:53
  • $\begingroup$ If you only have a diffuse BSDF and don't want to use Principled BSDF, another way to do the same thing is to use a Mix Shader combining the Diffuse BSDF and a Transparent BSDF using the alpha from your image as a Mix Factor. $\endgroup$ Commented Jul 2, 2020 at 20:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .