Source Filmmaker

Source Filmmaker

Some problems with alpha textures
I was working on a custom model, but one of the textures, wich is a gradient (obviously using alpha) seems not working... this may explain my problem better:

This is the texture[gyazo.com]

This is how it shows in blender[gyazo.com]

Same but rendered[gyazo.com]

But this is how it shows in SFM[gyazo.com]

This is the texture in the VTF file[gyazo.com]

And those are the code lines in its VMT[gyazo.com]

What is wrong?
< >
112/12 megjegyzés mutatása
What does the selfillummask look like?
Pte Jack eredeti hozzászólása:
What does the selfillummask look like?
like this: https://gyazo.com/5178bfd0d09c93c1844f23b6d19b26d8
Ok, I didn't have the selfillummask texture while I was setting this up, so my stuff here is without it... But, it may be that mask that is giving you the problem.

This is the Blender, QC, VMT set up using your Gradient with final result also shown in HLMV

https://i.imgur.com/gzJdyeC.png


This is my SFM Render without lights (and if you look closely you can see the texturescroll is working.

https://i.imgur.com/wEAS7Pm.gif

This is with a single light added and a model thrown into the box.

https://i.imgur.com/KcqiT2B.gif


You problem may lie in the same masking problem we have with community paintable items for the selfillum mask.


Legutóbb szerkesztette: Pte Jack; 2018. jún. 3., 22:07
Bingo!

This is with your current SelfIllummask texture turned on...

https://i.imgur.com/XWS9F39.png

And flipping the mask vertically doesn't change things.

Doh, I should have read the Wiki first.....

$selfillum textures

Warning:Cannot be used with $translucent or similar values on models. Use UnlitGeneric shader instead

By default, $selfillum takes the alpha channel of the base texture and uses it as the $selfillummask (turns it into a map for how bright each pixel of the image should appear.)

This means partial brightness or even only small areas of brightness can exist. A partially bright face can still receive light that is added to the default light on the face. The VMT property must exist.


AND THE FIX IS (Drum Roll if you please!!)

https://i.imgur.com/XTivphG.png
Legutóbb szerkesztette: Pte Jack; 2018. jún. 3., 22:55
selfillum fx? can be done very cheap[i.imgur.com]. if you bump the color it glows too. and it only needs one simple diffuse texture.

for the heck of it. i didn't have this phat line bug. is that the base being black underneath the alpha texture? i'd call that crap. translucent didn't work tho.
Legutóbb szerkesztette: episoder; 2018. jún. 3., 23:02
and yes the scrolling texture still works...

https://i.imgur.com/47J5oTZ.gif
episoder eredeti hozzászólása:
selfillum fx? can be done very cheap[i.imgur.com].

for the heck of it. i didn't have this phat line bug. is that the base being black underneath the alpha texture? i'd call that crap. translucent didn't work tho.

I though most additive textures didn't play well with SFM, or is that just certain particle textures?
Pte Jack eredeti hozzászólása:
I though most additive textures didn't play well with SFM, or is that just certain particle textures?

you mean the lighting thru things gitch? i'm certain the error is in one of the map sprite style shader combos. dunno what. i don't know/can't find one that does that. all this old material stuff is nasty. on models it seems to work. snap[i.imgur.com].
Legutóbb szerkesztette: episoder; 2018. jún. 3., 23:48
was just messing with this a lil further. made that weird scrolling edge a lil better/nicer looking animated. noise is our friend. :D i 'corrected' the direction to make some sense too. it's basicly now as 'expensive' as the selfillum pass.

https://gfycat.com/gifs/detail/JampackedAmbitiousAmericanbittern

and the material. this can all be tweaked for 'flow' speed, stretch and waving times. i think it's luck the detail can use the seperate transform. iirc in most other shader combos it's broken.

unlitgeneric { $basetexture "dev\gradient_dif" $color "[1 .8 .6]" $detail "dev\noise_512x32" $detailscale 1 $detailblendmode 0 $detailblendfactor 4.0 $additive 1 $nocull 1 $cvar "[.5 .5]" $svar "[1 .25]" $rvar 0 $tvar "[0 0]" $sine1 0 $sine2 0 proxies { linearramp { rate .3 initialvalue 0 resultvar "$tvar[1]" } sine { sineperiod 1.3 sinemin -.004 sinemax .002 timeoffset 0 resultvar $sine1 } sine { sineperiod 1.7 sinemin -.003 sinemax .007 timeoffset .2 resultvar $sine2 } add { srcvar1 $sine1 srcvar2 $sine2 resultvar "$tvar[0]" } texturetransform { centervar $cvar scalevar $svar rotatevar $rvar translatevar $tvar resultvar $detailtexturetransform } } }
Legutóbb szerkesztette: episoder; 2018. jún. 4., 11:09
Kewl.

But the reason mine has an edge at the top is because I left the top face on the model and just reused a portion of the gradient to paint it, so it isn't totally transparient (hence the edge). I was just interested in finding the answer "why?" and to see if that scrolling texture proxy worked in SFM and rushed the model.
Legutóbb szerkesztette: Pte Jack; 2018. jún. 4., 11:28
Sure. No problem. ;) Using a flawless gradient makes the transform useless anyway. Could perhaps use a wave gradient to rotate around in this circle. It's still just rotating around it. Hence why i had to try the detail approach to animate it in a different way. :)
Yup, the beautiful thing about SFM, eh? Is there another way to work around a problem? lmao
< >
112/12 megjegyzés mutatása
Laponként: 1530 50

Közzétéve: 2018. jún. 3., 18:48
Hozzászólások: 12