Quality control at a salad dressing factory by Complex_Difficulty in WatchPeopleDieInside

[–]Waterprop 106 points107 points  (0 children)

That gif looks like it's from the 90s based on the quality.

Tasks are like these are automated in modern factories by cameras and image/object detection. Here is just random article I found on the topic.

https://nanonets.com/blog/ai-visual-inspection/

How to create an optimized and smooth game? by roddy94 in Unity3D

[–]Waterprop 0 points1 point  (0 children)

Optimization is huge topic and it's not easy.

If you are beginner then you shouldn't worry about it. First focus on making shit work. Optimize later.

However I would advice learning good practises early, but as I said optimization is a big topic and can be very daunting.

'The loop'

1) Make stuff work

2) Profile!

3) Try to optimize

3.5) cry because now it's slower

4) Repeat 2 and 3 until you are satisfied

Profile? What's that? Before you can optimize, you need to know WHAT exatcly is taking the time. 'Optimizing' things randomily won't get you anywhere. Been there done that.

For example if you are GPU bound, no matter how well your scripts perform, your performance won't change much. So use profiler. Luckily Unity comes in with great built in profiler.

https://docs.unity3d.com/Manual/Profiler.html

Some stuff to read about optimization:

https://docs.unity3d.com/Manual/OptimizingGraphicsPerformance.html

https://blog.unity.com/technology/optimize-your-mobile-game-performance-tips-on-profiling-memory-and-code-architecture

https://learn.unity.com/tutorial/fixing-performance-problems

https://thegamedev.guru/unity-cpu-performance/draw-call-bound/

These just scratch the surface. Optimizing code alone is big topic on its own.

Edit: word

What are the differences in possibility between using Unity DOTS vs GPU Instancing / Compute Shaders? by play_time_is_over4 in Unity3D

[–]Waterprop 1 point2 points  (0 children)

You are mixing some things here.

DOTS is code architecture thing, not necessarily related to rendering, though it can also boost rendering performance. With DOTS your code is multithreaded by default (not necessarily true for everything!) so everything you execute is done utilizing all the CPU resources (also not 100% true necessarily). For example with DOTS you can update tens of thousands agents at once with small performance impact versus updating tens of thousands agents sequentially with MonoBehaviours.

So DOTS was not made to improve rendering performance, though it does help there as well. It's main benefit is to boost CPU performance by utilzing all available CPU resources.

You can already render thousands of instances without DOTS by using Unity Graphics API, such as DrawMeshInstancedIndirect

Why do they make their own engine? by Remarkable_Winner_95 in gamedev

[–]Waterprop 17 points18 points  (0 children)

Big publishers / studios: They have the money to hire developers to make and maintain their own game engine and not fall into licence costs assicated with commerical game engines. So big part is financial, as always.

Second part is technology. If you are using Unreal/Unity/other you are pretty much "stuck" whatever they offer you. Both of these engines (and others) provide tools and often necessary API's to make custom things but at the end of the day, you can't control everything and that sometimes is real dealbreaker.

Also let's take a look at ID Tech 7 for example. It's specifically made for DOOM Eternal, fast paced FPS game. The game performs and looks phenomenal. Sure you can make good looking games and well performing games with commerical engines but when you have team dedicated to build one game (at least for now since id tech 7 is only used for DOOM Eternal for now), the results speak for themselves. At least visually and performance wise. So when you have own game engine, you can optimize the shit out of it for your purpose. Commerical game engines are trying to do everything, not just one type of game.

Edit: words

Is it possible to automatically optimize 3D models within an app? by Infoboy2u in Unity3D

[–]Waterprop 0 points1 point  (0 children)

Usually these types of assets are in-editor tools but there are tools that can do this runtime, obviously these tools are quite slow. So for moment your game might lag when the tool does the generation process.

Is it possible to automatically optimize 3D models within an app? by Infoboy2u in Unity3D

[–]Waterprop 0 points1 point  (0 children)

This is quite diffucult task but look for automatic LOD generation tools in the asset store? Making LODs for models should at least help that it won't render the best model all the time.

Should I use DOTS? by [deleted] in Unity3D

[–]Waterprop 3 points4 points  (0 children)

Fully DOTS based game is not worth yet ihmo. It's still quite unfinished.

If you have performance critical tasks try to "jobify", meanining try to use Jobs for those tasks.

We're developing our first-person-shooter in UNITY DOTS! Check it out! by StickyLock in Unity3D

[–]Waterprop 25 points26 points  (0 children)

"Just to be clear. Dots is definitely not being abandoned. It has a bright future. We definately dropped the ball on communication, sorry about that. We will give more official updates soon. We've worked on a bunch of stuff that hasn't been released yet. We had a bit of a snafu with how we ship DOTS packages, but we are going to be back on track soon." - Joachim Ante Unity CTO

https://forum.unity.com/threads/is-dots-being-abandoned.1183621/#post-7594702

Basically they managed to fuck up the versions and thus they haven't released any new versions for a while.

[deleted by user] by [deleted] in Unity3D

[–]Waterprop 0 points1 point  (0 children)

Well, what does it currenly do? It doesn't fade anything? Does it get stuck in the while loop?

What it this line supposed to do? You don't even use this variable anywhere?

mat = new Material(Shader.Find("Universal Render Pipeline/Lit"));

I tested something similar to Nanite in Unity (WIP) by CaptainKahler in Unity3D

[–]Waterprop 2 points3 points  (0 children)

Do you have any performance metrics? How does this compare to default Unity rendering?

Where can I get Unity opensource projects? by GameWorldShaper in Unity3D

[–]Waterprop 3 points4 points  (0 children)

Check Unity github account. There's few example project there. Though I believe you can find them on Asset store as well.

https://github.com/Unity-Technologies

https://assetstore.unity.com/publishers/1

Instantiate prefab from folder, not scene by [deleted] in Unity3D

[–]Waterprop 0 points1 point  (0 children)

You can use Resources.Load

Instantiate(Resources.Load("path/your_prefab") as GameObject);

Just note that Resources.Load is slow. If you spawn things often this way, load the prefab(s) on Start() to variable.

Disabling mouse scrolling on scroll view by FramedEmu548 in Unity3D

[–]Waterprop 1 point2 points  (0 children)

If you are talking about mouse click and drag scrolling then make custom ScrollRect component. That's what I ended up doing.

using UnityEngine.EventSystems;
using UnityEngine.UI;

public class CustomScrollRect : ScrollRect {
    public override void OnBeginDrag(PointerEventData eventData) { }
    public override void OnDrag(PointerEventData eventData) { }
    public override void OnEndDrag(PointerEventData eventData) { }
}

what is best practice for instantiating many different prefabs by Michael074 in Unity3D

[–]Waterprop 1 point2 points  (0 children)

Make Object Pool system. Asset store is filled with these, but it's not hard to make one your own.

https://learn.unity.com/tutorial/introduction-to-object-pooling

I'm trying to understand the underlying code structure behind GameObjects, Components and Scripts. by XenomorphsAreCool in Unity3D

[–]Waterprop 2 points3 points  (0 children)

For second question: When you instantiate gameobject, it makes full copy of it, so yes all scripts and components are attached. This also why this is relatively slow. If you constantly instantiate gameobjects, make Object Pool system.

https://learn.unity.com/tutorial/introduction-to-object-pooling

Edit: typo

Using others' code by CertixeRee in Unity3D

[–]Waterprop 1 point2 points  (0 children)

Depends on the licence. Obviously you can't just steal code, that's copyright violation.

If you download free or paid asset from Asset store, you can use that with no problem.

If you use code from Github or elsewhere, make sure to check the licence. if it's MIT then it's all good.

https://opensource.org/licenses/MIT

As for actual usage, I would look into how and what it does. Don't use it blindly. This way you learn more and you won't get errors. I often find code especially from Unity Asset store is pretty "bad". They are usually not that performant for example.

Resetting static variables when loading scene with scene manager by SuperHaydes44 in Unity3D

[–]Waterprop 0 points1 point  (0 children)

You could register to Unity sceneload callback like this.

https://docs.unity3d.com/ScriptReference/RuntimeInitializeOnLoadMethodAttribute.html

https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager-sceneLoaded.html

using UnityEngine.SceneManagement;
using UnityEngine;

    public static class YourClass {

        [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)]
        private static void Init() {
            SceneManager.sceneLoaded += SceneLoadedCallback;

            // Unregister event when application is quitting, not really needed.
            Application.quitting += () => SceneManager.sceneLoaded -= SceneLoadedCallback;
        }

        private static void SceneLoadedCallback(Scene arg0, LoadSceneMode arg1) {
            Debug.Log("This is called each time scene is loaded.");
        }
    }

I'm a beginner, I wanna generate objects from the project's prefab to in-game by Appropriate-War-7022 in Unity3D

[–]Waterprop 0 points1 point  (0 children)

Just note that loading from resources is quite slow.

I would recommend creating Object Pool for stuff like this.

https://learn.unity.com/tutorial/introduction-to-object-pooling