<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Web3 | Dencho</title><link>https://www.dencho.dev/tag/web3/</link><atom:link href="https://www.dencho.dev/tag/web3/index.xml" rel="self" type="application/rss+xml"/><description>Web3</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Wed, 11 Oct 2023 00:00:00 +0000</lastBuildDate><image><url>https://www.dencho.dev/media/icon_hu1b14c2ed69a2f89c06f5de8cc0bd5fd1_301795_512x512_fill_lanczos_center_3.png</url><title>Web3</title><link>https://www.dencho.dev/tag/web3/</link></image><item><title>Corrupted Realms</title><link>https://www.dencho.dev/projects/contracts/2022/corruptedrealms/</link><pubDate>Wed, 11 Oct 2023 00:00:00 +0000</pubDate><guid>https://www.dencho.dev/projects/contracts/2022/corruptedrealms/</guid><description/></item><item><title>Web3 Land Based Map System</title><link>https://www.dencho.dev/projects/contracts/2022/web3landmapsystem/</link><pubDate>Sat, 22 Oct 2022 00:00:00 +0000</pubDate><guid>https://www.dencho.dev/projects/contracts/2022/web3landmapsystem/</guid><description>&lt;!--TODO: Add a function or 2 from the tools inspector code and snap a pic of the custom inspector-->
&lt;p>Contracted by a startup to RnD and produce a working prototype of an Interactive Map with overlaying hexagonal cells and dynamic states that change based on the live NFT metadata pulled from the blockchain.&lt;/p>
&lt;div class="video_thing">
&lt;video muted autoplay="" name="media" loop="">&lt;source src="https://raw.githack.com/Denchyaknow/GitSite_Dencho/Develop/assets/media/projects/Web3LandMapSystem/XRLog_2022_897.webm" type="video/mp4">&lt;/video>
&lt;/div>
&lt;p>This is one of my earliest projects involving Web3, at the time (2022) there was but a handful of blockchain SDKs that were compatible with Unity and C#.&lt;/p>
&lt;p>This Map system need to be usable in a way that it helps you setup the map, and hold live data representations synced form the blockchain.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Feature&lt;/th>
&lt;th>Description&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>MapManager Component&lt;/strong>&lt;/td>
&lt;td>In charge of loading terrain prefabs and settings relative to a scene Id, and contains CellData methods/data used to hold serialized data about points on the map.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Custom Inspectors&lt;/strong>&lt;/td>
&lt;td>Includes setup status among the needed controls to specify how to spawn a planar grid of cells across any number of terrains.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Automatic Serialization&lt;/strong>&lt;/td>
&lt;td>Hooks into Unity to serialize/deserialize data with the scene upon save reloading during development.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>CellData Saving and Loading&lt;/strong>&lt;/td>
&lt;td>After initial setup, controls allow devs to save the current state of the maps cellData to a serialized array. During runtime upon connection to the blockchain, if supplied with a contract config, will pull the celldata bit by bit from the blockchain to override the default serialized data on the map. Only when data has been synced recently can users interact with cell states via a UI.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Dynamic CellData Status&lt;/strong>&lt;/td>
&lt;td>Upon user interaction, should display the current state of a NFTs land metadata.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Additional WebGL Branch&lt;/strong>&lt;/td>
&lt;td>WebGL support for the map. With deep link for Web3 Wallet connection.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Asynchronous Code&lt;/strong>&lt;/td>
&lt;td>The main thread only haults for saving files to disk. everything else used the async C# pattern to invoke logic overtime till the array queue is exhausted. Thanks to Cysharps UniTask plugin for supporting WebGL and unifying my asynchronous logic between platforms.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Frustrum Culling&lt;/strong>&lt;/td>
&lt;td>Occlusion Culling grass and other map objects based on what the camera sees. Much like the system from ZeroDawnHorizon and other AAA titles with big maps.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>AAA Cinemachine Camera System&lt;/strong>&lt;/td>
&lt;td>Uses Cinemachine, which is a popular AAA camera system part of the Unity registry that we can easily manipulate in code.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h4 id="rapid-prototyping">Rapid Prototyping&lt;/h4>
&lt;p>It was important to save development time by exploring adaptable plugins from github and the asset store, that might give us a head start. After testing multiple grid based map plugins, we settled on one who's source code was extendable and well documented so we can adapt the plugin to work with NFT metadata.&lt;/p>
&lt;p>First step was to generate a map from an array of terrains, thus populating the serialized custom celldata thats compliant to the ERC-721 smart contract. Then a simple controller to navigate around the map, written from scratch using Cinemachine.&lt;/p>
&lt;div class="video_thing">
&lt;video muted autoplay="" name="media" loop="">&lt;source src="https://raw.githack.com/Denchyaknow/GitSite_Dencho/Develop/assets/media/projects/Web3LandMapSystem/XRLog_2022_892.webm" type="video/mp4">&lt;/video>
&lt;/div>
&lt;p>After a few months of work we had a working prototype that listed live NFT data synced from the blockchain.&lt;/p>
&lt;div class="video_thing">
&lt;video muted autoplay="" name="media" loop="">&lt;source src="https://raw.githack.com/Denchyaknow/GitSite_Dencho/Develop/assets/media/projects/Web3LandMapSystem/XRLog_2022_899.webm" type="video/mp4">&lt;/video>
&lt;/div>
&lt;div class="video_thing">
&lt;video muted autoplay="" name="media" loop="">&lt;source src="https://raw.githack.com/Denchyaknow/GitSite_Dencho/Develop/assets/media/projects/Web3LandMapSystem/XRLog_2022_901.webm" type="video/mp4">&lt;/video>
&lt;/div>
&lt;p>This was the first version of the UX for the Map controls, they were revised later on.&lt;/p>
&lt;div class="video_thing">
&lt;video muted autoplay="" name="media" loop="">&lt;source src="https://raw.githack.com/Denchyaknow/GitSite_Dencho/Develop/assets/media/projects/Web3LandMapSystem/XRLog_2022_903.webm" type="video/mp4">&lt;/video>
&lt;/div>
&lt;p>A GUI to compliment the Map so the user can filter out thousands of NFT metadata to find one specifically.&lt;/p>
&lt;div class="video_thing">
&lt;video muted autoplay="" name="media" loop="">&lt;source src="https://raw.githack.com/Denchyaknow/GitSite_Dencho/Develop/assets/media/projects/Web3LandMapSystem/XRLog_2022_909.webm" type="video/mp4">&lt;/video>
&lt;/div></description></item><item><title>NFT Artisan</title><link>https://www.dencho.dev/projects/contracts/2022/nftartisan/</link><pubDate>Thu, 10 Feb 2022 00:00:00 +0000</pubDate><guid>https://www.dencho.dev/projects/contracts/2022/nftartisan/</guid><description>&lt;!--TODO: Add a function or 2 from the tools inspector code and snap a pic of the custom inspector-->
&lt;p>This tool allowed the team to easily recreate NFT metadata and media from serialized data types in a Unity project, like an array of CellData or GameObjects.&lt;/p>
&lt;div class="video_thing">
&lt;video muted autoplay="" name="media" loop="">&lt;source src="https://raw.githack.com/Denchyaknow/GitSite_Dencho/Develop/assets/media/projects/NFTArtisan/XRLog_2022_871.webm" type="video/mp4">&lt;/video>
&lt;/div>
&lt;p>I learned alot about the growing standard that is NFT Metadata, how its imprinted onto the block chain via a smart contract, the requirements for batch uploading NFT metadata, and even interacting with smart contracts.&lt;/p>
&lt;p>Creating NFT media and metadata needs to be consistent in brand and format. This tool allows use to do just that after we make iterative changes to Land or NFT items in a Web3 enabled project.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Features&lt;/th>
&lt;th>Description&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>Batch Generation&lt;/strong>&lt;/td>
&lt;td>Capable of generating over 100,000 NFT images or videos in one session with efficient batch processing.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Format Typing Support&lt;/strong>&lt;/td>
&lt;td>Supports PNG, JPG, and MP4 formats to accommodate various NFT media requirements.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Automatic Framing&lt;/strong>&lt;/td>
&lt;td>Operates independently on its own GameObject, allowing for movement and adjustment within the scene as needed.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>MapManager Integration&lt;/strong>&lt;/td>
&lt;td>Utilizes the CellData array from the MapManager component to generate &lt;code>metadata.json&lt;/code> files and media, processing each cell&amp;rsquo;s data based on its position and configured settings.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Recording Settings&lt;/strong>&lt;/td>
&lt;td>Offers highly adjustable recording settings to customize recording angles, durations (for videos), and formats, while being stored on a configurable scriptable object.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Scene Interaction&lt;/strong>&lt;/td>
&lt;td>Capable of handling large scale recordings and was tested with with over 100k CellData entries in the MapManager for comprehensive map coverage.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Dynamic Object Handling&lt;/strong>&lt;/td>
&lt;td>Links with an ItemDatabase or an array of Transforms to spawn instances at the recorder&amp;rsquo;s location, capturing necessary Metadata and Media.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Operational Versatility&lt;/strong>&lt;/td>
&lt;td>Functions both in and out of play mode, providing flexibility across different development stages.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Asynchronous Code&lt;/strong>&lt;/td>
&lt;td>The main thread only haults for saving files to disk. everything else used the async C# pattern to invoke logic overtime till the array queue is exhausted.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Automated Cleanup&lt;/strong>&lt;/td>
&lt;td>Manages the cleanup of spawned instances post-recording to maintain scene integrity.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Export Functionality&lt;/strong>&lt;/td>
&lt;td>Exports generated Media and Metadata to specified folders, organizing assets for efficient access and use.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The end result is 2 folders full of fresh ready to upload NFT Media and Metadata.&lt;/p>
&lt;div class="video_thing">
&lt;video muted autoplay="" name="media" loop="">&lt;source src="https://raw.githack.com/Denchyaknow/GitSite_Dencho/Develop/assets/media/projects/NFTArtisan/XRLog_2022_890.webm" type="video/mp4">&lt;/video>
&lt;/div>
&lt;p>Example of live NFTs using Metadata created from this tool.&lt;/p>
&lt;div class="video_thing">
&lt;video muted autoplay="" name="media" loop="">&lt;source src="https://raw.githack.com/Denchyaknow/GitSite_Dencho/Develop/assets/media/projects/NFTArtisan/XRLog_2022_888.webm" type="video/mp4">&lt;/video>
&lt;/div>
&lt;div class="video_thing">
&lt;video muted autoplay="" name="media" loop="">&lt;source src="https://raw.githack.com/Denchyaknow/GitSite_Dencho/Develop/assets/media/projects/NFTArtisan/XRLog_2022_899.webm" type="video/mp4">&lt;/video>
&lt;/div></description></item></channel></rss>