STEAM GROUP
Blender Source Tools BleST
STEAM GROUP
Blender Source Tools BleST
267
IN-GAME
1,607
ONLINE
Founded
November 8, 2013
All Discussions > Help > Topic Details
C4sh0e Dec 18, 2018 @ 2:40pm
Faces being removed from models.
I can say with certainty I am merely an amateur with blender, but the problem I have occured when I compiled my model. The model looks fine from the top angles, yet the bottom of the model is completely invisible! From what I can describe the model seems to have destroyed any faces with leaves on it when I compile.

Pictures:
Top of the model [cdn.discordapp.com]
Bottom of the model [cdn.discordapp.com]

QC file:
$modelname "props_foliage/fern.mdl"
$model "Body" "fern.dmx"

$staticprop
$scale 1
$cdmaterials "models/props_foliage/"
$surfaceprop "fern"

$sequence "idle" "fern.dmx"
Last edited by C4sh0e; Dec 18, 2018 @ 2:41pm
< >
Showing 1-12 of 12 comments
Pte Jack Dec 18, 2018 @ 3:19pm 
Have you added $nocull 1 to the material VMTs?

When you're looking at the model from the bottom you are most likely looking at the back faces of the mesh. $Nocull 1 pushes the textures through to the backside.

This can have negative affects on the model in ways of lighting and shadows. You might want to consider giving your mesh some thickness so the backside is actual mesh.
Last edited by Pte Jack; Dec 18, 2018 @ 3:21pm
C4sh0e Dec 18, 2018 @ 3:49pm 
I will give that a try. Thanks!
C4sh0e Dec 18, 2018 @ 4:33pm 
image[imgur.com] Awesome, it worked. Thanks so much.
Last edited by C4sh0e; Dec 18, 2018 @ 4:34pm
Zappy Dec 19, 2018 @ 6:06am 
Originally posted by Pte Jack:
- You might want to consider giving your mesh some thickness so the backside is actual mesh.
You don't have to give it a thickness. If you duplicate the mesh and change the duplicated mesh to face the other way (Blender calls this "flip normals"), it will render both the front- and back-sides of faces, while the model is still infinitely thin.

Note that if you give a model a thickness, the inside and the outside mesh will not line up perfectly, which allows you to see between the inside and the outside meshes. (Unless you keep the very edge either infinitely thin or with a visible edge, neither of which work that well if the model uses a transparent material where not all of the mesh is visible, which it looks to me like is the case here.)

Originally posted by 55 year old Zoomer:
I will give that a try. -
If "that" is using $NoCull in the material, please re-consider it. $NoCull causes the back-side of a mesh to be rendered... but it's still the back-side. To clarify, this means that it'll pick up lighting from the front, not the back, and display the "front" lighting on both sides. And to clarify, this means that even if you use an incredibly strong light on the back-side of it, the back-side (and also the front-side) will not show any effect of the light from the back.

Duplicating the mesh and flipping the duplicate will cause both sides to pick up lighting from their respective sides.

(Sometimes, you may want a side to pick up lighting from the opposite side... but in most cases, you probably won't want that, especially if you're uncertain of what this means.)
Pte Jack Dec 19, 2018 @ 8:56am 
Zappy, if you duplicate mesh and flip it, your reversing the faces all together. If you use a solidify modifier, the mesh is thickened and the mesh is an actual reversed mirror of the upper side and the new mesh uses the same texture.
Zappy Dec 19, 2018 @ 11:58am 
Originally posted by Pte Jack:
- if you duplicate mesh and flip it, your reversing the faces all together. -
Please define "reversing - all together" in that context. The way that you're phrasing it makes it sound negative, so I'm not sure that you think of "flip normals" in the same way as I do.

If you use the "flip normals" function thing in Blender while in Edit Mode, it makes the selected faces swap their front-side to the back-side, both in terms of which side is the new "front" and which direction lighting is calculated from. It does not do anything besides that. This is perfect (and the exact wanted behaviour) for having a mesh display both of its sides.

Originally posted by Pte Jack:
- If you use a solidify modifier, the mesh is thickened -
As I said and explained the reasoning for, this is not always a good thing, and can often be a bad thing when transparent materials are involved.

Originally posted by Pte Jack:
- If you use a solidify modifier, - the mesh is an actual reversed mirror of the upper side and the new mesh uses the same texture.
The same holds true for duplicating a mesh and using "flip normals" on the duplicate.
Last edited by Zappy; Dec 19, 2018 @ 11:58am
Pte Jack Dec 19, 2018 @ 12:10pm 
ok, the context I got from your post was to dupe and flip the mesh, not the normals... Also, negative context if the item is rippled or concave/convex in nature. Best way to do something like this is with a solidify modifier. Front and back are aligned, thickness is even and normals face outward.
Last edited by Pte Jack; Dec 19, 2018 @ 12:11pm
Zappy Dec 19, 2018 @ 12:22pm 
Originally posted by Pte Jack:
- Also, negative context if the item is rippled or concave/convex in nature. -
"Negative context"?

Originally posted by Pte Jack:
- Best way to do something like this is with a solidify modifier. Front and back are aligned, - and normals face outward.
Again, the same holds true if you duplicate a mesh and use "flip normals" on the duplicate.

Originally posted by Pte Jack:
- Best way to do something like this is with a solidify modifier. - thickness -
Again, I'm specifically saying that while some thickness can be nice, I'd argue that that's more often unwanted than wanted, especially when transparent materials are involved (as then you can peek through the transparent bit into a place between the front and the back, which thus shows nothing even if it's supposed to, which can look wrong at bends/curves and such (which infinitely-thin things won't in the same way)), which the materials seem to be here.
Pte Jack Dec 19, 2018 @ 1:08pm 
Zappy we can take this off line if you wish and argue all day... LOL All I'm saying is that with duplicated mesh, you run the risk of pulling the verts of one mesh through the other, which would expose the backside of the mesh to the camera and lead to clipping. If the Verts of the two meshes occupy the same space, you can end up with artifacts. Using the solidify method, you're only manipulating one mesh, the "ghost" follows along and maintains its distance from the main. Also, weight painting is easier. After the mesh is inplace, textured and weight painted, you can apply the modifier, giving you that extra mesh for front and back sides.

As you are well aware, modelling practices are personal preferences, and I think we have both made good cases for both our preferences.
C4sh0e Dec 20, 2018 @ 4:47am 
Lol guys thanks for arguing in my thread but anyway why would I need to flip the top mesh if the faces were not destroyed by blender in the first place? The faces got destroyed when I compiled it through crowbar. Reguardless of that, the textures were creating other weird effects too but nocull fixed that aswell.
Zappy Dec 20, 2018 @ 7:34am 
Originally posted by 55 year old Zoomer:
- why would I need to flip the top mesh if the faces were not destroyed by blender in the first place? -
Because Blender by default renders the back-sides of things, while Source doesn't (and usually shouldn't).

Try to hover the mouse cursor over a 3D viewport in Blender, press N to open a side panel thing on the right, and then enable "Shading" > "Backface Culling" in it. This will cause Blender to not render the back-sides of meshes (just like Source).

Originally posted by 55 year old Zoomer:
- Reguardless of that, the textures were creating other weird effects too but nocull fixed that aswell.
What "other weird effects"? $NoCull lets the back-side of the mesh be rendered, and does not change anything else about the model or material, so any "other weird effects" really should not be affected by $NoCull (except in a few cases (such as environment cube-maps), where they're affected negatively due to not working correctly on the back-sides of things).

Originally posted by 55 year old Zoomer:
- nocull -
Again, $NoCull's only use is to allow the back-sides of things to be rendered, and there are many things which only work right on the front-sides of things, so it's (nearly) always better to duplicate and flip stuff to technically have a front-side on both sides than it is to use $NoCull.

Unless you know exactly what I mean about $NoCull and you know exactly why I'm telling you to not use it, you really should not use it. And even if you do know, you probably shouldn't want to use it, anyway.
Last edited by Zappy; Dec 20, 2018 @ 7:35am
Pte Jack Dec 20, 2018 @ 8:54am 
$nocull is useful for models that bleed into areas where a backface can bee seen, for example this car has no interior, the exterior is just a shell.

https://steamcommunity.com/sharedfiles/filedetails/?id=1593896632

If I had backface culling turned off, looking though the windows I would not see the back seat area of the car, I would see the outward facing paint and where the back right side is through the window would be the background. The car would look incomplete.

As Zappy said, Blender defaults to back face Culling turned off, if you turned it on, the plant would have behaved in the same manner that it did when you compiled and looked at it in HLMV.

https://steamcommunity.com/sharedfiles/filedetails/?id=1596062610

As both Zappy and I have pointed out, having actual mesh is a better option than using the $nocull command in a material. How you do it though is totally up to you, after all it is your model.
< >
Showing 1-12 of 12 comments
Per page: 1530 50

All Discussions > Help > Topic Details
Date Posted: Dec 18, 2018 @ 2:40pm
Posts: 12