STEAM GROUP
Blender Source Tools BleST
STEAM GROUP
Blender Source Tools BleST
317
IN-GAME
1,875
ONLINE
Founded
8 November, 2013
All Discussions > Bug Reports > Topic Details
jario_362 17 Apr, 2016 @ 9:17am
Material order is not optimal when exported from Blender
Hi. I'm starting to get frustrated with exporting SMD models.

I once exported an SMD model with Viseme Shapekeys, and it has the materials in the order that makes it work. However, now, I can't remember how I did it.

These screenshots taken from Milkshape 3D should clear up what I'm trying to fix.

Correct order: http://sta.sh/01yaijvvmxib .

Incorrect order: http://sta.sh/01t6lcteqssp .

How does one fix this? If I compile a model to Source Filmmaker with an SMD that has the material order like in the second link, the skin on the model's mouth will separate into shapes, rather than the skin seamlessly reacting to the Viseme Shapekeys. This is the only problem that I can think of, that is keeping me from making a Tutorial on making a Source Filmmaker model with lip sync capabilities from a MakeHuman model.
< >
Showing 1-15 of 18 comments
Artfunkel 17 Apr, 2016 @ 11:15am 
The material order depends on entirely on the order of polygons within the mesh. I don't know how you might control that except through retopology.

Why does the material order matter? I've never heard of that before. It might be something worth supporting.

In the meantime try exporting to DMX. It's much easier to re-order polygons there, though you will need to dive into the Datamodel with a script to do so.
Zappy 17 Apr, 2016 @ 11:32am 
Originally posted by Artfunkel:
Why does the material order matter?
Source probably thinks "now I should render material 1... done, now for material 2... done, now for material 3..." etcetera etcetera, in which case with transparent materials and other special effects, the order might make a difference.

Anyway, I know putting a $TextureGroup list with the materials of the model can change the internal order of the materials in the MDL (which is seen when making override materials in Source FilmMaker, for example), as long as $TextureGroup is put before all $Model, $Body, $BodyGroup, etcetera lists. Does that help with anything, jario_362?
Last edited by Zappy; 17 Apr, 2016 @ 11:33am
jario_362 17 Apr, 2016 @ 11:46am 
Zappy, I think you've nailed what I've been attempting to explain. If you look at the second screenshot, Skin is at the very bottom. I noticed, when I compile a model with that sort of order, the teeth are shown where the lips would normally block the sight of them.

I'm just curious as to how one would go about using the $TextureGroup command that you mentioned. If it does the trick, I'll see to it that I'll make a fully functional model with MakeHuman with lip sync capabilities. I'll make the model to the specifications you wish for.

Thanks. I hope to be able to test out this new method, very soon.
Zappy 17 Apr, 2016 @ 12:04pm 
Here's a QC snippet of a model where I've chosen the material order using $TextureGroup in order to get the Source FilmMaker override material order I want, as an example:
-No mesh parts above- $TextureGroup Skins { { Body Glyphs Interior Wing WindshieldTranslucent WindshieldOpaque InfobotPlayer KitScanAuto KitScanManual ScreenAphelion ScreenRadar ScreenLines ScreenMap ScreenBackground ScreenRT } } $Model Aphelion "Aphelion" -More mesh parts below-
Last edited by Zappy; 17 Apr, 2016 @ 12:17pm
jario_362 17 Apr, 2016 @ 12:07pm 
Method tested. So far, it's really promising. Just like my first time! I'll try making a version of the model with a full Viseme Set, test it out, and, if it works, it'll mean that this is a definite solution to that problem.
jario_362 17 Apr, 2016 @ 12:07pm 
Ah, ok. Thank you very much. I just saw your post, just now, Zappy.
jario_362 17 Apr, 2016 @ 12:22pm 
Confirmed. I repeat, it is confirmed. It works! Zappy, you're entitled to a fully-functional model made from MakeHuman, that has lip sync capabilities. Just let me know what you want your model to look like, and I'll take care of the rest. This is a token of my gratitude.
Zappy 17 Apr, 2016 @ 12:25pm 
But I don't want one.
jario_362 17 Apr, 2016 @ 12:32pm 
Oh, ok. Is there something else I can offer, then?
Zappy 17 Apr, 2016 @ 12:33pm 
Yes, lots of stuff. (But nothing which I want.)
Last edited by Zappy; 17 Apr, 2016 @ 12:33pm
jario_362 17 Apr, 2016 @ 12:36pm 
Well, feel free to request for a comic, or something, in the event that you do change your mind.
jario_362 17 Apr, 2016 @ 3:42pm 
It's odd. I try the same thing with other characters, and it doesn't compile, for some reason.
jario_362 17 Apr, 2016 @ 3:45pm 
Hang on. I might have found the problem.
jario_362 17 Apr, 2016 @ 3:55pm 
For one model, there was another $Model line. I took that one out, and that works for the one model that didn't seem to like it. The same model's shirt is transparent, so, I'll have to look at that, for sure.
jario_362 17 Apr, 2016 @ 5:15pm 
Disregard the last couple of messages regarding the problems. I just figured out why the models don't compile. It's because, you need to match all the texture names. Not sure about the casing, but, the texture names have to be exact. Like, if one texture has "Eylid" in it, you'd have to put it as that exact spelling.
< >
Showing 1-15 of 18 comments
Per page: 1530 50

All Discussions > Bug Reports > Topic Details