Es/Leak: Difference between revisions

From Valve Developer Community
< Es
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{wip}}{{translate}}
{{wip}}{{translate}}
{{LanguageBar}}
{{LanguageBar|title=Fugas (error visual)}}


{{L|.bsp (Source)}} maps must be completely internally sealed. No part of the interior of the level, the world, should connect with the outside, the {{L|void}}. Even the sky must be sealed off with a brush using the <code>tools/toolsskybox</code> texture. When there is any kind of gap to the void, a '''leak''' is generated when the map is compiled by {{L|VBSP}}. When a leak occurs, {{L|VBSP}} cannot tell which part of the level is inside, and what part is outside, and it will not work properly.
Los mapas {{L|.bsp (Source)}} deben sellarse internamente por completo. Ninguna parte del interior del mapa, del nivel o mundo en sí, debería estar en conexión con el {{L|void|vacío}} exterior. Incluso el cielo debe ser sellado con una textura <code>tools/toolsskybox</code>. Si hubiera cualquier tipo de hueco o conexión con el vacío del mapa se producirá un '''error visual''' llamado '''fuga''' o '''filtración''' (''leak'' en inglés) al compilar el mapa con {{L|VBSP}}. Al producirse esta fuga, {{L|VBSP}} no sabe detectar que parte del mapa está dentro o fuera del nivel, por lo que no funcionará adecuadamente.


This example shows a map with an obvious gap in the geometry, leading to the void. This will generate a leak error message when it is compiled:
Este ejemplo muestra un mapa con un espacio obvio en su geometría, por el que se ve el vacío. Este generará un mensaje indicando el error de fuga al compilar:


[[File:hammer_leaks1.jpg|frame|left|A gap in geometry that leads to the void will cause leaks.]]{{clr}}
[[File:hammer_leaks1.jpg|frame|left|Un espacio que produce que se vea el vacío, causando un error de fuga.]]{{clr}}


When a map like this is compiled, with a gap to the void, VBSP generates an error similar to this in the compile log:
Al compilar un mapa con dicho problema, VBSP genera un error similar a este en el registro de compilación:


<pre>
<pre>
Line 16: Line 16:
</pre>
</pre>


With this error message, VBSP is telling you that there has been a leak in the level, and the first entity it found when attempting to get into the level from the void (in this case, a light entity). It also gives you the location of that entity, expressed in X, Y, and Z world unit coordinates.
Con un mensaje de error de este tipo, VBSP nos dice que hay algún error visual por alguna fuga en el mapa e indica la primera entidad que se encuentra cuando intenta entrar en el mapa (en este caso, es una luz). También da la ubicación de la entidad, expresada en coordenadas de los ejes X, Y y Z.


{{note|Often the mentioned entity is not the cause of the leak - it's the one that the leak trace originated from. Deleting it will simply make the report mention another entity, it won't solve the problem! There is one situation when deleting an entity does solve the leak: when it's placed outside the playable area. This is covered later in this article.}}
{{note|A veces no es la entidad mencionada la causante de la fuga, sino alguna que lo produzca a raíz de esa. En este caso, eliminando dicha entidad se conseguirá que el informe mencione otra entidad, pero no se solucionará el problema. Hay una situación en la que al eliminarla se soluciona la fuga: cuando está fuera de la zona de juego. Más adelante se hablará de esto.}}


{{note|If you have no point entities in your map when you compile it, {{vbsp|4}} may report a leak, because it has no way of deciding whether the interior or exterior of the map is the playable area.}}
{{note|Si no tienes entidades en el mapa al compilar, {{vbsp|4}} informará del error de fuga, pero no tendrá manera de saber si está en el interior o el exterior de la zona jugable del mapa.}}


{{note|VVIS will refuse to run if there is a leak; in {{as|4}} and later {{also|{{hammer++}}}}, this will stop the compile process. This does not apply when previewing maps in the {{L|Portal 2 Puzzle Maker}}, for unknown reasons.}}
{{note|VVIS no cargará algo si tiene un error de fuga, en {{as|4}} y versiones posteriores del {{also|{{hammer++}}}}, esto detendrá el proceso de compilación. Esto no se aplica a la previsualización de mapas en {{L|Portal 2 Puzzle Maker}}, por motivos que se desconocen.}}


{{note|In {{p2|4}}, {{csgo|4}} and {{as|4}}, if you have a leak and you skip {{vvis|4}}, the map will not compile the skybox.{{clarify}}}}
{{note|En {{p2|4}}, {{csgo|4}} y {{as|4}}, si sufres un error de fuga y omites {{vvis|4}}, el mapa no compilará la textura del cielo.{{clarify}}}}


{{note|If a {{L|water}} material is appearing as nodraw, this is likely caused by a leak.}}
{{note|Si hay {{L|water|agua}} que aparezca como textura invisible «nodraw», puede ser causado por una fuga.}}


== Effects of leaks ==
== Efectos de fugas ==
Una fuga en un mapa puede tener una serie de efectos negativos. {{L|VBSP}} informará del error y no producirá un archivo (<code>mapname.{{L|prt}}</code>) del todo correcto. El archivo lo utiliza {{L|VVIS}} para realizar los cálculos de visualización. Como el archivo no es perfecto, VVIS no lo ejecutará correctamente. Si esto se produce, {{L|VRAD}} también funcionará mal; puede que solo funcione la iluminación directa y no el resto.


A leak in a level has a number of bad effects. {{L|VBSP}} will report the leak, and it will not correctly produce a portalfile (<code>mapname.{{L|prt}}</code>), if at all. The portal file is used by {{L|VVIS}} to perform its visibility calculations. Since there is no portal file, VVIS will not run correctly/at all. When this happens, {{L|VRAD}} will also work incorrectly, or only perform direct lighting - no light bounces.
Estos mapas puede que sean completamente injugables. VVIS puede que pida al motor renderizar el mapa entero de una vez, lo que es perjudicial para los fotogramas por segundo y puede incluso hacer que partes del mapa sean completamente invisibles. VRAD renderizará tu mapa en negro completamente.


Maps are usually not playable at all. VVIS may tell the engine to render the entire map at once, which is bad for framerates, or have entire areas be invisible. At worst, a leak can make VRAD render your entire map black.
== Pérdida de tiempo con las fugas ==
{{L|VBSP}} informará de todas las fugas que encuentre, pero esperar horas a que se compile por completo, ejecutar el juego y encontrar dónde esta el error tras compilar es algo, simplemente, ineficiente. Es recomendable asegurarse de que el mapa no tiene fugas antes de empezar a compilarlo. Si detectas que VBSP tiene alguna fuga al compilar, puedes usar Ctrl+C para anular el proceso de compilación.


== Wasting time with leaks ==
== Encontrando fugas ==
A veces estas fugas no son tan evidentes como en el ejemplo. Pueden ser una fracción de unidad y aún así causar una fuga. {{L|VBSP}} te muestra un {{L|pointfile|archivo de puntos}} que te ayuda a encontrar el error. Esto hace una línea del vacío del mapa hasta la entidad en donde se encuentra en el último chequeo. Tras recibir el error de fuga, se crea un archivo llamado <code>nombredelmapa{{L|.lin}}</code> en el mismo directorio que el {{L|.vmf}} del mapa.


{{L|VBSP}} will always report any leaks it finds, but spending hours of full compile time and game execution just to find out that your map is broken ''after'' compilation, simply isn't efficient. Make sure you've tested that your map doesn't have a leak ''before'' you even begin to worry about your map's visibility and lighting. If you notice that VBSP leaked while the compile is happening, press Ctrl+C to abort the compile.
=== Cargando un archivo de puntos ===
 
El archivo de puntos se puede cargar en el editor Hammer para mostrar con precisión dónde está la fuga en el mapa. Para cargar un archivo de punto de un nivel, se usa {{L|Hammer_Map_Menu#Load Pointfile|Cargar archivo de puntos}} en el menú '''Mapa'''.
== Finding leaks ==
 
Sometimes these gaps aren't quite as obvious as the above example. They can be a fraction of a unit wide and still cause a leak. {{L|VBSP}} provides you with a {{L|pointfile}} to help you locate the leak. It draws a line from the void of the map to the entity it found during the leak check. After receiving a leak error, a <code>mapname{{L|.lin}}</code> file will be created in the same directory as your {{L|.vmf}} map file.
 
=== Loading a Pointfile ===
 
The pointfile can be loaded into the Hammer Editor to show you precisely where the leak is inside the level. To load a pointfile for the level, use the {{L|Hammer_Map_Menu#Load Pointfile|Load Pointfile}} command in the '''Map''' menu.
 
[[File:hammer_leaks5.jpg||thumb|400px|right|The '''Load Pointfile''' command shows the path to the leak in the Hammer viewports.]]
This image shows the pointfile loaded into the previous example. Notice that the red line appears in both the 3D and 2D views, and is traced back from the entity through the gap.


[[File:hammer_leaks5.jpg||thumb|400px|right|El comando '''Cargar archivo de puntos''' muestra un camino a la fuga en Hammer.]]
Esta imagen muestra un archivo de punto cargado en el ejemplo anterior. La línea roja aparece en ambas vistas, 3D y 2D, y se extiende hasta el hueco.
<!--
Using this visual aid, you can find the source of the leak by following the red line to the outside of the level. It's best to start at the entity specified by {{L|VBSP}}, and then follow the line until you find the gap in the geometry. Close the gap and recompile the level to see if you have fixed the leak.{{clr}}
Using this visual aid, you can find the source of the leak by following the red line to the outside of the level. It's best to start at the entity specified by {{L|VBSP}}, and then follow the line until you find the gap in the geometry. Close the gap and recompile the level to see if you have fixed the leak.{{clr}}


Line 56: Line 52:


Another method to find the source of the leak is to zoom out in one or more of the 2D views. After loading the pointfile, zoom out until you see the red line. Follow the line until you reach the entity at the one of the endpoints. Then select the entity, and choose {{L|Hammer_View_Menu#Center_Views_on_Selection_.3CCtrl.2BE.3E|Center 3D Views on Selection}} from the '''View''' menu. Now you can follow the pointfile line to find the leak.
Another method to find the source of the leak is to zoom out in one or more of the 2D views. After loading the pointfile, zoom out until you see the red line. Follow the line until you reach the entity at the one of the endpoints. Then select the entity, and choose {{L|Hammer_View_Menu#Center_Views_on_Selection_.3CCtrl.2BE.3E|Center 3D Views on Selection}} from the '''View''' menu. Now you can follow the pointfile line to find the leak.
-->
== Otros tipos de fuga ==
Además de los espacios en la geometría exterior, hay otros errores que causan que {{L|VBSP}} genere error de fugas.


== Other causes of leaks ==
=== Entidades fuera del mapa ===
 
[[File:hammer_leaks2.jpg||thumb|300px|right|Al colocar cualquier entidad en el {{L|void}} se producirán fugas.]]
Besides gaps in outside geometry, there are other map errors that can cause {{L|VBSP}} to generate a leak error.
Todas las entidades deben estar dentro de la zona jugable o de la textura del cielo. VBSP trata de sellar el mapa con una entidad, como {{L|func_door}}.{{clr}}
 
<!--
=== Entities outside the level ===
[[File:hammer_leaks2.jpg||thumb|300px|right|Placing any entity in the {{L|void}} will cause a leak.]]
All entities need to be inside the playable level space or skybox. VBSP treats all brush entities as if they are not there, so attempting to seal a map with a brush entity, such as a {{L|func_door}}, will create the same condition as if there were a gap in their place.{{clr}}
 
=== Improperly constructed areaportals ===
=== Improperly constructed areaportals ===
[[File:hammer_leaks3.jpg||thumb|300px|right|Areaportals that do not seal areas will cause leaks.]]
[[File:hammer_leaks3.jpg||thumb|300px|right|Areaportals that do not seal areas will cause leaks.]]
Line 72: Line 67:
[[File:hammer_leaks4.jpg||thumb|300px|right|Seal areas behind non-solid geometry to prevent leaks.]]
[[File:hammer_leaks4.jpg||thumb|300px|right|Seal areas behind non-solid geometry to prevent leaks.]]


{{L|Displacements}} and {{L|water}} also do not seal maps and will cause leaks. You can fix this type of leak by adding a solid brush behind them to seal the map. Using a brush with the <code>tools/toolsnodraw</code> material will seal the map, but not add any additional rendering cost, so it's a great way to seal the map behind displacements. Water should be sealed off with whatever is sealing off the area above it (probably <code>tools/toolsskybox</code> or another typical texture, such as bricks.) Do not use nodraw to seal off water, as this will cause a weird trailing effect.{{clr}}
{{L|Displacements}} and {{L|water|agua}} also do not seal maps and will cause leaks. You can fix this type of leak by adding a solid brush behind them to seal the map. Using a brush with the <code>tools/toolsnodraw</code> material will seal the map, but not add any additional rendering cost, so it's a great way to seal the map behind displacements. Water should be sealed off with whatever is sealing off the area above it (probably <code>tools/toolsskybox</code> or another typical texture, such as bricks.) Do not use nodraw to seal off water, as this will cause a weird trailing effect.{{clr}}


=== Mismatched entity origins ===
=== Mismatched entity origins ===
Line 131: Line 126:


Using the pointfile tools makes finding leaks relatively painless, but one of the most important ways to fix leaks is by preventing them in the first place. Taking your time when building, and making sure brushes are snapped properly to the grid can go a long way towards eliminating leaks before they occur. The cleaner and more organized your geometry, the more likely you are to be able to spot leaks when they occur, or even prevent them from happening in the first place. You can also help prevent lots of extra work by compiling your level as you go along, instead of building your whole level before trying to compile it. Finding one leak at a time while the map is only partially complete is a lot easier and faster than finding leaks in a complete map that is full of geometry.
Using the pointfile tools makes finding leaks relatively painless, but one of the most important ways to fix leaks is by preventing them in the first place. Taking your time when building, and making sure brushes are snapped properly to the grid can go a long way towards eliminating leaks before they occur. The cleaner and more organized your geometry, the more likely you are to be able to spot leaks when they occur, or even prevent them from happening in the first place. You can also help prevent lots of extra work by compiling your level as you go along, instead of building your whole level before trying to compile it. Finding one leak at a time while the map is only partially complete is a lot easier and faster than finding leaks in a complete map that is full of geometry.
 
-->
{{ACategory|Source}}
{{ACategory|Source}}



Latest revision as of 00:26, 25 October 2024

Under construction.png
This page is actively undergoing a major edit.
As a courtesy, please do not edit this while this message is displayed.
If this page has not been edited for at least several hours to a few days, please remove this template. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.

The person who added this notice will be listed in its edit history should you wish to contact them.

Info content.png
This page needs to be translated.
This page either contains information that is only partially or incorrectly translated, or there isn't a translation yet.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article complies with the alternate languages guide.(en)
English (en)Deutsch (de)Español (es)Français (fr)Русский (ru)中文 (zh)Translate (Translate)

Los mapas .bsp (Source)(en) deben sellarse internamente por completo. Ninguna parte del interior del mapa, del nivel o mundo en sí, debería estar en conexión con el vacío(en) exterior. Incluso el cielo debe ser sellado con una textura tools/toolsskybox. Si hubiera cualquier tipo de hueco o conexión con el vacío del mapa se producirá un error visual llamado fuga o filtración (leak en inglés) al compilar el mapa con VBSP(en). Al producirse esta fuga, VBSP(en) no sabe detectar que parte del mapa está dentro o fuera del nivel, por lo que no funcionará adecuadamente.

Este ejemplo muestra un mapa con un espacio obvio en su geometría, por el que se ve el vacío. Este generará un mensaje indicando el error de fuga al compilar:

Un espacio que produce que se vea el vacío, causando un error de fuga.

Al compilar un mapa con dicho problema, VBSP genera un error similar a este en el registro de compilación:

ProcessBlock_Thread: 0...1...2...3...4...5...6...7...8...9...10 (0)
**** leaked ****
Entity light (-1607.69 -1094.12 -183.00) leaked!

Con un mensaje de error de este tipo, VBSP nos dice que hay algún error visual por alguna fuga en el mapa e indica la primera entidad que se encuentra cuando intenta entrar en el mapa (en este caso, es una luz). También da la ubicación de la entidad, expresada en coordenadas de los ejes X, Y y Z.

Note.pngNota:A veces no es la entidad mencionada la causante de la fuga, sino alguna que lo produzca a raíz de esa. En este caso, eliminando dicha entidad se conseguirá que el informe mencione otra entidad, pero no se solucionará el problema. Hay una situación en la que al eliminarla se soluciona la fuga: cuando está fuera de la zona de juego. Más adelante se hablará de esto.
Note.pngNota:Si no tienes entidades en el mapa al compilar, VBSP VBSP informará del error de fuga, pero no tendrá manera de saber si está en el interior o el exterior de la zona jugable del mapa.
Note.pngNota:VVIS no cargará algo si tiene un error de fuga, en Alien Swarm Alien Swarm y versiones posteriores del (también en Hammer++), esto detendrá el proceso de compilación. Esto no se aplica a la previsualización de mapas en Portal 2 Puzzle Maker(en), por motivos que se desconocen.
Note.pngNota:En Portal 2 Portal 2, Counter-Strike: Global Offensive Counter-Strike: Global Offensive y Alien Swarm Alien Swarm, si sufres un error de fuga y omites VVIS VVIS, el mapa no compilará la textura del cielo.[Clarificar]
Note.pngNota:Si hay agua(en) que aparezca como textura invisible «nodraw», puede ser causado por una fuga.

Efectos de fugas

Una fuga en un mapa puede tener una serie de efectos negativos. VBSP(en) informará del error y no producirá un archivo (mapname.prt(en)) del todo correcto. El archivo lo utiliza VVIS(en) para realizar los cálculos de visualización. Como el archivo no es perfecto, VVIS no lo ejecutará correctamente. Si esto se produce, VRAD(en) también funcionará mal; puede que solo funcione la iluminación directa y no el resto.

Estos mapas puede que sean completamente injugables. VVIS puede que pida al motor renderizar el mapa entero de una vez, lo que es perjudicial para los fotogramas por segundo y puede incluso hacer que partes del mapa sean completamente invisibles. VRAD renderizará tu mapa en negro completamente.

Pérdida de tiempo con las fugas

VBSP(en) informará de todas las fugas que encuentre, pero esperar horas a que se compile por completo, ejecutar el juego y encontrar dónde esta el error tras compilar es algo, simplemente, ineficiente. Es recomendable asegurarse de que el mapa no tiene fugas antes de empezar a compilarlo. Si detectas que VBSP tiene alguna fuga al compilar, puedes usar Ctrl+C para anular el proceso de compilación.

Encontrando fugas

A veces estas fugas no son tan evidentes como en el ejemplo. Pueden ser una fracción de unidad y aún así causar una fuga. VBSP(en) te muestra un archivo de puntos(en) que te ayuda a encontrar el error. Esto hace una línea del vacío del mapa hasta la entidad en donde se encuentra en el último chequeo. Tras recibir el error de fuga, se crea un archivo llamado nombredelmapa.lin(en) en el mismo directorio que el .vmf(en) del mapa.

Cargando un archivo de puntos

El archivo de puntos se puede cargar en el editor Hammer para mostrar con precisión dónde está la fuga en el mapa. Para cargar un archivo de punto de un nivel, se usa Cargar archivo de puntos(en) en el menú Mapa.

El comando Cargar archivo de puntos muestra un camino a la fuga en Hammer.

Esta imagen muestra un archivo de punto cargado en el ejemplo anterior. La línea roja aparece en ambas vistas, 3D y 2D, y se extiende hasta el hueco.

Otros tipos de fuga

Además de los espacios en la geometría exterior, hay otros errores que causan que VBSP(en) genere error de fugas.

Entidades fuera del mapa

Al colocar cualquier entidad en el void(en) se producirán fugas.

Todas las entidades deben estar dentro de la zona jugable o de la textura del cielo. VBSP trata de sellar el mapa con una entidad, como func_door(en).