#🖼️┃2d-tools
1 messages · Page 15 of 1
https://youtu.be/Kgjth3nRsFc?si=BFxLMqZsMBB00je5 17 mins and i cant look around https://paste.ofcode.org/iDZcZjDZQjGLYbaPCDEBhd
Learn how to create your own classic First Person Shooter in Unity!
Get the assets for this series here: https://www.dropbox.com/s/juihs7yq93x1aon/GPJ_FPS_Assets.zip?dl=0
Don't forget to hit that like button and if you'd like to see more gaming goodness then subscribe for more!
Support the show by pledging at http://www.patreon.com/gamesplu...
Assets are the game files, sprite images and their meta data that includes slicing to split sprite sheets into individual sprites
Sprite renderer is a component that takes those sprite assets and shows them on screen
Since you want to split a sprite renderer, you'd have to duplicate the sprite renderer gameobject for both halves and then modify the outline of the sprite programmatically
Sprite outline is normally a part of the asset metadata, so if the sprite renderer doesn't have a writeable property to crop or modify the sprite you may need to generate a new asset and modify its outline
But I don't really know how this would be done
It's possible you can't modify either at runtime so you'd need to generate a new mesh for splitting purposes that otherwise renders the sprite the exact same way as a sprite renderer does
Or just use a shader that trims the visible area and just change the collider
Hmm... shaders ,should look into it
i have achieved it almost the slcing thing using the sprite only
the only problem is now the collider being shrinked to the very small and gives the caution in the editor like
"The collider did not create any collision shapes
as they all failed verification. This could be
because they were deemed too small or the
vertices were too close. Vertices can also
become close under certain rotations or very
small scaling."
i tried ot pause and adjust the collider and made the block fall over it precisely cut over it
and for the code
Friends. Why is it when I import a PNG as a Sprite Texture (Right) and also as a Default Texture (Left), only the Sprite Texture (Right) retains its correct aspect ratio?
Default Texture is setup on a material that goes on a quad mesh renderer. What on earth is going on?
yeah finally its working @modest cargo
Presumably the texture's size is being rounded to a power of two based on the settings on your texture.
Either that or the quad isn't the same aspect as the texture
Based on import settings? Any idea how I can disable the rounding?
A quad is by default always a square, no matter the texture's aspect ratio
Sprite renderer on the other hand takes its width and height from the sprite
The texture import settings have the "Non-Power of 2" option for automatic resizing under Advanced if the texture is not PoT
I played with these settings but it didn't make any changes
The setting can change the texture's dimensions but like I said a quad is always a square
And so will your texture be on it unless you resize the quad
funny the display of the texture in the import does react to changing those settings. but the rendering on the quad remains the same
maybe it depends on how i exported the texture. if the export bounds (using Affinity Designer 2) of the texture is is not square, perhaps the texture recalibrates to fit into the square quad.
It's not that funny
The quad primitive is a square shaped mesh, it doesn't have any knowledge or concern of texture's size or shape that's assigned to it through the material
Any texture you assign to the material will be stretched to fit its shape
yes!
Sprite renderer is different, it reads the sprite meta data to know what shape the texture should want to be, and then change its own mesh shape accordingly
Image components likewise
i swear its how i export the texture. im going to export as a pure square and test
thanks for bouncing with me Spazi 😛
voila, sprite (left) mesh renderer (right).
Lesson - to render textures on quads properly. the texture needs to be exported as a square.
That's one way but it wastes space on the texture as well as on the quad
Another way is to resize the quad to be the same aspect ratio as the texture
This sounds interesting? How can I resize to fit the aspect ratio?
You multiply the x and y transform scales with the texture's aspect ratio
You can type it in or do it programmatically
will give it a shot
Hello, i would like reverse "Feel Wheel Dust (Texture 2D)" (screen1) and these sprites "Dust_0, Dust_1 etc" (screen2) , how can i do this please ?
I have solve to reverse it but it dont have children (Dust_01, Dust_02 etc), how can i put them in "FeelWheelDust 1-fotor-2025012114372" please?
https://youtu.be/JUs6pPk_y8I?t=2163
is this feature released or not yet ?
start the video at 36:00
Executing your 2D game art direction and vision is exciting but labor-intensive. Watch this video for practical tips on eliminating repetitive tasks and simplifying supporting props thanks to Unity’s new AI-powered 2D workflows. Rus Scammell, a 2D expert and technical product manager, will walk you through these time-saving possibilities.
Spea...
It is not available yet
is there a way to automatically create a rule tile based out of a tile palette like this?
Aren’t there rules for the two most common techniques included?
Or maybe it was an export option in tilesetter… I forget
maybe, I'll need to look in to it. i spent too much time trying to automate it and got like 95% of the way there but still some edge cases so I'm probably going to just use fewer neighbors lol
Is it an orthographic camera?
i fixed everything but no it wasnt
Tilemaps work a bit weird for me
So painting is working as expected
However sprites are off the grid on the palette
But if I click on down left of the sprite
It works as intended
Hey question I want to try building a basic platformer in 2D are there any packages that would be of great help or are tilemaps enough usually
hi im trying to have a wall rule tile in wall tilemap layer surround the floor layer, been looking at it for an hour so far no idea how to approach it might be impossible 😔 , like how would the far left and right side wall differ when both have the same rule?
Being empty on one side will tell it
you don't have to have sprite on the inner wall tile, just use it as a cue
these two they both empty on both side, unless this is not what you meant
sorry my english not the best
any | wall | any
X | | wall(empty sprite)
any| wall | any
ah i get it thanks ❤️
truly outside the box type sh
Is there a way to create a rule tile from a tile palette directly?
I've downloaded an asset with literally hunders of sprites in it, so hard to find the correct ones for my rule tile
actually this lead me to nowhere😔 , doing a procedurally generated with this one
afaik no
can only drag sprites onto the rule tile not tile base, you can drag the entire parent rule tile or select a few to drag them in
Hey, I'm trying to use rule tiles but somehow my rules are not being applied, am I missing something?
ahwait it's the first rule overriding everything isn't it?
Well it was 👀 Sorry
anyone know why im not seeing any grid or selection gizmos in the tile palette tab? i even have the buttons for that turned on but no dice. its not gamebreaking but its quite difficult to work blindly
hi,I can't find the slice option in the sprite editor,how can I find it?
Any way to create a tile which uses more then 1 cell ? for example a building or a tree
Each tile takes up exactly one cell
You can certainly place multiple tiles at once, or make a sprite that's too big to fit in one tile
Still looking for some best partice, maybe i should create the bigger sprites as gameobjects
you can draw multiple tiles at once as a selection box
how do i remove the black and make the bg transparent from the walls?
Use an alpha channel?
im trying to procedurally generate the top walls, i tried doing this combine into 1 to reduce the placement coding
however it result to this? anyway to make it align like in the palette? fyi before i fix the palette by adding offset to the tilebase its the same as the tilemap shown on the left
how do i unlock the "Lock transform" option
bruh the lock transform do the opposite :(
ah nvm got it
hello ,i cant find the used by composite option in my tilemap collider 2d component,ive added the composite collider 2d
Set the pivot for the sprite correctly
Hey y'all, I have a tilesheet where I have created multiple sprites so that I can have different physics shapes on each. The problem is that since they are layered one on top the other I have to drag the top ones out the way to reach the lower ones. How can I click through to the lower ones like you do for overlapping prefabs in the engine?
Turn off the layer above?
Hello yall. I'm currently creating a game in unity 2D but am somewhat of a beginner to the 2D render pipeline. I wanted to use normal maps for a few sprites of mine but they aren't acting the way I want them to. Here is an example:
The shading on one side does not seem to match the other. Is there a way to fix this?
It's like the normal map works on the right but does not work on the left
Hi im working on rule tile to auto generate wall, i have a 2-tile high tile (24x48, pivot at center bottom tile 12x12) compare to other 24x24, i have this wall comes from Custom.png sprite that got its top-half placed under the other wall tile in that same Custom.png.
however when i clone Custome.png to another one, in this case i named "another sprite.png", the 2-tile high wall now manages to work wonder, appear ontop of the other tile
is this something working as intended i can use normally or its a bug i shouldnt use this? i cant find any order configuration for this
my tilemap seems to be bugged where moving camera to the right makes half my tiles dissappear and the bugged tiles also show eraser with an offset
does anyone know a fix for this?
figured out what caused the issue (using tilemap selection's inspector move tool instead of the tile pallete move tool)
had to remake the entire tileset rhough
Is there a way to have an underside on this plane model, so whenever it spins as a sprite, you see a diffrent side? OR should i use a 3D plane for this?
Hi, what will be the best sizes of graphics for 2d pixelart game?
Hey I am trying to change the background of my Button (TextMeshPro) with a PNG Sprite I designed but it wont let me do it. Any Ideas of what I am doing wrong ?
id say it depends on the game youre going for, minecrafts size is 64x64 for example.
you can get a great game with 128x128
https://www.piskelapp.com/ id recommend this website for sprites, but i do now know the correct metrics
Piskel, free online sprite editor. A simple web-based tool for Spriting and Pixel art. Create pixel art, game sprites and animated GIFs. Free and open-source.
Okey I think that will be it but do you have some tutorials to learn pixelart for someone who programming only and want to make solo game?
generally i would say that whenever you do pixelart its a good idea to remember that everything you create of of something else is always the same thing, just with less detail. Hearing this probably wont be of much help but look at this example of a "ninja/samurai". We humans can understand their anatomy and connect shapes with things weve seen before even when its very low resolution, so always remember that you cant go very wrong. When making way bigger or more detailed pixelart id learn normal art and maybe apply a filter afterwards.
I personally never watched alot of tutorials on that matter, since i always went for a normal artstyle but there are great ones on yt if you just search them up, however they go a bit deeper than the basics, and to learn the basics imo the best thing you can do is to just create over and over again since youre working with pixels. So learning by doing and eventually youll learn. Get a refrence and try to remodell it with the piskel editor i sent ya
I can't get my tilemap to update after I change the custom physics shape of a tile.
Have been looking for an hour, tried disabled/enabling the tilemap collider, closing/opening unity, ...
It worked at one point when closing/opening unity after I made a new tile palette, but now I just can't get it to work anymore even by closing & opening unity.
Ok so I made a new tile palette and now it works again, but only when I restart unity and then deactivate & reactive the tilemap collider
Any way to do this without restarting unity?
Also any way to get these to align perfectly? Neighboring tiles, so players won't get stuck behind a pixel that doesn't align
Removing and re-adding a collider component should re-evaluate the physics shape data, at least
Ah yeah that works 🙂
Now to find out how to align them properly:
Composite collider component is useful with tilemap colliders to make them seamless, the vertex distance setting I believe determines how close the adjacent colliders need to be
Those look fairly inaccurate though, it may help to start with a template version of the fence that only has the exact collision shape on it, which you can then auto-generate physics shape from or more easily create it manually
Then edit the sprite sheet itself back into the visual fence version
It's a downloaded tileset, I have absolutely no clue how to make graphics
But there's no coordinates or any way that I can find to align the custom physics shape of neighboring tiles
There aren't many tools to work with, but it has copy and paste
If you make one outline that has completely straight vertical shape and a horizontal shape in a cross configuration, and copy paste that into each individual sprite, then you know it tiles vertically and horizontally and can simply remove the verts of the fence branches that don't exist for those specific sprites
Or modify any part of it except the verts that connect to the edges
Ok if I zoom in far enough I can actually align them to the pixels in the images, that works too I guess
If my technique was unclearly explained I can make a simple demonstration for it
But in any case it's often worth it to have round or rounded colliders for your characters
Because Unity's physics do not have integer accuracy like they were in old games, corner snagging is pretty common
I can't find a solution in my tilemap for these corners.
I need them to go up to connect, but there's no tile for when the fence ends?
I'm not capable of creating my tilemap sprite again, it's a downloaded asset. Is there another solution for this?
Those two should be different tiles, even if they look the exact same
No, they would have the same or identical "image"
But a different sprite slice and different physics shape
But I can't add another image to my tilemap sprite?
It's technically possible to have two overlapping sprite slices with different physics shapes
But practically it's a pain because the sprite editor doesn't let you select overlapping slices to edit them so you'd have to "juggle" them from place to place
Why not?
I bought the asset, I have 0 clue how to make or edit it
Or can I copy/paste one of the tile sprites generated from it and add that to my tile palette manually?
But I'm still editing the physics shapes in the tilemap sprite asset I bought?
And it wouldn't be there
Or can I edit physics shapes directly from the tile palette?
Editing images isn't hard, but if you have zero experience doing it I suppose that has a bit of a learning curve too
The generated sprites can't be copied and edited, they are only references to a part of the sprite sheet created by the slicing step
Can't edit them from the tile palette
If the sprite sheet has extra empty space, it'd be simple to copy paste the two fence sprites there so you can slice those as different sprites and make their physics shape as either lower corner or horizontal end cap fences
If it has no extra empty space, it'd have to be expanded I believe either up or to the right to not mess up existing slicing data
But if you don't want to touch image editors, I guess you could try finagling two slices on top of each other with different physics shapes
Basically you need to move other slices to clear an empty space, then move one of the duplicate fence slices there so it's possible to edit one in the right spot, do it for both caps, move everything back into place
Or final option I guess duplicate the whole sprite sheet just for making those two extra slices
I can use paint and gimp a little bit, the tilemap does have some open spaces
well it has like purple squares, I assume those are open spaces
Or is there a specific tool that makes this easier?
I don't know how to do it with gimp, but it's probably not that hard to figure out
I don't know about purple, emptiness should normally show up as a grey/white checker pattern
Instead of modifying the sheet could also copy paste the two tiles into their own mini sprite sheet
Whichever seems easier
thx for the help 🙂 I'll figure something out
Hey folks - learning Unity. Im following a unity tutorial on an older version so running into this issue - where I dont have the same settings in Unity 6
In the tutorial turning on AA fixes the tiles so they dont have the wonky lines
But I dont have that setting popup for me
disregard - I found kindve a hacky solution for the moment to resolve. Just scaled the tiles 1.1 on the x and y
Hey all!
I have a need to create normal maps for my sprites so that they react to lighting in my game. Unfortunately I could not find a good way to achieve results here. So, I started building a tool to allow selection of a 3D direction, and painting normals.
I am only a couple days into development and have many ideas to create an intuitive workflow here. I could use some programming help, and if any artists are interested please follow development. It will be a valuable tool, pretty barebones right now.
Neat
I tagged all of my tilemaps, added tilemap colliders, tagged my player, added a box collider to my player, and wrote the following code, checked for spelling and somehow the player goes trough like a ghost. And yes, I've checked online and found nothing helpful.
Restarting unity didn't work either.
It works perfectly fine for the other levels
I just use Gimp and fill in the grid with the pencil tool. Advice on color schemes and theory, I don't have any advice. I just "eyeball" it.
I'm planning on using my 3D model for a 2D project. I already know how to make sprites with a 3D model, but what I'm curious about is.. I want to make the sprite modular, so have different hair, clothes, weapons, etc. is it recommended to simply do all that in 3D? What about face anims?
Hey I have started to create my own 2d sprite and texture and actually working with procreate in separate file for each object but as i do like ground tile I strugle to make the tile "connect" one to another did someone now a software or a methode to make this easier ?
Any1 know how to add a lightning strike in 2d?
just some basic lines that can collide and can be between 2 different shades of blue or something of the sort
I require it to be used as an ability in the game I am creating although I think I'll manage making it shoot out from the players poision
I’m having an issue with the Pixel Perfect Camera, movement and UI. I created a Reddit post with more detail and wanted to share in case anyone might have any ideas. Because I’m running out of them 🤪. https://www.reddit.com/r/Unity2D/comments/1ih8rnt/urp_pixel_perfect_camera_cinemachine_shaking/
Thanks everyone!
Anyone here knows how to shift drag to resize in aseprite to keep the same ratio? I asked on their discord and got no response and google doesnt say anything about it
Are you holding shift before you click? Apparently you need to click first and then hold SHIFT. I don’t have it in front of me at the moment, so I’m winging it, sorry!
Yea you're right, I discovered that yesterday, it's weird
Awesome! Nice work. I hate those kinds of problems.
Yea, they're not complex at all just annoying, anyway thanks
i need help.
my unity is not unitying. i have here as well the tilesets i made myself. i did something bad, but im not sure how to fix it.
@teal mango Your slicing settings instruct the sprite editor to slice a 19x19 grid
But your sprites aren't in a 19x19 grid
They aren't in much of a grid at all, or to my eyes shaped so that they could form a coherent tilemap
I know they are not in a 19x119 but i tried from 16x16 to 32x32
you mean the way they are distributed?
The way they are distributed, as well as shaped
They aren't in a grid, so there's no grid slicing that could work
I cannot see how those tiles could be used as a tilemap
It looks more like two incomplete tilemaps of different sizes mixed in together
Or three?
they should all be the same diameter then?
Yes
If you are starting out, it's better to use an existing functional tilemap as a base or a template to draw over
oohhh a template might work
if i want to make a horror game similar to fnaf game what should i start with
Tutorials and courses, mainly
Unity is a pretty big game engine so you may want to prepare to learn a lot of basics and some programming before you get to the meat of making a game
If you want something like the original fnaf, you might not need to deal with all the stuff unity comes with
Fnaf itself was made with Clickteam Fusion, and there's similar simpler engines like GameMaker and Construct
But Unity's potential is virtually limitless so if you're working towards bigger projects later it'll be worth learning
Unity has official tutorials for almost anything in !learn site
But some third party courses may get you quicker into making whole projects
:teacher: Unity Learn ↗
Over 750 hours of free live and on-demand learning content for all levels of experience!
My advice stands
Unity is a big engine to learn, so if you want to make something simple within a short schedule, one of those simpler engines would be much more efficient choices
To get results as quickly as possibly you might want to search for tutorials how to make a fnaf-like game specifically
There are such tutorials for Clickteam Fusion, Scratch and Godot, at least
Unity would not be my first option given the scope of your project
okay
#💻┃code-beginner
don't crosspost please
Ok. Soory. I am nood this server
Hi can someone help me on 2D sprite rigging? (Unity 6 (6000.0.33f1) 3D URP Scene)
I'm trying to animate an Illustration by Sprite Editor's Skinning Editor
but it seems like my Rig doesn't work when I put it in my Scene. the bones don't move the illust at all
I hit apply after I finished Rigging and tried saving, restarting my project and all, but my rig in the scene just doesn't bend my illustration.
anyone know whatmight I be doing wrong here?
is there a free tool to easy put multiple sprites together into a sprite sheet?
Unity's sprite atlas feature does so automatically with no action on your part besides setting it up, if you want the sprites together for performance reasons
If you want to compose them together for workflow reasons, I'd use vfx toolbox's image sequencer
https://github.com/Unity-Technologies/VFXToolbox
do I need sprites together for performance? won't have many at first, but I might add a LOT more later (like 100s maybe 1000s)
I need this to make modular character sprites (to change character outfit)
"Need" is relative
Seems like it was a bug for this version (Unity 6 (6000.0.33f1) 3D URP Scene)
Fixed in (Unity 6 (6000.0.37f1))
Beat me to it!
I still haven't evrn upgraded to 6 for my 2d stuff, they haven't introduced anything that was worth the downgrade they made to the sprite editor a few versions before that.
(For me)
I'm using Unity's (6000.0.34f1) Aseprite feature, and all I have here is a single black pixel. I'm wondering why it creates all of that whitespace around it, and if there was a setting or something I had to do that would crop the file?
or is this a non problem and I shouldn't even worry about it
Is this a good/acceptable way to set up a 2d top-down character where I can swap sprites for all the body parts (head, body, arms, hair, clothes, ...)
It's from an asset I downloaded, it basically creates 3 gameobjects, Down, Side and Up, for each direction you can move in. Then it has a bunch of child objects where you set all the sprites:
That's a pretty standard method.
is using modular sprites just an outdated approach to this?
or how does that fit in?
If it works, it works.
!collab
:loudspeaker: Collaborating and Job Posting
We do not accept job or collab posts on Discord.
Please, use Discussions to promote yourself as job-seeking, advertise commercial job offers, or look for non-commercial projects to participate in:
• Collaboration & Jobs
We take the content of the Aseprite file and create a new texture which is always power of two. There is most likely a minimum size as well, which is why you are seeing e.g. a 32x32 texture around your one pixel Sprite.
Is anyine here working with DOTS and 2d?
Hello! I'm importing spritesheets and I'm running into a problem where some of the sprites get permanent ids and others don't, sometimes in the same sprite sheet. I can see in the .meta file that the temprorary ones are shorter, not full GUIDs. This s a problem because everytime I reimport those sprites the internalID changes and then I have to remake all the animations that use those sprites because the references are lost.
Has anyone seen this before? How can I get unity to assign a permanent internalId? Why do some sprites get temporary ones?
Here's an example from the .meta file.
name: PlayerIdleDown_3
rect:
serializedVersion: 2
x: 48
y: 16
width: 16
height: 16
alignment: 9
pivot: {x: 0.5, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: b2d6d7d6e6c9d8f44af35629836f425a
internalID: -464549779
spriteID: b77ff0850b6806a4a9c843f1f29b1a9f
internalID: 1224923050
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: PlayerIdleUp_0
rect:
serializedVersion: 2
x: 0
y: 0
width: 16
height: 16
alignment: 9
pivot: {x: 0.5, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 1ad24c788fa9cd0428e2537a1a9c196f
spriteID: 3b94927a98223154e9034024483046e2
internalID: 3716121684516627735
vertices: []
indices:
Is anyone really familiar with effectors? one way platforms are hit and miss for me, if you barely make it through the one way platform, you can sometimes fall back through. Does anyone know what might cause this, how I can make it less consistent, or how I can debug it?
@idle bough after months of testing different methods of one-ways, i found the Edge Collider 2D with the Platform Effector 2D gave the best result, hope this helps!
Thanks ill try that out and see if it improves the behavior for me
If you can reproduce it, do file a bug report so that the 2D team can take a closer look.
Hey everyone, I need some help with a Tilemap sorting issue in Unity URP.
When I place a second tree in front of another, it deletes part of the tree behind it. The trees have a transparent background, and I’ve already set the Transparency Sort Mode to "Custom" with the Y-axis in the URP settings.
If I manually adjust the Z position in the Tilemap, the issue is fixed, but constantly doing this is a hassle. I’d like Unity to automatically sort trees based on their Y position, so those lower on the screen appear in front of those higher up.
What am I doing wrong, and how can I make Unity handle this sorting correctly? Any help is much appreciated!
Hey guys, is there a way to control in which direction to bend a specific bone (knee) while using IK Manager and Limb solver? Example my knee is bending sideways causing a mesh to deform.
In the LimbSolver2D you have an option called "Flip" which allows you to switch between the two solving directions
followup question, do you use any edge thickness? Does it matter? Is it maybe a ratio of thickness to size of player collider?
2D components only support 2D depth sorting, not any form of 3D
Isometric tilemaps which are still 2D have their own specific isometric sorting
this is my first time making a sprite in aseprite for unity. How can I make different animations of the wolf and add it all to one sprite sheet? Do I have to do this manually or is there an application like smack studio that makes it easier?
There's is no need to crosspost
you can make it all in the same sprite, aseprite lets you tag ranges of frames as certain animations, then when you import it in unity, each tag will be imported as an animationclip
you don't need to go through a spritesheet at all, unity can import aseprite files directly
Is there a way to disable placed ruletiles so I can manually correct them without changing all the adjacent ones? Or is that a case of if I'm gonna use ruletiles they have to be 100% accurate for every condition or I may as well do it by hand?
In this particular case, I'd like the block on top of the slope on the left to also be a slope, but without changing the one at the edge of the small pit on the right.
You can't disable rules temporarily, but your world doesn't have to be built only from rule tiles
You can make rules that evaluate tiles further away than just one in each direction, if that helps
The rule tile system is an example implementation of custom scriptable tiles
You can customize the system itself, or make your own
can you make 3d look 2d?
i mean, they're already projected onto a 2d screen
what do you mean by "look 2d"?
2.5d has a lot of definitions afaik, but sounds like you're looking for orthographic projection on a camera?
Why is the Wolf not going directly into the player but instead in this wierd spot? hit has no wierd offput and it works for the triangle?
for now i want it to go into the player like the Trianlge
Hey, do you know of any free tool that is good to create simple 2D animations as sprite sheets? Cause the tools I am using rn are not great and the ones shown in a quick Google search are mostly for pixel art, which is not really my thing
In Unity 6 how do I easily remove a physics shape from a tile? If I remove the physics shape from the tile in the Sprite Editor it doesn't seem to matter and it gives the tile a collider anyways. The only way I can get it to not give a tile a physics shape is by going to the tile asset and setting the collider type to none. But it's a bit cumbersome to do this by going through all the assets.
Sigma?
!ask
:thinking: Asking Questions
:mag: Search the internet for your question!
:book: Use the API Scripting Reference and User Manual and this troubleshooting site for commonly posted issues.
:wrench: Attempt to debug your issue.
:thought_balloon: Find an appropriate channel by reading the name and description in #🔎┃find-a-channel
:grey_question: And don't ask to ask, ask a full question illustrating with screenshots if needed.
-# For more posting guidelines, go to #854851968446365696
Can you multiedit that property?
If not, you could just write an editor script to do it.
Probably. Just though it was weird i can't edit it via the sprite editor(and that not having a physics shape not does modify that property automatically). Just wondering if i was missing something
The vast majority of sprites in most projects can use the default value, I'd expect.
What am I doing wrong here with the tile palette window? I assume the UI has changed in Unity 6? Compared with the screenshots in https://learn.unity.com/tutorial/introduction-to-tilemaps#5f35935dedbc2a0894536d00 I can't figure out how to actually draw on my tilemap with this.
Unity’s Tilemap system makes it easy to create and iterate level design cycles within Unity. It allows artists and designers to rapidly prototype when building 2D game worlds. In this tutorial, you'll create a Tilemap and explore the Tilemap system including Tilemap settings, and you'll use the Tile Palette to edit your Tilemap.
Hello how do i center my tiles pls
I have a question about sorting layers, let me know if this is the wrong place to put it.
I need a specific layer C to appear below layer B, layer B to appear below layer A, but layer A to appear below layer C. I can't do this with the one-dimensional scale that is Unity's sorting layer system.
How can I accomplish this?
To clarify, I can't just split the sprites because the regions that overlap between objects on the layers will change as the objects move around. I'm more looking for a way to define layer relationships on a per-layer basis, a bit like how the layer collision matrix works
The short answer would be stencil shaders.
what happens if all 3 sprites overlap?
I don’t really have an answer, but for my use case, I know they never will
a theoretical system would break in that 3-overlap case, so i don't think there exists a widespread system for that; it'd have to be custom, or premade by someone with a similar goal
idk about pinballkitty's answer though, i don't really know about shaders. maybe there's an easier way out there
If I knew how to implement it through shader code, I’d probably end up making each layer check if another later touching it should be drawn over it and draw nothing if so, so regions with all the layers would end up being empty
Is there a long answer? I’m relatively new to shaders and I’m not sure exactly how the stencil shader should work to accomplish this
The longer answer would be to learn how stencils work and how to make stencil shaders
But I'd first recommend looking into Sprite Mask components to see if those can do what you want without any custom shaders
Sprites already interact with stencils via the mask components
Alright, thanks!!
Hi everyone, i've a question for u (and, i think, u are more knowledgeable about it than I am) :
I want purchase a graphic tablet, but i know nothing about it... If a designer here use a graphic tablet, have u a counsel at give me for what choice, what software, why, the utility...
So, can u help me for know what i will need to buy and give the performance of your counsel ?
PS : Sorry if u don't understand me well, i'm young french, and, my English is not perfect...
I have sliced the png images to use them for terrain but they look like this when added:
any idea why and how could i fix this?
so it's due to scaling?
maybe, can u show your component and scale of your sliced and your tilemap ?
this
and this :
(with your tile map)
were tilemap colliders changed in unity 6? the old way i went about it with composite colliders and tilemap colliders no longer works
Hey quick question. Does anyone know off the top of their head why the Sprite editor won't update visually on a simply polygon sprite? It is visually updating everywhere else in the project.
I sliced my tiles and got them into my tilemap but for some reason they went all pink. when i resterted unity they looked normal for a few moments then went back to pink
wrong render pipeline? Or PPU issue?
I've just read the entire Pixel Perfect Camera page, been trying to figure it out for a few days now.
I'm making a 2d top-down RPG, without the PPC my tiles have lines in between them, with it it looks good.
Is there any way to control the Size of the Orthographic camera?
My tileset is 128x128, but if set Assets Pixels Per Unit to 128, my camera is waaaay too zoomed in.
I've tried setting it to 32 & 64, but a value in between those would be better.
I've tried playing around with the Reference Resolution as well, but I don't understand how that works, sometimes it does something, sometimes it doesn't.
I don't know what resolution the assets were made for.
Is it ok to set my Camera's APPU to 32 or 64 if my Tilemap sprite is set to 128?
Would it be ok to set it to like 45 instead? Or will that cause issues?
Or is there another way I don't know/understand to set my camera size properly?
As long as I use the PPC, my world looks good, no matter what APPU I set for the PPC.
I do have some character stutter, but I have that with all of the settings.
So im trying to add motion to my 2d sprite animations. I have a animation where a enemy steps forward while attacking. By animating the position and using root motion it works. But when I tried to separate the animation in to 3 different animations for windup, impact and recovery the motion stops working. And it seems that the root motion only animates differences in the position in the current animation. For a animations like this where the position is supposed to change at the first frame it doesn't work. How do I fix this or is there a better way to animate motion?
why is the sprite not showing up?
it as an image and i've tried chaning the layer and didnt work too
is that on a canvas?
the part that i think its covering yeah
is it parented to the canvas/intended to be on the canvas though
if it's supposed to be part of the world, it's way too big lol
it's scaled by 153x, and it's about 3 times larger than the viewport
the buttons are parented to an empty
and the part that i think its covering but idk how to tix its on a canvas
and is that empty a child of the canvas?
this is my first game, so correct me if there is a better way of doing it,
what is on the canvas is the BG
the rest are buttons that the player needs to press and are for organizing proposes on an empty
ok, how should the player press them?
by clicking/tapping?
you're kinda dodging my question here...
yeah sorry
its going to have a trigger so when the player presses a key it triggers and sees if the player hit the note or not ( this is for a small rythm game )
by "trigger", you don't mean a collider set as a trigger, right
is it supposed to be UI or not, that's all you need to answer
the buttons arent
the rest its background so idk if it should count as UI or not
so yeah, this
but iirc canvas stuff is overlayed onto the world, so you can't have a background on a canvas but foreground objects in the world
(at least in overlay mode)
sorry if this question is dumb, how or where should i put the background than?
usually i just see it as a gameobject tbh
anyways for future reference; spriterenderers don't work on canvases, you need image components for that
alright yeah thank you!
managed to fix it
anybody know anything about aesprite?
hello, i need help with a problem, i wanna bring forward an object and i cant, i search on google or youtube, but no results
i did it, i used chatgpt, ty
Is it somehow possible to take a part of the tilemap you've build and save it for re-use?
Specifically, my tile palette has a tree in it, but I have to assemble it. Once it's on my tilemap, can I somehow save that tree so it's easy to place full trees? The bottom of the tree should be on a different tilemap (layer) than the top.
Or do I manually have to add both parts to their own layer each time I want to add a tree? Which will be 1000s of times.
so i got this tilemap and i sliced to a 16*16 as you can see but when i import the slices inside the palette it somehow gives me these weird diamond shapes i dont know why :C
(video) try checking this video nvm, turns out this video doesn't go over that. guess i mis-remembered
although im pretty sure you can just select multiple tiles at once
yeah but not on different layers
I was hoping I could make something similar to a prefab for my tile palette, but so far haven't found anything that can handle different tilemaps (layers)
one sec, haven't worked with 2d in a while. let me make a project to check
not sure how you managed that. seems like the tilemap texture was somehow rotated. maybe you selected an isometric grid
where would i change the grid?
i have other pallets where it works fine
its just this one
as you can see these work fine
but these are 3232 not 1616 can that be a reason
its not isometric
is the tree like this (or something similar) in your tile pallete?
im not 100% sure whats cuasing it. have you tried the basic stuff like deleting and remaking the tile-pallete?
if it is, you can move the individual parts around by selecting the pencil in the top right, selecting the tile and then moving them with the move tool
yea i did try to redo and it still doesnt work
i can provide the tilemape maybe that helps but it looks fine no?
sure, i'll see if i have the same issue
are you trying to put the 16x16 tiles on the 32x32 grid?
ehm i dont know maybe ? how can i see that:/
also your tilemap sprite is 176x384, 384 is not dividable by 16, not sure if that matters though
i mean it looked fine when i sliced it so i didnt worry about that but maybe i need to change it
my grid is 1,1,0 so it must be 16*16 no?
if you have one tilemap sprite set to 32 Pixels Per Unit and the other 16 Pixels Per Unit that might cause it, not sure
1 on the grid = the Pixels Per Unit you set
so if your sprite has 32 PPU that would be 1 grid space, since your other has 16, it would take up 1/4th of a grid
(this one doesn't but) some tilemaps have padding on them. which can cause the main tilemap texture to not be divisible by the main sprite size
also yeah, ensuring PPU is consistent is important. not sure if its causing the issue here though. seems to be a rotational issue. which im completely stumped by
Another question, I'm trying to create a 2nd scene that should load to the right of my 1st scene.
I understand how to load the scenes, plenty of videos on that, but do I just move the transform of the gird in the 2nd scene to the right of the 1st scene? Can't find any information or tutorial on this.
i did the ppu stuff but no change
hm. looks goods on my end
pretty sure it's because you're mixing 32 & 16 PPU
wait let me try in a different project
do you mean you want to additively load the scene?
yeah, I got both scenes in my hierarchy, but the tilemaps just completely overlap eachother
and changing the transform of one feels wrong
oh yeah, you'd probably just move the grid then. assuming everything already lines up correctly, should work fine
you can also move the tilemaps if you want, depends on the scenario
feels weird
let's say I make 10 scenes that go to the right
the 10th scene's grid will start at 900/0, wouldn't that cause issues?
that wont cause issues until you start getting into the tens of thousands, maybe higher
although, a pretty common fix is to just translate everything to the center again
its usually completely unnoticeable
guess I'll just try it this way 🙂
so when you say i had a 32*32 tile map sprite i just deletet the other pallete but that doesnt help
did i miss somehting
did you change Orientation in the tilemap?
The default is XY
Could also be the Cell Swizzle in the grid:
Try creating a new project and see if it works there
yeah looks fine, weird that you have the grid and tilemap on the same object though
how many scenes can I load at the same time in my editor?
would 9 be ok? they're fairly small
yea it works in my new projects that weird
now try adding the 32x32 and see if it still works
usually you'd just load them whenever you need them. assuming its a side scroller, you should only need to have 2, maybe 3, scenes loaded at a time.
nah it's top-down
I need the center and then the 8 maps around it
can do them one by one, but if 9 isn't an issue that would be easier
it still works
well, it shouldn't cause too much lag. unless you need to swap them around though, its usually better to just do it all in a single scene
my world will get fairly big, so can't do it in one scene
could do chunks aswell. although, honestly, it mostly depends on personal preference. unless you actually notice any lag, dont worry about optimisation
no I'm just talking about my editor, if there's a limit to how many scenes I can have open in the hierarchy
oh, yeah probably not. if there is a cap though, you can always just unload a few scenes
seems like a
problem to me ¯_(ツ)_/¯
wait is your tile pallete centered correctly?
those look like they're 8 pixels off
wdym by that
might be do to the size not divideable by 16
but i works fine at my other project
idk
you are right my palette tiles are off
do you know why that happens?
cause in my other project this doesnt occur
omg i fixed it
it was my pivot being on custom
thanks guys for all the help
<3
Hello everyone! I'm new to Unity, and I'm having trouble whether to use After Effects or Unity's 2D Animation Package...
Is animating a 4K - 8K canvas PSB file (400MB - 1GB+) with Unity 2D Animation Package performance-heavy? Is the resulting animation real-time, or pre-compiled?
The resulting animation is calculated in real time. The 2D Animation package allows you to animate a 2D image almost like 3D, where you generate a mesh for your image and create a skeleton for it. Once done, you map the mesh's vertices to the bones of the skeleton. When you then move a bone at runtime, the vertices of the image will deform/bend.
Apart from the overhead of the actual image, what you should be aware of in terms of performance is number of vertices the image/sprite has, number of bones, and number of animated images/sprites on screen.
I would recommend that you make a quick test where you animate something similar on a device you wish to support to see if it is within your frame budget or not, before going all in.
Make sure you have mathematics and burst packages installed, or the performance isnt great, and make sure that your platform settings allow an image large enough. And when stress testing, hide gizmos because the 2d rigging gizmos are a lot of the lag I have experienced with heavier rigs.
Ah... I see. Thank you both so much for the insights!!
Though, I am honestly worried if my work will support those in a lower-end system...
My PC is the only device that I can actually test the game on, which is ultra-high-end 🥲
You might want to consider how much you need textures that large on devices with tiny screens.
And how much of the screen they will occupy in game.
But the same consideration applies to prerendered frames from after effects, or for any 3d objects with textures for that matter.
The game itself will be locked in 16:9 ratio
But my canvas is often more like a square, because I also would need to account for animating things outside the screen and such

Oh also, is something like "clip layer to below" possible in Unity?
Sprite masking, and in a more general sense stencil masking.
Sprite masking and stencil masking... I see.
Thank you!! I'll keep that in mind 
Oh and... may I ask just one last question?

Ask as many as you want
You're so kind!!
okok uh so
The only reason why I'm considering unity's 2D animator is because I want to randomize the eyes blinking period, and also randomize "single blinks" and "double blinks" as well.
But I'm not sure which will be better: Just static animation (final render would be 4K video) with pre-set(rendered) blinkings and all other animations in After Effects, or actually animate it in Unity
I would show what the drawing I'm trying to animate looks like for reference... but it's NSFW so I'm not sure if I can send it here 
Because now hearing that it's real-time in Unity animations, I'm really having doubts on its performance
especially on 4K resolution
You can pm it to me, unless it is really extreme.
well... not extreme I guess... haha..
I mean. Pretty sure I've seen worse in azur lane ads. Through still better not to post it here uncensored =]
It definitely looks fun to animate. I've wanted to try something like that myself some time.

I saw some videos yesterday that claim you can fix lines in tilemaps by adding them to a sprite atlas, not requiring a pixel perfect camera.
Is this outdated? Or should it still work?
I tried it, but doesn't do anything for me. There's tons of people in the comments that say it works though.
Why are the feet, hands and head "moving" on my character? They have no animations or anything? What's causing this and how do I fix it?
The background is a tilemap, the character itself is just some 2D capsules & sprites thrown together
Using a pixel perfect camera
i think it's the pixel perfect camera causing it
Hello, I have a problem in my game. When I start the game and begin walking, the pixels on the character's neck sometimes become thick. I also notice that the pixels on the tiles sometimes appear thinner or thicker. The PPU is set to 32x32 everywhere since I draw at this resolution. The filter mode is set to Point. Please help me with this issue.
!collab
:loudspeaker: Collaborating and Job Posting
We do not accept job or collab posts on Discord.
Please, use Discussions to promote yourself as job-seeking, advertise commercial job offers, or look for non-commercial projects to participate in:
• Collaboration & Jobs
oh it's fucking spam
<@&502884371011731486> bot job post spammed to all artist tool channels
!ban 1338185219827830916 scam spam
jacobj.roberson_20393 was banned.
orthographic?
are you using a pixelperfect camera?
it's already orthographic
so it's not a pixelperfect camera, try using that
okay, i try
(add it to the existing camera, it still needs a camera component to work)
I added it, but now the character jitters when moving, just like in the video.
🥲
so what should I do then?
got the exact same issue here, I think adding a lerp to the camera movement might fix this, haven't tried yet
guys a link to find 2d 4movement (up down left right) sprite for main character for try some stuff on unity?
I will try and tell you, but if you try first, then tell me.
So im trying to add motion to my 2d sprite animations. I have a animation where a enemy steps forward while attacking. By animating the position and using root motion it works.
But when I tried to separate the animation in to 3 different animations for windup, impact and recovery the motion stops working. And it seems that the root motion only animates differences in the position in the current animation. For a animations like this where the position is supposed to change at the first frame it doesn’t work.
It works if I add a frame where the pos is 0 but then I have a frame before the movement, and even if I dont add a sprite keyframe for that frame it still changes the sprite.
How do I fix this or is there a better way to animate motion?
Sounds like something is wrong in the Animator setup, maybe a missing or wrong transition between states?
not quite sure what you mean by a wrong transition between states? Im not very experienced with the animator
here i have the attack separated to the startup, attack and recovery with them having a exit time of 1
google some animation debugging guides for unity
you should be able to debug the animation state to see what is happening exactly
still not sure how this is a transition problem. If just take the impact animation where the enemy is supposed step forward -1.6 units (facing left) and just set it as the default and loop it, the enemy still doesnt move
I don't know either and it doesn't look like anyone else does
It's your project, I don't know how you set it up and what is happening behind the scenes
That's why I'm advising you to look up a unity animation debug guide
googling unity animation debug doesnt seem to yield any helpful results for this problem. Also its pretty much just the default animation setup without anything else, so there shouldnt be anything else going on in my project. Ill try a fresh project to see if the problem persists
@gentle onyx Hi! I think the problem is something else. By default, the camera should work properly, and there shouldn't be any shaking.
Try setting the Interpolate to Interpolate on your Rigidbody on the player object
@gentle onyx same effect 😄
@gentle onyx The problem was in the code. I tried this solution, and the shaking disappeared. But when I move the joystick as shown in the video, the character doesn't move.
before:
public float speed = 5f;
public Joystick joystick;
private Rigidbody2D rb;
private Vector2 moveInput;
void Start()
{
rb = GetComponent<Rigidbody2D>();
rb.interpolation = RigidbodyInterpolation2D.None;
}
void Update()
{
float moveX = joystick.Horizontal;
float moveY = joystick.Vertical;
moveInput = new Vector2(moveX, moveY).normalized;
}
void FixedUpdate()
{
Vector2 newPosition = rb.position + moveInput * speed * Time.fixedDeltaTime;
float pixelsPerUnit = 16f;
newPosition.x = Mathf.Round(newPosition.x * pixelsPerUnit) / pixelsPerUnit;
newPosition.y = Mathf.Round(newPosition.y * pixelsPerUnit) / pixelsPerUnit;
rb.MovePosition(newPosition);
}
after:
public float speed = 5f;
public Joystick joystick;
private Rigidbody2D rb;
private Vector2 moveInput;
void Start()
{
rb = GetComponent<Rigidbody2D>();
rb.interpolation = RigidbodyInterpolation2D.None;
}
void Update()
{
float moveX = joystick.Horizontal;
float moveY = joystick.Vertical;
moveInput = new Vector2(moveX, moveY).normalized;
}
void FixedUpdate()
{
Vector2 newPosition = rb.position + moveInput * speed * Time.fixedDeltaTime;
float pixelsPerUnit = 16f;
newPosition.x = Mathf.Round(newPosition.x * pixelsPerUnit) / pixelsPerUnit;
newPosition.y = Mathf.Round(newPosition.y * pixelsPerUnit) / pixelsPerUnit;
rb.MovePosition(newPosition);
}
so yeah I made a new empty 2d project and its still the same. I made a square and added a animator to it. If I try to set the position for the first frame it doesnt work, but if I add a frame before it works. For this animation the square is supposed to move 5 units. If the first frame is pos 0 then it does, but if the first frame is say pos 2 then the square only moves forward 3 units. Either im missing something or the animator doesnt work with first frame movement.
Also if root motion is off the square expectedly moves to 5.
the scripts you provided are the same, also whats the problem in the video? the character is moving
The problem is that the character used to move in the direction the joystick was pointing, but now it only moves in 4 directions. So, it's not moving along the entire axis anymore.
Well we cant see what changes you made so its hard to help
I've confirmed my problem is with the camera, if I don't move the camera my player has no jitter
Before:
using UnityEngine;
public class PlayerMovement : MonoBehaviour
{
public float moveSpeed = 5f;
private Vector2 moveInput;
private Rigidbody2D rb;
void Start()
{
rb = GetComponent<Rigidbody2D>();
}
void Update()
{
moveInput.x = Input.GetAxis("Horizontal");
moveInput.y = Input.GetAxis("Vertical");
moveInput.Normalize();
}
void FixedUpdate()
{
rb.velocity = moveInput * moveSpeed;
}
}
Yes, but the camera doesn't follow the character.
!code
📃 Large Code Blocks
Use links to services like:
https://paste.mod.gg/, https://hastebin.skyra.pw/, https://paste.ofcode.org/, https://paste.myst.rs/, https://scriptbin.xyz/
📃 Inline Code
Surround code with three backquotes. Not quotation marks.
To format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
Hi, how delete colors sprite in tile palette?
They indicate that a tile asset has gone missing. You should be able to use the eraser tool to remove them from the tile palette.
Hey!
If I can't add a collider, how do I prevent my character from falling off the world? Because right now when I press play it just falls off
you can add a collider, you just can't add a 3d collider
BoxColldier = 3d, BoxCollider2D = 2d
Hey!
I tried using this tutorial (https://www.youtube.com/watch?v=BLfNP4Sc_iA&ab_channel=Brackeys) to create a healthbar but it disappears whenever I click play, does anyone know why?
Let's create a simple health bar using the Unity UI-system!
Get up to 91% OFF yearly Hostinger Plans: https://hostinger.com/brackeys/
Code: "BRACKEYS"
● Brackeys Game Jam: https://itch.io/jam/brackeys-3
● Project Files: https://github.com/Brackeys/Health-Bar
···················································································...
hello, when making an animation in 2d, the sprite's position changes in every frame if all the sprites in the animation is not on same width and length, and you can't make them the same w&l in some situations. Is there another way to fix this issue?
You have to modify each Sprite's pivot so that they remain in the same world position throughout the animation
should i adjust it manually or select one of the options in the Pivot drop down menu at the sprite editor? Like center, top, bottom etc.
It depends on the Sprites. E.g. if you animate a slime on the floor, then the bottom center pivot point will most likely be the same throughout all the frames. But if you cannot find a common attach point for all frames, then you have to create a custom pivot for all frames.
If you are animating in Aseprite, the Aseprite Importer will do the pivot calculation automatically if you make use of .ase/.aseprite files in Unity.
no, i animate in Unity
i think i need to do it custom in this sitch. I'll change the x,y values of the pivot of the bigger sprite so it's position is aligned with other sprites. I think it requires some trial and error but i think it's the most convenient way right now. Thx for the support
Yeah that sounds like the way to go.
Best of luck!
Hey sry to bother you again. I tried adjusting the pivot by hand and it reduces the movement of the sprites during animation but doesn't fully stop it. Is there a more precise way to do this? I just need to set pivot on the same exact pixel on every sprite in the animation, how can i do that?
does anybody know why i dont have that bell curve in my unity version (iam using the newest version ) and is there a way for me to get that bell curve iam also missing the reverse one
The gear icon opens a menu that lets you add new curves
They're probably added by the user
At least I haven't seen more official ones than what you have there
hope this is the right channel. getting a tearing effect with some tiles.
things ive tried:
creating a sprite atlas and putting the tileset in it
turning off anti-aliasing
creating a sprite/default material with pixel snap turned on
setting the tileset filter mode to point and compression to none
changing the cell gap to -0.1
none of these solutions have solved the issue. the tearing/gaps still show up in both the editor and build
i just set the max size to 16k and it fixed everything but i feel like that cant be the intended solution
yippee yipeee yay yay yay. i realised that the original tilesheet was over 2048px wide so obviously the max size needed to be above that. reimported and resliced and its looking fine. cant believe i didnt notice that
grrr there's still some mild tearing
Time to remove some of your previous attempts at fixing it perhaps =p
i'd say leaving up the thought process is more helpful than deleting everything but i can delete if people want me to
No, no.
I meant, one of your previous fix attempts might be causing the new artifacts.
oh my god im so sorry hehehe. i completely misread the message
ive reverted all the fix attempts ive made. slowly re-trying them now in isolation to see if that fixes the little bit of tearing that remains
I know I have broken things in new and exciting ways, trying to fix a problem.
hehe exactly
Most of the advice for similar problems is meant for low res pixel art
What are your filtering and mipmap settings like?
do i have to enable generate mipmap to see that?
oh i shouldve just clicked it hehe
The point filtering is only for low resolution pixel art.
Setting the pivot the way you do is the only way you can do it in the editor. You can also create scripts to do it automatically for you, but I'm not sure that would help you in your situation.
i managed to fine tune it to some extent but it's still slightly rocking back and forth while moving. It's a helicopter though so it doesn't feel completely off. I think making width&height of all the sprites in the animation is a viable option too if nothing else works
There are two different kinds of tile gaps you might be seeing
One type is color bleed in which color from the adjacent tiles appears on the edges, the type that you already saw
It has many potential causes, and the fixes are all about minimizing where and how this color bleed can happen
Each tile should have their colors extended a bit outside the tile so when the colors get sampled outside of the tile only the correct colors appear there
The second type is a visual gap between tiles that shows whatever's behind the tiles
That doesn't really have a cause, other than how unity fundamentally renders tiles in its own inexact way, though it can appear much worse when using AA like MSAA that attempts to blend the edges with the empty space that technically exists between them
Once that cause is eliminated it can still appear, and you can only really fight it by making the tiles a little bit bigger than the grid cell by slightly decreasing the PPU, or get into pixel perfect rendering
decreased the PPU to 255.9 and it seems to have done the trick. ty :]
Hey there ! I'm making a pokemon fan game and I'm importing all the resources from the poke emerald recomp project.
However, there is something interesting about the sprite sheets. They all come with this greenish colour (See picture)
Is there a way to replace this colour to transparent without going with photoshop as there are a TON of sprites (obviously)
Thanks 😄
I was wondering if it was possible to edit part of a tilemap (the rockwall) to make it flat? My workaround has been to put the tiles on a different layer and manually add a box collider but I cant see that being an efficient fix
Just use rectangles for the sprite physics shapes?
Tile can have a collider type: grid so it ignores the sprite's physics shape
https://docs.unity3d.com/Manual/tilemaps/tiles-for-tilemaps/tile-asset-reference.html
any idea why this happens?
Aseprite Importer 1.2.2 is now available! 
This version updates the way the Tile Palette is being laid out in Unity.
It is now 1:1 with the Tile Layer inside of Aseprite, giving it a much better overview of the tiles.
Why what happens? Can you be more specific?
When I move the arm it kind of cuts out a tiny part of it
Show your sprite mesh and bones? My guess is that your topology is pinching a bit.
All I done was make a stickman on Photoshop,export it to psb,rig it in unity and that's it
https://youtu.be/5hF4DBXpHac?si=yZOUc9XvCQsor0Ec
Here's what I followed
Use inverse kinematics to move your character limbs with ease!
Rig up your 2D character in Unity using Unity's 2D animation library (creating a skeleton). Next, I'll show you how to hook up IK (inverse kinematics) to your character to perform realistic joint movements. Finally, I'll show you how to use all of this together to create great-looki...
Ok, that's great. But if the mesh isn't good, it won't deform nicely.
The automatic mesh is usually trash, especially for skinny geometry.
This sort of geometry/ weighting can help avoid pinching but you'll likely need to tweak it a bit.
Unity Rigging System is better than Spine?
I dunno, probably not. Much cheaper, certainly.
I'm having a lot of shader problems with Spine.
I imagine that this will be resolved directly in Unity,
Well, unity rigged sprites can use any shader you want.
Very helpful for unusual effects.
Real, crazy that my problem is simples illumination.
Spine objects full do not receive global or URP light.
The 2d urp lighting is pretty new, so they might not have updated the spine shaders to use it.
No clue,I made my own then that happened so I used the one used in the video and the same happened so I'm not really sure
If you show us the mesh, we can maybe make suggestions
Okay, I'll when I'm next on,thanks
wdym by mesh
The part of the video you linked starting at 2:33
everything is same with the video
Guessing you haven't looked at the manual.
how do I make a 2d grid background fit the camera?
You mean so that the camera's size is grid cell-perfect?
yeah
You may need a proper aspect ration, but you can just manually change the size in a way that fits the grid.
To move in accordance with the grid:
Figure out the distance between each cell, and increment/snap the camera based on that.
gotcha, I'll research that
By aspect ratio I mean the size of the screen itself
if I have a sprite sheet like this, how do I create objects from it? i.e. if I want to get one of the chairs near the top-middle area, how would I get those sprites specifically?
Import into unity as type multiple sprite and use the sprite editor to make sprite slices
Spazi is correct but question aside for a sec, that sprite sheet is actually insane. it looks awesome 🙌
looooool I wish I could take credit for it. I got it from a website (free download which was nice)
Is there a way to automate the sprite skinning and rigging system so that I can import images from external sources (say a file added by a player) so be used with the sprite resolver system? I used to use Spriter and just swap the sprite for each sprite object but now I have the issue of sprites needing to be given geometry and bones in order for them to properly conform to the bones' rotations and positions.
Currently I'm importing the eye atlas for a blinking animation normally (non-external) and then using it in a sprite library for resolving, I'd like to be able to us either atlases imported from external locations or somehow automate or simplify the skinning and rigging process so that I don't have to have each atlas have it's own rig. Note that all my sprites/parts of the rig are perfect rectangles, nothing is being deformed outside of rotation. How would I make this work while still being able to use the 2D animation package?
Since you need the TextureImporter/PSD Importer to produce the runtime assets, the way to go is having the user creating asset bundles which you can stream in at runtime. Not the neatest approach, but some games modding communities have made it work.
Dang, that's really unfortunate. I've refactored my rig to be aligned to the pixel-grid so that I can just parent sprites to the bones for added on sprites, it always confuses me that sprites use layers instead of the Z-axis (it's so much more annoying to use layers for complex sprite systems ;-v-). Thanks for the info.
I have seen the following in the release notes Added options to create WhiteBox Tile Palettes. And I'm wondering where the option is in Unity 6 because I can't find it.
I... have sorta of an issue with the sorting of sprite layers. My guys toggle a sprite on top of them when they die to indicate that they are dead. That works fine, but since they are sorted on a layer on top of the sprite of the character icons is meant to be in, they get on top of ANY other character that passes over (image 3) I don't want that to happen, I would want death character to have the lowest priority to show over all other characters. I could do that by code with a messy way of placing ALL the sprites lower in the sorting layer while they are dead and back up again when they are not, but... I was wondering if can do some other simpler trick to solve that
Can't you use sorting groups?
Isn't that the same than the object layer?
yo, any1 know why tile palette keeps making ghost versions of tiles that i cant erase or use?
there's 2 "layer" things in unity, sorting layer is separate from the "layer" that's beside "tags"
Oh, so I can change the layer and place it BELOW another?
by setting the sorting layer, yes
So it's like always below the next one no matter the sorting on the layer?
sorting layer is for rendering
layer is for physics (and misc, i guess, though idk what else you'd use it for)
not sure what you mean by that. sorting on each layer would be done with the.. priority thing, i don't remember what it's called
I mean, that something on layer 0 would be rendered before anything in layer 1 no matter if it has a sorting order of like -1000000, rigth?
ah yeah sorting order is within each layer
(i can't say if 0 would be before 1 though. might be the other way around. i don't remember)
If you put everything for a character into a sorting group, they are treated as as single object in the sorting order, with its own internal sort order.
i cant seem to erase 2 of these tiles (the offset ones) and this keeps happening every time i reopen unity, the dirt uses the same sprite as the other one but when i remove the sprite from the tile object the offset one doesnt dissapear
I have made a new unity package for 2D Sprites (Blend modes / layer effects.)
(Package)
https://assetstore.unity.com/packages/vfx/shaders/2d-sprite-blend-modes-312704
(How to / Overview)
https://www.youtube.com/watch?v=_zafuaRkrz8
i have no idea if this is the channel for this
None of the channels outside of the showcasing category are for showcasing
https://discord.com/channels/489222168727519232/1080140002849214464
Nice asset though
Okay thank you
Thanks
im trying to place a crop sprite on top of a farming plot using a tilemap but it places it using the middle of the sprite and not the bottom, how do i fix this?
You can edit the sprite slicing and pivot in the sprite editor
what do i need to change? the pivot i assume
Pivot will determine where the sprite appears relative to the tile itself
Slicing determines what pixels are included/excluded in the sprite from the sprite sheet
i changed the pivot to bottom centre and it still hasn't fixed it
I would assume there was some change, at least
somehow the same
make sure you hit save/apply
yeah i have
tried it multiple times
alright its changing now but changing the pivot to bottom center still doesnt get it where i need it for some reasons
sorted it - custom pivot of 8, 8
im sorking on a 2d projecvt rn but some of the art assets i want behind others are appearing in fron no matter what I do. The parts I have circles should be behind the other stuff (except for the two platforms on top). I'm not tryinf to do paralaxing just trying to get some layering in my scene
Are you setting sorting order in the sprite renderers?
umm probably not. How do I do that? (sorry i havent used Unity in a few years)
Each renderer has a sorting order, and you can also group them into sorting layers.
Hi so I’m on version 2022.3.45f1 and I’m trying to figure out how to replicate the way aseprite importer name animation frames in 2d.
For example using a fresh built-in render pipeline project, in 2d it would be something like this:
but a fresh 3d built-in render pipeline project + installed 2d packages (including aseprite importer) would name my animations like this:
so 2d includes the file name + frame + index, but 3d only does frame + index.
These are .aseprite files as well as using animated sprite import mode.
Anything I can change in my project to allow 3d to do file name + frame + index for frame names when I import an aseprite file using the importer package?
not 100% sure if this is the right channel for this but how would i make a 2d texture for my game
the ground looks really basic so i wanted to try making some ground textures
but i have no idea how to add them in
I asked about it. Seems to have been a "hickup" with the release notes. The internals was created for it, but it never made it out.
Tilemap (https://learn.unity.com/tutorial/introduction-to-tilemaps) or SpriteShape (https://docs.unity3d.com/Packages/com.unity.2d.spriteshape@latest) are the two most common ways of building a 2D world
The name code looks like this:
return isMerged ? $"Frame_{frameIndex}" : $"{baseName}_Frame_{frameIndex}";
So if you've selected to merge all layers, Ase Importer should name the sprites Frame_{frameIndex}. If you use individual layers, it will name them {baseName}_Frame_{frameIndex}.
Oh ok thanks
Im not sure how i would know or set it like that because i just drag my aseprite file in and the importer does its thing. Is isMerged false by default then in 2d and in 3d its true? Because i just created fresh templates and the import aseprite mimics different behavior even though i didnt change anything with the aseprite file
ok I guess I just flip it around for 3d as a solution
It shouldn't be different between a 2d & 3d project. So do file a bug report if that is the case, so we can figure out what goes wrong and fix it.
Yes sir thank you
how do i access the 2d renderer tab on the inspector?
trying to do the same as this guy: https://discussions.unity.com/t/help-how-do-i-fix-the-layering-on-my-tilemap/905652/3
It's not a tab, but an asset
Quality tab of Project Settings has rerences to your URP assets, which in turn have a reference to Renderer assets
so how do i create a 2d renderer asset in order to use the solution provided in the link?
If you made a URP 2d project, you already have one among your assets and the references are in place in the quality settings
If not, you have to do the steps to make it so
Instructions pinned in #archived-urp for how to make URP assets and assign them to be active
Graphics and quality settings
Refer to the instructions for specific URP setup steps, which you can follow to see what you have in the relevant slots in your project
sorted out the urp stuff but now even with the custom axis transparceny sort mode it doesn't wanna sort the sprite on the lower axis infront of the sprite on the higher one
im guessing i need to change the tilemap sort order instead but no clue how to do that
sorted it, had to change the tilemap renderer mode to individual instead of chunk
thanks for the help anyway
Are you able to get an animation clip object from an aseprite file through code after importing it?
why though?
why not just assign the animationclip as a reference
I got a lot of aseprite files and I will have a lot more in the future
when an aseprite file imports, it creates a bunch of stuff like animation controller, clip, sprites, etc. If I can get the animation clip it would be good
well i couldn't find anything exposed by the importer
maybe i gotta edit the package a lil if there isnt any way to get the animationclip without exporting
Ok nevermind I had to use something like
AnimationClip clip = AssetDatabase.LoadAssetAtPath<AnimationClip>(filePath);
and get the animationclip from the aseprite file path
Why do I have this in unity?
Don't know if this is the right place to post (sorry if not). Trying to follow a tutorial on creating an isometric game. Whenever I try to add an isometric tilemap (or even a hexagonal one), it shows no isometric grid on the scene - all examples I find have it showing immediately upon adding the object. I have already reinstalled Unity twice (this was one solution I found) and reinstalling the 2D Tilemap Editor package (another solution I found). Am I missing something simple/stupid?
Someone has some tip to make a dirty with tint effect to a sprite? i would like it be procedural, not a fixed dirty sprite.
hello people, I dont know if its an already known issue but I found a very bad bug possibly with the aseprite importer. if you change the import mode setting in layer import settings from merge Frame to Individual layers and apply its fine but if you try to change back to merge frame setting again and apply then it breaks the file. I tried changing other settings but it would still not be usable. the only way I know is to delete it and save a new file if you are lucky to have the original.
this is the error I get, Failed to import file Assets/Aesprite/bunball.aseprite. Error: Index was outside the bounds of the array.
at UnityEditor.U2D.Aseprite.AsepriteImporter.OnImportAsset (UnityEditor.AssetImporters.AssetImportContext ctx) [0x001cf] in .\Library\PackageCache\com.unity.2d.aseprite\Editor\AsepriteImporter.cs:234
can anyone please safely double check if this happens? its pretty bad and I couldnt find it in issue tracker.
edit: deleting the meta file makes it work. I am on unity 6000.0.31f with aseprite 1.1.8
Hi everyone, I have a question regarding 2D game art resolution and how to approach this in Unity. I have designed my art assets to look sharp on a 4k screen, having in mind the default camera zoom that the game would have. I am now starting to think these large assets might be overkill or bad for performance, as I see that many 2D games were designed for 1080p screens. The ppu and camera settings add to my confusion, and I haven't found any answer that explains the workflow.
I want my game to look sharp on a 4k screen, and I want to be able to zoom in on the characters during certain moments without the assets becoming obviously blurry. But, I also need the game to run at 60fps on weaker devices. Should I maybe have designed the assets for a 1080p display and then added a postprocess sharpening filter when the game was running on a 4k screen, or during the zoomed in sequences?
Or are devices now so powerful that I can get away with the 4k assets, am I overthinking this?
imo, design with 4k, test on your target hardware, according to that you can scale your textures to fit those devices' needs using the texture import settings and use the quality settings to choose how to. take a look at this discussion https://discussions.unity.com/t/how-should-hd-sprites-be-scaled-optimized/807330/19
I am very early in development, don't really have something like a Switch or PS5 dev kit to test things out, just my PC. Hopefully changing those import settings will be enough, but is there a way for Unity to do this automatically?
not that I know of, you have to override the settings manually for each platform. better might be to make a script that handles it if you want more control.
Please submit a bug report and we'll take a look at it. Thanks!
why is my sprite behaving so weird? Its a 32x32 artwork so, shouldnt it be right if I put pixel per unit to 32?
I just read on stack exchange that its bad for performance reasons to keep it at 100
what's the sprite size? also what's the size of your tileset?
not sure how it works, but your grid is probably set up for the tilset sprites, so your character sprite appears much bigger
not sure what the proper way is to deal with this
try setting it to 32x32 and adjust the scale
Unity is a 3D game engine, which means it isn't going to act how you might expect with scaling because 2D is still just 3D in the end. PPU is how many pixels the sprite will use to create 1 Unity unit (1m). You'll need to do a combination of using the matching PPU of the sprite and your orthographic camera size to get it to actually look like 32 pixels on your screen.
https://discussions.unity.com/t/help-understanding-ppu-and-the-effects-it-has-on-sprite-size/206288
alright will try it, thanks ^^ 🤝
Can you define just how you want it to look/work? Just a noise texture applied over the sprite, or...?
PPU of 32 with a 32 pixels tall sprite means it will be one unit tall before any gameobject transform scales are applied
So if you've scaled the player object or it's parented under something scaled, PPU will not apply exactly
PPU is only relative to the unit grid of your scene, so if your other assets don't conform to unit grid or don't have correct PPU values, they will not conform to any standard resolution between each other
PPU is not related to performance at all, any more than ordinarily scaling objects is
thanks spazi, that was really helpful. now I think I've understand PPU 🫂
It's nothing more than scale the sprite renderer will give the sprite, as a way for you to make sure your sprites can be all the same relative resolution
Still chasing help for this if anyone is able to provide some insight. Cheers.
does the tilemap brush have a paint radius setting? I cant seem to find anything that will let me draw more than 1 single tile wide
seems weird that it wouldnt have one
You can click and drag to select multiple tiles from the tile palette in any configuration to paint many at a time
Make sure the gizmo for the tilemap is enabled?
I mean the radius to place a selected tile, so I could draw 4x4 tiles instead of 1x1 when clicking once
No Tilemap gizmo in the list despite having the package installed. Only thing related to Tilemap in Gizmo list is TilemapCollider2D. Uh oh?
I have sent one.I replicated it on an empty project, I am not on the latest lts version tho. hope its not something stupid from my end.
Great, thanks Subbu
thank you UnityTed
in top down view, i have a enemy can fly, object A like table barrels.., object B tall like pillar cant fly over, and a player, i have the transparency sort in y axis 011
im stuck on the render ordering part. i need the enemy to always above A but can still behind B, the player can still both behind and infront of A and B like go behind the top part abit like real life
so player, A, B are forced to stayed on the same sprite render order but the enemy need to be higher than A while the same as B and player ? sounds impossible, thought that this problem should be popular, hope anyone can show me a how stuff like this can work
maybe im overthinking abit, it might be just enemy pivot lower than usual
any1 know how to set up auto step up blocks code?
Can you elaborate?
nvm i fixed the code
Any good tutorials on SPrite layering? The built in Unity Version does not really work for me
Can you be more specific?
Sorry, i didnt see your message for some reason. My Problem is that the player walks infront/behind some of my sprites way too late, which does not look that good. Since they all have different sizes, the built in Unity way does not really work for all i know. In 1, the Player is randomly infront, which should only happen at a certain y level, depending on the size of the House, in 2 he is behind. Like i intended. So my question was how i can customly change the y level or if theres any good tutorials on this topic (That preferably dont use tilemaps)
^For anyone wondering, i found that you can change the pivot in the sprite editor for each object
HEY
i need to know that
What's the preferred way to scroll sprite's texture on the screen?
I have a background sprite and I positioned it to match the height of orthogonal camera, which is set to 5 meters.
Now I'd like to make it scroll
void Start()
{
_material = GetComponent<SpriteRenderer>().material;
}
void Update()
{
currentscroll += speed * Time.deltaTime;
_material.mainTextureOffset = new Vector2(currentscroll, 0);
}
Is this a good method?
I just tried it and it didn't work. What material do I have to use for it to work?
Had to create my own material and inherited from the default Unlit material. Now the sprite scrolls with this code:
public class BackgroundScroll : MonoBehaviour {
public float ScrollingSpeed = 1;
Vector2 CurrentScroll;
SpriteRenderer SpriteRenderer;
Material Material;
void Start() {
SpriteRenderer = GetComponent<SpriteRenderer>();
Material = SpriteRenderer.material;
float RandomStartingOffset = Random.Range(0, 1);
CurrentScroll.x = RandomStartingOffset;
}
void Update() {
float CurrentFrameScrollingSpeed = ScrollingSpeed * Time.deltaTime;
float ScrollSpeedInNormalizedTextureOffsetSpace = CurrentFrameScrollingSpeed / SpriteRenderer.bounds.size.x;
CurrentScroll.x += ScrollSpeedInNormalizedTextureOffsetSpace;
Material.mainTextureOffset = CurrentScroll;
}
}
Also had to change wrap mode to Repeat in the texture asset.
You could use custom sorting axis, or explicitly set the sort order via code.
Hi guys, I was working with the Tile Palette as usual, but in the middle of my work session, the brush tool suddenly stopped working… xD
I can still use the select tool normally...
Has this happened to anyone before? How did you solve it?
Is there a section here for a "hey, look what I just draw!" Type of posts? Like for some games related drawings?
No, this is a no-fun unity development server
There's #1180170818983051344 but it's only for unity games and projects, not game assets in general
why is my 32 ppu not fit to one cell here ? but when i set ppu to 256 it works
My guess is that the texture's true size is 256, and PPU is calculated before Max Size reduces is to 32
it was originally 256, im trying to make it as small as posible without create new image by external app
Max Size is usually used to limit the resolution for performance reasons per platform, so if it changed the size of sprites it'd be a very inconvenient
with 256ppu when the texture is 32 pixel, does it just add more pixel to the texture
Why do you need to do that?
If it's a solid white block it doesn't seem to matter what the resolution or PPU are as long as the scale is right
i was just trying to make it as small as possible
like 1 pixel is 256 smaller than 256 pixel fr fr
I believe you end up with effective PPU of 32
i just realize that was a dumb question
Hiya! I'm having some weird issues with the resizing of my tile palette, could I get some advice on how to fix this?
Hey i am just a 16 yr old dev i want to make a 2d Metroidvania Where can i start please answer because most of you guys are wayyy more experienced
please be honest
!learn
:teacher: Unity Learn ↗
Over 750 hours of free live and on-demand learning content for all levels of experience!
how do you move tiles around the palette window?
its placed a tile on top of another, I cant see any way to drag it off
another odd thing is even though I have gizmos enabled in the palette, nothing shows up. For instance here I selected a bunch of tiles, which should give me an outline in the tile palette that shows what I selected
hello, why does my scene editor look like this?
this is what its supposed to look like (this is in game)
I checked "Selection Outline" in my gizmos and suddenly no matter what I do I cannot get my tilemap grid to display anymore???
i'm new and i'm having trouble with basic sprite settings and trying to get a tiled grid as a sprite. i'm trying to find the right place to ask my question. is this it?
I'd use a tilemap
Or a custom sprite shader that repeats the grid in world space instead of sprite UVs
i don't know how to feed a tilemap to a prefab which expects a sprite
"Expects"?
It may help to see a picture of what you have and what the desired result might look like
k sec
my desired six tiles are already co-located, but i can only get it to repeat the index tile, rather than to go out to neighbors like a standard tile spriting system
i'm sure there's some way to do this, but i don't know how to say it in unity-ese
in some systems, you'd have a descendant of a sprite called a tiledsprite, which would provide the sprite interface but be implemented with a tilegrid or whatever
in others it'd just be "it has to be the stuff at the right position on the map," which is what you usually see on hardware sprites
You can make a new sprite slice for the well (or any other part from the sprite sheet) using the sprite editor
Unity's sprite editor allows you to use the same sprite sheet sliced as a grid for tilemap or modular sprite purposes as well as to slice arbitrary sections of it into an independent whole
If the well was in scattered parts on the sheet, then that would not be an option, you'd have to use it sliced as a grid either as separate sprites or as a tile palette
You can probably forget most of what you assume how sprites work when dealing with Unity
Unity supports only 3D geometry using shaders meant for 3D rendering which it also uses for its sprites
Sprite sheets also don't have the concept of a sprite index
Each slice, whether in grid or totally arbitrary has a unique ID instead
im struggling on finding a way to make custom 2d shapes inside unity is there anything apart from sprite shape that will help me since i am finding it very difficult and not providing results i want
There isn't really
Most assets you are expected to make in external editors
i am instead going to just make everything 3d
and lock some of the rotations and what not
will this be viable?
I guess, without knowing any of the details
2D or 3D you usually end up having to use an external editor anyway
Everything in unity is 3D technically, but 2D components have their own system for depth sorting
if im looking to make simple shapes with some of them being curved what external editor would you reccomend
if you're looking to do it statically, use adobe products. if you're looking to do it dynamically, i know an asset in unity store that might be useful. i need to find out if i'm allowed to post those though
If you want to make 2D, use drawing or image editing programs, such as Krita or Gimp
If you want to make 3D, use modeling programs like Blender
Unity does have ProBuilder for making meshes within the editor, which is easier to learn than Blender but much simpler
ill look into them thanks for the help
is it okay to post asset store links here in response to someone's question?
Sure yes, since it's relevant
can I get these auto generated outlines to hug the sprites? I need it for a particle effect that follows the shape of the sprite animations
There's no feature for it, but it's technically possible
I know of this pixel perfect collider script, which does much the same task though in a different context, so it may be a useful resource anyway
The might also be scripts that do exactly what you need out there
I don't think there's a way to get particles to follow sprite outlines though? Nor to read sprites in general, only meshes or textures
At least by default
Any recommendations on pixel-perfect game? I mean everything: in-game movement, UI, visual representation.
So far I set filter mode to no filter in textures. But that's about it.
The character movement is not pixel-perfect, unlike in the old console games, and I can position all objects and UI in the world in a non-pixel manner.
Let's say I have all my sprites in a 100 pixels per unit, is there a way to make all game objects to be positioned in the same way: only 1 cm steps and not less.
so i havent really used unity 6 for 2d since its launch and cant figure out how to slice a sprite sheet. im in the sprite editor and can only edit 1 piece at a time but id like to add a border space to all at once (could do it in unity 5) any ideas
is the sprite asset set to Multiple
i have a icon and a tilemap, both in same sorting layer with icon order=0, tilemap renderer order=-10
how come the tilemap appear infront of the icon ?
After enabling pixel perfect camera, the UI is moving back and forth. Is there a fix for that?
If it's inside a canvas, there's also plane distance that affects that.
no canvas
its just a tilemap
both same Z
guys someonee could asnwer me why linerender flicker when zoom in or out
someone could help??
This happens with any geometry that's too small when you don't have any antialiasing method enabled that can bring out sub-pixel information
It's often a better solution to use grid textures rather than lines
Textures can be filtered via mip maps and don't require any antialiasing methods
i need to use line renderer
so i should use some antialisiag method ??
beacuse it wat to create line render in rine time chagne color material postion ecc
Yes
Camera component has screenspace AA methods, graphics quality settings have "hardware" AA methods
Most screenspace AA methods can only smooth out detail that's already there, not prevent it from disappearing
So you have to try a few different ones
anti aliasing doest work
waht i should do ??
That's not good enough
Which ones did you try
And how much did each of them improve the situation
If you see no change at all, then they were not activated correctly
i try all of them and also msaa x8 but the flickering remains
Also tried TAA and Render Scale?
Can you confirm it changes in some way, at least
Using them both at the same time would yield the best results
But there's a limit how far that can stretch it
Your alternative is to make each line a texture with transparent area around it for mip map sampling to "spread" onto
When looking at graphics that are far or small, they either have to be blurred in some way or the pixel disappears entirely
There's no any obvious or simple way to do that technically
If mip maps aren't good enough you'll be looking at some type of custom shader supersampling
Or generating the lines purely with shader math and control precisely how thin or faded they should become when they reach sub-pixel screen space size
But that requires familiarity with shader math
Like I said if the AA methods don't work for your line geometry, the next easiest method is to have your lines as textures
If they're individual line textures, you can also control their color and whatnot individually
But the important part is to have empty space around the line on the texture, so when it gets downsampled it has room to blur out, like this
You can still use the line renderer, but with that texture on the material
But it basically doesn't matter if it's a line renderer, or a Quad mesh
ok
Assuming they remain straight
If you need a lot of very precisely antialiased grids, in the long run it'll be better to make them with shader maths
But in a pinch I'm sure this would be fine
know i notice that thin mesh in 2d not fliccker
maybe is the material
or i should use meshes instead of linne rederere ??
There should be no difference I think, since a line renderer is a mesh
Be sure to only make observations through the Game window with your camera in orthographic view
Scene window renders everything a bit differently, since it's not limited by any display resolution
yeah
but i have notic that the center line donnt flicker
why
even if i use mesh
and they are thin like the orders
The center lines in your video are much thicker, so you'd have to zoom much further out for the flickering to appear
even with the same thikess the horizontal center one dosent flick why ??
maybe z buufferr ??
You must be seeing something different that what I'm seeing in the video you posted earlier
Anyway, because the flickering is due to coordinate rounding, it's possible that lines that intersect the screen's (or world's) center perfectly have a chance to always appear at least one pixel wide
But it's incidental
Isn’t there a tool for being able to rotate objects without it distorting the pixels?
What type of distortion, do you mean pixel art and if so are you using pixel perfect rendering
Yes, pixel art. And yeah. I’m not sure. I was just in a conversation with someone saying Unity is bad at rotating pixel art, and I recall there being a tool to make it look nice
There's technically no "good" way to rotate pixel art
The best you can get out of the box is with pixel perfect component
https://docs.unity3d.com/Packages/com.unity.2d.pixel-perfect@5.1/manual/index.html
See example under Upscale Render Texture
Or I guess alternatively if you're fine with smudgy pixels, there are tools like this
https://assetstore.unity.com/packages/2d/smooth-pixel-209066
Very cool
But in the crisp world of true pixel perfectness, rotating has always been an issue since the old days to now
Algorithms like RotSprite have been invented for that, but they're not perfect
It's not possible to fit a rotated grid of sprite pixels into an equal resolution grid of display pixels without having to round pixel positions in a way that distorts the art
I’m using URP with normal maps to achieve dynamic lighting in a 2D game, but I’m encountering some issues with edge sharpness. The edges are displaying strange artifacts, especially where the boxes meet. The sprites have their Filter Mode set to ‘Point (no filter)’ and no compression. Does anyone know what might be causing this? Thanks!
Check to make sure your normal maps aren't being resized by import settings
Advanced category has non-power of two resizing options
Iirc sprite normal maps should be imported as type: normal map, not as sprite
Then the resizing options appear
Sprite type textures don't get auto-resized like other textures so it's probably not that, but check the setting after switching
Thank you! When I change it to a normal map, the texture in the first image changes to look like the one in the second image. Is this normal? Also, are there any other settings I should check?
Sorry, I couldn’t figure out the exact cause. However, I found that keeping the texture type as sprite instead of normal Map and increasing the screen resolution to 4K or higher can eliminate the edge artifacts.
What do you mean by "screen resolution"
Jugding from the appearance it looks like the light/shadow texture is downsampled (as it tends to be for performance reasons), and this downsampling might be causing gaps in the intersection of the tiles
sorry if the expression seems odd, as I am using a translation. ‘Screen resolution’ refers to this part
Do you have any suggestions for improvement?
This is not a variable that you truly have control over, the user's monitor will determine the display resolution when they play your application
I'm not sure why it would be happening, but it seems like a clue
You could modify the 2d light texture's resolution to increase it directly to reduce leaking but it's a bit of a band-aid solution
I'd rather poke at the placed sprites a bit to see why and how the light seems to be leaking through the seams
Why are the tiles shadowed to begin with
Frame debugger may let you observe the raw light texture when the game renders it
The light texture being the wrong size would definitely cause such artifacts.
Hiya! Could I get a hand with my tilemap physics? I really want to have one layer that holds every 'moveable' object (like crates that can be pushed around).
I've got the collision working, but when the player pushes ONE crate, they push EVERY crate.
Is there a way I can make the crates all move separately?
Make them gameobjects instead of tiles?
You could use the tilemap to spawn them.
is there any way to layer a camera without pixel perfect and a camera with pixel perfect at the same time?
Ok so I created a tile palette with 5 differant sprites.
But I can't assign the tile to my terrain generation script:
// Direct references to tiles for better performance
[Header("Foreground Tiles")]
public TileBase dirt;
public TileBase grass;
public TileBase crustrock;
public TileBase mantlerock;
public TileBase mantlerock1;
this is my first time trying to create tiles
So I created this tile in yellow:
then I added 5 tiles in it, each with differant sprites:
idk if this is what im suppose to do
and I can't even add these tiles to this section:
@compact knoll do you know how to solve this?
Pretty sure you're gonna have to create custom tile classes.
Not sure where this belongs... Anyone having experience with 2D sprites? I want to create a modular 2D character where you can equip different armors, items and whatever. Its animations should look like this. How would i do this? Is this possible?
Any help welcome!
I assume i dont need to do one new animation for each combination of wearables and items equiped?
Anyone know how to make a composite collider act like it is "filled in" like a box collider instead of "hollow" like an edge collider? This would mean I could detect OnTriggerEnter2D when inside of the collider which I can't do now
Hi i really need help with pixel art in unity2d im trying to make a background and tile map but i cannot get the pixel sizes to be consistant even though they have the same ppu can anyone help me i am using aseprite and dont really know how to properlly import pixel art into unity/ use it in unity
They need the same PPU AND the same scale to have the pixels match.
Did you actually drag the individual tiles, or are you trying to drag the entire tile palette
I tried both, nothing work
so I cannot create a simple tile with no rules normally? I have to code my own tile with no rule?
and just to confirm, you are not confusing your tilemaps with the concept of a tile? you expanded the subassets for the tile palette asset and dragged the tiles from there?
Ok I will tell you what I did step by step with screenshots.
First, I create a new tile palette inside tileclass folder:
then I drag and drop the tile palette inside my SampleScene:
it create something like this:
then I select the Layer1 and drag and drop a sprite in it:
then I copy paste the Layer1 and rename them all and use differant sprites for each:
then I try to drag and drop them into my terrain generation for using as tiles:
but it doesn't work
it's like they aren't considered as tiles.
notice how this is a Tilemap object so obviously wouldn't be possible to drag into a TileBase variable
how to make a tile for tilebase then?
following these instructions will create tile assets which you can then drag into the serialized fields of type TileBase
thanks
just need a yes/no for this
Maybe
Probably not by stacking, but perhaps by rendering one of the two onto a Render Texture and displaying that on the other
Does anyone know of a good (free) alternative to figma for 2D level design mockups?
Is anyone able to recommend any resources on building a beautiful 2d scene in unity? I am aware of tutorials that explain things like parallax, lighting, post-processing, etc but wondering if there are any resources which go through putting it all together to create something that looks good? I guess it does also not need to be unity specific, but more about the concept of building a scene visually would be helpful too
I have a background sprite and a clue sprite which are equal in size. How can I detect if the mouse is hovering over the clue sprite?
I Have the Image component "Use Mesh Sprite" set to true and the sprite itself has Mesh Type "Tight" and I use a GraphicRaycaster to detect what's under the mouse, but it returns true all the time.
How can I change the shape of the Image based on the sprites alpha?
You'd need to actually edit the sprite mesh, either by setting the bounds in the panel you're showing or using the editor tab.
For a project like yours, something like this might help https://github.com/sr4dev/Unity-SpriteAssist
mhh I edited the Custom Outline, it still detects the image over the entire screen. Is this even possible with UI.Image or should I switch to SpriteRenderers
How to make organic leves in Unity with Sprite Shape!
● Check out Skillshare: http://skl.sh/brackeys10
● Download Sprites: https://gumroad.com/l/OWUQQ
● Check out MortMort: https://www.mortmort.net/video-library/
● Join Discord: http://discord.gg/brackeys
❤️ Donate: https://www.paypal.com/donate/?hosted_button_id=VCMM2PLRRX8GU
...
guys i cant get this to work can someone help??
anybody got the aseprite files by chance
hey, im trying to learn how to make a simple game and i kinda ran into an issue. i need to splice my sprites, but there is no splice option in the sprite editor
Hey guys, anyone know how to stop this line showing up when painting with tile maps in 2D? Thanks!
check your tiles, maybe there is the problem
you have to switch sprite from single to multiple
I just put it into a atlas and that seemed to fix it but yeah
See pinned comment
Has anyone made rule tiles but with more than 8 adjacent rules?
no but do you really need 8? i usually neded 2 max 🤷♀️
At some point it might be easier to just place the tiles.
The point is to have it placed during runtime by the player.
Just 2? As in up/down and left/right?
hi can anyone help me add a simulator for Glaxy tab A7 lite pls pls thank you
I have a brass telegraph key in pixel art, and I'd like the light source in the room it's in to be a single light bulb hanging on a string from the ceiling
This is my first attempt at trying pixel art (also open to feedback in general I have no idea how to judge my own stuff) and I'm not sure if I did it correctly to allow for 2d lighting
I'm vaguely aware I'll need to set up a normal map for it, but should I have done the shading differently on the base sprite to make it look more flat for the lighting engine to do more work, or is this a fine amound of detail?
I though you was talking about extend neighbor
But if you meant 8 tiles then I worked with 20+ or sth
Ohh, i didn't use it for that, but you will have to definietly have a rule tile (check in scene if it's working correctly). Then search to how connect it with player actions
I really wish to could help, but i only done it for static grid
I made it an atlas and that worked do you know if there’s any downside to doing that?
Is there a way to stick one sprite to another?
So I have 2 game objects and I'd like one sprite be next to each other
So let's say I have 2 sprites like that:
◾⬛
And I'd like the right edge of the left square to stick to the left edge of the right square
I understand I can calculate it manually using the pixel per unit, sprite sizes and the scale. But is there some functionality in the editor to do it?
Imo the godot rule tile is better
the default in Unity is time consuming
How can I make this maintain pixel art aspects instead of squashing? I made a 9-slice gameobject, and I've seen 9-slice keep pixel integrity, I can't tell what I'm doing differently
Wait, nevermind, something erased the corners I designated in the editor, fixed
Oh yes 2 extensions I guess haha. I think I’ll go with one extension for now.
Is there a way to create a 2D expanding ring visual effect? As in, expanding radius, but constant thickness of the line.
There are lots of ways. The easiest would probably be an sdf.
On a tilemap there is one collider, which manages all the other colliders of each individual tile. how to i get the specific coordinates of the tile, when i hit its exact collider?
Use the position of the hit with Tilemap.WorldToCell
If necessary you can offset it by subtracting the normal vector* half the cell width too
yeah i did that worldtocell thing but it was always off, depending on where i hit the tilemap from. when i hit it from the left position it only gave me the coordinates fo the tile on the left and not the actual tile i hit. Is that where i need to substract the normal vector in order for it to function correctly?
That's why I mentioned the whole normal vector thing.
YOu have a RaycastHit2D right?
So like:
Vector3 hitPos = hit.point;
hitPos -= hit.normal * tilemap.cellSize.x;
Vector3Int cellCoordinates = tilemap.WorldToCell(hitPos);```
Basicallyt we're doing this. Green arrow points to the hit pos (the original raycast). Red arrow is the negation of the normal vector * half the cell width
ah thanks a lot! I will try it as soon as i can. chatgpt also told me about using a raycast but it never really detected anything.
ah ok. But does this also work wehn the object that colliders with the tiles doesnt really move, but rotate and then hits the tile? Its a pickaxe, that should rotate and when any of the upper part hits the tile then the position should be given back. Is that also possible with this code or does it only work with moving tiles, which are really facing towards the block
This code has nothing to do with anything moving
it's for a raycast
you could model your pickaxe swing with raycasts or boxcasts etc if you wish
otherwise you could use OnCollisionEnter2D if the pickaxe is a dynamic Rigidbody (unlikely)
ok. sorry i am not that big of an expert yet 😅 with unity or those components. Thanks for the help!
hey can anybody help me?
@static latch If you have a question, then !ask an actual question.
:thinking: Asking Questions
:mag: Search the internet for your question!
:book: Use the API Scripting Reference and User Manual and this troubleshooting site for commonly posted issues.
:wrench: Attempt to debug your issue.
:thought_balloon: Find an appropriate channel by reading the name and description in #🔎┃find-a-channel
:grey_question: And don't ask to ask, ask a full question illustrating with screenshots if needed.
-# For more posting guidelines, go to #854851968446365696
How do i lower trancperency? 2D game
Don't make people guess what you are asking. Ask a full question #🖼️┃2d-tools message
Can you provide an example? There are many varieties of pixel jitter
Oh right sorry, I was talking in the channel I had forwarded from: the jittery blur only happens while the player is in motion, as I've come to find it was because of the smooth time that I added to the camera, otherwise it looks fine. However, it would be massively unfortunately to have to drop this feature because it adds a lot to the feel of the game and the movement, so I was wondering if its theres known issues with having the camera not match up 100% with the gameobject its following while maintaining visual clarity.
-# I'll try to provide a clip of the blur, if you would still like one(?)
Yes, there's about a dozen or two types of pixel or blurry jitter from various causes
But I'd rather see some demonstration than explain them all
here it is With vs Without camera smoothing
The monitor I use Unity on is 144hz so it looks slightly different to me in-editor than this 60fps video, but the effect is still there, just not as blurry (presumably since its jittering more often on my monitor)
Indeed video captures that kind of jitter a bit unreliably, but I see potentially two types
If the player and camera are moving in different types of Update methods, mainly one in FixedUpdate and the other in Update (for example if the character is an uninterpolated rigidbody) that would cause one of them to update at much slower rate of the fixedupdate
The other type would be from if you're using pixel perfect component and camera smoothing, just in general pretty much
It often appears as "blurry" kind of jitter since it's so fast
The fixedupdate variety is more "choppy"
My camera follow script is currently using LateUpdate() and my player is using FixedUpdate()
I tried changing the camera follow script to use FixedUpdate()as well, but it led to visual distortion of the player sprite (seemed to stretch a column of pixels around where the yellow eye of the player is)
Would start by ruling out one so you can rule out the other one
I was told I should really always use LateUpdate() too so I'm really unsure as to how people typically handle this with sprites
And regarding the second message (I think), I am using Point (No Filter) on the sprite with no compression.
I'm not particularly surprised that there are visual issues with this when using no filter on the sprite but I don't see how else I can maintain the "pixel perfect" clarity of the sprite while also having the sprites be as small as they are (12x32)
FixedUpdate runs only at 50 times a second, or whichever your physics timestep is set to
In any case much less frequent than Update, so limiting the camera movement to that is a simple fix but not necessarily ideal
Usually with rigidbodies you'd enable interpolation so the visual position of the object is not limited to just 50 fps
But that also means you must only move the object using methods that don't override interpolation (and assumes you are using fixedupdate because your character is a rigidbody)
yeah the character is kinematic rigidbody2d
Pixel Perfect component is the way to render something pixel perfectly, as the name implies
It would solve the visual distortion
But unfortunately it's also a cause of camera jitter similar to what you've been seeing but a different type
Do you know of any appropriate approach to fix this issue then? Like I said, using FixedUpdate() did technically fix this issue but led to its own issues of distorting the width of the player when they were moving horizontally
That's a shame. Is there no example of someone making this work properly and having best of both worlds?
It would be a huge shame to have to shelve the camera smoothing
More or less yes
The issue is that it's a fundamental problem with no one clear solution, and it manifests in many different ways so it's hard to pin down
The jitter is an illusion that occurs when the camera and another object shift between screen pixels close in time to each other, but not at the exact same time
That happens either if their velocities relative to each other change smoothly, or if they have different sub-pixel positions even if they are moving at the exact same velocity
It's hard to create rules that ensure neither of those can occur
One way to minimize it is to simply minimize situations where the camera has to smoothly follow a moving object for an extended time
There's a reason why true pixel art games avoid that
do they? damn
well thats fine then, if its not something anyone has been able to do, then I can't feel too bad about it
i'll try to maybe give it a shot and see if i can find any parity but I probably won't put too much stock into it
Games that don't simply live with imperfect pixels, but they tend to not be very blocky / zoomed in
Another alternative is a shader based texture antialiasing like this https://assetstore.unity.com/packages/2d/smooth-pixel-209066
Since it's a type of blur, it won't work great with very low resolutions
I see, I'll have a look at implementing anti aliasing if I can't get my own attempt to work. Thank you for your help 🙂
Another more involved solution is to render all sprites to an RT texture together snapped to pixels, and then point the camera at that texture, so it's possible to move the camera smoothly separately from any pixel snapping logic
I think that particular asset was removed from the store, though
@opaque girder If you want to stick with unity's tools, there's quite a few resources on the forums from people analyzing and solving this particular problem by extending, such as:
https://discussions.unity.com/t/unity-cinemachine-2d-camera-having-a-weird-re-rendering-effect-after-player-stops-moving/939908
https://discussions.unity.com/t/pixel-perfect-camera-and-jitter/947095
https://discussions.unity.com/t/pixel-perfect-camera-jitters/948166/3
The second and third are for when you are using pixel perfect camera and cinemachine, but the logic is the same even withou cinemachine
First one is if you aren't using either cinemachine or pixel perfect rendering, just point filtered sprites
But getting it good is quite a rabbithole
If it were me I'd try to keep damping to absolute minimum to avoid messing with this stuff too much
What are the odds that this will also be an isuse if I have other pixel sprites moving while my camera is moving? For instance, enemies that are walking about while the player is walking the opposite direction
Jittering issues appear when any object is moving in the same direction as the camera, either at nearly the same speed or at a non-integer distance from it
Old game engines that weren't simply emulating pixels and didn't support sub-pixel positions still suffered from the first type of jitter
Actually the jitter was possible even if the speeds and distances were exact, but they were moving with a different timing
If it takes for an object 10 frames to move one pixel to the right, and for a camera also 10 frames to move all objects in its view one pixel to the left relative to it; yet one of them starts moving 5 frames later than the other so the result is that from the camera's point of view the object moves a pixel back or forth every 5 frames
The smaller the time difference is, the blurrier it seems
Idk if this is the right channel (if not, which one is?). Is there a way to create a vertically scrolling background out of different textures with different height (one texture at a time/per level, but all the images have different sizes) without any of them being squished?
I was using the method of just putting the texture/material on a 3D Quad the size of the screen/camera that's slightly behind the main 2D playing field, but I just now realised that taller textures get squished down to the height of the screen.
Is there some property on the texture/material to make it scroll at its proper size, or do I need to do something else entirely?
After some more messing around, I can actually answer the question myself in case anyone else is wondering. By setting the Y-Tiling property in the Material to the ratio of (screen height/texture height), it keeps the proper height.
hello, very new to all of this but wondering if I can get help... Why do my "half-grass" tiles appear "on top" of my "grass" tiles. I thought it was due to the asset I was using but I've tried different ones so now I'm lead to believe its because I'm not setting up something correctly... Can someone help me understand how to get all my tiles appear on the same "layer"?
How are you sorting them?
the layers?
The tiles.
I feel like there was a way to select a tile asset from the tile palette, like open it in the inspector but I can't find it. Is that real? or am I making it up
I do think thats related to my problem but I can't find anything like this
oh well still anything would be helpful lol
are your sprite pivots set up properly?
did you make this asset? what parts did you make?
I made these specific ones
what do your pivots look like
I have to read up on pivots... I've never messed with them
here right?
Hello friends, I am trying to create a simple 2D unity game and I am having quite a bit of trouble getting my tilemap to render correctly, any help would be greatly appreciated!
Firstly, if I load in the tilemap and start moving my camera around, I am getting quite a bit of tearing between tiles. The game mostly looks good, but every few seconds some tiles will tear, briefly flashing gaps/other artifacts.
To fix this, I changed the material on my Tilemap renderer to be a custom one that has Pixel snap on, this seems to fix the artifact issues, but has created an odd, new problem. In game, my tiles have pixels from their neighboring tiles rendering on screen. it is as if the tiles are off by one pixel on the bottom, but this is not visible in the scene mode nor is it visible on the tiles. Any idea how to solve this?
My best bet for the above is that some of my tiles actually have some floating point value for their pixel location?
The "tearing" seems to happen with certain tiles, but not others. These tiles seem to be the same ones that show the odd artifact of the neighboring tile when Pixel snap is on.
How do I create a simple 'Tile' to use for my terrain generation?
I have a Tile Palette and I added my sprite in it, now what do I do?