Posts

Featured post

[004] Godot3D - Procedurally generated Hex Maps

Image
Hello there 🐐 I am currently working on a small project and needed to experiment with different map sizes and shapes. I took this opportunity to learn more about how maps can be procedurally generated in 3D. In this blog post I will show you how to procedurally create maps in Godot using Grid Maps. I also felt like I struggled a bit with creating and optimizing the code and I took this as a perfect opportunity to give back to the community :) Get the latest version of the code here Prerequisites For this tutorial we will be using a 3D model of a hexagon that I've borrowed from Jmbiv's tutorial . Alternatively, you can also scour the web for other 3D models and resize them to 1mm height and ~1.74mm width . As long as you don't want to sell your game and don't want to build the 3D models yourself, I suggest also looking over MagHex Tiles for Gloomhaven which you can download and resize for your game. Setting up your scene In this part you can follow my steps...

[003] OpenCV: How to obtain disparity maps

Image
In this blog post I will show you how to use the calibration UI and how to obtain smooth disparity maps.    This blog post is part of a five part series on detecting 3D skeletons using a PS4 camera: OpenCV: Capturing video from a PS4 camera OpenCV: How to calibrate a PS4 camera OpenCV: How to obtain disparity maps Throughout the rest of the tutorial, you will gain experience in using OpenCV and Python to handle image streams and combine stereo images to obtain depth information. Get the latest version of the code here What is disparity Disparity can be defined as the difference in image location of an object seen by the left and right eyes ( source ). In order to calculate disparity we need to: capture a left_frame and a right_frame at the same moment in time  and then rectify the frames such that we can determine the pixel correspondence between frames (where the same pixel is placed in two different images) In the first tutorial we captured the feed from a ...

[002] OpenCV: How to calibrate a PS4 camera

Image
In this blog post I will explain how to calibrate your stereo camera which will help us in obtaining accurate depth information.  This blog post is part of a five part series on detecting 3D skeletons using a PS4 camera: OpenCV: Capturing video from a PS4 camera OpenCV: How to calibrate a PS4 camera OpenCV: How to obtain disparity maps Throughout the rest of the tutorial, you will gain experience in using OpenCV and Python to handle image streams, combine stereo images to obtain depth information, running Pose Estimation models to extract skeletons from frames and how to transform 2D skeletons into 3D skeletons for animations.  Get the latest version of the code here Stereo cameras and how to get one Fun fact: The same way sound can be mono or stereo cameras can also be stereo by having two or more lenses which can view a scene from different angles. Stupid question: Why aren’t there so many one eyed pirates? Stupid answer: Because they can get more information (e...

[001] OpenCV: How to capture video from a PS4 camera

Image
In this blog post I will explain how you can setup a PlayStation4 camera on a Windows machine and how to capture images from it for your personal projects. Something wrong I can feel it! This blog post is part of a five part series on detecting 3D skeletons using a PS4 camera: OpenCV: Capturing video from a PS4 camera OpenCV: How to calibrate a PS4 camera OpenCV: How to obtain disparity maps Throughout the rest of the tutorial, you will gain experience in using OpenCV and Python to handle image streams, combine stereo images to obtain depth information, running Pose Estimation models to extract skeletons from frames and how to transform 2D skeletons into 3D skeletons for animations. Setting up the camera The PS4 connector is just a regular USB3 port with with a slightly modified shape The PS4 camera has the infamous proprietary connector which made you unable to plug the camera in regular USB ports. Due to this lot of people started creating third party adapters or even soldering and...