source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

Faceposer is not rendering models

Open Riomaki81 opened this issue 13 years ago • 17 comments

I've been chasing this issue for a while and I'd like to add an issue here, either for Valve to fix, or others to give me some guidance.

Basically, my problem is that Faceposer is having trouble rendering models. If I move the mouse around in the Faceposer 3D View, I can see a solid, white object that looks like the model, but it appears to be oriented incorrectly (Center Face and Center on View don't work as advertised).

I am on the beta branch for Half-Life 2 and its episodes and I've tried running hlfaceviewer.exe from common/Half-Life 2/bin as well as the Source SDK 2013 Singleplayer folder (also, with and without running Faceposer.bat first).

Attached is what I see after starting a new scene, adding an actor, and loading the Barney model. As you can see, the 3D view model looks like Barney, but he has no textures and is rendering as solid white (the fact that wireframe is checked notwithstanding).

As you can see, all of Barney's festures and flex sliders come through, but no matter what I do, the model refuses to render correctly. This isn't limited to Barney. I also witnessed the same problem in HL Model Viewer, for which I've tried similar steps to get around it.

faceposer

I would appreciate any help with this. Does anyone have this working correctly? Do I need to extract models or textures and shaders somewhere?

Riomaki81 avatar Nov 28 '13 20:11 Riomaki81

I just load up 2 faceposers(different exes), one from sdk 2013 with some lipsync working(note had to borrow some files from source film maker to get it to work), and 2007 hlfaceposer.exe with models working and just use one for lip syncing wavs and other for the animation editing... hope that helps. and then u gotta remember to copy paste between mod folders the images.secenes or w\e file

bmk10 avatar Nov 29 '13 02:11 bmk10

Could you clarify where the two different hlfaceposer.exe files are located? I'm sure that the Source SDK Base 2013 one is in steamapps/common/Source SDK Base 2012 Singleplayer/bin. The 2007 version I'm not so sure. I know there is a hlfaceposer.exe in steamapps/(username)/sourcesdk/bin/source2007/bin, but it crashes on start with "Can't find steam app user info."

I did notice that on trying to verify Source SDK Base 2006 and 2007 that Steam needed to run the Steampipe conversion on them. I let it do that, and so now there are Source SDK Base and 2007 folders in the /common folder. However, neither contains a hlfaceposer.exe.

Riomaki81 avatar Nov 29 '13 17:11 Riomaki81

launch 2007 one with Source SDK Tools, and launch steamapps/common/Source SDK Base 2012 Multiplayer/bin/hlfaceposer.exe

bmk10 avatar Nov 29 '13 23:11 bmk10

Okay, so I followed your advice.

The Source SDK approach does let me open 2007 Facepower and what I did was Reset Game Configurations, which basically removed all connections to Half-Life 2, and did Create A Mod on the Source Engine 2007 branch. When that mod was created, Faceposer could now be opened, albeit there were no models to display. I extracted the Humans subfolder in Source Models.gcf into a self-created /models folder in my new mod's folder (in SourceMods) and I was able to load the models.

Unfortunately, they are still rendering as textureless, solid white models in Wireframe mode (similar to the screenshot I provided) and splotches of solid black and white in all other modes. In other words, no difference between 2007 and 2012.

Did you have the same problem with solid white models and found that this solved it?

Riomaki81 avatar Dec 02 '13 04:12 Riomaki81

I looked at the Output for Faceposer 2013 Singleplayer and discovered something interesting. It appears to be missing two important shaders:

"Couldn't load vertex shader vertexlit_and_unlit_generic_vs20" "Couldn't load pixel shader vertexlit_and_unlit_generic_ps20b" "Programming error: CMatRenderContext::Bind: NULL material" "Programming error: CMatRenderContext::Bind: NULL material"

So, it would appear these two shaders are missing. From what I can tell, every other Source game has them - from Portal 2 to The Stanley Parable. Half-Life 2, however, does not. If it has a shaders folder, it's not exposed like the others are.

Even if I were to swipe the shaders from another Valve product, I'm not sure where to put them. Placing them in the equivalent location (platform/shaders/fxc) doesn't seem to work.

Riomaki81 avatar Dec 02 '13 05:12 Riomaki81

Interestingly enough, you are correct that Source 2013 Multiplayer's Faceposer does work, in part because it appears to find both those shaders or, at least, it doesn't complain about missing them. What is problematic, though, is that the textures are extremely low-res and there is a non-stop error in the Output window abut "Material debug/debugmrmwireframe [spelling?] has bad reference count 0 when being bound."

Left 4 Dead 2's Faceposer works well, so I'm pretty confident it's not a video card issue - it's a missing shader issue.

This makes me wonder if it is partially related to what was detailed in this bug: https://github.com/ValveSoftware/source-sdk-2013/issues/26

Riomaki81 avatar Dec 03 '13 01:12 Riomaki81

Does anyone else have some suggestions on how to tackle or workaround this problem? All my searches have basically hit on dead ends, as there is very little information on post-Steampipe Faceposer.

Thanks.

Riomaki81 avatar Dec 03 '13 21:12 Riomaki81

most older info on this would be here http://forums.steampowered.com/forums/search.php?searchid=18927105 (keyword:faceposer)

ok, seems like ur being persistent, this helps alot, my guesses are driver problem with the dll for faceposer(probably not it)., missing files, or maybe corrupt hlfaceposer install( reformat ur source sdk, base 2007/2013 single or multiplyer) [defrag/fix fiels](u probably did this) , ur os/drivers hate source

can you load mdlviwer ? this would be nice to know. models textureless? did u get the textures or materials from the other gcf file? did u try to load some basic models like v_crossbow.mdl with a texture?

I mean u could faceposer in one mod, then later copy over the scenes.images, and then hammer it in bsp, then run in hl2 beta theorically it works to use 2007 vcds in multiplayer to 2013 multiplayer, and thats with fixed multiplayer npcs.

u could still facepose thoerically if it setup to run on a mod by just edit game configurations to a sourcemods folder, just have white textures in faceposer all the time lol, but in game u will see result it everything works.

bmk10 avatar Dec 04 '13 08:12 bmk10

https://www.google.com/search?q=Couldn't+load+vertex+shader+vertexlit_and_unlit_generic_vs20&oq=Couldn't+load+vertex+shader+vertexlit_and_unlit_generic_vs20&aqs=chrome..69i57.163j0j7&sourceid=chrome&espv=210&es_sm=93&ie=UTF-8

reinstall maybe

bmk10 avatar Dec 04 '13 08:12 bmk10

I have made some progress on the Half-Life 2/bin hlfaceposer.exe and the one in Source SDK 2014 Singleplayer. I was able to take those two missing shaders from another Valve game (Left 4 Dead 2) and place them in common/Half-Life 2/hl2/shaders/fxc, which appears to be the equivalent location to what was previously /half-life 2 episode two/hl2/shaders/fxc as described in that Facepunch thread.

As a result, these two errors no longer happen: "Couldn't load vertex shader vertexlit_and_unlit_generic_vs20" "Couldn't load pixel shader vertexlit_and_unlit_generic_ps20b"

However, these still do, for reasons below. "Programming error: CMatRenderContext::Bind: NULL material" "Programming error: CMatRenderContext::Bind: NULL material"

The orientation of the models is now correct both here and in Model Viewer. Center on face does what you expect and navigation works fine. Everyone just has the purple/black checkerboard on them - which is good. It just means I need to figure out where to get their textures from.

Riomaki81 avatar Dec 04 '13 17:12 Riomaki81

Model Rendering works fine for me. What does not work for me is rebuilding the scenes.image file. No matter what i try, I cannot get HL2:EP to recognize any of the .vcfs i create image

Perhaps export the materials folder from the gcf? (or pak or whatever valve is calling it these days)

Some more information - I have two computers in which i dev for source. One steam install is basically fresh - only having HL2:EP2, HL1, and AOE:II on it. The other has Both portals, all HL2+Episodes and some random other games. Faceposer works fine on both machines (Aside from the scene.image not building)

tetsu0 avatar Dec 11 '13 02:12 tetsu0

Could you possibly explain which Faceposer you are running (.exe or .bat you're using and in what folder) and if you did any manual extraction of models or materials (and if so, to where?). Also, if you are on a particular branch of the game (i.e. normal versus "upcoming"). Are both of your computers on the same OS and on Steampipe?

If you didn't do any fancy and it just worked, I would guess that totally removing and redownloading the game would be the best option for me, but it would still be useful to know which hlfaceposer I should focus my attention on.

I've tried extracting the models from the source models.gcf and the materials/models folder from source materials.gcf into a custom mod folder built from the 2007 SDK (just to keep them separate from my HL2 installation and to follow bmk10's advice). To some extent, I could get materials to appear on models, but they were clearly wrong (i.e. Barney has black eyes and his scalp was drifting away from his head... very, very wrong).

Riomaki81 avatar Dec 11 '13 03:12 Riomaki81

I'm running Windows 7 Premium on both machines and I have not extracted any models or materials from either. I'm running faceposer.BAT from the common/Half-Life 2/Bin folder. As far as game branch... I'm not sure what you're asking..

Before you reinstall, have you tried to verify your game cache integrity?

Also, I'm wondering if the lack of game configuration option on boot has anything to do with this crap not working. If you launch hammer, it asks you to choose which game you're mapping for. I wonder why the same isnt true for faceposer?

tetsu0 avatar Dec 11 '13 03:12 tetsu0

Game branch meaning are you in any of the "Beta" branches (if you right click on Half-Life 2 in Steam -> Properties -> Beta, the setting under "Select the beta you would like to opt into." There are currently two options - the NONE option and the Beta - Beta updates option, which is what I'm on).

I've done cache integrity without errors and I've been focusing on the Half-Life 2/Bin folder versions as well.

Riomaki81 avatar Dec 11 '13 03:12 Riomaki81

I'm not participating in any betas.

tetsu0 avatar Dec 11 '13 03:12 tetsu0

Alright, thanks for the information. I wish you luck on your scenes.image problem... yes, that would be pretty important.

Riomaki81 avatar Dec 11 '13 03:12 Riomaki81

After totally removing the Half-Life 2 and Source SDK from Steam and deleting the folders in /common (and pre-Steampipe remnants in /steamapps/(username)), I was able to get hlfaceposer.exe working again by redownloading and installing Half-Life 2. The only quirk I noticed was that the error "Material debug/debugmrmwireframe has bad reference count 0 when being bound" repeats non-stop in the output window. But Barney shows up and I can manipulate his face and gestures. Haven't tried generating a new .vcd or scenes.image, though.

Riomaki81 avatar Dec 11 '13 04:12 Riomaki81