Modding:Textures/es: Difference between revisions

From Vintage Story Wiki
No edit summary
Tags: Mobile edit Mobile web edit
No edit summary
Tags: Mobile edit Mobile web edit
 
(34 intermediate revisions by the same user not shown)
Line 9: Line 9:
=== Texturización plana ===
=== Texturización plana ===


Texturing your items and blocks in vintage story is quite simple, but there's some things to consider when using shapes. Lets start off with just using a flat texture for an item:
Texturizar tus objetos y bloques en Vintage Story es bastante sencillo, pero hay que tener en cuenta algunas cosas a la hora de usar formas. Empecemos usando una textura plana para un objeto:


<code>texture: { base: "item/resource/texture" }</code>
<code>texture: { base: "item/resource/texture" }</code>


If your item has a variant you can also use it in the textures, even without the byType function:
Si su ítem tiene una variante, también puede utilizarla en las texturas, incluso sin la función byType:


<code>texture: { base: "path to texture/texture-{variant}" }</code>
<code>texture: { base: "path to texture/texture-{variant}" }</code>


=== Shape Texturing ===
=== Texturización de formas ===


If your item is rendered with a custom shape using <code>shape: { base: "path to shape" }</code> you can control it's textures using the plural version "textures". Doing so requires that you use the same "#texture" identifier used on each side of a shape cube.
Si tu ítem se renderiza con una forma personalizada usando <code>shape: { base: "path hacia la forma" }</code> puedes controlar sus texturas usando la versión plural "textures". Para ello es necesario que utilices el mismo identificador "#texture" utilizado en cada lado de un cubo de forma.


Lets see an example. First we'll look at a few cubes in a shape JSON:
Veamos un ejemplo. En primer lugar vamos a ver algunos cubos en una forma JSON:


<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
{
{
   "name": "Cube_1",
   "name": "Cubo_1",
   "from": [ 0.5, 0.0, 2.0 ],  
   "from": [ 0.5, 0.0, 2.0 ],  
   "to": [ 5.5, 1.0, 2.5 ],  
   "to": [ 5.5, 1.0, 2.5 ],  
Line 39: Line 39:
}
}
{
{
   "name": "Cube_2",
   "name": "Cubo_2",
   "from": [ 0.5, 0.0, 2.0 ],  
   "from": [ 0.5, 0.0, 2.0 ],  
   "to": [ 5.5, 1.0, 2.5 ],  
   "to": [ 5.5, 1.0, 2.5 ],  
   "rotationOrigin": [ 1.0, 0.0, -1.0 ],
   "rotationOrigin": [ 1.0, 0.0, -1.0 ],
   "faces": {
   "faces": {
     "north": { "texture": "#wood", "uv": [ 0.0, 0.0, 5.0, 1.0 ] },
     "north": { "texture": "#madera", "uv": [ 0.0, 0.0, 5.0, 1.0 ] },
     "east": { "texture": "#wood", "uv": [ 7.0, 3.0, 7.5, 4.0 ] },
     "east": { "texture": "#madera", "uv": [ 7.0, 3.0, 7.5, 4.0 ] },
     "south": { "texture": "#wood", "uv": [ 1.0, 2.0, 6.0, 3.0 ] },
     "south": { "texture": "#madera", "uv": [ 1.0, 2.0, 6.0, 3.0 ] },
     "west": { "texture": "#wood", "uv": [ 7.0, 0.0, 7.5, 1.0 ] },
     "west": { "texture": "#madera", "uv": [ 7.0, 0.0, 7.5, 1.0 ] },
     "up": { "texture": "#wood", "uv": [ 0.0, 3.0, 5.0, 3.5 ] },
     "up": { "texture": "#madera", "uv": [ 0.0, 3.0, 5.0, 3.5 ] },
     "down": { "texture": "#wood", "uv": [ 0.0, 0.0, 5.0, 0.5 ] }
     "down": { "texture": "#madera", "uv": [ 0.0, 0.0, 5.0, 0.5 ] }
   }
   }
}
}
</syntaxhighlight>   
</syntaxhighlight>   


Now we can assign the #texture references from our item or block JSON using this format, which can also utilize variants in the regular {variant} format:
Ahora podemos asignar las referencias #texture desde nuestro item o bloque JSON usando este formato, que también puede utilizar variantes en el formato regular {variant}:


<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
textures: {
textures: {
   "metal": {base: "path to metal texture" },
   "metal": {base: "path hacia la textura de metal" },
   "wood": {base: "path to wood texture" }
   "madera": {base: "path hacia la textura de madera" }
},
},
</syntaxhighlight>
</syntaxhighlight>


This is a useful method since both "metal" and "wood" can be assigned to multiple cubes within the shape JSON.
Se trata de un método útil, ya que tanto "metal" como "madera" pueden asignarse a varios cubos dentro del JSON de la forma.


=== Voxelized Texture Shapes ===
=== Textura de Forma Voxelizada ===


If you decide you want a variant of an item to not be rendered using a JSON shape you can use the "voxelizeTexture property when defining a shape. Lets take a look at what the redmeat JSON does:
Si decides que quieres que una variante de un ítem no se renderice usando una forma JSON puedes usar la propiedad "voxelizeTexture" al definir una forma. Echemos un vistazo a lo que hace el JSON de redmeat:


<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
Line 76: Line 76:
texturesbytype: {
texturesbytype: {
   "redmeat-raw": {  
   "redmeat-raw": {  
     "meat": {base: "item/food/meat/raw" }
     "carne": {base: "item/food/meat/raw" }
   },
   },
   "redmeat-cooked":  {  
   "redmeat-cooked":  {  
     "meat": {base: "item/food/meat/cooked" }
     "carne": {base: "item/food/meat/cooked" }
   },
   },
   "redmeat-cured":  {  
   "redmeat-cured":  {  
     "meat": {base: "item/food/meat/cured" }
     "carne": {base: "item/food/meat/cured" }
   },
   },
   "redmeat-vintage": {
   "redmeat-vintage": {
Line 90: Line 90:
</syntaxhighlight>
</syntaxhighlight>


We can see here that only the "vintage" variant will be rendered as a regular voxelized item texture, while the rest will use the redmeat shape and apply their texture to it.
Podemos ver aquí que sólo la variante "vintage" se renderizará como una textura de objeto voxelizada normal, mientras que el resto utilizará la forma carne y le aplicará su textura.


== Texturing a Block ==
== Texturizar un Bloque ==


=== Simple Block ===
=== Un Bloque Simple ===


Blocks are textured a little differently since they default to generic "cube" shape. This means they don't use the singular "texture" method, and instead always use a version of the plural "textures":
Los bloques se texturizan de forma un poco diferente, ya que por defecto tienen la forma genérica de "cubo". Esto significa que no utilizan el método singular "texture", y en su lugar siempre utilizan una versión del plural "textures":


<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
textures: {
textures: {
   all: {base: "path to texture*"}
   all: {base: "path hacia la textura*"}
},
},
</syntaxhighlight>
</syntaxhighlight>


=== Texturing Other Block Faces ===
=== Texturizar otras caras de bloques ===


When assigning textures "all" will give every side the same texture, but we can easily customize each side, especially if we want to use some block behaviors like <code>"Pillar"</code> or <code>"HorizontalOrientable"</code>:
Al asignar texturas "all" dará a cada lado la misma textura, pero podemos personalizar fácilmente cada lado, especialmente si queremos usar algunos comportamientos de bloque como <code>"Pillar"</code> o <code>"HorizontalOrientable"</code>:


<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
textures: {
textures: {
   up: { base: "path to top texture" },
   up: { base: "path hacia la textura superior" },
   down: { base: "path to bottom texture" },
   down: { base: "path hacia la textura inferior" },
   south: { base: "path to back texture" },
   south: { base: "path hacia la textura trasera" },
   north: { base: "path to front texture" },
   north: { base: "path hacia la textura frontal" },
   west: { base: "path to left texture" },
   west: { base: "path hacia la textura izquierda" },
   east: { base: "path to right texture" },
   east: { base: "path hacia la textura derecha" },
},
},
</syntaxhighlight>
</syntaxhighlight>


Keep in mind that if you're using the <code>"Pillar"</code> or <code>"HorizontalOrientable"</code> behaviors you'll need directional variants for each (such as updown, northsouth, eastwest etc.) and you'll likely have to organize it using the ByType functionality. A great example of this is the log (Pillar) and altar (HorizontalOrientable) JSONS.  
Tenga en cuenta que si utiliza los comportamientos <code>"Pillar"</code> u <code>"HorizontalOrientable"</code> necesitará variantes direccionales para cada uno (como arriba-abajo, norte-sur, este-oeste, etc.) y probablemente tendrá que organizarlo utilizando la funcionalidad ByType. Un gran ejemplo de esto son los JSONS log (Pilar) y altar (HorizontalOrientable).  


== Texturing an Entity ==
== Texturizar una entidad ==


=== Basic Entity Texture ===
=== Textura básica de entidad ===


All entities utilize a shape, but generally they are applied using a single entity map texture, which is essentially a texture file with each cube side mapped onto it. Doing this manually would be incredibly tedious, and is best done with the Vintage Story Model Builder found [[VS Model Creator| here]].   
Todas las entidades utilizan una forma, pero por lo general se aplican utilizando una única textura de mapa de entidad, que es esencialmente un archivo de textura con cada lado del cubo mapeado en él. Hacer esto manualmente sería increíblemente tedioso, y se hace mejor con el Vintage Story Model Builder que se encuentra [[VS Model Creator/es| aquí]].   


Once you have your properly mapped out texture you can assign it to your entity:
Una vez que tengas tu textura correctamente mapeada puedes asignarla a tu entidad:


<code>texture: { base: "path to texture map" }</code>
<code>texture: { base: "path hacia la textura mapeada" }</code>


=== Alternative Entity Textures ===
=== Textura de Entidad Alternativas ===


after defining the first texture, you can also add alternatives to the same entity. Lets look at the Wolf for an example:
después de definir la primera textura, también puede añadir alternativas a la misma entidad. Veamos el Lobo como ejemplo:




<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
texture: { base: "entity/wolf/wolf1", alternates: [ { base: "entity/wolf/wolf2" }, { base: "entity/wolf/wolf2" }, {...} ] }
texture: { base: "entity/wolf/lobo1", alternates: [ { base: "entity/wolf/lobo2" }, { base: "entity/wolf/lobo2" }, {...} ] }
</syntaxhighlight>
</syntaxhighlight>
Each successive alternative should be numbered (starting with 1).  
Cada alternativa sucesiva debe ir numerada (empezando por 1).  


{{Navbox/modding|Vintage Story}}
{{Navbox/modding|Vintage Story}}

Latest revision as of 21:01, 14 June 2023

Other languages:

This page was last verified for Vintage Story version 1.15.


Antes de personalizar las texturas, te sugerimos que leas primero las páginas Item Básico, Bloque Básico y Entidad Básica para entender este tutorial.


Texturizar un Item

Texturización plana

Texturizar tus objetos y bloques en Vintage Story es bastante sencillo, pero hay que tener en cuenta algunas cosas a la hora de usar formas. Empecemos usando una textura plana para un objeto:

texture: { base: "item/resource/texture" }

Si su ítem tiene una variante, también puede utilizarla en las texturas, incluso sin la función byType:

texture: { base: "path to texture/texture-{variant}" }

Texturización de formas

Si tu ítem se renderiza con una forma personalizada usando shape: { base: "path hacia la forma" } puedes controlar sus texturas usando la versión plural "textures". Para ello es necesario que utilices el mismo identificador "#texture" utilizado en cada lado de un cubo de forma.

Veamos un ejemplo. En primer lugar vamos a ver algunos cubos en una forma JSON:

{
  "name": "Cubo_1",
  "from": [ 0.5, 0.0, 2.0 ], 
  "to": [ 5.5, 1.0, 2.5 ], 
  "rotationOrigin": [ 1.0, 0.0, -1.0 ],
  "faces": {
    "north": { "texture": "#metal", "uv": [ 0.0, 0.0, 5.0, 1.0 ] },
    "east": { "texture": "#metal", "uv": [ 7.0, 3.0, 7.5, 4.0 ] },
    "south": { "texture": "#metal", "uv": [ 1.0, 2.0, 6.0, 3.0 ] },
    "west": { "texture": "#metal", "uv": [ 7.0, 0.0, 7.5, 1.0 ] },
    "up": { "texture": "#metal", "uv": [ 0.0, 3.0, 5.0, 3.5 ] },
    "down": { "texture": "#metal", "uv": [ 0.0, 0.0, 5.0, 0.5 ] }
  }
}
{
  "name": "Cubo_2",
  "from": [ 0.5, 0.0, 2.0 ], 
  "to": [ 5.5, 1.0, 2.5 ], 
  "rotationOrigin": [ 1.0, 0.0, -1.0 ],
  "faces": {
    "north": { "texture": "#madera", "uv": [ 0.0, 0.0, 5.0, 1.0 ] },
    "east": { "texture": "#madera", "uv": [ 7.0, 3.0, 7.5, 4.0 ] },
    "south": { "texture": "#madera", "uv": [ 1.0, 2.0, 6.0, 3.0 ] },
    "west": { "texture": "#madera", "uv": [ 7.0, 0.0, 7.5, 1.0 ] },
    "up": { "texture": "#madera", "uv": [ 0.0, 3.0, 5.0, 3.5 ] },
    "down": { "texture": "#madera", "uv": [ 0.0, 0.0, 5.0, 0.5 ] }
  }
}

Ahora podemos asignar las referencias #texture desde nuestro item o bloque JSON usando este formato, que también puede utilizar variantes en el formato regular {variant}:

textures: {
  "metal": {base: "path hacia la textura de metal" },
  "madera": {base: "path hacia la textura de madera" }
},

Se trata de un método útil, ya que tanto "metal" como "madera" pueden asignarse a varios cubos dentro del JSON de la forma.

Textura de Forma Voxelizada

Si decides que quieres que una variante de un ítem no se renderice usando una forma JSON puedes usar la propiedad "voxelizeTexture" al definir una forma. Echemos un vistazo a lo que hace el JSON de redmeat:

shapebytype: { 
  "redmeat-vintage": { base: "item/empty", voxelizeTexture: true },
  "*": { base: "item/food/meat/red" },
},
texturesbytype: {
  "redmeat-raw": { 
    "carne": {base: "item/food/meat/raw" }
  },
  "redmeat-cooked":  { 
    "carne": {base: "item/food/meat/cooked" }
  },
  "redmeat-cured":  { 
    "carne": {base: "item/food/meat/cured" }
  },
  "redmeat-vintage": {
    "item/empty":  { base: "item/food/meat/vintage" }
  }
},

Podemos ver aquí que sólo la variante "vintage" se renderizará como una textura de objeto voxelizada normal, mientras que el resto utilizará la forma carne y le aplicará su textura.

Texturizar un Bloque

Un Bloque Simple

Los bloques se texturizan de forma un poco diferente, ya que por defecto tienen la forma genérica de "cubo". Esto significa que no utilizan el método singular "texture", y en su lugar siempre utilizan una versión del plural "textures":

textures: {
  all: {base: "path hacia la textura*"}
},

Texturizar otras caras de bloques

Al asignar texturas "all" dará a cada lado la misma textura, pero podemos personalizar fácilmente cada lado, especialmente si queremos usar algunos comportamientos de bloque como "Pillar" o "HorizontalOrientable":

textures: {
  up: { base: "path hacia la textura superior" },
  down: { base: "path hacia la textura inferior" },
  south: { base: "path hacia la textura trasera" },
  north: { base: "path hacia la textura frontal" },
  west: { base: "path hacia la textura izquierda" },
  east: { base: "path hacia la textura derecha" },
},

Tenga en cuenta que si utiliza los comportamientos "Pillar" u "HorizontalOrientable" necesitará variantes direccionales para cada uno (como arriba-abajo, norte-sur, este-oeste, etc.) y probablemente tendrá que organizarlo utilizando la funcionalidad ByType. Un gran ejemplo de esto son los JSONS log (Pilar) y altar (HorizontalOrientable).

Texturizar una entidad

Textura básica de entidad

Todas las entidades utilizan una forma, pero por lo general se aplican utilizando una única textura de mapa de entidad, que es esencialmente un archivo de textura con cada lado del cubo mapeado en él. Hacer esto manualmente sería increíblemente tedioso, y se hace mejor con el Vintage Story Model Builder que se encuentra aquí.

Una vez que tengas tu textura correctamente mapeada puedes asignarla a tu entidad:

texture: { base: "path hacia la textura mapeada" }

Textura de Entidad Alternativas

después de definir la primera textura, también puede añadir alternativas a la misma entidad. Veamos el Lobo como ejemplo:


texture: { base: "entity/wolf/lobo1", alternates: [ { base: "entity/wolf/lobo2" }, { base: "entity/wolf/lobo2" }, {...} ] }

Cada alternativa sucesiva debe ir numerada (empezando por 1).

Icon Sign.png

Wondering where some links have gone?
The modding navbox is going through some changes! Check out Navigation Box Updates for more info and help finding specific pages.

Modding
Modding Introduction Getting Started Pack Temático
Content Modding Content Mods Developing a Content Mod Basic Tutorials Intermediate Tutorials Advanced Tutorials Content Mod Concepts
Code Modding Code Mods Setting up your Development Environment
Property Overview ItemEntityBlockBlock BehaviorsBlock ClassesBlock EntitiesBlock Entity BehaviorsWorld properties
Workflows & Infrastructure Modding Efficiency TipsMod-engine compatibilityMod ExtensibilityVS Engine
Additional Resources Community Resources Modding API Updates Programming Languages List of server commandsList of client commandsClient startup parametersServer startup parameters
Example ModsAPI DocsGitHub Repository