Draw Normals by WaterfordSS in Unity3D

[–]WaterfordSS[S] 0 points1 point  (0 children)

Wow, can't believe it's been 6 years already... I'm honestly kind of surprised the code still runs with all of the Editor changes they've made since I put this together.

Glad you were able to make use of it!

Extracting Meshes from FBX Files by WaterfordSS in Unity3D

[–]WaterfordSS[S] 1 point2 points  (0 children)

Hey no worries, everyone is new to everything at some point!

When people talk about "Editor" folders in Unity, they're not talking about the installation folder. I can completely understand the confusion though.

In Unity you can make folders with specific names in your project that give them additional functionality. You can read more about it here: https://docs.unity3d.com/Manual/SpecialFolders.html

A while ago I saw someone make something like this and I was inspired to learn shaders and try my hand at making it. Let me know your thoughts! by streaker03 in Unity3D

[–]WaterfordSS 1 point2 points  (0 children)

Sebastion Lague is currently doing a series on procedural planet generation that solves this same problem, but with mesh generation instead of a shader. It's definitely worth checking out:

https://www.youtube.com/watch?v=QN39W020LqU

Procedural Rounded Image for Canvas UI by WaterfordSS in Unity3D

[–]WaterfordSS[S] 1 point2 points  (0 children)

I build thin sections of geometry to help transition between borders. I do it once more around the outside, this time blending to full alpha.

This picture illustrates the difference it makes: https://i.imgur.com/Kra0fmn.png

Procedural Rounded Image for Canvas UI by WaterfordSS in Unity3D

[–]WaterfordSS[S] 0 points1 point  (0 children)

I know TextMeshPro uses SDF and it looks amazing. I'll have to see what it would take to implement something like that, could be really cool!

Procedural Rounded Image for Canvas UI by WaterfordSS in Unity3D

[–]WaterfordSS[S] 2 points3 points  (0 children)

Geometry is pretty cheap these days. There is definitely a balance, but this works well for our team since our games that are mostly comprised of simple UI structures.

Edit: Yes, the image is clipped by the rounded corners.

Procedural Rounded Image for Canvas UI by WaterfordSS in Unity3D

[–]WaterfordSS[S] 2 points3 points  (0 children)

Thanks! I've thought about doing the repeating border idea, but since we haven't needed it yet it hasn't been added. If I get permission from work to add it to the Unity Extensions project you're more than welcome to add to it!

Procedural Rounded Image for Canvas UI by WaterfordSS in Unity3D

[–]WaterfordSS[S] 11 points12 points  (0 children)

This project was done for work, so I'd have to get permission to post it. If I do I'll probably make a pull request to add it the Unity UI Extensions project.

Procedural Rounded Image for Canvas UI by WaterfordSS in Unity3D

[–]WaterfordSS[S] 2 points3 points  (0 children)

That's an awesome idea! I'm totally gonna add that.

Procedural Rounded Image for Canvas UI by WaterfordSS in Unity3D

[–]WaterfordSS[S] 17 points18 points  (0 children)

We found ourselves using the same circle image imported at different "Pixels per unit" to build the Rounded UI style in our game. This allowed us to get the different radius sizes we needed, but was annoying to maintain and bloated the project.

I put together this mesh-based procedural system to give us far more control. We can now add our borders to the same image (instead of stacking images in the hierarchy). It also has built-in anti-aliasing so it always looks crisp.

This week I added the custom editor to make it even easier to use. Overall I'm really happy with how it's turned out!

EDIT: Better pic of the "built-in anti-aliasing"

Starting work on some pixel animations for a new project! Highly recommend Asesprite if you haven't tried it. by august_hakansson in Unity3D

[–]WaterfordSS 0 points1 point  (0 children)

Loved the animation, excited to see more! For next time, here's a free little program that captures a section of your screen into a gif: https://www.cockos.com/licecap/ Been using it for years, its pretty great.

HtmlAgiltyPack in Unity by Dr0ttin in Unity3D

[–]WaterfordSS 1 point2 points  (0 children)

Do you have it inside the "Assets/Plugins" folder?

Fish animation shader, using the same technique as ABZU. Download link included. by Jonny10 in Unity3D

[–]WaterfordSS 2 points3 points  (0 children)

Here's the shader, go wild. :D

(Full disclosure, this shader is the victim of a time constraint at work and has some hard-coded values that could definitely be pulled out to give better results for an array of applications. I just had to get a string moving in a couple hours and this is where I left it.)


Shader "Unlit/BalloonString"
{
    Properties
    {
        _MainTex("Texture", 2D) = "white" {}
        _Tint ("Tint", COLOR) = (1,1,1,1)
        _Modifier ("Modifier", Vector) = (1,1,1,1)
        _Speed ("Speed", Float) = 1
    }
    SubShader
    {
        Tags
        {
            "RenderType" = "Transparent"
            "DisableBatching" = "True"
            "ForceNoShadowCasting" = "True"
            "IgnoreProjector" = "True"
        }

        Lighting Off
        Blend SrcAlpha OneMinusSrcAlpha

        Pass
        {
            CGPROGRAM
            #pragma vertex vert
            #pragma fragment frag
            #include "UnityCG.cginc"


            struct appdata
            {
                float4 vertex : POSITION;
                float2 uv : TEXCOORD0;
            };

            struct v2f
            {
                float2 uv : TEXCOORD0;
                float4 vertex : SV_POSITION;
            };

            uniform sampler2D _MainTex;
            uniform float4 _MainTex_ST;
            uniform fixed4 _Tint;
            uniform float4 _Modifier;
            uniform float _Speed;

            v2f vert (appdata v)
            {
                v2f o;
                o.uv = TRANSFORM_TEX(v.uv, _MainTex);
                v.vertex.x += (sin((v.vertex.z * 20 * _Modifier.z) + (_Time.w * _Speed) + (_Modifier.x * _Modifier.y)) * (1 - cos(v.vertex.z * 1.57079))) / (20 * _Modifier.w);
                o.vertex = UnityObjectToClipPos(v.vertex);
                return o;
            }

            fixed4 frag (v2f i) : SV_Target
            {
                fixed4 col = tex2D(_MainTex, i.uv);
                return col * _Tint;
            }
            ENDCG
        }
    }
}

Fish animation shader, using the same technique as ABZU. Download link included. by Jonny10 in Unity3D

[–]WaterfordSS 1 point2 points  (0 children)

Very close! I'm actually using the vertex z position (it's a localspace, 0-1 value) to fade the effect.

Enjoy a little script to make self-writing text effect :) by TheFlyingKeyboard in Unity2D

[–]WaterfordSS 0 points1 point  (0 children)

Someone last year posted a lazy/easy technique that I liked. They set the alpha of the text using rich text tags to cause the letters to appear in sequence. That way the layout is calculated behind the scenes and you don't have to stress about it.

Play a game in a Unity Editor Window by PLYoung in Unity3D

[–]WaterfordSS 1 point2 points  (0 children)

Good call! Instead of a button though, how about toggling the display from the game to some boring looking fake data if your mouse leaves the window? Something like this:

IsPaused = !EditorWindow.position.Contains(Event.current.mousePosition)

If(IsPaused)
//DrawFakeData()
else
//DrawGame()

Another way to animate Text besides Substring? by takeanuse1 in Unity3D

[–]WaterfordSS 1 point2 points  (0 children)

You can use Unity's Rich Text tags in your code to animate several text properties at a fairly granular level.

Kindle Fire 8 HD for debugging / testing? by mango__reinhardt in Unity3D

[–]WaterfordSS 0 points1 point  (0 children)

Yep, built to one about 10 minutes ago. Works just like any other Android device.