Modelling issues (invisible model?) Created 5 years ago2019-04-28 22:01:41 UTC by RollingBarrel RollingBarrel

Created 5 years ago2019-04-28 22:01:41 UTC by RollingBarrel RollingBarrel

Posted 5 years ago2019-04-28 22:01:41 UTC Post #342527
Heya! I've been dabbling at modelling in Blender and compiling GoldSrc models. However, I've run into a issues with the visibility of my compiled models that I am unsure how to solve (I suspect I'm missing something obvious but my googling attempts have failed me). Here's a screenshot of my first model attempt in Jed's model viewer, the humble paper cup; it's a bit poly heavy but 222 polys shouldn't exceed the limits of a model as far as I'm aware?
ah yes, the monstrous paper cupah yes, the monstrous paper cup
For some reason the outside faces appear invisible (at all angles) but the inside is fine and I'm unsure why...

I also made a model of beautiful donut box (badly textured, about 1600 polys...) which is completely invisible; I suspect in part because of the high poly count, but even with multiple $body commands in the QC file to compile with individual SMDs for the donuts and the box compiled together it doesn't show up. UVs and textures are fine and can be viewed in the model viewer (for both the paper cup model and the donut box), just not the model itself in the case of the donut box.

Any ideas what could be wrong (or any info I can provide to track down the problem)? I'm completely new to modelling, let alone getting stuff into GoldSrc so thanks for your patience :)
RollingBarrel RollingBarrellearning in progress
Posted 5 years ago2019-04-29 00:15:35 UTC Post #342528
As for the cup, maybe the polys' faces are flipped.
Not sure how to do this in Blender 2.79 and before, but in 2.80, you gotta select the object, go to Edit Mode -> Mesh -> Normals -> Recalculate outside. Something like that.

I highly suggest you to enable backface culling in Blender's 3D viewport, so if faces are facing the wrong direction, you'll be able to see it. :)
Admer456 Admer456If it ain't broken, don't fox it!
Posted 5 years ago2019-04-29 13:37:24 UTC Post #342531
Those poly counts are incredibly low by GoldSRC standards these days, so that shouldn't be an issue. As Admer has said, and based on your screenshot, it looks like your paper cup model is essentially inside out. GoldSRC culls backfaces, so you won't see the models if their polys are inverted.

As for the model that doesn't appear at all, it's not really much to go on. There could be any number of reasons why this is the case. I'd need to actually see and test the model file itself.
monster_urby monster_urbyGoldsourcerer
Posted 5 years ago2019-04-29 16:11:05 UTC Post #342532
Also, models can have as many polys as they like. It's just that you can have a maximum of 2048 vertices per SMD.

Now, I believe 1600 polys is a bit too much for a donut box. :P
My 2007 laptop will probably agree with me. But regardless, maybe your model is too tiny to be seen. This is just a wild speculation though. Blender units should, I believe, be equivalent to GoldSrc units. So you'd generally make a 24x16x12 box or something around those dimensions.

Or maybe it's so so huge, that you gotta zoom out a little bit in the model viewer. That can happen as well.

Does the model viewer display the number of drawn polys correctly for that model?
Admer456 Admer456If it ain't broken, don't fox it!
Posted 5 years ago2019-04-29 20:23:31 UTC Post #342536
In HLMV check "show ground", and then you can see the actual size of the model compared with a (i think) square the size of a regular biped human.
Posted 5 years ago2019-04-29 21:42:14 UTC Post #342537
Thanks for the info about backculling peeps! I'll use that Blender toggle to check those faces tomorrow and let y'all know how it goes. As for the donut box, I'll double check the model viewer now just in case it is a scaling issue.
RollingBarrel RollingBarrellearning in progress
Posted 5 years ago2019-04-29 21:53:00 UTC Post #342538
Well, I have some good news and some bad news.
The good news is, the donut box appears in game.
ta-da!ta-da!
The bad news is the donuts are floating in the air when they should in fact be on the floor. Furthermore the 3 donuts have all morphed into one. I think the origins of the box and it's constituent donuts are messed up ha, at least the backface culling doesn't seem to be an issue for my quantum donuts :P I rather suspect this is why it does not appear in HLMV
RollingBarrel RollingBarrellearning in progress
Posted 5 years ago2019-04-30 02:31:04 UTC Post #342539
Did by any chance you had multiple armatures for the doughnuts or separate mesh objects that could have had the same name possibly? Ideally if making a static mesh you should have it all joined together in case of possible export confusion. Also if you havent seen it I have a guide on blender specific exports:
http://www.the303.org/tutorials/gold_mdl_blend.htm
Lastly Jeds' HLMV has some crash on close and hiding locked up processes . For a better and more featured HLMV, use standalone:
https://github.com/SamVanheer/HL_Tools/wiki/Half-Life-Model-Viewer
Posted 5 years ago2019-04-30 20:51:03 UTC Post #342540
Cheers for the tip The303 I have upgraded from Jed's model viewer to the standalone version and it has not crashed once so far which is good. Indeed I followed your tutorial + Brett's video tutorials to get the model working from blender which proved very helpful!
I can confirm that the normals of the outside of the paper cup were borked so backface culling was indeed the cause of the issue with the paper cup, thanks Admer :) I've managed to fix it (Blender 2.79 has the backface culling checkbox in the viewport properties window, under 'Shader' FYI those who are using Blender 2.79).

Interestingly however, upon compiling the paper cup I suddenly had the same issue as I had for the donut box - it appeared invisible in HLMV. Now, besides fixing the normals, I only did one other major change to the blender scene - I removed the 'idle' armature which I had setup as per Brett's video. I didn't add any armature to the donut box model in the first place, so I highly suspect the model origin is incorrect when exported from Blender unless you have a bone. Also I tried checking the 'weapon origin' checkbox in HLMV and the paper cup did appear, though in the wrong place so I think my theory about the incorrect origin might be the most likely reason for the apparent disappearance and misplacement of both models:
the paper cup floats above from the weapon origin viewthe paper cup floats above from the weapon origin view
I am still a little confused however as toggling the ground (with a loaded image) and attempting to zoom/pan in HLMV didn't show the paper cup at all, only the weapon origin checkbox which is bizarre. A possible fix would be to add an armature with a single bone to any static model I make, but it's not ideal.
RollingBarrel RollingBarrellearning in progress
You must be logged in to post a response.