#๐Ÿ–ผ๏ธโ”ƒ2d-tools

1 messages ยท Page 9 of 1

modest cargo
#

This for a top right outer corner

modest bloom
#

and not a box

#

how do I make rules to put the outer layers black

#

bc like it can be any direction empty

modest cargo
modest bloom
#

something like this

#

this is how they are with the tilemap

modest cargo
#

You could extend the edge far out or cover it with something
The rule tiles can't really know whether the edge is on the "outside" or the "inside" of your level

#

Because as far as tile rules are concerned there is no difference

modest bloom
#

also they have a tilemap collider composite

#

wont it be bad for performance

#

if I have lots of tiles

#

or is it well optimized

#

and doesnt rll matter

modest cargo
#

Maybe if it's a complex collider shape or if you're modifying the tilemap often

modest bloom
#

this is the setup

#

also Im working with navmesh

modest cargo
#

Unity's navmesh doesn't inreact with physics at all, unless you've enabled the option for dynamic colliders to carve holes in the navmesh or be avoided by agents

#

And they only interact with 3D colliders and mesh renderers anyway, afaik

modest bloom
worthy hearth
#

Hey people, does anyone know any project that used 2d skeletal for a top down character

#

Im planing on implementing in my game, would like to know If this is a good idea

modest cargo
dim cradle
#

Hi All !

I am developing my 2D Game (it's a pixel fight game) and i am thinking about using the 2d skeletal animation technique but i am not sure if it's the best idea to do that .
so my question is: should i use the traditional 2D sprites animation or the skeletal one ?
(it's to animate this style of character )
( I created this one on Illustrator )

modest cargo
#

Illustrator would be my last choice for making pixel art
Even MSPaint would likely be better

dim cradle
modest cargo
dim cradle
eternal hatch
#

Could I make this without using mask?

#

I have squared textures

#

I have sprites of polygons (hexagon, etagon and 10, 12, 16 and so on)

#

What I need to do is to add texture on the sprites

#

Could I make this without using mask?

modest cargo
eternal hatch
#

I have almost 50000 game objects (sprites to crop)

#

Then, there should be 100000 game objects to do it, right?

#

A performance issue.

#

Am I correct?

modest cargo
#

Well, performance is not so simple, but possibly

#

50 thousand sprites on screen at the same time? What does that look like

eternal hatch
#

Most of them are disabled in most of time.

#

Only some of them which are in players vision are visible

#

I am implementing a kind of Object Pooling

#

I instantiate all game objects at start time

#

And enable/disable them needed

#

So many instantiating and destroying could be a problem also, so....

modest cargo
#

Object pooling would eliminate the need for thousands of disabled gameobjects since you'd only need as many total as need to be visible at once

#

Disabling instead of destroying alone isn't pooling

eternal hatch
#

So you mean I can reduce the count of total objects in the scene? Only visible objects?

#

When I move to other region, some objects should be visible.

#

How could I make them visible?

#

Hello @modest cargo

#

I have another question

#

How could I resolve this?

#

Please please help me to do this

#

I am almost terrified.

modest cargo
# eternal hatch How could I make them visible?

Well, agario is functionally an mmo
it only needs to send the client the player positions that are possible to see at its given size, the client wouldn't have to run any monobehaviour scripts on the players
Since there could be many players almost too small to see, they probably won't need sprite renderers either
They could be rendered cheaply with gpu instancing without requiring any animation

#

Google drive is awful for hosting video, it doesn't even load for me

#

The game you're referencing is way more complex than it appears on the surface

eternal hatch
#

Thank you for your advice.

eternal hatch
#

Hi @modest cargo
please check this video and give me a good advice

modest cargo
eternal hatch
#

I made the grip using shader graph

#

I do not have the option you are saying

#

The size of grid map is height = 2000 and width = 2000 (in unity unit)
And the cell count is 1000 * 1000, so I used shader graph for this grid map

modest cargo
#

The problem is trying to render grid lines between pixels and smaller in width than a pixel

eternal hatch
#

I have a very large grid map, obviously

modest cargo
eternal hatch
#

But I prefer mipmaps.

#

So I will try with mipmaps first

#

Thank you for your advice

#

But in that case, do I need to have a very very large texture?

modest cargo
eternal hatch
#

I have 1000*1000 grid squares

#

I think

One texture has 100*100 squares
I have 10*10 textures on a scene

Is this okay, do you think?

modest cargo
worthy hearth
fading python
#

Hey guys, how do I make the tilemap transparent so that the player can walk through it?

modest cargo
modest cargo
strong knoll
#

im having trouble with my 2d sprites inside my 3d unity game

#

can someone give me a solution?

fierce lichen
#

tiles with a negative z axis begin to disappear if you zoom in on the camera

deep rivet
#

Hi guys, I am working on a pixel art game but I faced a serious problem. I am really struggling to properly size my assets relative to the screen size. The assets look decent, I used a consistent palette and size, but they still look bad. I googled around but didn't find anything relevant. Do you know any good resources on this ?

modest cargo
#

Depends how you want it to function

modest cargo
deep rivet
#

they look kind of small. I use 32 x 32 pixel art and they take up a lot of space on screen, but each individual pixel looks small and blurry

#

and before you ask, all the settings are correctly set ( PPU, filter mode and compression )

#

I really enjoy the look and feel of pixel art, especially in games such as Stardew Valley, where the colors look so alive. I understand I won't be able to get that level of quality in my assets as a beginner, so I tried a monochromatic palette

modest cargo
deep rivet
#

It's probably very frustrating for you, but I don't think it's a problem that can be solved with some settings

modest cargo
#

It could be a visual design issue rather than a technical one, just as well

deep rivet
#

that's what I mean

modest cargo
#

In either case showing an example could be very helpful

deep rivet
#

sure

#

the thing at the bottom is supposed to be an inventory bar

#

to me, the UI looks way bigger than it should, but scaling it down makes it hard to see

modest cargo
#

Assuming this is from the Game window at 1x zoom level I do see a technical problem
The sprites aren't rendered in a pixel perfect way, meaning the screen pixels and sprite pixels don't line up in position or scale

deep rivet
#

I will probably switch to a pixel perfect camera once I figure that out

modest cargo
#

For example the blue orbs' PPU is not consistent with the other sprites, that would be a problem

#

Designwise I think it looks fine, nothing really wrong with it
Maybe the purple parts could use some more hue variation and less contrast, but that's up to your artistic eye really

#

What's there is good, adding more stuff and testing visual clarity in play will give more clues about what needs to change, if anything

deep rivet
#

ok, will try that out

#

thanks

modest cargo
#

I also recommend trying out less noisy shading, either as excercise or to contrast the ragged looking surfaces
It's a look that stands out though

deep rivet
#

i see

#

I did it like this beacuse I didn't really know how to add some detail, and lower sizes don't give me to much space to work with

modest cargo
deep rivet
#

is there any specific tutorial / guide that helped you ?

fading python
modest cargo
fading python
#

What collider do I need?

#

and where sprite/tile color's alpha channel value?

modest cargo
# fading python What collider do I need?

"Objects passing through each other" is way too generic thing for me to recommend anything specific
You'd either disable one of the colliders involved entirely, or according to specific terms

modest cargo
modest cargo
# strong knoll

2D Sprites are not really intended to be used in a 3D scene, which is apparent due to how they are sorted on a per-sprite basis according to their pivot point's distance to camera
Probably the ideal solution would be to give them a non-sprite 3D shader that uses opaque sorting instead of transparent

bleak oyster
#

Does anybody know why my Tilemap Collider 2d is not calculated correctly and how to get rid of this problem?

modest cargo
bleak oyster
#

That was exactly what I needed, thanks!

restive jungle
#

not sure if this is the right place to put this... I have a script that "paints" a blank sprite. When a raycast hits the collider it applies paint at that point. Is there a way to check that sprite's pixels to see how much of that sprite has been painted on? I need to check every pixel to see if alpha is 0, just not sure how to structure that, trying to get the code put in here but Hastebin isn't working

fierce willow
#

Having an issue with Steam Deck and the pixel perfect component - it doesn't seem to be rendering the game at 1280x720 even when it's set to do so in the Steam settings, as the game is using the Retro AA filter mode. Reference resolution is 640x360 so it shouldn't be doing this, surely?

modest cargo
fierce willow
#

This one here

#

If I don't set it to "stretch fill", the game will render at it's reference resolution and not upscale at all, meaning the UI is set correctly but the game window is half the size it should be on the Deck

#

No issues whatsoever on any of the other platforms I've tested

modest cargo
fierce willow
#

The problem visually looks either like the game view itself is half the size it should be, but the UI scales correctly

#

Or if I use stretch fill, it uses the filter mode (which it should only do if the resolution is off)

#

But the steam deck is a 1280x720 device, so I really don't understand

ornate rock
#

How come my 16x16 size pixel art seems to... distort? as evidenced by my video here? Resolution is 1920x1080 or so, and I also have "Pixel snap" enabled in the materials of all of the objects, for reference.

fierce willow
ornate rock
#

Oh, sorry. Let me try that again. I tried to use a build of the game.

modest cargo
# ornate rock

This happens because the camera's sub-pixel position and scale relative to the sprites is not pixel perfect
Pixel perfect camera component and its workflow would be required to fix that problem definitively
Frankly I don't know what the Pixel Snap material option does, but in my tests it makes this particular problem worse if anything

ornate rock
#

Already tried that. It seems to make the camera jitter around whenever the character moves. I'm not medically affected by it, but it is more of an annoyance.

modest cargo
#

Any two objects (such as player and camera) that move nearly but not exactly at the same rate will jitter relative to each other as they snap to pixel increments at different paces multiple times a second

#

Even the natively pixel perfect games of old had to work around this effect

#

Another option is to abandon pixel perfectness and use a sprite AA shader instead

fierce willow
modest cargo
fervent moth
#

I'm gonna use Tiled to make maps for Unity but I have a problem related to Tiled rn, is this a good place to ask or should I go directly to Tiled community/support

#

It's behaving in a weird way

fresh vortex
#

How can i place text in the world? Im using a world space canvas but the text is in a different place in both the game and scene veiw

sly elbow
#

I'm having issues figuring out the rules for these three tiles. The one with the checkmarks I managed to auto-tile., can anyone help me with what the combinations are supposed be

modest cargo
#

The rules on the tile below should be the opposite of the one above

sly elbow
modest cargo
#

im having this issue with it idk if its

ornate rock
modest cargo
ornate rock
#

Yes.

modest cargo
ornate rock
#

It seems to happen on the player character, too. It also seems to happen on odd-numbered resolutions.

modest cargo
#

If the issue is same as mine here, that can be fixed by using sprites with padding / margins

#

this is after adding padding to the tile sprites with the help of generating a sprite atlas

ornate rock
#

Last I remember, a sprite atlas only made it WORSE for my new pixel art.

#

The black parts on the sprites (not counting the door) aren't supposed to be here.

modest cargo
ornate rock
#

It didn't seem to get rid of the issue entirely.

modest cargo
#

Is the texture AA visually functioning?

ornate rock
#

Stretchy and squishy pixels. The seams I got rid of already.

#

For the most part, it seems to.

#

Oh, wait. The AA texture seems to bring the seams BACK.

modest cargo
modest cargo
modest cargo
# ornate rock Try this.

It doesn't look like smoothpixel is enabled or functioning here
We'd expect to see at least one pixel wide blur at the pixel boundaries

ornate rock
#

Well, no, because here, the filter mode is set to "Point" because Bilinear brought the tears back.

bleak oyster
#

Is there a way to increase brightness of a sprite (e.g. that I use for a parallax Background to fade it out)? I know that I can use color (see Screenshot) for some color modifications, but this usually darkens the sprite. If set to #ffffff it is basically simply rendering the original color.

solemn latch
cloud silo
#

very beginner question but if i wanna have a mostly geometric looking artstyle, what kind of tool/asset/import would i use? Idk how to even ask the question, if i wanna have for example just an asset that's the > symbol, looking crisp, would i just draw it in like PS and then import it with decent res? I'm from a webdev background so for this kind of stuff we'd just use an svg for example

#

the pinned message for vector graphics says the package is experimental and not recommended for production, so im not sure if that's the way to go

modest cargo
#

No reason you can't import simply them as raster textures, but a problem could be that Unity doesn't use any real image resampling for textures that are rendered at non-native size

cloud silo
#

i'm open to learning, i've just never really messed much with art and occasionally i import assets and they come out blurrier than i want the game to feel haha

#

but at the same time i wouldn't wanna just have an absurd res to make up for it

modest cargo
#

Upping the resolution doesn't help

#

Textures rely on mip maps when rendering at non-native scales
Mip maps are pre-generated downsampled versions of the texture, in multipliers of powers of two

cloud silo
#

that makes sense

modest cargo
#

iirc by default with bilinear filtering when a texture is shown at below native size it uses the next lower mip level, so the resolution drops significantly
Trilinear filtering blends the two nearest mip levels together proportionally and looks better, but both are still incredibly blurry compared to real image resampling algorithms that image editors use

#

The exception to this is rendering an image at exactly native resolution, or at exactly the native resolution of a mip map, so 50%, 25%, 12.5% and so on

#

UI images also have the option of pixel perfect / pixel snapping that reduces blur further
But it's all kinda kicking the can down the road

#

Player screens are often different sizes anyway so you don't practically have perfect control over the display resolution

#

Mesh geometry doesn't suffer from any of those problems

#

Vector graphics package has tools to convert to raster images, which might with luck have a way to enforce native resolution rendering, but it also recently seemed to have gotten vector rendering tools

#

Third option for crisp images could be to create them procedurally with shaders, avoiding texture limitations

cloud silo
#

would you recommend the third option, or does that come with severe complications since i imagine i kinda have to mathematically describe my shape (which is probably possible for some of the simpler ones, but would get more complicated for more complex designs)

modest cargo
cloud silo
#

yeahhh

modest cargo
#

Shape complexity itself isn't a problem though

#

TextMeshPro uses this to render its fonts at "infinite" resolution

cloud silo
#

gonna read more on this, thanks a lot!

wraith bay
#

this is going to sound like a noob questions,
but is there no suc thing as a water texture?

Are you suppose to use other textures and then paint them blue to simulate water?

#

most sites are see, dont really have a water texture

abstract olive
#

Water typically does not use a "water texture", no. But it depends on the look of your game.

modest cargo
tranquil dock
#

Super dumb question but i can't get my camera to be of android portrait orientation, i did change it in player settings and even changed the resolution

open oracle
tranquil dock
#

i figured it out, just forgot to change it in the game window itself xd

wraith bay
#

the water is so nice and simple but yet as detail

modest cargo
# wraith bay I was looking for something like this

Most likely overlayed animated normal maps which form the moving waves, and bend the reflection from the sky/sun
That's usually how it works in 3D games like that one
2D games more commonly use a simple texture or some kind of distortion

wraith bay
modest cargo
strong island
#

Hi guys! Sorry if the question doesn't belong here. I have a problem where my tiles are 32x32, and they are set to 32 pixels per unit, and my player prefab also uses a sprite of 32x32 and it also has its pixels per unit set to 32, but for some reason my player is way bigger than a tile, I have to scale it down to 0.1, so any ideas why I have to scale down the player to match the size?

golden harbor
#

I haven't been able to find anything that really answers (or at least explains the more complex workings of this) but I'm looking for a way to have sprites (more specifically tilemaps rendered as chunks) behave closer to a 3D plane with a textured applied than the default behaviour using a strict render order

#

I still want to use the tilemap rendering system because it's helpful to have less important textures take up a small 256x256 png than a whole full size texutre.

quick badge
#

Hello. I am having a problem with my character getting stuck in between tiles sometimes. I have found online that the way to solve this problem is to enble Used By Composite in the Tilemap Collider 2D, and set the Geometry Type in the COmposite Collider 2D to Outlines. (I have tried Polygon and Outlines though). I am now falling through the Tilemap Platforms, and I am not sure what I am doing wrong. I have edited the Sprites using Custome Physics Shape, and I don't know if that is causing the problem, or if it is something that I am missing.

golden harbor
#

I had to set "pixels per unit" to 100 as a way of saying the tile had a 1:1 scaling for my tiles which were 128 pixels. That is to say my tiles were designed for 1.28 unit sized tiles

proper solar
#

How do I import this sprite character in my unity, I don't know how I'm gonna slice the the character right per frame

#

I tried 16 x 32, 32 x 32, 32 x 64 and 64 x 64. all of them didn't work

proper solar
#

I need help immediately, how will I be able to slice these all apart in unity?

modest cargo
modest cargo
proper solar
#

Should I just set it to auto?

#

Though I was able to slice it apart properly but I have a problem with collision

modest cargo
#

Automatic slicing produces totally subpar results if you've got any kind of sprite sheet animation

proper solar
#

Do you have to have at least a knowledge with measurement stuffs to do it right?

#

I'm a bit confused with pading/offset and I don't know how they work

modest cargo
#

It can be hard to know exactly what those values are for each sprite sheet but once you know what size the character likely is, you can pretty easily trial and error the padding/offset and keep adjusting

proper solar
#

Thank you so much for explaining, I will take note of this

strong island
solemn latch
proper solar
waxen blaze
#

there any good vids compairing unitys built in 2d rigging and animating compaired to spine pro? only one i found was 4 years old, so hoping unity has sorted some of those bugs out,

golden harbor
#

I'll try and get an actual in game example tonight but it was pointed out that I could always change the shader a specific sprite or tilemap uses

modest cargo
#

I didn't understand the part about "less important textures" or "whole full size texture"

golden harbor
#

wario2 I'll try that out

#

I guess that was less important information but my point was I still wanted to use billboarded 2d tilemapa despite it being a 3d game

torn axle
#

Why is the right bottom corner is sliced by what seems like a polygon

modest cargo
torn axle
#

Outline. Okay. Well, i reimported the image and it fixed itself, after a crash while trying to save it ๐Ÿ˜‚

#

Thanks for the help, I'll remember your insight

woeful fractal
#

how do you determine what the pixels per unit should be? if I used a 64x64 pixels canvas for creating my main character, should the pixels per unit be 64?

quaint galleon
#

so i made a bunch of decorative foliage, and was thinking about how best to use them

#

is there any nice tool for just placing decorations?

#

like the tile palette but not bound to a grid

golden harbor
solemn latch
#

So a sprite with half the PPU will have pixels that look twice as large.

eternal hatch
#

Hello

#

Hope you are doing well~

#

I made a grid using mipmap

eternal hatch
#

But now I have another strange problem

#

The texture is very clear and working correctly [Left Image]
When I zoom out a little, the center part of texture is blurred and vanished at all [Right Image]

#

Is this normal using mipmap?

modest cargo
# eternal hatch

I don't recognize this from the appearance but I'd try different mip map filtering options, whatever they were

modest cargo
eternal hatch
#

Okay Thank you @modest cargo I will try the options

eternal hatch
#

I tried to resolve by changing each options, but could not.

#

Even in scene view I can see the vanishing effect

#

When I zoom in I can get the original clear grid

#

This must be related with mipmap because mipmap is for smaller resolution than original resolution

modest cargo
#

Mip map levels are half the original texture's resolution
Your texture is non-power of two and has odd numbered dimensions so it may be possible that mip maps aren't being generated, or not generated properly

#

Always use PoT dimensions if you can

eternal hatch
#

Thank you very much. I will try

eternal hatch
#

When I tried 1024 * 1024, it worked correctly

#

Thank you very much @modest cargo

stray turtle
#

how do I set the width of this 2d camera?? it keeps scaling width with how big I make the window
ex.

modest cargo
#

To enforce a specific aspect ratio I believe you'd have to use the pixel perfect camera component with borders, force the game to run in a window or use a UI canvas with black bars that cover the outside of your virtual window regardless of the user's screen's resolution

#

Unity is generally intended to adapt to all resolutions and change the camera width accordingly

stray turtle
#

ok I see

#

so if the user has a tiny game window and cant see all the components properly? thats just a them problem

quick badge
#

Hello. I am having a little bit of a problem with my character getting stuck on tiles on a tilemap. I have tried multiple solutions like using a capsule or circle collider on the player, but the problem that I am having with that is when I get to the edge of a platform, my character slides off, so I don't like that solution. I have found this solution mentioned a few times on some forums and on Reddit. It says to turn on Used By Composite in the Tilemap Collider 2D, and the Composite Collider 2D will turn the Colliders into one Collider on each of the platforms. I already had a Composite Collider 2D on my platforms because I am using a Platform Effector 2D on the platforms.

The problem that I am having is when I check off Used By Composite, the Colliders on the Platforms disappear. I have tried both Outlines and Polygons Geometry Type in the Composite Collider 2D, with the same results. One things I am doing is on the tiles in the Sprite Editor I did a Custom Physics Shape, because I was getting stuck on the platforms sometimes when jumping down, which I have to use IgnoreCollider on my player when jumping down to allow my character to jump down, because if I use the effector for that, it will cause my enemies on the platforms to fall through.

Can anyone tell me why the Collider is disappearing when I enable Used By Composite, but people in the posts that I have seen says it works great for them.

I appreciate your time. Thank you.

unborn siren
#

Hey, my png files for my animations seem to be getting compressed/distorted, despite me setting the compression option to "none" on the file. Anyone know how to fix this?

woeful fractal
modest cargo
#

What you're describing "should not" be happening from the sound of it

woeful fractal
modest cargo
#

And the same PPU

solemn latch
mild pewter
#

Hello, I just started using Aseprite Importer to manage my spritesheets - it's way more convenient and way faster to just have the .ase file in my project and plug those sprites in directly (All you have to do in asesprite is save and all edits will automatically apply to your unity assets). Rather than keep the .ase file external and import the .png. But is this a noob move - the .ase file is quite a lot bigger than the equivalent png file (16 MB compared to 6 MB in some cases)

#

If you pixel devs could share your workflow as far as asset importing and etc., that would be very nice!

#

(or not even necessarily pixel, just 2d in general)

unborn siren
#

I just started using Aseprite, so this is my first time exporting any sprite sheets. I exported it as a png although I don't really know the advantages or disadvantages of exporting it that way

modest cargo
mild pewter
#

Weeeell when I say pixel I mean like 550x550 ๐Ÿ˜“

#

I have one that's way bigger that has all the rule tiles for a hex tile...

modest cargo
#

Consider ways to reduce the need to store that much individual pixel data? A lot of things can be generated on the fly or rendered procedurally

#

Hard to say without knowing what's in there

quick badge
solemn latch
#

I am not sure how the ase importer handles it but worth checking.

solemn latch
#

Usually it is just stuff in the /resources folder that is left in its original format, but specific filetypes might be handled differently so testing it definitely the way to go.

#

But that's why most peeps use uncompressed PSDs and PNGS instead of jpgs, for instance. The size of the final asset is determined by the import settings for your platform.

modest cargo
#

Crunch compression can help with build sizes but if you use big textures you'll have to store big textures
Image formats for web generally benefit from much smaller file sizes

waxen blaze
maiden patio
#

is there an efficient way to add animated tiles to my tile pallette or do i have to add them as separate objects? (sorry if this is the wrong channel to ask this)

open oracle
open oracle
#

yeah it's this one

#

Tiles: Animated Tile, Rule Tile, Role Override Tile

maiden patio
jaunty sequoia
#

how can i make Open Sprite Shape2d work with rays

solemn latch
#

Add a collider, probably.

unborn siren
#

I've been experiencing a problem with Unity where my sprite is being shifted/distorted in the game view. Also, a few pixels occasionally flicker behind the sprite as well. Does anyone have any idea how to fix this problem?

modest cargo
#

If it happens even with 1x, 2x or 4x zoom levels then you should look into using the pixel perfect camera component

unborn siren
#

Just used the pixel perfect camera component and the the image is no longer being distorted. Thanks!

modest cargo
#

"Custom outline" can be used to crop slices in a tight way

random canopy
#

I've painted with a tilemap and pallet before, but I can't get it to work in my current 2D project for a gamejam (i'm normally a 3D VR guy). Can someone see what I'm doing wrong?

#

i think i solved it. Each sprite I drag into the tilemap, it creates a .asset now. it didn't do that for the previous tile pallets I tried creating

random canopy
#

yeah. i'm good now

gleaming harbor
#

Hi all, couldn't find anything on google, is it possible to draw tiles that are not aligned with the grid ? for decorations for exampe

still tendon
#

you can modify their positions by adjusting their Transform component in the Inspector window

gleaming harbor
#

thats kinda jank but works ig

bleak flume
#

You don't HAVE to use the grid if you don't need it basically

solemn latch
#

You can also change the sprite pivot, if you want it to still be related to the grid but at an offset.

#

(For instance placing decorations at tile corners)

gleaming harbor
#

I ended up just placing gameobjects on the scene

small stream
#

is ther a way to delete slices in the sprite editor

gleaming harbor
# small stream

Did you try selecting them and pressing the delete key on the keyboard ?

#

I personally havent needed to do that yet, but seems like a logical thing to try

small stream
#

my goofy ass kept using backspace

#

i thank u phone headed person

gleaming harbor
#

๐Ÿ’€

#

ur welcome friend

little void
#

Beginner question!

I have a 2D game w/ parallax backgrounds, the farthest back of which is completely static and unmoving. I want to use an orthographic zoom-out, which currently zooms out on everything- including that background.

I'd like the zoom to not alter the depiction of that distant background. What method would best accomplish this?

(One suggestion was to place the background on a canvas image that is drawn to screen-space, which I've tried, however I can't seem to get it to render behind everything else, even when setting the canvas's sorting layer to the far back.)

modest cargo
#

Alternatively you can use a script to scale the parallax images as the camera scales

tranquil vine
#

anyone know why this could be happening? the character is a sprite which renders behind a quad like normal, but when i add a material i made it renders in front of it

#

and it only does that id the material's surface type is set to transparent

#

nvm fixed it by using the unlit/transparent cutout shader ๐Ÿ™ƒ

distant spindle
#

Can anyone help me explain what Pivot in Sprites means? I'm having a hard time understand what it doesn, searching the document doesn't give off much info either.

Sprite Mode > Pivot

modest cargo
distant spindle
modest cargo
# distant spindle Not really. Can you recommend some articles for further reading? Thank you ๐Ÿ™‚ ...

Hmm I'm not sure if there are articles about it exactly
It's simply the local zero coordinate or "origin" of a sprite that it visually exists relative to
It's called a pivot point I assume because when the sprite is rotated, it pivots around this point, and additionally scales away from /towards this point
Because of this you may sometimes see systems that allow multiple pivot points for a sprite, even if the asset itself can only have one true origin
In Unity nested Transforms act like pivot points and that's also what pivot point sometimes refer to, though in technical terms Unity only refers to sprite origins as "pivots"

bleak gorge
#

I'm testing out the 2d animation package, but the selections in the sprite editor seem super buggy. Any idea how to resolve?

#

For example I can't click on bones in edit mode, and if I try to make an area selection, it just shows this turqoise area that you see in the screenshot above

bleak gorge
#

I guess it's just an issue in the 2022.3.4f1 version I'm using. ๐Ÿ˜ฆ

#

Makes it pretty much unusable

#

Wait why the fuk aren't I using 2023... Just created a new project with the older version by accident heh

#

Let's see if it works in 2023

#

Heh works like a charm

#

Spent an hour on that

bleak gorge
#

Any idea why I'm getting this error message when using the default sprite shader/material?
" is using a shader without GPU deformation support. Switching the renderer over to CPU deformation."

#

At first the skin seems to be working properly, but after playing, it somehow loses the connection from the sprite renderer to the skin/bones, so the sprite doesn't deform anymore via the bones

#

When I open re-open the scene, it seems to reset something and it works again

modest cargo
#

Patching the editor doesn't tend to break stuff
Upgrading to another version, especially a tech stream, might

opaque hawk
#

Hello working on a chatbox my Text(Legacy) dosent get displayed whenever I start the scene however on the right Inspector I can still see it being changed, what can cause it to make the text disappear? Whenever I start the scene it begins to change in the inspector but the text in scene just dissapears

hollow crown
bleak gorge
#

Or drawing order issue?

#

Probablyy alpha 0 though

bleak gorge
bleak gorge
#

Happens when having a sprite skin and running the game normally

modest cargo
#

It doesn't sound like a significant problem that the renderer falls back to CPU deformation
I think GPU deformation may be a new feature that the shader might not support yet, or broke if you upgraded

bleak gorge
#

So I have to re-open the scene in order to have the bones "attached" again

#

When I play it, the animations work properly during play. But then I stop, the skin-bone connection is lost, and it won't play again on Play either

modest cargo
bleak gorge
#

2023.1.14f1

modest cargo
#

No idea, I'd test if the problem occurs in a newer LTS editor
2023.1. could still be rough

bleak gorge
#

Newer LTS editor?

#

Latest LTS is 2022.3.10f1

#

I'm wondering if I could somehow make a sprite shader that somehow would have GPU deformation support

#

and see if that'd fix it

#

But no idea where to start with that

modest cargo
modest cargo
bleak gorge
#

Hmm yeah good idea to test in a fresh project. Although my current project is fairly new and clean to begin with

modest cargo
#

It did go through an upgrade though as I understand

#

Not a process I have a lot of faith in, especially with SRPs

bleak gorge
#

Also I'm using URP

modest cargo
bleak gorge
#

Oh right, that's true

#

You've been paying attention!

#

@modest cargo created it and tested. I am getting the same error, but the "connection from skin to sprite" is not broken, so this would be a perfectly OK solution for me. Maybe this also proves that the warning isn't related to the "connection issue"

modest cargo
bleak gorge
#

At this stage I don't care about the performance, just prototyping silly stuff

#

But this "connection issue" is then perhaps somehow caused by me upgrading the project... ๐Ÿ˜

#

Deleting Library probably won't fix it...? Well, worth a shot

#

Nope, didn't help

#

Ehhh... I made the object into a prefab and that seemed to fix it

modest cargo
bleak gorge
#

Yeah kinda impossible to debug, but at least if the workaround works that I just found, I can work with it

#

Thanks for your help @modest cargo

#

This is my joy fella saying thanks

celest gulch
#

any idea how I might make this polygon collider2d work here?

#

not bones, just a lotta objects placed that have sprite renderers

bleak gorge
#

What do you mean? Work how?

celest gulch
modest cargo
bleak gorge
#

Yeah I would probably go for a box collider with your chatacter

#

No capsules in 2d I think

celest gulch
bleak gorge
#

It wonโ€™t, but Iโ€™m fairly sure you donโ€™t want that to begin with

celest gulch
#

Box is better ofc, but figured I didnt know why it wasnt working anywya

bleak gorge
#

Basically because of what Spazi said

#

It will take the shape of the sprite renderer you attach it to

#

Or more speficially the renderers physical shape that can be edited in the sprite editor

celest gulch
#

Is there a way to enable seeing all colliders?

#

not sure how these 2 are being forced so far apart

bleak gorge
#

At least by selecting allโ€ฆ

#

In the game view I think thereโ€™s an option to view gizmos (incl. colliders)

#

Cute doggo btw

solemn latch
#

And yes, like eeik said you'll also need gizmos enabled

flint wyvern
#

How to solve the skill cooldown problem

modest cargo
flint wyvern
#

When I press the key to use the skill but the problem is when I keep pressing key the skill will conduct until I release the key

#

l want give it a limit about the time

flint wyvern
#

How to control the function conduct once per second

modest cargo
flint wyvern
#

I had asked ChatGPT but it didnโ€™t work well

modest cargo
flint wyvern
#

So,whatโ€™s your opinion?

modest cargo
#

And maybe even if you aren't

shut hatch
#

My mobile game, which I bought webgl build, shows characters as blue squares in places such as google, opera, yandex, but it looks normal in the browser named FireFox Focus, how do I solve this?

modest cargo
sullen copper
#

is there a reason why the sprite renders so weirdly

#

it like goes it waves like what

#

my life will literally be so happy if it just stops doing that

#

ok i found out rigidbody2D was doing it

#

setting it to kinematic worked

bleak gorge
# sullen copper

Are your textures set to Point filtering? The 'cause for that in general is probably that the object is moving so ever slightly, so the renderer is trying to figure out how/where to draw those pixels

sullen copper
#

oh no i fixed it for some reason rigidbody2D dynamic on a sprite does that

modest cargo
bleak gorge
#

@modest cargo the "disconnect from bones/skin" issue is back. ๐Ÿ˜ข

#

Not expecting you to resolve it, just saying

#

Made a new project and just copied the minimun necessities and the same happens

#

Boo

bleak gorge
#

Any ideas on what I could try to remedy this issue?

#

If I reopen the scene, the skin works again until I hit play and stop

#

The plot thickens... but it's really hard to even describe what happens currently

#

I made a script that reloads the current scene when stopping the game, which fixes the issue, but comes with other issues like the entire hierarchy of the scene gets closed and your previous selection is lost etc...

#

I wonder what kind of "updates" I could try to do when entering edit mode that would somehow "rebind the skin"

#

The culprit has been found!

#

I need to have this "Reload scene" enabled

#

And the issue disappears

#

@modest cargo party time!

modest cargo
bleak gorge
#

Pretty much yeah. Figured that it had something to with scene loading, and then remember I had set these settings by hand

solemn latch
#

Why did you disable domain reloading? That is the 'reset all scripts' setting, and if it is turned off you need to add provisions to handling anything that does need to reset.

#

2d bones are updated via script so I could see that causing some weirdness

modest cargo
solemn latch
#

Yes, but what I'm saying is that 'stuff not properly being reset when leaving playmode' is exactly the sort of error that you expect from the domain not being reloaded.

#

And 2d animation package is buggy as fuck already, frankly.

bleak gorge
#

However having scene reloading on isn't causing much slowness to the workflow really, it's the domain reloading that makes things super slow

velvet hollow
clear ermine
#

I just don't know where else to put this, but I could use some guidance.

I have a 3D game where the player's inventory is represented by a hand of cards. I keep running into limitations with how I'm handling the cards. At first I tried UIElements, but that was bad. Next I tried UGUI, but this ran into issues with it not being possible to interact with 3D space. Currently, I'm just trying to make them physical objects as spriterenderers. I'm running into an issue with layering sprites. The parts of my card are dynamic (think background vs image) and as such, I set the order for the image 1 higher than the background. The problem is when 2 cards overlap, the image for the "under card" gets rendered ontop of the background of the "top card" and looks silly. I would prefer that I could just keep them all at sorting level 0 and have them rendered by hierarchy like ugui.

#

Should I just offset the different elements of the cards by .00001 or something? That seems a little hacky.

modest cargo
velvet hollow
#

I want Lights 2D to be sorted like sprites (Y value) and to have an effect only on the sprite that they are in front of on the same Target layer.

#

simple example would be :
Player can place multiple lights.

Lights have to affect Default, Ground, Player, etc. Target Sorting layer - so that they light up the player, ground and buildings.

Now if the player places a street light in front of the building it's Y should determine that it should light the building, the player and the ground.

If the player places it behind the building then it should light only the player and the ground based on Y. Just like if the player places a prop.

If there was only one light the issue would be simpler, but since the player can place one behind the building and one in front it seems more complex to me.

(the building would be transparent when the player is behind the building, or it could be exactly on the edge where we should see it only affect the ground and the player)

In the Normal map example, yes, objects would be lit as if they are 3D but that isn't what I'm asking about. The graveyard keeper's torch goes behind the tree and no longer affects it at all.

Also think of a forest, and it's night, the player has a torch. It should only light trees that are above player's Y and the trees below should be unlit (by that light) And since the world has other objects, props, and animals I can't just change trees sorting order layer dynamically because then it might be in front of some other object or behind. It needs to remain default.

I hope this is more detailed and I hope someone has some sort of solution, thanks everyone!

cobalt obsidian
#

I'm making a auto tiler using the 2D extras rule tile, and it isnt tiling properly, there is supposed to be a transition tile between these two tiles.

#

I think its because these two tiles have the same rule settings

#

How can i fix this?

modest cargo
velvet hollow
#

Oh I thought maybe some more information would help people out in understanding that normal maps won't help :/

modest cargo
#

Yea sure, not related to those

velvet hollow
#

I did look at that but the game is so far into development that I'm super scared of doing radical changes

modest cargo
#

Beyond that there probably is no simple or non-destructive way to get anything resembling isometric sprite lighting into your project

velvet hollow
#

The asset is not using light2d at all, so everything would have to be re-done ๐Ÿ˜ฆ I talked to the developer of smart light yesterday

modest cargo
velvet hollow
#

Well now is the question is it worth the effort, not sure how much it would add on to the game to do such a big time investment

modest cargo
#

It's possible to write editor scripts to find and replace components in scenes/prefabs while passing properties between them which could be a worthy effort investment if you've got a whole lot of those components

velvet hollow
#

there's like 1000 lights xD that have animations, scripts that turn them on Events or time of day, cutscenes and placable props that have lights with also animations/scripts

#

crazy amount of work tbh

modest cargo
#

There aren't really a lot of options though
Making a lot of anything using a system you don't want to be using is jeopardizing a lot of time and resources whichever way you cut it

velvet hollow
#

true true

#

game is called Everholm, you can take a look on steam if you like

#

maybe we don't even need it but it just bugs me a lot

modest cargo
# velvet hollow maybe we don't even need it but it just bugs me a lot

What you have there honestly looks good already! I'd only consider making the switch at all if the new system is guaranteed make some future content or features significantly better and easier to implement
Rarely that's the case with lighting though since they're more just flavors of the same thing

#

Looks great otherwise too ^^

velvet hollow
#

Thanks! We're trying really hard haha ^^ Well, the only time I feel like we need it is when the player places a light behind something like a tree and you see that the street light is behind the tree but then you also see that it lights the tree up..

#

or a building or any other sprite

#

I guess it will stay like this and I'll wait for some future magical update for unity's lights haha

modest cargo
zenith blade
#

Can someone tell me why my tiles are messed up

modest cargo
solemn latch
modest cargo
#

From what I know 2D lights can exclude objects by sorting layer, but if there's another way it must be somewhere under the hood

zenith blade
velvet hollow
modest cargo
zenith blade
modest cargo
#

This means each 32* tile occupies only a 16* grid square

#

Which is maybe kinda awkward but usable so you can have different sizes of tiles together

#

They must all still have 16 PPU

zenith blade
modest cargo
#

And select slices by clicking them so you can edit the Pivot precisely

zenith blade
#

Ohh... Thanks a lot, i was soo troubled with this yesterday.

nimble brook
#

so I'm working on a project in 2022.3 and it uses HDRP because it's mostly a 3d game with 2d elements, but i want to also have like menu scenes and whatnot that are 2d pixel perfect in a retro SNES+ sorta style.

i'm having problems figuring out what to use for the Pixel Perfect camera though - the 2D pixel perfect one warns me to use the URP Pixel Perfect camera instead because it's not compatible with the scriptable pipeline. but does that mean i need to install the whole URP package just to get its camera or is there supposed to be an HDRP equivalent? add component gets no results for "pix". i'm a little afraid adding the URP package will interfere with my HDRP setup which is why I'm asking instead of just trying it.

nimble brook
#

actually i don't think i actually need it for purely UI driven scenes???

fluid thorn
#

How do i fix that the tiles stick out of the grid

modest cargo
snow fog
#

I needed a very small 2d asset, and i tried scaling a big image and that didn't turn out great. I discovered that using an image as big as how it should be in pixels on the screen works the best, but how would this work for bigger monitors? It's fine for 1080p, but something like 4k?

snow fog
#

you can find it in the import settings of each texture

#

it defaults to 100

snow fog
modest cargo
#

You should not under any or most circumstances upscale art before importing it

snow fog
snow fog
modest cargo
#

If you're working with vector graphics I think there's also the (experimental?) vector graphics package that may potentially streamline this process, but I'm not familiar with it

snow fog
snow fog
#

also getting this right will be crucial forever

#

xd

modest cargo
snow fog
modest cargo
# snow fog should i still enable mip maps?

Yes, mip maps are required to smoothly scale down any kind of texture or image in Unity
Since Unity doesn't do any realtime downsampling like image editors or browsers do, it just has to settle for blending between mip levels, each of them being half the original resolution
For this reason it's important that the texture dimensions are even, or power of two ideally, or compiled to a sprite atlas

modest cargo
snow fog
#

this is without mip mapping

snow fog
snow fog
modest cargo
# snow fog Oh, okay. What do you mean with "even or power of two"? you mean as if they shou...

Those are the best dimensions for textures since they can always be halved and stacked together if needed and they're compatible with GPU's internal optimizations, 8, 16, 32, 64, 128, 256, 512, 1024, 2048 and so on
But as long as the dimensions aren't odd numbered the mip maps should work okay
If you use the sprite atlas feature then the dimensions don't matter, since the atlas will always be created as PoT, as long as they fit onto the atlas

snow fog
modest cargo
#

Since mip maps are pre-downscaled versions of the texture always half of the original, that means that the sprite should be crisp at 1x, 0.5x, 0.25x and 0.125x scales
Anything in between will have to blend the two nearest mip levels so they will be at least a bit blurry
Enabling Trilinear filtering may improve this

snow fog
modest cargo
snow fog
modest cargo
#

Not fundamental gamechangers, especially if your textures already have good dimensions, but useful to leverage especially if your sprite dimensions change a lot over development iterations

snow fog
modest cargo
#

@snow fog oh and also if this is a Canvas image, you may want to enable "pixel perfect" on the canvas so the sprite can't be between pixels positionally

snow fog
#

much better than the original result

fluid thorn
#

But it fits

modest cargo
# fluid thorn We still got some lines

Color bleeding between tiles in a tilesheet can be caused by multi-sample antialiasing and/or by lack of padding on the sprite sheet for the tile sprites

#

Creating a sprite atlas of the tiles and defining padding in its settings is perhaps the most convenient way to add padding to your tiles

modest cargo
#

Did you not hear

fluid thorn
modest cargo
#

That's how it works for everyone really

#

But I can elaborate if you can point to a specific part that seems hard to understand, as long as you've tried to understand it

fluid thorn
modest cargo
#

But note that not all gaps between tiles are color bleed, they can be air gaps as well which can't be fixed by this particular fix

fading magnet
#

I have a question

#

I gave my character a scarf

#

that follows them

#

but, it doesnt realyl fit in

#

because its not following the pixel grid

#

and like, its not pixely

#

is there a way to pixelize it?

#

i know i can give it an outline using a shader, but im not sure if there's a good way to pixelise it

#

i made it using a linerenderer

modest cargo
fading magnet
#

i do, but it kinda messes something else up

#

i thought there might be another way to do so

snow shell
#

Hey guys, is there anyone who can tell me what im doing wrong? I have two different Tilemaps which dosnt stick to the same Grid or atleast not to the same spot of the Grid.

modest cargo
fading magnet
#

I have some of my sprites rotate 45 degrees

#

and i kinda want to keep free rotation for my objects without them looking really weird

#

Not sure if its worth it

fading magnet
#

Diagonal pixels are pretty cursed, but i think its worth it

modest cargo
# fading magnet I have some of my sprites rotate 45 degrees

If it's exactly 45ยฐ then you could consider making rotated variants of the sprites
If that's not an option I think your other options are to either render the scarf to some kind of low resolution temporary buffer or render target, upscale that and use that as a sprite
or dot the length of the scarf with small squares so it becomes kind of a chain of pixel perfect sprites

fading magnet
#

Im not gonna make more sprites, because the rotation isnt locked to just 8 directions

#

other things sound rather complicated, but ig i'll try to figure em out

#

thanks for help!

fading magnet
#

Also, what's the best way to give it an outline

#

I tried using a shader, but it didn't go well

#

Making another bigger line renderer under it also poses some unwanted issues

modest cargo
# fading magnet Also, what's the best way to give it an outline

There isn't much of a best way
Shaders maybe if you know shader math, but if it works for the line it might not work for the pixelated version of it
If you use the sprite chain method or render target texture method, you can make duplicates of them tinted black on a lower sorting layer
With the sprite chain you could use a sprite that's one pixel bigger, and with the render target texture you can do the duplication many times with an offset in each direction

#

Using a separate buffer for it also enables the possibility of using an outline algorithm on it, but those can be complicated and expensive if done with scripts, and super complicated if done with compute shaders

#

Compute shaders might be the best way to do all parts of the effect, but they're way beyond most people including me

fading magnet
#

Dang, I see

#

That's a shame

#

I used to assume there is a simple solution for every problem I encounter, but I don't know it due to my inexperience

#

Seems like it's the first time that's not the case

fading magnet
# fading magnet

Okay, I think a better solution would be keeping pixel perfect camera

#

And coming up with a solution for the umbrella rotation

solemn latch
fading magnet
#

I can make a shader that pixelates the UV

#

But not the mesh

#

Which will stay smooth like that

solemn latch
#

What I'd do is use a gradient along the edges, and pixelize the alpha based on that

fading magnet
#

Hmm

#

Won't that still not be pixel perfect

#

Cuz of the mesh

#

I think I'm just gonna use a pixel perfect camera

#

Other issues that it causes sound easier to fix

#

And it looks very good

sage aspen
#

Hi. Is there any (huge) performance difference between animating sprite via spritesheet and storing that spritesheet in variable and feed shader with specific frame at given time?

#

By "animating via spritesheet" i mean using animator and renderer component. To be more precise - i'd like to combine two different animated sprites in a single shader

solemn latch
sage aspen
#

yeah, that's what i thought, thanks

mental jay
#

how do i code for tilemap 2d collider

#

like if i dont want to use the component

minor coral
#

Could someone help me with Isometric Rule tiles, i cant seem to get them to work

#

this is what it looks like

#

it isnt supposed to be like that tho

fiery vessel
#

Hello, Im really struggling with figuring out how TileMaps work, I have been trying my hardest to paint but its not responding the way I want it to. I just want to select parts of the tile to paint, but when i go over the painting area, it gives me the entire thing!

Am I suppose to divide the sprite into multiple? idk what im doing really

marsh coyote
#

whys it do this

minor coral
#

u need that

marsh coyote
minor coral
#

add the pixel perfect camera package to ur project and then add it as a component to your camera

modest cargo
# marsh coyote whys it do this

This is color bleed from adjacent tiles on the sheet
Pixel perfect camera component may improve it, but you may also need to add padding to each tile in the sheet
Sprite Atlas with its padding feature can do this automatically without requiring editing or re-slicing the sprite sheet itself

granite oxide
#

Does anyone know if it's possible to 'mask' an image within another image while also preserving the aspect ratio? Or is this something I have to use an image editor for

modest cargo
heady blade
#

guys, how can i fix this?
left side is a simple guy, it's how he need to be.
in centre the arm of guy overlays other guy... in right side... idk, what the hell

modest cargo
# heady blade guys, how can i fix this? left side is a simple guy, it's how he need to be. in ...

All 2D renderers follow the rules of 2D sorting
https://docs.unity3d.com/Manual/2DSorting.html
It makes sense that if your character heads are set to be rendered after the bodies, that goes for all of them even across different characters
You'll probably want to use the sorting group component to group multiple 2D renderers to use the same sorting priority, with the order between them sorted internally within the group
https://docs.unity3d.com/Manual/class-SortingGroup.html

heady blade
#

oh, crap, thx you, i don't know about sorting groups

light elk
#

how do I snap background so it makes parallax?

#

press alt or somethhing?

modest cargo
# light elk how do I snap background so it makes parallax?

Snapping and parallax don't immediately seem to have a lot in common to me
You can hold ctrl while dragging objects to snap to grid increments, so if your sprite sizes fit the grid you can tile them seamlessly
You can hold V to grab sprite by its vertex, and keep holding it to snap to another sprite's vertex, meaning you can tile them seamlessly regardless of their shapes or sizes
Though not always, seamlessly tiled sprites are often when making a parallax effect which by itself refers to objects moving at different speeds relative to camera speed

light elk
#

no i mean like 2 images snap them right at the end

#

they are not tiled

#

just regular images

modest cargo
blazing lily
#

I'm using the Pixel Perfect Camera for my game with the following settings running at a fullscreen 1920x1080 and getting some weird artifacting. The video shows the artifacting, the gif shows the expected animation. Anyone know what's up? Unsure what other info would be relevant here ๐Ÿ˜…

modest cargo
blazing lily
#

I'm rotating the transform of the sprite renderer's object

#

Also, upon re-exporting the spritesheet with spacing inbetween the frames, I'm getting different artifacting

#

For the leftward animation, I'm no longer getting the white pixel artifacting on the left, but for the rightward animation I'm still missing the 2 outline pixels for the hand

#

Is this spritesheet bleeding? And is there anything I can do to combat this artifacting, seeing as just adding padding inbetween the frames didn't completely solve it?

modest cargo
blazing lily
modest cargo
blazing lily
#

Looks much cleaner that way, but I'll still occasionally see a few pixels randomly show up

#

also i hadn't even noticed before sending that but it looks like there's a small black line at the end there, cutting off the legs

#

These issues also don't occurr if I'm using Pixel Snapping instead of Upscale Render Target on the Pixel Pefect Camera component, but the Upscale setting was very handy to make pixelated lines with the Line Renderer

blazing lily
modest cargo
blazing lily
#

In that case, I did not, but Pixel Snapping alone should have prevented it

modest cargo
#

Should've

blazing lily
#

However, it seems the issue with that was that my sprite's anchor point was not the corner of a pixel

modest cargo
#

Haven't seen this one before despite using the pixel perfect camera a bunch
Is it URP or BiRP?

blazing lily
#

Maybe this is causing the artifacting as well?

blazing lily
modest cargo
#

You can see Project Settings>Graphics if a SRP asset is assigned there

blazing lily
sharp tiger
#

hello! it is a bad idea to use a 8000 x 6000 px image for the background of a top-down shooter game? xd

#

or should i use a tile map?

modest cargo
sharp tiger
#

okkk thank you @modest cargo !

fading magnet
#

Im using URP, and i have 2D lights in my game

#

i was wondering how can i make it so that the light source only affects some objects

#

but not the others

#

Here's how it looks rn

#

light affecting bg buildings looks kinda bad

#

these are supposed to be very far away

#

i tried to mess a little with lighting layers and sorting layers, but it didnt seem to work

#

im 99% sure i just didnt do it right

modest cargo
fading magnet
#

But wnever i change the sorting layer it just turns black, and renders over everything else in the scene

#

Thats how it usualyl looks

#

Oh okay i figured it out

#

the order actually matters

jaunty sequoia
#

i made a player movment that can jump with a raycast and when i try to jump on a close sprite it doesnt work

wispy sand
#

Does anyone know a good tutorial on how to do this

void lark
#

Hey, i have a scrollRect but when the content is very big the scroll rect is like 2fps how do i do?

zenith blade
#

why does my spritesheet look so bad

#

while the creators looks good and clear

#

what settings am i doing wrong, pls help.

#

i figured it out Filter mode to Point and compression to high quality

#

๐Ÿ˜ญ

pearl creek
#

I'm not sure this is a right channel to ask, so sorry if I've pick wrong

I need an advice or maybe resources to read about what are the best practices of drawing pixel art tileset of topdown surfaces. Like in my project I have dirt, water, grass, ground, etc tile surfaces. So I'm thinking about to make those nice looking transitions between different types of surfaces.

The question is what is the best techniques when I need to have transitions between multiple tile tipes? I was thinking about simple overlapping, when tile types have layer number and for example grass overlaps all, then dirt goes and finally water. However I will be glad to take an advice!

heady blade
#

what should I do if, when decreasing, the object drops very, VERY much in resolution...?
1 In game
2 Original

modest cargo
fast pasture
#

hey everyone, im new to pixel art and i made a character for my game (i think it is 24x24 or 16x16) anwyay how can i make the backround cuz obvously it wont be 16x16 but i dont want the pixels to be like bigger if yk what i mean

#

and this is prob a dumb question but i genuinly dont know

solemn latch
fast pasture
#

i think i did scale it as otherwise it is blurry in unity

#

is there a different way to fix that

#

the pixel art maker i used had a scale option before exporting

#

can i not just scale it the same amount

solemn latch
#

Well, you'll have to do the math to figure out the correct size if you're scaling it.

fast pasture
#

what math

#

it will be a 64x64 scaled x3

and 24x24 or smth scaled x3

#

thoights on this ( it will shoot fire

fast pasture
#

It looks abit to simple ig but not sure what to change

next sluice
#

even backgrounds?

fast pasture
#

Not sure really as i have never made a pixel art game

#

I just dont want them all looking different

#

As well as that i need someone to comment on the flamthrower i made cuz it seems a bit bad but idk what to change

next sluice
#

You want them to be sharp no matter how big they get?

fast pasture
#

Yes i think so?

next sluice
#

as in, say you have this sprite that looks nice when you leave it:

fast pasture
#

Is it a good idea to have the backround at a higher resolution

next sluice
#

but when you stretch it out, it gets all blurry:

fast pasture
#

They are both blurry

next sluice
#

oh

#

in that case you just gotta mess with your sprite settings for all of your graphics in unity

fast pasture
#

Nah i mean both of yours are blirry

#

But ok so for the backround

#

What resollution?

#

Is best?

next sluice
#

i couldn't tell you, it varies case by case

#

are you trying to tile your background or make it as one single piece?

fast pasture
#

Well i want the backround covering the whole screen but if it is 64x64 it wont be

fast pasture
#

Idk if that would woek

#

Though

#

And maybe ill just do tiles to save time

next sluice
#

i mean you can do that

#

you don't have to do it in tiles

fast pasture
next sluice
#

but if you make it bigger, say to a 128x128 background and stretch it out to fill the screen, it gets blurry

fast pasture
#

I scaled it in my pixel art program

next sluice
#

so when does it get "blurry"?

fast pasture
#

It doesnt if i scale when i said blurry i was talking about ur images

next sluice
fast pasture
#

Yea if i scale it which u said not to or smth it makes it not blirry

next sluice
#

i never said not to scale it

#

if scaling makes it look nice, then good

fast pasture
#

๐Ÿ‘

next sluice
#

but then you said that you were "not sure really"

fast pasture
#

Anyway since ive realised ill do tiles im pretty much sorted thanks

next sluice
#

like, what are you trying to accomplish exactly?

#

alright, great

fast pasture
#

If anyone knows what i could change woth this however please say

fast pasture
restive jungle
#

Is it possible to get the pixel data of what's being shown through a sprite mask?

#

I have a blank 100 x 100 sprite that I 'paint' pixels on and depending on what it's on i want to check what percentage of the sprite mask area is painted

modest cargo
#

Such as by having a lower resolution invisible grid with a script that fills the cells with color or binary data at points where the painting is happening and count those

restive jungle
#

oh man yea that sounds good

#

I think I can make an array, I just want the alpha info

#

the problem is seeing what is being masked

#

and mark that as 0

#

or whatever

#

the masking is the problem though, I want to track the percentage of what's visible

#

If i turn the mask off you can paint anywhere on the blank sprite

modest cargo
restive jungle
#

but is there a way to find what is outside or inside the mask? And put that in an array?

#

I don't know any other way to paint on an enemy other than using a sprite mask

modest cargo
solemn latch
candid pagoda
waxen blaze
fast pasture
#

For me it was blurry on phone

lime sage
#

Why are my tile textures blurry despite having seemingly correct settings?

#

When it's not in playmode it's fine, but when I enter playmode it automatically becomes blurry

#

image of it not in playmode

#

I'm a moron, I was thinking the max size thing would be affecting each individual tile, changing it to be higher than the full tileset texture fixed it

lavish rivet
#

Hi, I'm trying to draw 2D game elements from an isometric view
How do I unify the drawing style and make the objects consistent in size? I work with several people

terse sable
#

Hey I was wondering if you could somehow smooth out parts of a tilemap collider like what I got here?

modest cargo
pine pumice
#

Hello, I'm trying to fit different foliages for a tree, i have the triangles set but its seems to cut off at the end likely because the 2d branch is too wide, how to fix this?

bold crater
#

hello this has happened a few times and I cant seem to fix it except to delete everything and start from scratch with building my bones. randomly one or more of my 4 limb's will stop functioning. In this photo, the arms work (white lines) and the feet dont (green lines). I dont know why or when it turned from white lines to green but they were working an hour ago. When I move the LimbSolver2D target, the green lines follow it but the foot doesnt

bold crater
tidal turret
#

Is it possible to constraint an end point of a Sprite shape controller to another moving game object, and keep the start point stuck on another spot?

It's basically a flower head and a stem, and the flower head is moving back and forth. I want the stem to follow it, but I obviously want the stem attached in the ground, with just the end point moving along the flower head.

modest cargo
solemn latch
solemn latch
modest cargo
#

Oh ye I didn't notice it was about points of the sprite shape, constraint components might not work in that case

broken spire
#

Hi there! I used some textures in Unity and messed with the colors of these images with the color picker on Base Map.
Is there a way I can generate new image textures with the edits I made within Unity?

modest cargo
#

The default blend mode is "multiply", but particle materials can also have overlay, additive and subtractive blendings
All of those are supported by most image editors

broken spire
#

Thank you Spazi!

near oasis
#

anybody knows if unity has any plans to implement 2D navmesh baking? i know navmeshplus exists and i got it working, but it feels really hacky...

eternal bough
#

why I can't have the additional options like him help me

modest cargo
eternal bough
eternal bough
#

I can't slide the rigidbody into the RBI can't slide the rigidbody into the RB

modest cargo
eternal bough
#

and also why my character is not moving forward yet it seems to me to have done everything well

gilded wadi
#

Having some issues regarding pixel scaling despite using PixelPerfectCamera; The strange thing is this does not occur on my own system, it only occurs for a few other users, so my guess is it's hardware specific. Any advice?

The UI is rendered with a seperate camera to a canvas, but this canvas is rendered by the game's main camera, which is forced to integer world positions, and uses pixel perfect camera.

https://cdn.discordapp.com/attachments/772545751527850005/1169030468159684628/lol.mp4?ex=6553eb77&is=65417677&hm=fc1eb3134e58a285b738e2d6d62b01c0ee6579fdb484b562dcda2821f2405b59&

#

You can see it here in the crosshair, this issue doesnt occur at all on my end, only on other users' PCs

#

the screen gets scaled up correctly, and only applies integer scaling as it should, but its as if pixel perfect camera is not scaling to the correct resolution, or the pixel grid is being offset slightly

unkempt ledge
#

Why is my sorting not working?

#

No matter what option i choose. the sorting does not change

modest cargo
unkempt ledge
#

hmm i might have figured it out. My sprite is 32x32 pixel art, what size should my gridmap be?

#

i dont get why y = 32 looks bad, but y = 24 looks kinda all right :/

#

@modest cargo

modest cargo
unkempt ledge
#

I see. So i guess like this @modest cargo

modest cargo
unkempt ledge
#

Thanks for the help anyway ๐Ÿ™‚

#

Now i have a basis which i can work from

modest cargo
unkempt ledge
#

yeah i was following a tutorial but i might have missed a step since his worked and mine did not haha :d

signal tendon
#

Hello everyone, I have a question about the Isometric Rule Tilemap. I've checked some of my settings, and everything seems to be correct. Why is it displaying abnormally, like in the video?

slender meteor
#

In terms of the sprite sheets / sprite editor / sprite slicing - I've chosen to split sprites in my sprite sheet up into 16x16 sprites which is what most stuff fits into, but in the future I might have a building sprite that breaks the height and goes to maybe like 20x16 and then i'd want to use this building sprite in my game. How would this work with the sprite sheet being sliced into 16x16 chunks?

untold bone
#

If I want to make a 32 by 32 pixel sized sprite would I make my canvas 32 by 32 pixels

solemn latch
#

Make sure the pivot is placed correctly.

nova tinsel
#

I've been trying out the Aseprite 2d importer, while it seemms to be quite good an powerful, i'm having a bit of trouble with my asset workflow rn

i have a custom material that supports an emission mask for 2D sprites, it uses the SpriteSecondaryTextures feature. The way how i have the mask setup is that it's set as a different layer from the main diffuse sprites (as shown in the picture below)

#

however, i cant really make, nor know how to make the importer create a texture fromm the emissive layer so i can properly setup the emission mask. my idea then became making another .aseprite file which would be just the emmissive layer and hope the dimensions match. sadly to my disapointment, the importer refuses to properly make both sprite dimensions match, as shown in this picture

#

now i'm running out of ideas on what would be the best way to implement my desired emission masks, i'd appreciate if anyone knows some kind of trick or tip to making both sprites have the same dimensions

nova tinsel
#

I've fixed it by making the emissive mask actually only mask the bits that have actual pixel data instead of masking the transparent bits

#

by doing this both sprites end up with the same dimensions as the other one

clear steeple
#

So I've created a tilemap that has a collider attached to it. The tilemapcollider2d has a CompositeCollider2D so its like an edge collider. How do I make it so when I raycast and hit one of these oval colliders, I get the info (like extents and center) of THAT particular collider and not the entire combination?

slender meteor
#

Is there a way to create a reusable color asset in unity? The goal is to take multiple sprites and change the color on all of their sprite renderers at the same time from a single source in the Unity editor.

modest cargo
unkempt ledge
#

I am trying to create a lineRenderer with a collider so i can detect collisions. I am having a problem where the mesh does not align with the actual line

#

the code:

#

Am i missing something ? ๐Ÿ™‚

#

I think it something to do with the worldspace. How can i turn it of?

hollow crown
unkempt ledge
#

@hollow crown thanks for the reply but i went with another approach. I had to many problems with the mesh renderer.

#

i raycast, and then draw the line that way.

robust mason
#

does anyone know the fix to this sorting problem in a top down game

#

the gun rotates towards the mouse

solemn latch
#

How are you handling the sorting? My guess is that the center of the sprite is moving which is affecting the sorting if you are axis sorting? You could try putting the gun physically in front of the player(on the z axis), or setting sorting layer order explicitly.

robust mason
#

i fixed it by placing a sorting group component on the player (parent of the gun)

flint wyvern
#

Can I ask where can I learn how to using handcraft art

fervent basin
#

Hey, we have this odd issue where the gradient in the UI (using unity canvas UI) is much stronger than the gradient in the PNG itself

#

could this be related to the way PNG handles transparency (even though it shows up correctly in the preview) ? I'm not sure where to look ๐Ÿค”
(compression is off)

trail oracle
#

does anyone know why the sprite editer wont open

#

Ive downloaded it

sinful grail
trail oracle
#

wdym

#

ohhh

#

wait

#

wdym

sinful grail
trail oracle
#

the botton that says sprite editor

#

the one your talking about

#

it just doesnt open and gives me a error message

sinful grail
trail oracle
#

ohh

#

my bad

#

I ment to say no error message

#

ops

sinful grail
#

Ok.. it just doesn't do anything? Hmm, I'm really sorry but I'm not sure then

trail oracle
#

ok

#

Does anyone know why the sprite editor wont open

#

ive downloaded it

sinful grail
trail oracle
#

ok

#

im sorry

#

im very impacoint

trail oracle
#

Does anyone know why my sprite editor wont open ive downlaoded it and I also dont get a error message it just doesnt open

brittle lion
#

Yo how do i get a health bar on unity 2023.1.19

trail oracle
#

Does anyone know why the sprite editor wont open for me>i have tried opening it and it wont open , and there is no error message.ive also downlaoded the sprite 2d package

visual rover
#

hello

#

i am having trouble with the content of the game brush, it doesn't brush the asset type but makes gaps instead

#

like that

#

does anyone know how to fix it?

spiral igloo
visual rover
#

that does not solve it

sinful grail
modest cargo
#

There probably was a miscommunication there

modest cargo
# visual rover

If by "game brush" you mean gameobject brush, then the gameobject size must match the grid size
Tiles sprites must have a correct PPU to fit on a tile grid, so if the gameobject tiles which you're painting use sprites, check their PPU values as well as the gameobject scale/size

visual rover
#

and it doesn't brush

#

as I try to use that setup

#

it keeps clicking and not letting some of it brush the tile

sinful grail
visual rover
#

PPU? where?

sinful grail
visual rover
#

I'll change the PPU to some random first.

#

Ok, the PPU worked.

#

Thank you again.

lament iris
#

How do i turn on grid snapping for 2d? It only seems to work in 3d

sinful grail
lament iris
lament iris
#

nvm I got it to work

visual rover
abstract olive
#

Set the sorting layer of the player on it's sprite renderer to be higher than the tilemap

#

You will need to be conscious about your layers and values as your scene becomes more and more complex.

visual rover
#

its at default

#

it's working, thanks

abstract olive
#

Yes, you'll want to organize layers and values. If you keep everything on default, you'll lock yourself into a corner.

stoic grotto
#

Is someone good at pixelart ?

modest cargo
frozen osprey
#

I'm lost on how to proceed with a sorting issue I have. The short version is this: I don't know how to guarantee that a character with multiple sprites is always drawn together.

My game is top down 3/4ths. Up until now my characters have all been made of a single sprite, but now I need to split them into multiple (for instance, head and body are split so that the head can be swapped out)

Here's the problem: I need a way to sort multiple sprites that all belong to one character, but I've already used all of the available methods to sort.

This means that I can't sort the body and head in character A without another character B having the potential to visually split character A in half if they happen to be standing at the same position

To elaborate on "using all the available methods":

I use Sorting layer to determine sorting between multi-floored room levels that are all visible at once

I use Order in layer to determine sorting between things like the floor of the level, the entity shadows, furniture tiles in the level, the entities themselves

I use Transparency Sort Mode of "Custom axis" (z) to determine sorting between entities that share the same layer and order in layer. This way a character standing behind another will correctly work. To accomplish this I manually update the z depth on every frame based on the character's Y position.

Frustratingly, a Sorting Group in theory is exactly what I need to use, but it then destroys the functionality of Transparency Sort Mode.

Any tips would be appreciated!

solemn latch
#

It is supposed to work with custom axis sorting.

#

(Though it certainly might not in all situations!)

#

Though worst case, could you just update the sort order of the group manually rather than manually updating the Z?

frozen osprey
solemn latch
#

Interesting...

frozen osprey
# solemn latch Though worst case, could you just update the sort order of the group manually ra...

This is the solution I'm leaning towards now after giving it more thought.

I should be able to combine multi-floor room levels and sorting for floor, shadows, furniture, etc to all fall under Sorting layer, which frees up Order in layer to be used to determine depth sorting. That would in turn allow me to use sorting groups to keep a character together

I'm lucky that my game is low resolution pixel art so I should be able to cleanly sort every possible screenspace y-position using just the 16 bit value available for Order in layer. I have no idea what the solution would be if my game used less visually-discrete positions.

#

I've always felt like I'm missing something when working with unity2d for top down games tbh. It feels like they mostly made it with sidescrolling platformers in mind

solemn latch
#

They made it for UI ๐Ÿ˜›

frozen osprey
#

that also would make sense

solemn latch
#

We are still seeing long term consequences of that origin.

#

But yes, a lot of the features they added have sidescrollers in mind.

frozen osprey
#

The great news about changing away from custom axis sorting is that I will no longer run into the issue of sprites getting too close to the camera and clipping out of existence if they run down for long enough

frozen osprey
#

Hmm, what a huge pain, there are actually a lot more layers I have to manage than I expected now, since previously Order in layer was just a simple int. Is there some way to define Sorting layer in script?

#

Guess I'll just spam layers named like 0 through 20 or something

mortal acorn
#

Why is my tilemap doing this? It renders in play mode in the editor but not in the actual build:

frozen osprey
#

changing sorting layer seems to be done with something like
renderer.sortingLayerID = SortingLayer.NameToID(sortingLayerName);
which only works for pre-defined sorting layers. It's not the end of the world though, I should be able to just predefine a bunch in the editor and hopefully have enough

spring finch
#

Has this happened to anyone else before? Project and assets all imported properly everything completely fine, everything consistenly works... but then you close/ load your project and everything is blurry? Thank you!

solemn latch
spring finch
solemn latch
#

Are you using the pixel perfect renderer?

spring finch
#

The pixel perfect camera? No not yet

#

But have never had this issue before- when I tried adding the pixel perfect 2D camera it also didnโ€™t resolve

solemn latch
#

Well, it is pixel art so you're gonna have scaling issues whenever the screen size isn't a multiple of the pixel size

spring finch
#

Just strange Ive been working on this for a month and never had the issue after importing art correctly

#

then just reload the project and every single thing is blurry

solemn latch
#

Did you change your texture import settings?

spring finch
#

Where can I check that

solemn latch
#

In the texture import settings.

#

You have them open in your screenshot