HaArLiNsH / TextureReplacerReplaced

The continuation of TextureReplacer, a plugin for replacing original textures in Kerbal Space Program.
8 stars 4 forks source link

Adjust visor reflections with the transparancy value of the visor #22

Open GER-Space opened 7 years ago

GER-Space commented 7 years ago

I looked yesterday only shortly at the visor (ingame) and I could not see the face of the kerbal, because the reflections are overwriting the transparancy.

I could adjust the reflections intensity by the transparancy value, so a 100% transparent visor will not display any reflections. (so you could make a half open visor, with the right texture)

HaArLiNsH commented 7 years ago

The 0% transparent reflections looks wonderful but are a but too strong with higher transparency It will be nice indeed if we could have reflections proportional to the transparency :)

omg a half open visor would be something really nice. But know that the visor texture is applied in a weird way , try these (work in progress) and you will see, this is not a texture applied in a flat way, they cut it like hell evavisor 40 50 0 noskull evavisor evavisor 30 50 evavisornrm evavisor_clear evavisor evavisor1

GER-Space commented 7 years ago

I have no idea what the pics should tell me, but if the first two are outlineing the UV-Map, then you are in texturing hell :-) (looks like an automatic UVunwrap to me) tools like Substance Painter or 3dCoat will help a lot with such problems, but you need to export the model (and UVmap) first.

I'll send a PR with an updated shader later. It's only a few lines that need to be changed (I use this allready in the reflective shader)

HaArLiNsH commented 7 years ago

the pictures I linked are visors textures ,maybe there was I bit too much visors for you to test but at least you can find visor with alpha, non alpha, NRM and the visor guide (with and without alpha).
This is what i wanted to show you :

http://i.imgur.com/DUAoraJ.png

If you look at the visor in this picture and compare it to the last in my other comment, you will see what I mean.
the yellow and blue quadrant are mirrored in the middle and the circle part in the red and green quadrant are ignored. and finally they have dispatched the part out of circle of the blue,green and red quadrant. (my explanation may be hard to understand, but compare and you will see) :)

The visors with the half kerbal skull show you my first try to make a logo for the level 5 visor (the second is transparent, so you can see the head behind and it does like an overlay) I haven't tried it since your new reflection/shader :)

GER-Space commented 7 years ago

OK, sorry I never actually used TR so I had no Idea that the images where textures for me to test.

For my first guess would be: The UV-Map is double used and thus mirrored. As an extra gimmick the texture mode is set tiling. the tiling can be turned off with one or two lines of code Texture scaling if set to new Vector2(1,1), the texture will be used only once.

HaArLiNsH commented 7 years ago

Ooh I see,nice :) I'll look into it, this could be a nice option to toggle if we want different effects on visors.