I tried search, but it gives me the topics with shaders, but I don’t want to use them.
I try to make a splash screen. I’ve done it, actually - it’s a logo, which is shown a few seconds when the game is starting (after the Unity3d splash screen). But I want to add an affect of hiding - I mean to show the texture and then make it black (or disappeared) gradually.
The problem is that I draw the texture in the OnGUI method using GUI.DrawTexture. So I can’t use, for example, a plane, which is drown over the texture, and operate with plane’s transparency (from fully visible to fully invisible to hide the texture). How else can I make this effect?
You could use the basic particle/addition shader and use it’s alpha value to make the texture disappear. You could setup some function with time.deltaTime to reduce the alpha amount over time. But you’ll have to use a plane with the texture/logo on it to make it work, you could then also add the function simply to the logo, which makes things easier, as you also could destroy it when it’s done.
I don’t know if there’s also a value for the DrawTexture part as it mostly can only be enabled or disabled, which will not have an gradual effect.
The question here is, why don’t you want to use a shader for this? If you’re not able to code some it’s ok, use the basic one (mentioned above). As another Option you could make a sprite-sheet with an animated logo image series that you could apply via drawtexture, but would be more work and maybe inefficient…
No, I think a sprite-sheet is too complex for a splash screen.
I also didn’t want to use a plane with a texture, because I read about it - it may be too pixelate when it’s drawn. So I decided to use a GUI.DrawTexture method. But I think I will have to use a plane and a shader, because I would like to make a “round” effect (sorry, don’t know how to call it correctly), when the logo texture becomes dark from all sides to the center.
So first of all, I will try to recreate my splash screen and use a plane with the texture instead of a GUI.DrawTexture method. And I will see how it looks.
Second, I will try to use a shader. You advised me particle/addition shader. Does it allow to make this “round” effect?
Well I had no issues with using planes and a texture on it for GUI elements, you just need a seperate camera that has the plan on the right position you want it to (obviously centered). The details are ok, and you can change them easily in the texture settings.
The particle/addition shade is able to render transparent stuff, so if you use and .png file it works, while the other shaders (diffuse) show the weird texture as it looks like in the editor preview (those icons). You can then change the alpha value in that shader to make the texture more and more transparent until it disappears.
For the “round” effect (I know hat you mean, those comic thing where you have a whole at the end and a character shows up or whatever) you could either use some animated texture for it, as overlay or as additional plane with transparent shader above it. There’s also the option to create a model for it and animate it which would be the fastest version I guess. There might also be a shader solution, but I’m, like you, not experienced with shader-creation so you have to find a way around your wanted “round”-effect
Well, I replaced everything with two planes - one for the texture and another one for the “curtain”. Looks rather nice, I think. You may watch the video in my WIP.
Not really. Please, take a look at the video above and compare my logo with Unity3d logo - their shading is a bit different. My texture is hiding fully (I mean every part of the texture at the same time), but Unity3d logo is hiding from its sides to the center. That’s what I want! Is it possible to do? I will try to search a bit more and will play with shaders…
Well, there’s no major difference, at least the majority will not notice any difference between the unity logo and yours. I wouldn’t waste that much time into making the fade-out effect different or exactly like the unity one. Everything is possible, you just need the right idea and way to solve it But as already said, I would move on and if you’re done with everything you can still look at the logo and change the effect, or maybe find it while you do something else…
If you still want to change it, I would try something with an alpha map (middle part would be white and fade out like you want) maybe you can use this map as overlay? Or you need to ask some Pro’s for giving you a proper shader but this is beyond my skills ^^ so good luck with this
SlyRipper, thanks for your help and I think the same - don’t want to spend too much time on this effect. Now it looks nice, so I will do everything else in the game and maybe then I will restyle this shading effect. If I find a good way to do that, I will post it here.