r_unity3d | Unsorted

Telegram-канал r_unity3d - r/Unity3D

156

News about the Unity engine and project showcases from Reddit. Made possible with @reddit2telegram (@r_channels).

Subscribe to a channel

r/Unity3D

Help implementing sprites for UI

I wanted to use sprite animations on UI for a turn based RPG I am making in Unity where they popup from behind the menus Akin to Mother 3. I want those characters to use many different animations for getting hurt or attacking. However, is there any way to do this without needing to make the size of the canvas for all characters match? Essentially, I am asking for a sprite renderer but transformed to screen coordinates instead of world coordinates.

https://redd.it/1b2wucq
@r_Unity3D

Читать полностью…

r/Unity3D

What am I doing wrong here?

I'm trying to change a button's color when it's clicked, but when I click it it becomes invisible. I can only see the "BOUGHT" text. (I used an online RGBA color picker to get my values)

private void Update()
{
clickCount.text = clicks.ToString();
clickCountShop.text = clicks + " clicks";

if (doubleClickerBought == false)
{
doubleClickerBuyText.text = "BUY";
}
else
{
ColorBlock colorBlockGray = new ColorBlock();
colorBlockGray.normalColor = new Color(141, 139, 140, 0.8f);

doubleClickerBuyText.text = "BOUGHT";
doubleClickerButton.enabled = false;
doubleClickerButton.colors = colorBlockGray;
}
}

https://redd.it/1az41pf
@r_Unity3D

Читать полностью…

r/Unity3D

Does anything feels weird to you? I made some changes to the camera in my game VORON and was not sure if it's feels good/okay. Feedback needed
https://redd.it/1az2cu6
@r_Unity3D

Читать полностью…

r/Unity3D

How do you think I should hint at this Easter egg?
https://youtu.be/58gHJOODUqs

https://redd.it/1az051l
@r_Unity3D

Читать полностью…

r/Unity3D

Yesterday, I shared my game here called RUNR END. Today, I released my dream platformer. To celebrate the release day, I'm sharing some keys in the video with you all :)

https://redd.it/1ayvnui
@r_Unity3D

Читать полностью…

r/Unity3D

I call them: 'iridescent fog volumes' (performant realtime volumetric light/shadows, for URP)

https://redd.it/1ayu0kt
@r_Unity3D

Читать полностью…

r/Unity3D

Short gameplay on tarmac track

https://redd.it/1ayn5yx
@r_Unity3D

Читать полностью…

r/Unity3D

After 4 years of solo dev, I'm finally releasing my game today! Wish me luck and feel free to play it :)

https://redd.it/1ayojbs
@r_Unity3D

Читать полностью…

r/Unity3D

One does not simply make Dungeon Generator! Hold my beer and check out bellow...
https://redd.it/1ayltr4
@r_Unity3D

Читать полностью…

r/Unity3D

Using Animator's state machine for enemy AI: Good or bad?
https://redd.it/1aylrbs
@r_Unity3D

Читать полностью…

r/Unity3D

Someone asked how we render outlines in our game, so here's a detailed breakdown

This is my team's game, Whisker Squadron: Survivor. We're quite proud of the rendering in the game!Someone recently asked how we draw the interior lines so cleanly, so I thought I'd write up a detailed breakdown here. A lot of what we're doing is pretty standard, but we have some "special sauce" in here too.

Hope it helps!

Whisker Squadron: Survivor

A brief overview:

We use a post-process effect that started out with the excellent Roystan tutorial.

We then modified this to give our artists more control using a technique we call "Alpha cues".Our game uses the old-school legacy rendering pipeline with forward rendering.

The Basics

First, here's what the game looks like without any outlines:

No Outlines

The post process shader makes use of the standard "depth buffer", which looks like this:

Depth Buffer

The first part of the PP effect simply looks at a cross-section of pixels around each point on the screen, and a threshold value determines whether a jump in depth counts as an edge:

Depth Buffer Detail

(Technically speaking, we use a "roberts cross" algorithm to do this pixel examination, see references below).

Here's what it looks like with *just* those depth-based lines:

Depth-Lines only

Next up: Interior edges. Our rendering system does a custom pass where it renders "normals" into a buffer:

Screen normals

And then the post process effect does a similar calculation where it determines how much changes from one pixel to the next using a cross pattern.Here's the result of the scene with Depth + Normals:

Depth+ Normals

And here's a closeup of an example of these normal edges:

Normal Edges

Incidentally - since we can independently detect depth-based edges and normal-based edges, we expose different settings for line thickness for each of these. Exterior edges have heavier lines.

​

The Secret Sauce: Alpha-based lines

So far, the techniques we've used are pretty standard. But we wanted a way to add "greebles" and little hand-drawn details on our objects.

To accomplish this, we modified our object shader to render the alpha channel as simple greyscale.This is not visible to the player, but here's what's happening in the alpha channel behind the scenes:

Alpha output from object shaders

This allows our artists to make "greeble" textures and apply them to objects however she likes:

Greeble textures with alpha output

https://reddit.com/link/1aye6t4/video/s4r2u7h4wekc1/player

Here's another shot showing with/without those "alpha" lines.

​

Fixing Issues and Tuning

If we just rendered lines everywhere naively, the distant objects would become very overwhelmed by the lines, since they have a constant thickness. So we have 3 different "blend range" parameters - one for depth-lines, one for normal-lines, and one for

Читать полностью…

r/Unity3D

We just released our multiplayer roguelike, Dungeon Survivors! Thanks to everyone here for the feedback and support. We have made tons of changes to the game based off everyone's feedback from the demo!

https://redd.it/1ayinoq
@r_Unity3D

Читать полностью…

r/Unity3D

animation doesnt work

​

look at animator. is says it runs an animation i even did as loop but nothing on screen . i did connect the animator controller to object and still nothing

https://redd.it/1aygtyv
@r_Unity3D

Читать полностью…

r/Unity3D

Tentacles of 'The Corruption' growing through the underground asteroid mining base, seeking biological life forms to assimilate. The player is one of the survivors, attempting to find their way to the last secure refuge of their fellow survivors.

https://redd.it/1ay8zhf
@r_Unity3D

Читать полностью…

r/Unity3D

I added water and temperature to my hacker raccoon game

https://redd.it/1ay7nwo
@r_Unity3D

Читать полностью…

r/Unity3D

Do you like this artwork as a collectible for our new game?
https://redd.it/1b2uzbf
@r_Unity3D

Читать полностью…

r/Unity3D

Universe Expansion Chart visualizing game progress!

We created a Universe Expansion Chart visualizing game progress in an engaging and dynamic way!

Do you like it?

https://preview.redd.it/9wvlgfgoalkc1.png?width=1468&format=png&auto=webp&s=5969dd3bc0f609a1ca19551e2f356cdd4e53f8af

https://redd.it/1az3v4f
@r_Unity3D

Читать полностью…

r/Unity3D

Help with Visual Studio coloring (I am completely new)

Hi guys, I've been just following a tutorial I found online and everything has been working just fine, but for some reason, some color dissappeared from Visual Studio and its bothering me. Things like the Time from Time.deltatime used to be a greenish blue, but now its just white. Any ideas of what might have caused this?

https://preview.redd.it/uhoou43lzkkc1.png?width=1920&format=png&auto=webp&s=0d435a045f54808424d057aa4258cf367ed980ad

https://redd.it/1az2dmt
@r_Unity3D

Читать полностью…

r/Unity3D

Skiddy Skies
https://redd.it/1ayv8op
@r_Unity3D

Читать полностью…

r/Unity3D

We're adding a much requested equipment section into the inventory but are torn between a few versions. Which do you most prefer? 🤔
https://redd.it/1aytvyr
@r_Unity3D

Читать полностью…

r/Unity3D

This is my first Unity game inspired by [ICO] and [Portal].

https://redd.it/1ayslm2
@r_Unity3D

Читать полностью…

r/Unity3D

Switched from HDRP to URP at a worse framerate

Hello fellow game devs

I've been developing Plunder for quite some time now. I started using HDRP and while it looked amazing it didn't give me the flexibility and framerate I wanted. Although It peaked at 100 FPS on my GTX 1080, I thought the simplicity of my models would allow me much more.


I decided 4 months ago to switch to URP, with targeting as many hardware specs as possible in mind. You know, it's designed for mobile so it should be easy to render on a desktop, right?


My builds are only getting 60FPS.


Standalone dev build, standalone profiler, 25ms CPU usage

While I have a good grasp on how to read the profiler, or so I think, I notice most of the framerate is lost due to rendering.


The frame debugger shows the following:


https://preview.redd.it/8bpkh8053ikc1.png?width=497&format=png&auto=webp&s=576989d366271b59fcc98005c595368651ebbdae

I first thought it had anything to do with vertice amount and batches, but all of my scene objects are marked as static and properly batched:


https://preview.redd.it/9iu4f4am3ikc1.png?width=324&format=png&auto=webp&s=bf5d3b1f2797155b7824a002df6e22504c83154c

Proof an empty scene still has bad FPS:


https://preview.redd.it/612otuir3ikc1.png?width=308&format=png&auto=webp&s=62955f02ad1d1c41c3b4ec9bf0e7d2dcfe6275f2

I have enabled URP static batching, GPU instancing on materials. One directional light with dynamic shadows and a dozen point lights with no shadow casting.


​

https://preview.redd.it/vrskfg184ikc1.png?width=435&format=png&auto=webp&s=09595e9f8223f8421ae31a6cac4047557bce570a

400K tris from ocean being rendered, should there not be more FPS on an i9 + 1080?


How do you tackle this problem? If you need more info I'm happy to give it!

https://redd.it/1ayqk6b
@r_Unity3D

Читать полностью…

r/Unity3D

Adding POLISH is so much fun!!!

I've been working on shoring up the game lately as we're pushing towards putting an updated demo out on Steam soon. Part of that has been adding some VFX where it was needed and a little bit of SFX to boot thanks to our Sound Designer :D

https://reddit.com/link/1ayo4to/video/f23n3j26dhkc1/player

https://redd.it/1ayo4to
@r_Unity3D

Читать полностью…

r/Unity3D

Why does this one face on my model not light up correctly?

https://redd.it/1ayaymz
@r_Unity3D

Читать полностью…

r/Unity3D

alpha-lines.

Additionally, alpha lines blend out closer to the camera the lower the contrast is. So if the greeble textures have an area of light grey, they will blend out nearer the camera than areas that have a black area. This makes it possible to add finer details that can only be seen up close. The downside is that it's not super intuitive, so it took our artists awhile to figure out how to use it effectively.

​

Distance fade

That's about it! There are some other technical challenges, which the excellent Roystan tutorial (referenced below) mostly addresses.


​

Let me know if this is helpful or if you've got any questions! The code is a bit of hacky mess so I'm hesitant to share it but if you ask reeeeal nice I might ;)

Areas for Improvement

1. We could probably save a whole draw pass by using Unity's depth+normals texture rather than rendering our own normals texture. This would also mean less texture sampling.
2. There's not currently a way to have different line colors on different objects. It'd be nice to have!

​

References:

Roystan tutorial:https://roystan.net/articles/outline-shader/

Roberts Cross edge detection:https://homepages.inf.ed.ac.uk/rbf/HIPR2/roberts.htm

Whisker Squadron: Survivor Steam page:https://store.steampowered.com/app/2140100/Whisker\_Squadron\_Survivor/

https://redd.it/1aye6t4
@r_Unity3D

Читать полностью…

r/Unity3D

We just released our multiplayer roguelike, Dungeon Survivors! Thanks to everyone here for the feedback and support. We have made tons of changes to the game based off everyone's feedback from the demo!

https://redd.it/1ayimas
@r_Unity3D

Читать полностью…

r/Unity3D

Effect 64x64 V16
https://redd.it/1ayhkzm
@r_Unity3D

Читать полностью…

r/Unity3D

A beginner's concern.

I've been with this problem for a while now. If your enter to the link below you'll see a short video where it's shown how the player's ship is moving odd, as if it was stuck. I think the issue lies in the code. I'll put it here below:

https://preview.redd.it/m3jbi1r25fkc1.png?width=1334&format=png&auto=webp&s=b89c3a60ac635f680333b50722de11845817bd12

Here's the link of the video: https://youtu.be/urDn2N8rRQc?si=\_LgeW5R2CpxRuN7v


Thanks in advance. I hope someone can help me on this 'cause chatgpt has been failing me.


https://redd.it/1ayf3yk
@r_Unity3D

Читать полностью…

r/Unity3D

hey, i have a problem with shadows, can anyone help?

https://redd.it/1ay6s1p
@r_Unity3D

Читать полностью…

r/Unity3D

"The Unity Tutorial for Complete Beginners" pipe problem

I am working through the Game Maker's Toolkit video that creates a Flappy Bird knockoff, and I'm having trouble with the location of the pipes. Although I have "heightOffset = 10" per his code, the openings between the pipes are mostly out of the camera window. I even copy/pasted his code, and the result was the same. What am I missing? Could I have a setting within Unity wrong?

https://preview.redd.it/qolunhqmhckc1.jpg?width=1062&format=pjpg&auto=webp&s=b692b90e865d3eabff3a5006d605f339b9269a19

https://redd.it/1ay1srn
@r_Unity3D

Читать полностью…
Subscribe to a channel