How to create a Flashlight in unreal that can be used in Android? - unreal-engine4

The player carries the flashlight so it is moving all the time. I'm aware of using a spotlight to make a flashlight when developing for the PC but it doesn't work for android. I have tried searching about it and all i have come across is creating a dynamic material that's applied to a certain area to give the illusion of a flashlight and it doesn't look good at all. So i would like to know if there is any other way to achieve this.

I think one option would be to use post processing. I am not sure is this better than using materials, but it is different (perhaps easier) way.
Here is example that I made quickly (obviously you would need to fine tune it):
fake light GIF
This contains ambient light and post processing effect.
Yellow area in middle that you see as light is not point light, it is just effect.
It is possible to change "light" area/intensity/color/... as well as overall darkness.
Also, worth mentioning, I made this quickly since I had already somewhat similar post processing effect, I just adjusted it so it look like flashlight.
You can find more information here:
Post Process Effects
Post Process Materials

Related

What approach should I use to create animated backgrounds in Unity?

I'm new to Unity and trying to figure out the best way to create animated backgrounds. To be clear, I'm not asking you to give me an exact solution or instructions, and I would be grateful if you just tell me which direction to look in, and I will figure it out by reading the documentation.
I'm interested in how animated backgrounds are created in 2D Unity (for example, as here: https://youtu.be/OxiGlmV6ByA?t=1075 flying leaves are visible on the background). I only thought of using particles or just creating standard animations in Unity. But, the second way seems too long and complex, and about the particles, I'm not sure how much it affects the performance in a mobile game. Google searches mostly give instructions on how to create parallax backgrounds or moving backgrounds in Unity.
In general, I will be grateful if you tell me which approach is the most optimal for creating an animated background in a mobile 2D game in Unity.
The particles system is well optimized, for what you want to do it will not affects the performance, even on mobile.

How do I use different Post-Processing effects on different cameras in Unity 2017.4.2f2?

Before I explain my situation, it's important that I mention I'm using an older version of Unity, 2017.42f2 (for PSVITA support). for this reason, I'm also using the old Post-Processing Stack.
I'm making a game in which I want a lot of bloom on the UI, but not as much for the rest of the game. I used a camera to render the UI, gave it Post-Processing (Screen Space - Camera on Canvas),
and another one to render the rest of the game
Each is given a different profile to use different effects.
My expectation is that the UI renderer camera would only apply it's effects to the Canvas. Instead, it also applies them to the camera beneath it; the game renderer camera.
As you can see I used Don't Clear clear flags. I also tried Depth-only, to see if it would make a difference.
I'm lost as to what I could do. Grain and bloom get applied to everything
yet the profile for those effects is only given to the UI renderer Camera's Post Processing Behavior Script.
Does anyone have any suggestions or ideas? I'm lost.

Unity Shader Graph - Glow motion of an object with Shader Graph

I'm new to shaders and with the new Shader Graph from Unity I'm trying to experiment and archive some effects that I have in mind for my games.
I want to get something like this:
https://imgur.com/vqy9y3H
I want a glow effect to go arround my object. In my case it's a square neon light, so it's simple I think.
What I have so far, experimenting and unifying different tutorials, effects, etc.:
https://imgur.com/aPW95S0
This is the current Shader Graph, i know its a mess and maybe there are useless nodes, etc.:
https://imgur.com/J3jzGE6
This is the tutorial I think it's the most accurate to what I need:
https://www.youtube.com/watch?v=UJUlGJS3QpY
Thanks in advance for any tip that help me find the correct path to archive the effect.
EDIT:
To make it clear, the real problem for me is the motion effect. I already setup the glow effect with post-processing and bloom. My problem is how to do the effect arround the object. In my case it's a neon tube, so it's easiest I think, as the effect can be on all the object but from the start of the tube to the end. As the tube is closed, it will start again from the begining almost at the same point. Hope it make it clear.
you can use post processing to get the effect your after, specifically bloom and tone mapping effects.
With post processing applied you just need to increase the color into HDR levels in your shader.
Applying a blur outside of post processing is actually extremely expensive and isn't really recommended unless there is absolutely no other option.

Unity3d Silhouette Highlight for 2d sprite

I want to implement Silhouette Highlight on MouseOver like in this picture:
Built in Unity3d user interface elements have a component called Outline and Shadow, but they only work with the user interface, not with the SpriteRenderer. The first idea was to create a second sprite with highlight at background and enable it to MouseOver, but I think that this method is not good.
As Everts (and me) mentions in a comment,
there's nothing wrong with simply making the "glow sprites" and turning them on and off. That would certainly be done in many large games: it's good.
It's true that you could write a shader that does this, but really that would be "bad engineering" - totally unnecessary for such a simple need. (And to be clear, arguably it's plain better to make custom sprites.)
Now, this brings us to an important point about Unity engineering -
it's critical to use existing assets, in Unity work.
There are a couple of stand-out examples. Like, NatCam and Edy's vehicle system. You just - literally - cannot use the camera in a game unless you use "NatCam"; the only alternative would be to completely pointlessly spend a year building NatCam yourself.
In this case, there are many good "glow shaders" available ...
https://www.assetstore.unity3d.com/en/#!/content/20166
Enjoy!

How can I achieve a node that will desaturate everything below it?

I am building a game where everything behind the player is greyed out as if it lives in a memory. But I don't know how I can achieve this effect. Is this where shaders are being used for?
Now I can create a SKLightNode to create the lighting and make it dark around the edges. But I like to field of view for the character to be 120 degrees. Everything outside of that angle should be greyed out.
Of course in the future I like the view to be blocked by obstacles but that is outside of the scope of this question.
A desaturation shader for SpriteKit can be found at my blog post on that subject. Note that this works in terms of an input texture, so you may need to adapt things to work on top of a tiled background. Also note that there is a new iOS 9 API to support capture of the output of a whole node, which may be useful to you in implementing this.