Source Filmmaker

Source Filmmaker

N-G-Neer Jan 2, 2018 @ 11:21am
Converting EyeRefract shader to Eyes
Hello, everyone !

I need to achieve a glowing eye effect in my current project.
As I've read, neither Eyes nor EyeRefract support the $selfillum feature.
However I found out that Eyes did work with a shadowless Uberlight with its cutOn and cutOff set to their max and min, respectively.

The model I'm trying to convert is the Pokken version of Mewtwo, available on the workshop.
So far, I managed to write the following :

"eyes" { "$basetexture" "models/pokken/shared/white" "$iris" "models/pokken/mewtwo/mewtwo_eyeball" }

The sclera is white, but so is the iris, even though mewtwo_eyeball is a texture with a colored iris.

I'd greately appreciate the help ^^
< >
Showing 1-8 of 8 comments
Zappy Jan 2, 2018 @ 11:27am 
Please re-consider what you're trying; Eyes is very different from EyeRefract.
Unless the eyes are extremely primitive, you can not get the same kind of look with Eyes as EyeRefract. Besides, what you would "gain" (broken/improper reaction to lights) from Eyes you can also achieve with EyeRefract (by just using a higher intensity/brightness light with some fine shape adjustment and such).
(Remember that if you right-click a light's intensity slider, you can choose "Remap slider ranges" or so and set the maximum value to be something higher than before, which will let you make the light much brighter than before.)


As for why the iris seems white, keep in mind that what would often be opaque on the iris texture of Eyes is often the exact opposite of what would often be opaque on the iris texture of EyeRefract (meaning the pupil/iris is likely transparent in the texture for use with EyeRefract, while they should be opaque when intended for Eyes).
Last edited by Zappy; Jan 2, 2018 @ 11:27am
N-G-Neer Jan 2, 2018 @ 11:36am 
Well, Eyes has the benefit of being affected by the Uberlight without any adjustment of the shape and risk of the light bleeding outside the eye. The model's eyes have a very triangular shape, so I'm guessing that would be tricky to adapt on a light.

I looked at some other model with an Eyes shader and to the best of my knowledge, the iris texture from this model was completely opaque, with a white-ish sclera and an iris right in the middle. Same for the Mewtwo model.
Last edited by N-G-Neer; Jan 2, 2018 @ 11:37am
Zappy Jan 2, 2018 @ 11:51am 
By the way, I just remembered that the iris part of Eyes is either twice as tall/wide or half as tall/wide as EyeRefract, meaning you either have to edit the iris texture to cut 25% off the top and bottom and 25% off both sides (so you have the middle 50% vertically and horizontally of the original texture, so the iris/pupil fills twice as much percentage-wise both vertically and horizontally), or have to edit the iris texture to add 50% of blankness at the top and bottom and both sides (so the original texture now only fills the middle 50%, so the original texture only fills half as much percentage-wise). I don't remember which of these is the case, though, but one of them is.


Originally posted by N-G-Neer:
Well, Eyes has the benefit of being affected by the Uberlight without any adjustment of the shape and risk of the light bleeding outside the eye. The model's eyes have a very triangular shape, so I'm guessing that would be tricky to adapt on a light. -
EyeRefract has the benefits of reacting properly to light, supporting refraction, supporting normal maps, supporting environment-/cube-maps, supporting ambient occlusion, and so on, allowing it to look a lot prettier than Eyes if used correctly.

Originally posted by N-G-Neer:
- I looked at some other model with an Eyes shader and to the best of my knowledge, the iris texture from this model was completely opaque, with a white-ish sclera and an iris right in the middle. Same for the Mewtwo model.
Are you completely sure the iris texture you have specified is opaque (and/or at least has the iris/pupil opaque)?

(I believe VTFEdit by default does not show the alpha mask in any way, though you can view the alpha mask itself by clicking Ctrl+Shift+A (you can revert to the colour by clicking Ctrl+Shift+C) or render transparency as white/gray checkerboards by clicking Ctrl+M (which works in combination with seeing the normal colours, basically just having it masked by the alpha).)
N-G-Neer Jan 2, 2018 @ 12:18pm 
Thanks for the image resizing tip, I'll give it a shot.
As far as all the benefits of EyeRefract, the camera wont be anywhere near the eyes to see that level of detail, so I think I can make do without refraction, normals and such ^^

Maybe I got tricked by VTFEdit. I'll get back to you on that.
Thanks for the help so far ^^
N-G-Neer Jan 2, 2018 @ 12:30pm 
Hmm, this is strange. The eye texture shows the regular iris (WITH alpha, you were right) but the exported TGA file shows solid alpha and the iris is missing.
Zappy Jan 2, 2018 @ 12:34pm 
Originally posted by N-G-Neer:
- the exported TGA file shows solid alpha and the iris is missing.
Maybe the image editor in question doesn't like TGA files very much? Try PNG instead.
N-G-Neer Jan 2, 2018 @ 12:36pm 
Nope, same gray square with an iris shaped hole. I'm using VTFEdit for the export and PaintDotNET for the editing.
Last edited by N-G-Neer; Jan 2, 2018 @ 12:37pm
Zappy Jan 2, 2018 @ 12:42pm 
Originally posted by N-G-Neer:
Nope, same gray square with an iris shaped hole. I'm using VTFEdit for the export and PaintDotNET for the editing.
I know that if I use VTFEdit version 1.3.3 to export a Team Fortress 2 EyeRefract iris texture as PNG, I can open the image in Game Maker 8.0 Pro's sprite/image editor with the alpha and also colours intact. (Even where the alpha is 0.) So make sure you have version 1.3.3 of VTFEdit (it's the latest one available, so you should, anyway) and that Paint-dot-NET can handle transparency correctly (and that it doesn't replace fully transparent parts with black colours or such).
Last edited by Zappy; Jan 2, 2018 @ 12:42pm
< >
Showing 1-8 of 8 comments
Per page: 1530 50

Date Posted: Jan 2, 2018 @ 11:21am
Posts: 8