PNG file looks completely different inside of Unity - unity3d

I purchased the "Set Builder: Back street Manhattan" with came with some png textures such as this one.
When I open the file in the browser or any editing program, it looks completely transparent except for the windows. When I drag the image into Unity, it is completely opaque bricks (which is what I want) If I duplicate the image and drag that image into Unity, it is again completely opaque bricks. If I save a copy of the image with photoshop or another application, the information that contained the bricks is lost and it is now mostly transparent, except it has some blotchy white textures which also aren't seen in the photoshop interpretation. Every texture in this folder is doing this same behavior. Are these files corrupted or compressed? How do I retain the brick information into an image editing program besides taking a screenshot within Unity ? Here is an example : of dragging images onto cubes in Unity. Left is a Photoshop copy. Right is attached image
The developer has not replied to my direct questions.

it can be your texture import format
try changing its format to true color

I found a solution in Photoshop.
Layer>layer mask>from transparency. Then right click on the layer to disable the transparency.

Related

Unity pixelart multiple sprites not cutting corectly

I have drawn a pixelart animation 32x32 pixel size, using Piskel online tool. I saved it as a 32x64 so i have both 2 frames in one png file. Then i included it in Unity and when i cut it in sprite editor i get this edge that appears on the next sprite, that shouldnt. See the picture of the robot above the head there is a line. I cutted exactly 32x32 pixels so that line should not be there.
Is there a way to fix this?
I have had the same problem once. If I remind correctly, you have to change the texture setting. Change the filter mode field to Point (no filter).
I may be wrong, but still I'm sure that your problem can be solved by changing it's texture setting.

Unity changed my image asset. How do I fix this?

I imported a PNG of all of the textures I want to use in a mobile game and when I went into the sprite editor, I noticed that the edges of the sprites were "fading" into the transparent background - and the transparency changes throughout this "fade". Autodesk Sketchbook does something similar when I open the image in it, but GIMP, MS Paint, and Windows Photos don't. I was going to put pictures of what I'm talking about here, but Stack Overflow says I'm not allowed to yet. How can I fix the problem? Is there a setting in Unity that I can change so it doesn't add the "fade" or do I have to change the file format and import it again?
EDIT: I have created an Imgur album with pictures of my problem. Basically, Unity is blending the colors of the sprites and it's blending the alpha too. Also, I made the textures bigger at one point and that improved the problem, but didn't fix it completely. Here are the pictures: https://imgur.com/a/6HGm3fy
EDIT #2: First off, someone commented trying to explain what I was seeing in my imgur pictures and I asked how to fix the problem he was describing without realizing that you can't properly reply to comments, so I'm asking again, how can I fix it? Second, I just tried messing with anti-aliasing in the quality settings of my project and got this error: "Setting anti-aliasing of already created render texture is not supported!" I didn't think I had any render textures - just regular textures - but when I double-clicked the error, an unnamed render texture with an illegal size (55x110 pixels) showed up in my inspector. Changing its settings doesn't seem to do anything, but in the inspector, it still looks like it was changed. What am I seeing?

Unity3d - How to do transparency images?

I have a unity application. When the user hover on the object, I want to change mouse image.So, I want to know how to make part of image transparent in unity3d? If I use directly .png image, the mouse looks like below image :
I don't want to show gray area. How can I do?
An image file can be saved with a crowd of formats. For your arrow can have transparent areas you should save it in a format that handles the so-called "alpha channel". This channel stores information about the degree of transparency (from 0% to 100%) of all and each of the pixels. Simple programs like Windows Paint eliminate this channel. I recommend you use "Gymp", is the one I use (It's free)
If you don't have that problem. Be sure you have selected the correct Shader Type. Not all the shaders are ready to transparency. I recomend you to use the "transparent Cutout" for 3D Objects:
And "Sprite (2d and UI)" for 2D Objects:
In Unity, in the asset explorer, if you click on your .png image, you should be able to select the texture type. It is definitely possible to have textures with transparency.
You should also simple check that you saved your png image with transparency
Transparency shows black when using a non transparent shader so that is not your case. Your image seems to be a jpg so it has no transparency (RGB only).
Unity does not use jpg and converts them to png but as the original has no transparency anyway, it is white pixels in the original and white pixels in the png conversion.
You need to rework the image in Gimp or Photoshop to remove the useless grey parts and make sure you save it as png so the transparency is stored (RGBA).
This is an old question but I guess people could like a more modern solution for most recent Unity versions (like I did).
Unity now supports Shaders Graphs, which means you can create a shader that gives transparency to a selected color in an image that normaly wouldn't have an alpha channel (like jpg or gif).
Sure if you are creating the image just make a .png with alpha channel, but sometimes free assets need a little tweak (as you didn't create them):
Make sure you installed a render pipeline that supports the shader graph (Window -> Package Manager -> Lightweight RP)
Create a render pipeline in your project (Create -> Rendering -> UniversalRenderPipeline -> Forward Render)
Make it active (Edit-> Project Settings -> Graphics -> Scriptable Render Pipeline Settings (select the one you created)
Create a new shader (Create -> Shader -> Unlit Graph), I created this one with good results:
Create a material, so we can actually use this shader in sprites (Create -> Material)
Configure the material to use the new created shader (with material selected, Shader Graphs -> [your shader name]
And voila!
I'm new to this shader graph thing but it looks really, really promising.
If everything went well you'll end up with a material like this:

Difficulty in using smooth blurred textures in Unity

I have planned to use blurred textures as shadow for my planes by just placing them on the surface below it.
In the first image you see below, there are three shadows.
1. Smiley's shadow: Default-Particle given by Unity and works great for this purpose.
2. Square: & 3. Arrow: A shape I created are not good enough.
To clarify the exact problem please find the 2nd image I have attached. The shadow(texture) is of very poor quality.
How to get the fine quality in blurred textures?
Image 1:
Image 2:
Check the import settings of your texture asset. This can be done by clicking the texture asset in the Project view. Then in the inspector view you can find "Format" drop down. You probably have either "Compressed" or "16 bit" chosen. If you change it to "Truecolor", the texture should look fine.

Why does UIImageView "darken"/saturate PNG images, and can I stop it?

I have a PNG file in a UIImageView, and next to that I have an EAGLView which displays the continuation of that same image (long story) as a texture, carved from the same original PNG. The point is, that these images, which should match up flawlessly, actually have somewhat differing color saturation.
Normally I'd blame my handling of the PNG texture load in GL, but when I hold Preview (with the PNG) up to the iPhone simulator, it's GL that's spot on, and the UIImageView that's wrong! It's taken the image and made it ever-so-slightly more saturated. The image view is opaque with 100% alpha.
I verified this on a clean UIImageView with another PNG file when put next to Preview.
Anyone know what's up?
If you are using Photoshop to save the png using the "Save for Web & Devices" tool, ensure the "Convert to sRGB" option is off and "Embed Color Profile" is also off. If you are using another editor, look for similar settings.
Read this, it will help explain better than I can.