Source Filmmaker

Source Filmmaker

Eranthis Nov 8, 2018 @ 5:58pm
Reworking Eye Texture: Iris Vanishes
https://i.imgur.com/W9P6sOg.png

Having an issue converting a model's eyes to use the more traditional sfm lighting on eyeballs. For some reason the iris disappears and I have no idea why. Any direction as to why this might happen?
Last edited by Eranthis; Nov 8, 2018 @ 8:00pm
Originally posted by episoder:
okay. done compiled atleast to test it. this should do that. i forget the bonenames from the c/p.

https://www.dropbox.com/s/9hgvtlt5kh7v8en/nowfixed.rar?dl=0

i tested with some other eyes tho. roughly the same as the gambler. the dude got some weird eye shape anyway. not alot of angle.

https://i.imgur.com/n5sLY41.jpg
< >
Showing 1-15 of 33 comments
Marco Skoll Nov 8, 2018 @ 6:05pm 
The alpha layer is important on EyeRefract textures, as it controls the strength of reflections on the eye - probably the easiest thing to do is compare to an existing model's EyeRefract textures for reference.
Eranthis Nov 8, 2018 @ 6:09pm 
Originally posted by Marco Skoll:
The alpha layer is important on EyeRefract textures, as it controls the strength of reflections on the eye - probably the easiest thing to do is compare to an existing model's EyeRefract textures for reference.
I did. I copied over the alpha layers from left 4 dead eye textures in sfm as reference.
Marco Skoll Nov 8, 2018 @ 6:13pm 
Then the next thing to check is that the file was actually saved with those alpha layers.

(Yes, I have seen this particular mistake before)
episoder Nov 8, 2018 @ 6:21pm 
if you use the same texture alpha as the cheap shader this won't work. on the refract shader the iris gotta be dark alpha for it to not add the noise from the texture. it's not entirely an envmap thing. you can make the alpha entirely black and the envmap still works.

if you made that mistake and used no alpha channel (default white) for the cheap eyes as full iris ball you should add the alpha aka layer mask or whatever, set it to black and save as rgba or dxt5 texture. that should do the trick.
Last edited by episoder; Nov 8, 2018 @ 6:24pm
Eranthis Nov 8, 2018 @ 6:53pm 
Originally posted by episoder:
if you use the same texture alpha as the cheap shader this won't work. on the refract shader the iris gotta be dark alpha for it to not add the noise from the texture. it's not entirely an envmap thing. you can make the alpha entirely black and the envmap still works.

if you made that mistake and used no alpha channel (default white) for the cheap eyes as full iris ball you should add the alpha aka layer mask or whatever, set it to black and save as rgba or dxt5 texture. that should do the trick.

I can confirm that the eye's diffuse texture alpha layer is completely black where the iris is.
Eranthis Nov 8, 2018 @ 6:54pm 
Originally posted by Marco Skoll:
Then the next thing to check is that the file was actually saved with those alpha layers.

(Yes, I have seen this particular mistake before)
VTFEdit shows that the alpha layer is present.
episoder Nov 8, 2018 @ 7:03pm 
okay. well. cpt. obvious hid in the corner. vertexlit is not an eye shader. have you actually setup and recompiled the model to use eyeballs and use those shader eyeball materials?
Last edited by episoder; Nov 8, 2018 @ 7:05pm
Eranthis Nov 8, 2018 @ 7:07pm 
Originally posted by episoder:
okay. well cpt. obvious hid in the corner. vertexlit is not an eye shader. have you actually setup and recompiled the model to use eyeballs and use those shader eyeball materials?
No, this was purely an attempt to rework the textures in general without touching the model. What on a model-level would help make these strings work for it?
episoder Nov 8, 2018 @ 7:21pm 
Originally posted by Eranthis:
No, this was purely an attempt to rework the textures in general without touching the model. What on a model-level would help make these strings work for it?

you gotta decompile it (using the crowbar) add a bunch of commands to the qc (like this with the correct eyeball coordinates for your model...
$attachment "eyes" "Head" 0.0 -2.48 72.14 absolute $attachment "dummyattachment" "Head" 0.0 0.0 0.0 $attachment "righteye" "Head" -1.50 -2.48 72.14 absolute // for debugging only $attachment "lefteye" "Head" 1.48 -2.48 72.14 absolute // for debugging only $model "model" "model.dmx" { eyeball righteye "Head" -1.50 -2.48 72.14 "eyeR" 1.00 4 "unused" 0.95 eyeball lefteye "Head" 1.48 -2.48 72.14 "eyeL" 1.00 -4 "unused" 0.95 flexcontroller eyes range -45 45 eyes_updown flexcontroller eyes range -45 45 eyes_rightleft }
) and recompile the model, to have those eyeball things working and the controllers for them.
Last edited by episoder; Nov 8, 2018 @ 7:21pm
Eranthis Nov 8, 2018 @ 7:38pm 
Originally posted by episoder:
Originally posted by Eranthis:
No, this was purely an attempt to rework the textures in general without touching the model. What on a model-level would help make these strings work for it?

you gotta decompile it (using the crowbar) add a bunch of commands to the qc (like this with the correct eyeball coordinates for your model...
$attachment "eyes" "Head" 0.0 -2.48 72.14 absolute $attachment "dummyattachment" "Head" 0.0 0.0 0.0 $attachment "righteye" "Head" -1.50 -2.48 72.14 absolute // for debugging only $attachment "lefteye" "Head" 1.48 -2.48 72.14 absolute // for debugging only $model "model" "model.dmx" { eyeball righteye "Head" -1.50 -2.48 72.14 "eyeR" 1.00 4 "unused" 0.95 eyeball lefteye "Head" 1.48 -2.48 72.14 "eyeL" 1.00 -4 "unused" 0.95 flexcontroller eyes range -45 45 eyes_updown flexcontroller eyes range -45 45 eyes_rightleft }
) and recompile the model, to have those eyeball things working and the controllers for them.
Model's decompiled.
To elaborate, what particular strings need the new coordinates of the model?
episoder Nov 8, 2018 @ 7:42pm 
the most important are the 'eyes' attachement and the eyeball commands. make sure you get the center of the eyeballs not the iris location. you can use a sphere helper to get those. that should make that quick.
Eranthis Nov 8, 2018 @ 7:46pm 
Originally posted by episoder:
the most important are the 'eyes' attachement and the eyeball commands. make sure you get the center of the eyeballs not the iris location. you can use a sphere helper to get those. that should make that quick.
I'm still lost as to what needs adjusting to the strings you've provided.
episoder Nov 8, 2018 @ 7:52pm 
those...
$attachment "eyes" "Head" 0.0 -2.48 72.14 absolute ... eyeball righteye "Head" -1.50 -2.48 72.14 "eyeR" 1.00 4 "unused" 0.95 eyeball lefteye "Head" 1.48 -2.48 72.14 "eyeL" 1.00 -4 "unused" 0.95
need the correct coordinates for the eyeballs and the center in the middle. you could try the qc_eyes tool, but i can't help you howto use that, cause i dunno, cause i never used it. or you may need a modelling tool to measure those. you know a good one?

if not you can upload the head smd and i can get those real quick. huh
Eranthis Nov 8, 2018 @ 7:57pm 
Originally posted by episoder:
those...
$attachment "eyes" "Head" 0.0 -2.48 72.14 absolute ... eyeball righteye "Head" -1.50 -2.48 72.14 "eyeR" 1.00 4 "unused" 0.95 eyeball lefteye "Head" 1.48 -2.48 72.14 "eyeL" 1.00 -4 "unused" 0.95
need the correct coordinates for the eyeballs and the center in the middle. you could try the qc_eyes tool, but i can't help you howto use that, cause i dunno, cause i never used it. or you may need a modelling tool to measure those. you know a good one?

if not you can upload the head smd and i can get those real quick. huh
Here's a link to the decompiled assets if you want to have a gander. I threw in the strings you added into the qc without any changes. I'm not well versed in the compilation of models, I just texture things tbh.

{LINK REMOVED}
(or the forum could just not let me provide a link at all)
Last edited by Eranthis; Nov 8, 2018 @ 8:01pm
episoder Nov 8, 2018 @ 7:59pm 
steam is whack. the link is removed. use (dot) or underscores in the url.
Last edited by episoder; Nov 8, 2018 @ 8:00pm
< >
Showing 1-15 of 33 comments
Per page: 1530 50

Date Posted: Nov 8, 2018 @ 5:58pm
Posts: 33