Unity - particle system material like this? - unity3d

Im trying to copy this fire system https://realtimevfx.com/t/sketch-10-jordanov/4273/7 the smoke here especially:
https://www.youtube.com/watch?time_continue=2&v=Wwj3Y6ieTlI
So far not much luck, mainly because when I try to emulate the smoke by setting the material to a fade alpha, or even cutout alpha, the overlapping particles become this:
See, they overlap instead of being a solid stream. Is this not possible in Unity?

There's a few possibilities for this.
The texture you're using for your particle has the color fading to black on the RGB channels, instead of being pure white or blue and only having the alpha channel contain the circle pattern.
The shader being used is "pre-multiplying" the color by the alpha, giving a darker look around semitransparent overlaps.
The particles are being lit and thus differences in position can result in differences in lighting, breaking color/shading continuity.
If you use a Unity "Unlit" particle shader, there should be no visible overlaps, assuming you don't have the first issue. I'd recommend trying some of the other shader options available in the Particle section and Mobile>Particle section.

Related

unity3d: Adding half-transparent video with shadows

I'm struggling with an issue that might seem a little bit awkward.
I have some black & white 2d animation (1440x1080px) that I'd like to be played in in a 3d environment in unity3d. Therefor I added a video player to a plane. Now comes the tricky part: I want to make the black areas of the video transparent while the white areas remain visible AND the white areas shall cast shadows on the surrounding. Using the particles shader "additive" does half of the job. But I just can't manage to let the video cast a shadow.
If it worked you would get some 2d "antagonist" (you can't interact with) that looks kind of 3d. Alternatively you could interprete it as some half materialzed holograph that casts shadows.
Is there any (simple) solution I just don't know?
Here some schematic drawing of what I would like to achieve, for better understanding.
The problem right now is: In contrast to my drawing, the desired shadow on the wall doesn't appear... :-/
So, I did never try this but you can maybe add a light in the scene just in front of the video player, that way the light will cast shadows.

Unity3D, Glass Shader, prevent rifts

I'm new to Unity and 3D and currently working on a 3D model of a smartphone. I have a Mesh that uses Standard shader with glass material. This mesh covers all of the surface, and is able to fill in any rifts that exist on the model.
My glass material looks like this:
The properties:
The model:
The problem is that this shader is black, it's covering other elements of the model, like camera, if I remove it, the model will look like this:
which is ok, but you may see that there are little gaps near to the camera, the rifts:
I have no idea how to fill this gaps and use glass shader in the same time.
Also, I cannot use Standard shader, because it doesn't work on mobile devices.
I tried to apply any other Glass Shaders with lower LOD, which seem to work, but the gaps still remain.
Any help is highly appreciated.
Okay, so I played around with the Standard Shader and the main problem you have is that it has no transparency at all. You won't be able to look through it if it has no alpha.
What I did to get results that seemed "okay" is:
I set the rendering mode to Transparent
I set the color to #0024050C
I set the Metallic to 0
I set the Smoothness to 0.9
I kept everything else on default
There may be a comparable version for the Standard (Specular) setup:
Same values as above
Specular to #181818FF
Source to Specular Alpha
And as far as I know, the Standard Shader should work on mobile with some features disabled.

How to achieve Terraria/Starbound 2d lighting?

I am making a 2d game in the perspective of Terraria/Starbound. I want the lighting to look similar to this:
Ive tried to get lighting like this by adding a material on all the sprites in my game and then giving them a sprite diffuse shader. Then I made a point light wherever I needed light. There where two problems with this though: 1) Where the light was most intense, it was draining the color of a sprite and made it lighter. 2) I noticed a big FPS drop (And I only had 1 point light!).
Is there any way of achieving lighting like this without having to write my own lighting engine? Ive search the asset store and Ive searched to see if unity has any way of handing 2D lighting from this angle but I have found nothing.
If I do have to write my own lighting engine, would that be to complex for someone who is relatively new to unity and has only had ~ 8 months experience?
Assume you are using tile map.
You need to have a field of view map, which can be achieved by reading this: http://www.redblobgames.com/articles/visibility/
Using such map, you know exactly the color tinting for each tile. Now, just blend the color to the SpriteRenderer of every tile on the map.
Somebody already created a line of sight plugin:
http://forum.unity3d.com/threads/light-of-sight-2d-dynamic-lighting-open-source.295968/
Here's my hacky solution on GitHub
There's 2 cameras.
Empty tiles on the tilemap are filled in with white blocks (only one camera renders this)
A gaussian blur is applied to the camera rendering the white blocks
Then, blend the two cameras, darkening everything not covered by the white blur.
You can adjust the "light" penetration by changing the white tile's sprite's Pixels Per Unit.

Unity2D tile mesh render is darker than source texture

I am making a 2D tile-based game in Unity.
I have a tile mesh implemented roughly along the lines of this wiki entry. Full source code is available at PasteBin. When I look at my graphic (image file) it is precisely the same color as I see in the scene view; however, when I start the game, the mesh is darkened. I notice that when I change the Ambient Light color, it does resolve the issue (sort of): it changes the brightness, but if I set it to pure white, then the colors are too bright (see here). Furthermore, when I have regular GameObjects (such as the brick you see in the second image) they are not affected by this Light setting. I don't understand why the mesh is. Is there a prescribed way to make it totally WYSIWYG? The tileset I am using is here.
Try changing the shader on the material of the renderer to Unlit/Texture or Transparent/Unlit - if you need transparency.

Metallic sparkle effect in OpenGL ES?

I'm working on an Android and iPhone app. I'm rendering lots of smallish (about 32 pixels) billboards to the screen for a particle system and want to give a glitter-like sparkle to each billboard e.g. as the particles are falling, random ones will briefly light up and sparkle as they catch the light. Is there a simple way to achieve this effect? As a limitation, I cannot use pixel/vertex shaders.
I was thinking something along the lines of a giving each billboard metal-like lighting effect (although I'm not sure how to do this part) coupled with giving each billboard a random and constantly rotating normal with flat shading so that each billboard would randomly light up. I'm having trouble making it look nice.
Disclaimer: I don't know OpenGL, and I did't actually try anything I write below.
You can have another, 'brightly lit', texture and substitute it when normal is nearly at the 'shine' position.
Take a piece of metal and rotate it. Once the normal is close to 'full shine' position, the metal shines a bit brighter, and a muted reflex travels through it, with a bright flash in the middle, then it is dull again.
If you can, apply a second bright texture of a narrow 'reflex' band and move it through surface of the billboards that are in a near-shine position, shifting them accordingly to normal angle. When the normal is at the shine position (± epsilon), apply the 'full shine' texture.
Also, unless your plates fly in vacuum, there will be a halo due to atmosphere. Add a rectangle say 50% bigger than the plate right behind it, and apply to it a semi-transparent halo texture that becomes fully transparent closer to edges. You only need it at the fill shine moment.