unity3d

Temporal filtering on depth image

前提是你 提交于 2021-02-11 15:08:36
问题 I'm reading the following paper and I'm trying to implement it, but it seems I'm not understanding fully the paper. https://vcg.informatik.uni-rostock.de/~malub/publications/2016_depthenhance/16_ARLS_depthenhancement.pdf I have calculated optical flow and some history of the depth images, and took the a linear average over the history samples as shown in the shader code. What I get is an image that has holes however the original one doesn't have any holes. Current filtered image Shader

Serializing a 2D array with JsonUtility

微笑、不失礼 提交于 2021-02-11 14:59:55
问题 so Im tryint to save some data with the Unity JSON utilities but Im having some trobles. I have a World class that inside has some parameters like Width Height etc, and a 2D array of "Tiles", that its another class Reduced version: public class World { [SerializeField] private Tile[,] tiles; public Tile[,] Tiles { get { return tiles; } protected set { } } [SerializeField] private int width; public int Width { get { return width; } } [SerializeField] private int height; public int Height { get

How to convert a RGB565 Texture to PNG depth image?

南楼画角 提交于 2021-02-11 14:49:14
问题 Using Googles AR Core Depth API, the current depth information is stored in a RGB565 Texture. If I want to calculate the current depth in a shader I use the following code (which is mostly stolen from Google Depth Lab): #define ARCORE_DEPTH_SCALE 0.001 // mm to m #define ARCORE_MAX_DEPTH_MM 8191.0 #define ARCORE_FLOAT_TO_5BITS 31 // (0.0, 1.0) -> (0, 31) #define ARCORE_FLOAT_TO_6BITS 63 // (0.0, 1.0) -> (0, 63) #define ARCORE_RGB565_RED_SHIFT 2048 // left shift 11 bits #define ARCORE_RGB565

Accessing a script from another script at runtime in Unity C#

走远了吗. 提交于 2021-02-11 14:02:31
问题 Like in here, but the difference is that it's supposed to be done from an instantiated prefab, so I can not drag the GameObject, that has the script with the variable I want to access, into this script. This was working public ScriptA script; void Update() { if (script.varX < 0) { // . . . } } But now I'm getting "Object reference not set to an instance of an object" error, which I think comes from the fact that the script trying to access ScriptA, is attached to an instantiated prefab. How

GitHub排名TOP30的机器学习开源项目

让人想犯罪 __ 提交于 2021-02-11 08:32:25
对于机器学习者来说,阅读开源代码并基于代码构建自己的项目,是一个非常有效的学习方法。看看以下这些Github上平均star为3558的开源项目,你错了哪些? 1. FastText:快速文本表示和文本分类库(Github上有11786颗星,贡献者Facebook Research) 源码链接:https://github.com/facebookresearch/MUSE 2. Deep-photo-styletransfer:“Deep Photo Style Transfer” 这篇论文的源码和数据。(GitHub 9747颗星,论文来自于康奈尔大学的Fujun Luan) 源码链接:https://github.com/luanfujun/deep-photo-styletransfer 3. 用Python和命令行来实现的最简单的面部识别API(GitHub 8672颗星,贡献者Adam Geitgey) 源码链接:https://github.com/ageitgey/face_recognition 4. Magenta:利用机器智能生成音乐和美术艺术品(GitHub 8113颗星) 源码链接:https://github.com/tensorflow/magenta 5. Sonnet:基于TensorFlow的神经网络库(GitHub 573颗星

Adding Firebase Admin SDK to Unity project

此生再无相见时 提交于 2021-02-11 07:43:54
问题 I'm new to Unity as well as to C# (real noob to C# and all the .NET stuff) and I want to use the Firebase Realtime Database in my Unity project. I was following the instructions on the Firebase docs to set things up, but after I created a new p12 file and added this code to my project void Start() { // Set these values before calling into the realtime database. FirebaseApp.DefaultInstance.SetEditorDatabaseUrl("https://YOUR-FIREBASE-APP.firebaseio.com/"); FirebaseApp.DefaultInstance

Check whether the writing permission was accepted or denied

戏子无情 提交于 2021-02-10 17:57:44
问题 I am currently trying to implement a trading system for my unity android app using firebase. For that I have to check, if a player pressed the buy button for one trade, if the selected trade is still available in the firebase database. The way it is supposed to work is, that the player who wants to buy something checks in the corresponding trade, if the buyerId is still empty, and if so puts his own id in there. I've set up the firebase rules, so that the buyerId and buyerName can only be set

Develop hololens in unity with macbook

雨燕双飞 提交于 2021-02-10 15:28:29
问题 I'm new with unity and hololens and I started to explore it. I have a macbook (I don't know if it is a problem). I downloaded Unity with all the components (Vuforia, IL2CPP etc.). When I change project settings for the hololens development I have some problems. In particular when I check the box "Virtual Reality Supported" I don't find in the list below the Hololens option. Also if I click on "+" button. I see: Vuforia, Oculus, OpenVr but not Hololens! Furthermore also in the field:

transform.position doesn't move player

試著忘記壹切 提交于 2021-02-10 14:36:21
问题 I have a Player (made out of an cylinder, some FirstCam , SecondCam and ThirdCam , for switching views when pressing a certain key - doesn't matter), which is located on a cube (wide enough to take a walk on it). There's nothing else below the cube. This is how it looks like: This is the Player 's structure: This is the inspector for Player : I have the following script ResetToInitial.cs , attached to my Player : using System.Collections; using System.Collections.Generic; using UnityEngine;

How to create game-wide object in Unity3d without singleton?

偶尔善良 提交于 2021-02-10 14:16:25
问题 Is there a way in Unity3d framework to register an object that would be accessible to all entities in all scenes in the game without resorting to singleton pattern (like a game state object)? 回答1: You could take the following approach: In the scene where the GameObject is created, in a MonoBehavior script attached to the GameObject: Name the GameObject with "name = ..." in Awake() (or in the Editor) Example: myObject.name = "FindMeInEveryScene"; Ref: https://docs.unity3d.com/ScriptReference