Blog |
Premisa El 20 de febrero Decentraland fue abierta al público. Para aquellos que no lo sepan, Decentraland es un mundo virtual que se apoya en el blockchain de Ethereum donde su comunidad define la utilidad y la estética de sus parcelas, creando una relación innovadora y dinámica entre propietarios y visitantes. Bajo esta premisa, el único límite es la imaginación. Tuvimos la oportunidad de formar parte del desarrollo del contenido de varias parcelas antes del lanzamiento, desde aventuras laberínticas y arte experimental sonora hasta galerías de arte, jardines e incluso un sistema de transporte. Darle forma al futuro del transporte virtual, hoy os enseñamos como creamos el Trail Transit System en el sur de Decentraland de inicio a fin, el día anterior al lanzamiento.
Antes de empezar Para este workflow, en Polygonal Mind hemos usado un plugin para Unity que puedes encontrar en GitHub [https://github.com/fairwood/DecentralandUnityPlugin/]. Este plugin nos ha permitido trabajar de forma nativa en Unity, componer y crear los escenarios sin tocar demasiado código. Es importante recalcar que no hemos usado exactamente la misma versión que puedes descargar en el link de arriba, el plugin ha sido modificado para sacarle todo el partido en nuestro caso particular y para nuestras necesidades, mejorando su rendimiento y dejándolo listo para el motor gráfico de DCL. Cada proyecto requiere un acercamiento distinto y una pipeline de producción diferente, es por eso que el plugin fue modificado conforme nos fuimos encontrando con distintos desafíos y problemas técnicos, principalmente relacionados con el rendimiento una vez deployeados en Decentraland. #00 - Conceptos básicos de un sistema de transporte
Tan pronto como empezamos a definir sobre papel todo el trabajo que teníamos que hacer decidimos inclinarnos por hacer que todo el entorno fuera una estructura megalítica con un ascensor al que se podía acceder desde el suelo. El problema del tren girando a la hora de volver fue solucionado teniendo dos vagones yendo en direcciones opuestas para evitar tener que esperar demasiado tiempo a un tren. Esto creaba un problema visual y de diseño: necesitábamos 4 plataformas por nivel y estos niveles debían estar conectados, para que el usuario pudiera subir libremente por toda la estructura. Hice una mood board visual y la propuse para basar todo el aspecto visual para poder empezar con los primeros diseños. Para el estilo artístico me inspiré mucho en los entornos y diseño artístico de Bioshock, y en el sistema de transporte de Fallout 4. Ambos juegos tienen una influencia muy grande en el retrofuturismo, pero apoyándose en distintos estilos artísticos. Bioshock* tiene unos preciosos entornos, muy influenciados por el art-deco, mezclados con entornos monumentalisticos de hierro forjado. Respecto a Fallout 4**, tiene un mundo muy bien construido basado en un futurismo desde los ojos de la gente en los 50 y los 60, lleno de detalles. Bioshock hace un uso magistral del canal metálico en sus entornos y esto fue algo decisivo como inspiración para mí cuando decidimos tomar nuestra propia aproximación al entorno art-deco. Una vez los límites del arte fueron establecidos, pudimos empezar a trabajar. Vamos a hacer el desglose de cómo se crearon los assets, empezando por la primera versión del tren, el que va encima del rail; seguido del disñeo de la estación y su integración con su entorno. Y por último pero no menos importante enseñaremos la iteración con el segundo tren, el situado bajo el rail. *Bioshock, desarrollado por 2K Boston / Irrational Games y publicado por Take Two. **Fallout 4, desaroolado por Bethesda Game Studios y publicado por Bethesda Softworks. #01 El tren: dándole forma al vagón virtual Para un terreno de 55 parcelas the Scene Limitations were pretty high for a environment that was basically a train system so we decided to go for a high-polygon mesh level of detail instead of a more blocky low-res shape resolution. The limits were a maximum of 550k tris, 116 materials and 58 textures (512 square max) to be implemented along the scene. El diseño resultante que salió basado en una sola imagen encajaba perfectamente en la idea que llevábamos para el "feeling" del entorno, pero nos salió el tiro por la culata durnate el desarrollo por ser una imagen dibujada a mano, sin referencia real y con perspectiva forzada de una vista del futuro durante los años 50. Así como el diseño iba avanzando, los problemas empezaron a manifestarse en la zona de la rueda (porque deformaba la estructura principal) y cómo el tren se iba a mover en el raíl. Esto llevó a cambiar el diseño, favoreciendo una cubierta para la rueda más gande y más suavizada, y un raíl también más ancho que se adaptaba a una rueda nueva, también más ancha. Si vamos al interior, se puede observar que el diseño del vagón está basado en concepts de los años 50 y el uso del contraste entre madera y hierro. Lo más complicado fue darle "controles" al tren, lo que queire decir que hacía falta incluir un pane lde mandos o algo similar, con palancas y botones. El diseño de materiales consiste en utilizar principalmente dos materiales, uno para el exterior y otro para los props del interior, y uno extra para el emisivo que tenía el panel de control. De nuevo la falta de contenido dado que las parcelas iban a funcionar como un sistema de transporte significaba que podíamos dedicarle más mimo, detalle y recursos, con el límite de las texturas de 512x512 px. Tras unas cuantas iteraciones teníamos nuestro primer modelo del tren viajando por el rail y listo para hacer las primeras pruebas. #02 La estación: un balance entre composición y utilidad Como hemos dicho antes, la estación tenía que tener dos niveles de plataformas: una a 16 metros con conexiones a ambos lados de la parcela y otra a la altura de 32 metros. Todas las plataformas tenían que estar conectadas de uan forma u otra para ser jugable para los jugadores y debía ser sencillo girar hacia el lado contrario en caso de que te hubieras pasado una parada, como en un sistema de metro real. Además, desde un punto de vista artístico, la idea era evitar en la medidad de lo posible el uso de escaleras o caminos largos para poder encajarlo con la visión más mecánica y futurista de lo que un transporte debería ser que teníamos. Tomando los entornos de Bioshock y concept art como ejemplo en materiales y composición, empecé a hacer los primeros esbozos de la forma que tendría la estación. Empecé a definir el diseño del ascensor, basado en cómo Bioshock hace uso del art-deco mezclado con steampunk para sus ascensores. Decidí seguir un diseño similar desde 0 hasta el look final del modelo. El diseño terminó siendo de concepto abierto y sin apredes, para evitar la claustrofobia y que sirviera como un punto de referencia en detalle de modelo y material. Desde el principio quise hacer un sistema de apertura y cierre mecánico para el asvensor así que empecé a planificar cómo iba a ser la animación. Tuve que tener en cuenta dónde tenían que estar los pivotes y como tenía que ser la jerarquía para que la animación se realice correctamente. Una vez el ascensor estaba terminado y situado en su posición final, se colocó la carcasa alrededor para permitir el acceso al ascensor. Los andenes empezaban a tomar forma. Empezamos el desarrollo de los andenes con idea de cómo iban a funcionar desde un punto de vista jugable, así que era crucial diseñar cómo la estación iba a ser jugada y experienciada por el jugador primero. Así que hice un level design o graybox definiendo los límites jugables y anticipando la parte visual que vendría después y todos los problemas que podrían venir después, y así es como encontramos y lidiamos con los problemas de conexión que había entre el suelo y el andén de 16 metros, así como otros problemas que complicaban la integración visual de todo el set. Siguiendo la idea original, el concepto era subir al usuario del andén de 16 metros al de 32 con un ascensor situado encima del andén superior. Esto nos hizo darnos cuenta de todos los problemas de integración visual y de gameplay y decidimos descartarlo rápidamente porque sobrecargaba la escena de polígonos. En su lugar, encontramos la solución en una plataforma entre los dos andenes principales. Con los últimos retoques era hora de pintar y diseñar sus materiales. Me decidí por usar texturas tileables seamless para los objetos más grandes, porque me daría más control de los detalles. Para los andenes y el ascensor, hice sus UVs y lo empaqueté en un atlas, maximizando el control sobre el detalle y mejorando los resultados del apartado gráfico. También nos aprovechamos del canal de metalness/smoothness para que el entorno brillase de forma natural. #03 El segundo tren: Reinventando el mismo concepto Cuando las estaciones estaban colocadas y funcionando, era hora de incorporar un segundo tren al rail. Este diseño estaba planeado para estar colgado del mismo rail que el vagón original pero con modificaciones claramente aparentes. La principal limitación para remodelar el exterior fue mantener las UVs para no tener que rehacer el texturizado, porque ambos trenes usan los mismos materiales. #04 Límites en los materiales y optimización de assets Los trenes estaban acabados y colocados en su sitio, las estaciones estaban en su posición final y los primeros tests daban buenos resultados, porque para este proyecto decidimos usar una aproximación por prefabs, y A. Picazo, nuestro programador, sugirió e implementó algunas modificaciones al plugin para reconocer las mismas meshes e instanciarlos en lugar de exportar cada uno de ellos individualmente como GLTFs diferentes. El rendimiento en general mejoró muchísimo y era hora entonces de recortar un poco en el campo de las texturas, no porque realmente fuera necesario, sino porque siempre es buena idea revisitar el trabajo realizado y mejorar o borrar archivos irrelevantes. Conforme fui adentrándome más en la relación entre uso de textura y resultado final concluí que el Normal map no era realmente necesario para darle el look que buscábamos. Es porque el ambient light de Decentraland MATA este tipo de microdetalle y la luz direccional no ayuda realmente en estas situaciones. Así que los normal maps fueron eliminados de todos los materiales que no necesitasen simular información de bump. I must say, that one thing that really helped the graphical level we accomplished in this scene was the use of the metallic/smoothness channel, as it meant a discrete type of shinning without being visually invasive as it is the glow channel. Packing ORM de Texturas y Decentraland Decentraland recomienda la optimización de texturas usando texutras RGB empaquetadas como ORM (Occlusion, Roughness, Metalness). Es una buena idea cuando trabajas con un workflow PBR pero para este proyecto evitamos usar Ambient Occlusion y en cambio lo bakeamos en el albedo, con un modo de fusión Multiplicar. Más info de este tipo de texturas se puede encontrar en la documentación de Khronos Group: Creando Colliders Los colliders en Decentraland se crean superponiendo una malla en el modelo que quieras que tenga colisión y añadiéndole el sufijo "_collider" (en minúscula, MUY IMPORTANTE) al nombre de la mesh que quieras usar de collider. Es importante no tener el mismo nombre dos veces en la misma jerarquía o que el padre e hijo con el mismo nombre haría que el GLTF export crashee. La jerarquía y las convenciones de nombramiento (naming conventions) son muy importantes. En cuanto a rendimiento se refiere, recomiendo usar una versión low-res de la malla cuando se cree el collider porque Decentraland crea Mesh Colliders basados en la malla con el sufijo que comento antes. Si eres familiar con Unity, sabrás que los Mesh Colliders no son lo más adecuado para escenas complejas y lo mejor es evitar colliders con formas muy complejas e intentar hacer sus boundaries. Problemas básicos al usar el wokflow de Unity Decentraland corre en una versión modificada del motor de Unity con modificaciones centradas en sus actuales y futuras características de la plataforma. Esto es algo bueno porque puedes ver cómo está quedando tu proyecto en tiempo real dentro de Unity, y lo parecido que quedará una vez deployeado. Aunque hay diferencias visuales significativas por el Ambient Light y Directional Light dentro de Decentraland. A pesar de la mejora de eficiencia, hacerlo significa que trabajar con el editor de Unity haya dos limitaciones a tener en cuenta. La mayor parte de los componentes no se exportarán por el formato GLTF y por ello no se verán tras el deploy: sistemas de partículas, luces, cámaras, componentes 2d, colliders y vfx no funcionarán. Los GTLFs solo te dejan tener los mesh renderer, materiales y un Animator con funcionalidad limitada. A tener en cuenta es que el eje X en Unity está flippeado y puede dar lugar a colocar cosas fuera de lugar, porque DCL n otiene el eje invertido. X = -X Además, el exporter no se lleva bien con escenas muy grandes y puede hacer que el editor se ralentice. Lo recomendable con escenas grandes es tener plugin de DCL escondido mientras se edita y abrirlo para evaluar las entidades y tener en mente si te estás saliendo de los límites de la parcela. #05 Fondos Tan pronto como las estaciones principales estuvieron colocadas en su sitio y el transporte era funcional, era hora de desarollar los alrededores del suelo. Me decidí por algo casi desértico, sin plantas, porque quería evitar a toda costa pasarme con los polígonos y quería mejorar el detalle de la experiencia del tren, y no empeorarla. Esto fue lo que decidimos hacer, el entorno rocoso fue detallado con algunas áreas de descanso y tuberías decorando los caminos. Las áreas de descanso reusan las texturas de los props de la estación. Se crearon 3 materiales más para la suciedad, las rocas y las estructuras de cristal. #06 Arreglos finales Durante la parte final del desarrollo y con el lanzamiento de Decentraland a la vuelta de la esquina, KnownOrigin decidió ser el anfitrión del art que se expondría en las estructuras para ser visto por el público. Un numero limitado de piezas fueron seleccionadas para ponerlas a lo largo del rail, permitiendo que fueran vistas mientras se viaja en el tren de una estación a otra y mientras se espera al tren. #07 Conclusión Este entorno fue un desafío enorme para el equipo, porque necesitábamos desarollar un sistema personalizado para que le tren se moviera y se parara en todas las paradas. Todas mis fleicitaciones a A. Picazo por conseguir que quede así de bonito. Para mí, que fui quien estuvo a cargo de todo el entorno, significó mucho porque pude darle vida a un diseño genial basado en dos juegos y un estilo artístico que me encantan. Además hubo bajas limitaciones en cuanto al apartado gráfico porque acabamos reusando muchos assets, eso sí, sin hacer la composición aburrida o repetitiva. Esto me dio la libertad de mejorar la apareciencia añadiendo geometría y acercándome a un diseño de materiales realistas, dándole un toque extra de detalles a una plataforma en la que reina el flat-shading y el low-poly en los entornos como es Decentraland. Kourtin ARTISTA DE ENTORNOS I purr when you're not looking. I'm passionate about environments and all the techie stuff to make them look rad. Learning and improving everyday to be a better hooman.
0 Comments
Premise The 20th of February Decentraland was launched. For the ones who do not know, Decentraland is a virtual world backed by the Ethereum blockchain where its community owns the shape and purpose of their LANDs, creating an innovative and a dynamic relationship between landowners and visitors. With this premise, the sky is the limit. We got a chance to be part in the development of some LAND content prior launch, from adventure mazes and sound experiments to art galleries, gardens and even transit systems. Shaping the future of virtual transportation, today we are describing how we created the Trail Transit System in South Decentraland from scratch to its final patch prior launch day.
Before starting For this workflow, here at Polygonal Mind worked with a custom Unity plug-in that you can find at GitHub [https://github.com/fairwood/DecentralandUnityPlugin/]. This plugin allowed us to work natively from Untiy, compose and create all the scenarios without heavy coding. Note that we did not use the plug in in its vanilla version, we slightly modified it in order to be suitable for our custom environments, improve its performance and be "game ready". Each project requires a different approach and production pipeline and that is why the plugin got modified as we faced different challenges and technical issues, mainly related to performance issues once deployed in Decentraland. #00 - Scratching the main concepts for a transport system
As soon as we started defining on paper all the work that had to be done we set the environment to be a megalitic structure with an elevator to be accessed from the ground level. The train direction returning issue was solved by having two wagons going in the opposite direction of each other in order to avoid long waiting queues. This created a visual and design problem, we needed to design 4 platforms per level and these levels to be connected as well. So the user could easily go through the whole building. I made a visual mood-board and pitched it in order to get my hands on the first designs. For the general art style I got a heavy inspiration from the Bioshock* environments and art design highlights, and from Fallout 4 I took the transit concept. Both games take a heavy influence on retro-futurism but being backed by different art styles. Bioshock has a gorgeous and well defined art-deco environments mixed with iron forged monumentalism environments and on the other hand we have Fallout 4**, which has a well built and detailed-retro futurist world based on how the future was being dreamt in the late 50s and early 60s. Bioshock does a materfully use of the metallic channel on its environment and that was key for me on the idea of doing a similar approach on an art deco environment. Once the art boundaries were set, we could begin the work. We will do the breakdown as we created the assets, beginning with the first version of the train, the one who goes on top of the trail; followed by the design of the station and its integration with the environment. And last but not least we will take a look on the second train. *Bioshock, developed by 2K Boston / Irrational Games and published by Take Two. **Fallout 4, developed by Bethesda Game Studios and published by Bethesda Softworks. #01 The train: Shaping the virtual wagon For a 55 LAND State the Scene Limitations were pretty high for a environment that was basically a train system so we decided to go for a high-polygon mesh level of detail instead of a more blocky low-res shape resolution. The limits were a maximum of 550k tris, 116 materials and 58 textures (512 square max) to be implemented along the scene. The whole design turned around one single image that fitted perfectly the mood we were aiming for, although it backfired during development as its a hand-drawn forced perspective of the future from the 50s. As the design advanced, the main issues turned around the position of the wheel (as it deformed the main structure) and how the train would "move" along the train track. This lead to a better and smoother shaping of the wheel cover and a bigger track for a bigger wheel. From the inside point of view, which it was made up entirely from design interior concepts from the 50s and the use of wood in contrast of an iron structured wagon, the main issue was to give a "direction" to the train, as it has to have a control point or something similar stuffed with mechanical levels and buttons. Its Material design consisted on two materials, one for the exterior and one for the interior props, plus one exclusive emissive material for the control panel. Once again, the "lack" of content as the LAND was purely a way of transport meant an advantage to dedicate more resources to detail and patch with more materials the constrain of 512px textures. After a few iterations we had our first model running on the track and ready to have its firsts tests. #02 The Station: Balance between composition and utility As we said before, the station had to have two levels of platforms, one placed at 16m with connections along both sides of the LAND and another platforms placed on the 32m level. All the platforms had to be connected one to another in order to be fully playable and easy to turn in the opposite direction in case you missed a stop, just like a normal subway design. Furthermore, from an artistic point of view, the idea was to avoid as much as posible the use of stairs or long paths in order to match a more "mechanic" and futuristic view of what transport would look like. Taking the Bioshock environments and concept art as a main guideline in colour and material composition I started to sketch the main shape of the station. I started defining the design of the whole elevator, based on how Bioshock portrayed art-deco steampunk elevators I decided to follow a similar approach from scratch to the final model visuals. The design came to be open and wall-less in order to avoid a claustrophobic feeling, it also served as a concept in model detail and material design. From the very start I wanted to make a mechanical opening and closing elevator behaviour and so this made me keep in mind where the pieces pivots need to be placed and how the parenting got to be done in order to get correctly animated. Once the elevator was done and placed, the carcass was placed and its access holes designed. The platforms began to take shape. We began the development of the statio platforms by its playable design, for me it was crucial to first design how the station would be played and experienced by the user. So I made quick greyboxes doing the playable boundaries and anticipating future visual and experience design troubles, that's how we found and dealt with the troubling connection of ground with the 16m level, as well as how we started to spot complications with the visual integration of the whole set. Following the original idea, the concept was to take the user from the 16m level to the 32m level by an elevator placed above the upper platform. This lead to notice heavy problems with visual integration and gameplay utility and was quickly discarded as it overloaded the scene with an amount of avoidable tris for a short experience. Instead a -middle level- was created that connected the upper platform of the 16m level with the lower platform of the 32m level. With its final touches it came the time to paint and design its materials. I decided to use seamless tileable textures for the biggest objects as it would give me more control of sharp detail, we had the exterior structure. For the platforms and elevator I made their UVs and packed them in an atlas, this maximised control over detail and enhance graphic results. Also we made a clever use of the metallness/smoothness channel to make the environment shine naturally. #03 The Second Train: Reconverting the same concept When the stations where set, running and the overall was working, it was the time to incorporate a new train to the tracks. This train design was planned to be upside down using the same track as the original wagon but with obvious appearance modifications. The principal constrain when remodelling the exterior was to keep and preserve the uvs or reshaping the train without needing to redo the material. Because both trains use the same materials. #04 Material consumption and asset optimziation The trains were done and set, the stations placed and the first tests showed good results, because for this LAND project we decided to use a prefab approach and A. Picazo, our programmer, suggested and implemented some modifications to the plugin to recognize the same 3D models and instantiate them instead of exporting them individually as separated files. The overall performance was boosted and it was now time for a texture cut, not because we really needed it, but its always a good idea to revisit the work and improve it deleting or replacing irrelevant files. As I started to dig in the relation between texture usage and the final result I concluded that the Normal map was usually not necessary to achieve a good result. This was because the ambient light in Decentraland KILLS this kind of micro-details and the directional light is not really helpful in such conditions. So normal maps were eliminated in every material that did not simulate high bumps. I must say, that one thing that really helped the graphical level we accomplished in this scene was the use of the metallic/smoothness channel, as it meant a discrete type of shinning without being visually invasive as it is the glow channel. ORM Textures and Decentraland Decentraland recommends texture optimization by using ORM (Occlusion, Roughness, Metallness) RGB textures. This is quite a good point when working in a PBR workflow but for the project we avoided its use as Ambien Occlusion requires a specific prop-set composition in order to be truly useful. Furthermore if I needed a darker area of occlusion I would just do a light multiply over the Albedo channel instead. More info about this textures can be found in the Khronos Group documentation: Creating Colliders Colliders in decentraland are created by overlapping a mesh on the model you want with collision behaviour and writing the suffix _collider to the mesh name. It is important to not have the same name twice in the same hierarchy or have the parent and child with the same naming as the GTLF export would crash. Parenting and naming order is a must. On the performance side I highly recommend to use a low-res mesh when creating the collider as Decentraland creates Mesh Colliders based on the mesh you had named with the suffix. As you may know if you are familiar with Unity, Mesh Colliders are not quite the best workaround for complex scenes so its quite better to avoid colliders with high detail or matching the original objects and do their boundaries intead. Basic issues of a Unity workflow Decentraland runs a modified version of the Unity engine with high modifications focused on their current and planned features on the platform. This is quite great as you can use the plugin and Unity to develop and preview how it will look once deployed. Alhough there are significant visual differences because of the Ambient and Directional light on deploy, you can pretty much guess how it will look like. But although the efficience boost that means working with the unity editor there are two main constrains to keep in mind. The major part of the components will not get exported with the GTLF format and therefore will not be shown in deploy: Particle Systems, Lights, Cameras, 2D components, Collider components and VFX will not work. GTLF only gets to have the basic mesh renderer, material shading and basic Animator functionality. Note that the X axis in Unity is flipped and can lead to missplacements when working with the plugin, as DCL does not have its axis inverted. X = -X Furthermore the exporter doesnt get along with large scenes and can lead to a laggy editor. The recommendable when working with large scenes is to have the DCL exporter window hidden while editing and opening it to evaluate all the entities and keep in mind if you are going out of bounds. #05 Backgrounds As soon as the main stations where placed and the it was functional. It was time to develop the ground surroundings. I decided to do an arid vegetation-less approach because I wanted to avoid a polygon overload and maximize detail above where the experience of the train was, not below. This was the decided approach, the rockish environment was detailed with some resting areas and pipes decorating the paths. The resting areas reused the textures from the props in the station and there were created 3 new materials for the dirt and rocks and one for the glass structure. #06 Final Patches During the very end of the development and with the Decentraland launch ahead KnownOrigin became the art host for the crypto art we wanted to display. A limited number of art pieces were curated and placed along the trail, being able to be seen and admired while you travel from one point to another and wait for the train. #07 Conclusion This environment meant a huge challenge for the team, as it needed to develop a custom behaviour for the train and its stops, all the props for achieving the train to move go to A.Picazo. For me, who I was in charge of the whole environment, meant a lot as I could bring to life a truly great design based on two games and an art-style I love. Furthermore there were low constrains regarding graphics as they were reused without boring the composition, this gave me the freedom to enhance the appearance by polygons and make a difference by doing a realistic approach with the material design and give extra detail in a platform that mainly relies on flat-shading and low-poly conceptualisation of environments. Kourtin environment artist I purr when you're not looking. I'm passionate about environments and all the techie stuff to make them look rad. Learning and improving everyday to be a better hooman.
La idea
Cuando empezamos a esbozar el proyecto ya teníamos claras algunas las bases: sensación de juego arcade, fácil de jugar pero difícil de dominar... varios juegos que encajaban ese espíritu eran los clásicos de Nintendo como Zelda y Super Mario.
Nos decantamos por un estilo de jugabilidad en concreto que se encontraba en The Legend of Zelda: Majora's Mask, basándonos en un nivel en concreto anotamos varias ideas que podríamos simular en Decentraland.
Limitaciones en Decentraland
En otros artículos hemos hablado de las limitaciones que nos encontramos en Decentraland, normalmente cuanto más simple sea la forma menor la probabilidad será de encontrarnos defectos en su render.
De todas formas, en Tomb Chaser queríamos dar un aspecto megalítico, de forma que podíamos jugar mejor enrevesando la forma y la distribución de los espacios. Esta principal característica la tuvimos en cuenta a la hora de determinar el flujo de trabajo del proyecto. Desarrollamos para la plataforma usando Unity, de esta forma las composiciones pueden ser fácilmente diseñadas y tener una aproximación bastante certera de como se verá en futuras pruebas y demostraciones previas a su forma final. El plugin DCL Export que usamos nos ayuda a transformar toda la información y metadata de Unity al formato GTLF listo para Decentrlaand. En busca de acelerar el proceso de creación hacemos uso de los Unity Prefabs, ya preparados para tener colisiones en la plataforma. Durante el proceso mediante prueba-error pudimos aprender con más profundidad cómo interactuaba el motor con nuestros assets. Por ejemplo, los GTLFs están preparados para pesar poco y suponer poca carga de procesado en comparación a otros formatos estándar como .fbx/.obj/.dae ... pero por otra parte suponen otras restricciones como su imposibilidad para transportar información de luces u otros componentes más allá de forma de malla, asignación de materiales y animación de transformaciones. Una vez dentro de Decentraland, tenemos otros impedimentos visuales como una acusada intensidad de luz ambiental añadida a la luz direccional que, obviamente, funciona one sided con las mallas en escena. En Decentraland lo más difícil es que algo quede oscuro.
El diseño del suelo
Para diseñar un laberinto has de pensar en su principio y su final, el camino que los conecta y luego añadir todo lo demás. De los puntos positivos de trabajar en una LAND tan grande para este proyecto fue su gran extendida altura máxima.
Decentraland hace cálculos para determinar tus limitaciones según el número de LANDs que estés haciendo uso en el proyecto, la fórmula es la siguiente: log2(n+1) x 20
Donde n representa al número de parcelas.
Puedes encontrar más información siguiendo los siguiente enlaces:
Una tierra como esta de 25 parcelas suponía tener a nuestra disposición 94 metros de altura, esto nos daba amplia libertad para crear diferentes alturas con diferentes recorridos y diseños.
Con estas amplias restricciones decidimos dedicar cada planta a un estilo de jugabilidad, algunas dedicadas a eventos de habilidad, correr o agilidad visual. Por ejemplo, la primera zona se basaba en la velocidad y la segunda en los reflejos que tenia el jugador para poder avanzar sin perder al fantasma.
Creación de las texturas
Cuando ya tuvimos el diseño general, era hora de pensar en su aspecto visual y la creación de las consecuentes texturas. Decentraland tiene una limitación de 512px por textura creada. El número que puedes hacer uso también esta delimitado según la cantidad de parcelas que forman parte de tu estado.
Para ponerlo en perspectiva, un material PBR básico hace uso de 3 texturas RGB+A mínimo: Albedo/Transparency (RGBA) map, Normal (RGB) map and Metallic/Smoothness/Occlusion map (RGBA). Para su desarrollo hicimos uso de dos técnicas de optimización de texturas: el uso de Trim Textures y Tileable Textures, ambas desgranamos a continuación.
Mediante el uso de este tipo de texturas no deberías encontrar ningún problema visual más allá de los mencionados. El principal enemigo de las tileable textures son los patrones de formas y colores, que pueden suponer una desmejora visual. Cuanto más neutra sea la composición más fácil será de mimetizarse en grandes superficies.
Trim Textures (Trim, eng. : Recortar) son similares a las Tileable Textures pero, mientras que las Tileable Textures hacen uso de su repetición extensiva mediante la ampliación de las coordenadas UVs, las Trim Textures hacen gala de "doblarse" sobre si mismas o repetirse la malla en pequeños trozos para crear el efecto de repetición. Esta situación supone un aumento de polígonos para en las UVs doblarse sobre si mismo pero su rendimiento no se ve necesariamente afectado.
Iluminando sin luz: Planos transparentes
Si decides juntar las texturas de las llamas u otros elementos semitransparentes con la información de bits de texturas opacas como la de las columnas, lo más probable es que al marcar el tipo de shader como "Fade" en Unity se generen una serie de defectos visuales no paliables sin acceder al render queue. Como este error es común debido a que las transparencias son lo último en renderizar en un espacio 3D, deberíamos siempre separar los objetos por materiales según si van a hacer uso de transparencias o no.
Ambiente oscuro a plena luz
El nulo control sobre la iluminación en las parcelas de Decentraland no te permite disponer del abanico de herramientas que Unity tiene para crear un ambiente correctamente iluminado, pero siempre hay formas de doblegar el sistema a tu voluntad, o al menos acercarnos lo máximo a nuestra visión de como queremos que sea la mazmorra.
En este proyecto toda la acción se desarrolla en un ambiente cerrado y sin apenas iluminación del exterior, pero la presencia de una luz ambiental tan fuerte lo complica bastante. Primero de todo oscurecemos las texturas, para falsificar esa falta de luz hacemos gala de una capa oscura adicional en modo multiply desde Photoshop. Mediante el uso de materiales emisivos de forma puntual podemos crear esa sensación de iluminación que realmente no existe. Además de las ya mencionadas limitaciones técnicas tenemos que poner en relieve un hecho básico en el desarrollo de entornos 3D: la luz atraviesa normales invertidas (en valor 0). Esto significa que para evitar que la luz entrara en la mazmorra había que colocar un plano oscuro mirando hacia el otro lado para cubrir cualquier posibilidad de que el valor del bias en la luz se colara en los pasillos.
Llegados al punto de tener el ambiente oscuro que deseábamos pasamos a añadir los puntos de luz que harán de contraste. Para ello hicimos uso de una forma inteligente y ligera del mapa de emisivos en diferentes assets en escena. De esta forma creábamos una imposición de color sin sacrificios visuales provocados por el post-effect automático de bloom de Decentraland.
Para los detalles finales sobre la luz, en este caso proviniente de una antorcha, deberíamos hacer uso de un mapa definido de emisivo, con zonas delimitadas en negro total para conseguir un mayor control sobre este efecto. Para añadir mayor credibilidad, una animación simple de escala y ligera rotación mediante el motor interno de Unity puede dar el toque realista que eleve el resultado a otro nivel. El uso del motor interno de edición y animación de assets de Unity es la mejor forma para así previsualizar el resultado más aproximado que se verá en Decentraland, pero recuerda que un GTLF solo aceptará la animación de sus transformaciones y nada más.
Conclusión
Considerando todo lo mencionado anteriormente, este artículo es un gran resumen de cosas que aprendimos y aplicamos durante el desarrollo del entorno. Ha sido una experiencia interesante porque las limitaciones nos llevaron a pensar de forma básica e inteligente formas de sortear todas las limitaciones sin llegar a sacrificar el resultado visual que buscábamos.
¡Una experiencia que me gustaría repetir!
Laura Usón
3D ARTIST
Passionate about videogames, movies and creatures. artist by day and superhero at night.
The Idea
When we started to concoct this project we wanted to recreate an arcade game, easy to play, hard to win, for that purpose we looked into classic games like Zelda or Super Mario.
Finally we looked into the laberynth from the games such as The Legend of Zelda: Majora's Mask, after watching the videos a couple of times, we anoted a couple of details that would be interesting to replicate.
Decentraland Limitations:
In other articles we have already discussed the limitations of decentraland, when the structures are not very complex or if you have to create a scene with models, there is, usually no problem.
However in Tomb Chaser we wanted to build a really big estructure, so that we could play with the space more precisely. In order to do that we incorporated a few steps to our pipeline to make it faster. For Decentraland, we utilise unity to mount the scene and use a plugin to export it in local and test the scene. The good thing about unity is that the illumination is very similar to Decentraland so we can see in a game engine how it is going. In order to accelerate de the process we create prefabs that we already prepare with the collider of decentraland. In this proccess, we learned quite a bit about the gltfs and the engine of Decentraland. For example the gltf's don't have to ocupe a lot of space, the software doesn't handle them very well, the ambient light travels throught everything and illuminates everything, so the dark ambients have to be faked.
Floors
To design a Laberynth, it's not complicated, just think about the start and the finish, then add the rest. One of the good things about decentraland is that you have a lot of height to play with, you can calculate how much you have in your land throught this:
log2(n+1) x 20 Height in meters
where n represents the number of parcels, also you can check this excel where it appears more clearly for designers.
Being a land of 25 we had 94 meters to work with, so when we divided the different floors, we created different storeys, that helped later on to create the open space rooms.
Also we decided to dedicate each floor to theme or traps, that way in each floor we tested one of the abilities of the player, for example on the first was speed and the second, reflexes.
Textures creation
Once we have the design made, was time to think about the textures, this is one of the biggest limitations in the platform, not only there is a limited number of textures for each scene, but you also have to take into account the size. The max size of the textures is 512 kb.
In order to work with that we used two technique that are the most useful for the environment design adn help a lot with optimization; Trim Textures and tileable textures.
With this textures you don't have this problem, since you can reduce the texture and you won't notice. The only thing you have to be careful is in create patterns, if you add something that it's not usual (like the sand mountains below) the pattern is easy to cacth. A way to bypas this is to make it completely random, that way you can conceal it.
Trim textures are similar to tileable textures, however while tileable texture you just have to enlarge the uv sets and you are ready to go. But with the trim textures you divide texture set in small textures, in squares or rectangles better, is easier to scale. That way we can create the small parts of the dungeon without abusing of the use of textures.
Transparent Planes
Also take into account that if your export your textures, Decentraland only admits .JPG, so it will covert your formats and moreover rotate them 180º.
If you mix the textures, for example columns with flames, and mark the material as a fade it makes the columns transparent to, and don't look good. So if you are going to add transparencies annotate them and prepare them in a single texture.
Dark ambient
Before I said that decentraland does not allow you to put custom lights in your scene at the moment, however we can create one, since it allows emissive materials.
In this case we want to create a dark dungeon, to do that first we have to obscure the textures, one way to do it will be add a multiply layer in photoshop, with a dark color. That way you paint the model normally and them control how "dark" you want them throught the multiply layer. Also since the light, travels throught inverted faces, (interior models like walls) we have to create a cover for them. To prevent the sun for entering the dungeon.
Finaly is time to add some light, what we used were emissive maps but with a low intensity, the emissive has the particularity that when intensity is mayor, it burns the surroundings and you can't see the models below.
I would also recommend use an emissive map, to delimit where emissive is acting, since we want a complete control over our "lights". You can also add movement to the planes throught animation, I would recommend to do it in unity thought because you have more control over waht you animate and the bones are not neccesary, like in other pipelines that you got to rig the mesh to animate it.
Conclusion
All in all, these is a compedium of tips that we have learned while we were working with the platform. It has been an interesting experience, because the limitations pushed us to look for turn arounds and tricks to recreate what we wanted to express.
A wonderfull experience that I can't wait to repeat!
Laura Uson
3D ARTIST
Passionate about videogames, movies and creatures. artist by day and superhero at night.
|
Categories
All
Archives
December 2020
|