Why is light not working in unity 2D mode? - unity3d

I manage to add light effects in my game, but I find that light only works in 3D mode. When it comes to 2D, light basically does nothing. From watching some tutorials I learned that to enable lighting in 2D, I have to create stuff like normal maps and materials and do some work with photograph editor software. But I do not know why there is such difference between 2D and 3D in terms of lighting. Could anyone give me any hint about this?

I'm sorry to tell you that Unity doesn't offer 2D light out of the box, you could instead develop by your self the system or just use assets like 2DDL Pro which is bundled inside the Unity Plus package.

Related

How to add light effects to buildings in unity (building light)

To be more precise I need a type of lighting that looks good to put on building models that already have a texture, I can't texturize the textures with light turned on apartments such as in GTA5 because I do not know how to create textures. I tried putting point light and spot light on buildings but it looks pretty bad, neon cubes are not good either as it makes the building look back.
I hope you understand what I meant.
Like that but no texturization
To achieve the results in the image, you should use an emission map.
Creating these types of lights using the Light Component is inefficient. You must not Spot Light OR Point Light for this purpose.
SOME YOUTUBE VIDEOS:
How to TURN ON Lights in Unity
How to Use EMISSIVE MATERIALS in Unity! Step-by-Step Tutorial

How to outline (silhouette) 3D model in URP?

Good weekend everyone, I'm looking for some tutorial/script how to make 3D object outline with original image texture (eg. stick with wood texture). I would like to when the raycast hits the object (I'm able to detect with object is raycast hitted), the object will be outlined/glowed.
I tryed many tutorials on youtube, finding shaders script, etc, but I'm using URP Unity 2020 and some shaders is not working - only pink material, or works different. Emitter material is not good too, because there is no original texture. I'm stuck on this for few days. I'm a newbie in the Unity community.
Thank you very much for your help. :)
Outline shaders are difficult to make. I use this free asset I found in the Unity Asset store for all my games if you are looking for an easy fix.
https://assetstore.unity.com/packages/tools/particles-effects/quick-outline-115488

Unity3d; Skybox on mesh like in Source engine.

In older games Ive made levels in, like unreal or half-life the skybox is a parallaxed texture that you assign to world geometry, for instance, the ceiling of your room, to give the illusion of the room being open to the sky.
There are some neat tricks or weird things you can achieve with this 'sky portal' method. For example you could have 'sky' in an underground room. or walk through a hole in the sky.
I'm wondering is it possible to make a mesh in unity3d render as part of the skybox like in these older engines.
You can do this yes. Usually you assign a "SkyBox" to your camera and change the "Clear Flags" for her "SkyBox". However, there are other ways to do.
Learn more here: http://docs.unity3d.com/Documentation/Components/class-Skybox.html
Hope this help !

How to draw images on Terrain in unity

I am working on game in unity in which i need some images to be placed on terrain as in the attached image yellow arrows and "P in blue circle" are rendered on surface in unity.
Any idea or method will be appreciated.
There's no built-in support for decals in Unity. You could just create separate gameObjects with transparent texture and place them above the terrain here, or use one of several packages for decals in Unity Asset Store, like this one. (I have only briefly tried it and can't say anything about it's quality).
I know it's an old topic - but for those who are still not satisfied:
I would recommend using Easy Decal.
It's a very powerful decal projector. It's easy to use and you can stick decals also on uneven surfaces like bumpy terrains.
You could try putting a plane with the texture aligned with the surface normal slightly above the surface. Or you could try an extension that does decals for you. This is what i found:
Decal System for Unity3D
As previously mentioned Easy decal is a good choice. It's easy to use, has extensive fuctionalities and you'll get a lot for your money. But if you need skinned decals there's no way around Decal System Pro by Edelweiss interactive. It's more expensive, but beside the skinned mesh support it also supports texture atlases which saves you draw calls.

3d / 2.5d game library for iphone and pc

I'm trying to make a 2d shooter game with 3d background.
The player and enemies are essentially just quads with textures.
The background will be simple 3d polygons with textures and some fog and light.
Therefore, I don't need a really powerful 3d library.
I tried Unity3D and Torque2D, but I don't like to use their GUI editors. I prefer to work with code.
So, is there a cross platform (mainly windows and iPhone) 3d / 2.5d game library, commercial or open source?
I assume it will be only limited to c, c++, and object-c due to apple's new ToS.
Cocos2D works on iPhone.
I recall that there is an Ogre3D port to iPhone, but I don't remember its name just now.
If you just want some simple images you can just use OpenGL ES. I've heard it's quite nice to program with it on iPhone. Also, take a look at parallax. If you want to do 2.5D games I think it's a must.
Good luck