Blender

Blender

Flat yet one-sided
Working on something with a flat, two-dimensional part to it that has the same texture on both sides. As I converted the parts into .smd and make a decent .mdl out of it the model looks great but the flat part of the model only shows the texture on one side while the other side is invisible.

Is there a way to fix this? Maybe with a command for the $BodyGroup in the .qc or I have to do something in blender before exporting?
Originally posted by still__alive:
No no, backface culling is basically like a render mode or whatever. Blender "lies" about how your mesh looks, from the perspective of a game engine. Start by turning backface culling on in Blender so you can see what the game engine is seeing, that should start to make things way more clear.

Lets say your mesh is a simple plane. One side will be invisible in the game engine. In blender you'll need to take that plane, duplicate it, flip it around 180 degrees so it is on the backface of your original plane and both planes have their backfaces facing each other. Then you need to also do the same "mirror" process to your texture. That is how you make it work for a game engine.

BFC off: (how Blender displays mesh by default)

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

BFC on: (how game engine actually sees the mesh)

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

Mirror the mesh:

https://steamcommunity.com/sharedfiles/filedetails/?id=1208345405
< >
Showing 1-7 of 7 comments
still__alive May 9, 2019 @ 6:35am 
You have to duplicate the faces and mirror the textures, to put it simply. Game engines only draw one side of a polygon, the side which the normal points out from. 3d modeling programs can "cheat" and draw their polygons two sided.

If you hit N in the 3d viewport, then in the menu on the side that opens up (or closes if you already had it open), then go to the "Shading" tab and open it, and check the "backface culling" box, you'll see the polys in Blender the way games engines see them.
phillippi2 May 9, 2019 @ 6:35am 
This is something called "Backface Culling". It keeps the back of the polygon from being rendered, to save on resources.

If what you want can be done in blender it would be like this:
In 2.79: Under the properties panel, open the shading tab and click on "Backface Culling".

In 2.80: Open up the "Overlays" menu and click "Backface Culling".

Unfortunately, I'm not too familiar with Source's shader system, atm. So, unfortunately, I can't speak to that side of it.
Mystic Monkey May 9, 2019 @ 6:47am 
I see, so the cause is Backface culling. is it possible to disable it for a specific part of the model?
Or is duplicating the only way?
Last edited by Mystic Monkey; May 9, 2019 @ 7:00am
The author of this thread has indicated that this post answers the original topic.
still__alive May 9, 2019 @ 7:02am 
No no, backface culling is basically like a render mode or whatever. Blender "lies" about how your mesh looks, from the perspective of a game engine. Start by turning backface culling on in Blender so you can see what the game engine is seeing, that should start to make things way more clear.

Lets say your mesh is a simple plane. One side will be invisible in the game engine. In blender you'll need to take that plane, duplicate it, flip it around 180 degrees so it is on the backface of your original plane and both planes have their backfaces facing each other. Then you need to also do the same "mirror" process to your texture. That is how you make it work for a game engine.

BFC off: (how Blender displays mesh by default)

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

BFC on: (how game engine actually sees the mesh)

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

Mirror the mesh:

https://steamcommunity.com/sharedfiles/filedetails/?id=1208345405
Last edited by still__alive; May 9, 2019 @ 7:05am
Mystic Monkey May 9, 2019 @ 7:05am 
Thanks. I think it's a bit of a silly thing Blender can't disable backface for models, but I did the duplication thing.
still__alive May 9, 2019 @ 7:19am 
Originally posted by Mystic Monkey:
Thanks. I think it's a bit of a silly thing Blender can't disable backface for models, but I did the duplication thing.

It isn't a setting to disable, for exporting meshes or anything. That is how video cards and game engines actually see the polys. Blender, and I'm assuming all other 3d apps do it as well, "cheats" and shows them as double sided, when they are not. Probably for artist convenience or something - some people must figure it is nicer to look at the meshes like that or something.

Turning backface culling off in Blender shows you how the video card and game engines actually see the polygons. And you have to model based off of what your mesh looks like with backface culling off. If you are doing video game/real time stuff at least.
Last edited by still__alive; May 9, 2019 @ 7:20am
Mystic Monkey May 9, 2019 @ 7:27am 
I guess it's sort of useful for when your camera accidentally clips inside a model and the double-sided polygons can disrupt view.
< >
Showing 1-7 of 7 comments
Per page: 1530 50

Date Posted: May 9, 2019 @ 6:03am
Posts: 7