Es/$phong: Difference between revisions
< Es
Jump to navigation
Jump to search
m (-Using L template for links) |
|||
Line 1: | Line 1: | ||
{{langsp}} | {{langsp}} | ||
[[File:Alyx phong closeup.jpg|thumb|200px|Sombreado phong en la piel, el pelo y los labios de Alyx.]] | [[File:Alyx phong closeup.jpg|thumb|200px|Sombreado phong en la piel, el pelo y los labios de Alyx.]] | ||
También está disponible en sombreado {{shader Name|LightmappedGeneric}} y {{Shader Name|WorldVertexTransition}} en todos los juegos desde {{csgo|4}}. proporcionando [https://es.wikipedia.org/wiki/Reflexi%C3%B3n_difusa reflexión difusa] a baja intensidad y [https://es.wikipedia.org/wiki/Resaltado_especular resaltado especular], enmascarados con una textura que controla su intensidad mediante téxeles. Para una explicación completa, véase | También está disponible en sombreado {{shader Name|LightmappedGeneric}} y {{Shader Name|WorldVertexTransition}} en todos los juegos desde {{csgo|4}}. proporcionando [https://es.wikipedia.org/wiki/Reflexi%C3%B3n_difusa reflexión difusa] a baja intensidad y [https://es.wikipedia.org/wiki/Resaltado_especular resaltado especular], enmascarados con una textura que controla su intensidad mediante téxeles. Para una explicación completa, véase {{L|Phong materials|materiales phong}}. | ||
{{Note|El sombreado phong <code>LightmappedGeneric</code> y <code>WorldVertexTransition</code> solo está disponible en {{csgobranch|4}}. Es necesario que la luz solar ilumine el material de una entidad {{ent|env_cascade_light}} para que funcione adecuadamente y usa sombras dinámicas generadas como máscara sobre las máscaras de sombreado tradicional ({{Strata|since}} {{ent|env_projectedtexture|4}} también afecta a los sólidos con sombreado phong activado)}}. | {{Note|El sombreado phong <code>LightmappedGeneric</code> y <code>WorldVertexTransition</code> solo está disponible en {{csgobranch|4}}. Es necesario que la luz solar ilumine el material de una entidad {{ent|env_cascade_light}} para que funcione adecuadamente y usa sombras dinámicas generadas como máscara sobre las máscaras de sombreado tradicional ({{Strata|since}} {{ent|env_projectedtexture|4}} también afecta a los sólidos con sombreado phong activado)}}. | ||
{{Note|El sombreado phong para <code>LightmappedGeneric</code> también está disponible en {{mapbase|4}}, pero se implementa distinto.}} | {{Note|El sombreado phong para <code>LightmappedGeneric</code> también está disponible en {{mapbase|4}}, pero se implementa distinto.}} | ||
{{important|En {{bms|4}} el reflejo de Lambert para | {{important|En {{bms|4}} el reflejo de Lambert para {{L|NewLight Point|nuevas iluminaciones}} no funciona. Por tanto las mallas con {{L|$phong}} o {{L|$halflambert}} reciben luz de TODOS lados perpendicularmente. Si quieres usar {{L|$phong}} o {{L|$halflambert}} puedes corregir esto añadiendo para el material {{L|VMT}} el parámetro <code>"$halflambert_gbuffer_off" "1"</code>.}} | ||
==Sintaxis== | ==Sintaxis== | ||
$phong < | $phong <{{L|bool}}> | ||
{{note|Todos los parámetros del siguiente ejemplo deben estar especificados en el material, de otro modo el sombreado phong no se muestra, excepto en {{insurgency|4}}.}} | {{note|Todos los parámetros del siguiente ejemplo deben estar especificados en el material, de otro modo el sombreado phong no se muestra, excepto en {{insurgency|4}}.}} | ||
:{{todo|Otros juegos que no necesitan parámetros phong (como Portal 2 en adelante)}} | :{{todo|Otros juegos que no necesitan parámetros phong (como Portal 2 en adelante)}} | ||
Line 32: | Line 32: | ||
* '''If''' {{ent|$normalmapalphaenvmapmask}} is used, the {{ent|$bumpmap}}'s alpha channel will be used for Phong masking. Using either <code>$basemapalphaphongmask</code> or <code>$basemapluminancephongmask</code> will override it. | * '''If''' {{ent|$normalmapalphaenvmapmask}} is used, the {{ent|$bumpmap}}'s alpha channel will be used for Phong masking. Using either <code>$basemapalphaphongmask</code> or <code>$basemapluminancephongmask</code> will override it. | ||
<br> | <br> | ||
{{MatParam|$bumpmap|texture|Phong requires mask. The | {{MatParam|$bumpmap|texture|Phong requires mask. The {{L|alpha channel}} of a {{L|$bumpmap|bump map}} acts as a Phong mask by default.}} | ||
{{MatParam|$basemapalphaphongmask|bool|Use {{ent|$basetexture}}'s | {{MatParam|$basemapalphaphongmask|bool|Use {{ent|$basetexture}}'s {{L|alpha channel}} as the Phong mask instead of <code>$bumpmap</code>'s {{L|alpha channel}}. | ||
{{warning|Using this with {{ent|$normalmapalphaenvmapmask}} will override the mask used for {{ent|$envmap}} to be the contents of the {{ent|$basetexture}}'s alpha channel!}} | {{warning|Using this with {{ent|$normalmapalphaenvmapmask}} will override the mask used for {{ent|$envmap}} to be the contents of the {{ent|$basetexture}}'s alpha channel!}} | ||
{{warning|{{gmod|4}} Using this with {{ent|$normalmapalphaenvmapmask}} and {{ent|$envmap}} renders in {{ent|$envmap}} and '''<code>$phong</code>''' be masked by both '''<code>$basemapalphaphongmask</code>''' alpha channel and {{ent|$normalmapalphaenvmapmask}} alpha channel.}} |since={{src07}}|shaders=VertexLitGeneric}} | {{warning|{{gmod|4}} Using this with {{ent|$normalmapalphaenvmapmask}} and {{ent|$envmap}} renders in {{ent|$envmap}} and '''<code>$phong</code>''' be masked by both '''<code>$basemapalphaphongmask</code>''' alpha channel and {{ent|$normalmapalphaenvmapmask}} alpha channel.}} |since={{src07}}|shaders=VertexLitGeneric}} | ||
Line 64: | Line 64: | ||
:{{note|<code>$envmap</code> is also affected by these fresnel ranges if both it and Phong are enabled in a material.}} | :{{note|<code>$envmap</code> is also affected by these fresnel ranges if both it and Phong are enabled in a material.}} | ||
:{{note| drives the x component of a phongwarptexture if specified.}}|shaders=VertexLitGeneric, LightmappedGeneric({{mapbase|only}})}} | :{{note| drives the x component of a phongwarptexture if specified.}}|shaders=VertexLitGeneric, LightmappedGeneric({{mapbase|only}})}} | ||
{{MatParam|$phongdisablehalflambert|bool|Disables forced | {{MatParam|$phongdisablehalflambert|bool|Disables forced {{L|$halflambert|half-lambertian}} shading on Phong materials. {{note|This parameter is effectively forced on in {{csgobranch|4}} due to <code>$halflambert</code> being disabled.}}|since={{as}}|also={{gmod}},{{Mapbase}}|shaders=VertexLitGeneric}} | ||
=== Colores === | === Colores === | ||
Line 73: | Line 73: | ||
{{MatParam|$phongalbedoboost|float|Phong albedo overbrightening factor. Ranges 0-255. | {{MatParam|$phongalbedoboost|float|Phong albedo overbrightening factor. Ranges 0-255. | ||
: {{note| This will multiply the tint that is being applied to phong from $phongalbedotint.}} | : {{note| This will multiply the tint that is being applied to phong from $phongalbedotint.}} | ||
: {{bug| This does not work when using | : {{bug| This does not work when using {{L|$detail}}. }}|since={{csgo}}|also={{gmod}}|shaders=VertexLitGeneric}} | ||
[[File:Phongwarp example.png|thumb|200px|The Hunter without and with its <code>$phongwarptexture</code>, showing how it affects the Phong reflection.]] | [[File:Phongwarp example.png|thumb|200px|The Hunter without and with its <code>$phongwarptexture</code>, showing how it affects the Phong reflection.]] | ||
{{MatParam|$phongtint|RGB matrix|Color tint of the phong reflection. | {{MatParam|$phongtint|RGB matrix|Color tint of the phong reflection. | ||
Line 79: | Line 79: | ||
: {{note| Also tints {{ent|$rimlight}}}}|since={{src07}}|shaders=VertexLitGeneric}} | : {{note| Also tints {{ent|$rimlight}}}}|since={{src07}}|shaders=VertexLitGeneric}} | ||
[[File:Phongwarp_coordinate_guide.png|thumb|200px|Breakdown of the $phongwarptexture: computed coordinates, texture and result]] | [[File:Phongwarp_coordinate_guide.png|thumb|200px|Breakdown of the $phongwarptexture: computed coordinates, texture and result]] | ||
{{MatParam|$phongwarptexture|texture|Used to create an iridescence effect, as seen on Episode Two's | {{MatParam|$phongwarptexture|texture|Used to create an iridescence effect, as seen on Episode Two's {{L|npc_hunter|Hunters}}. | ||
: The highlight is multiplied with a texture. The coordinates of the sampled pixel are as follows: | : The highlight is multiplied with a texture. The coordinates of the sampled pixel are as follows: | ||
:x: 1 - (distance to the center of the highlight) | :x: 1 - (distance to the center of the highlight) | ||
Line 99: | Line 99: | ||
== Véase también == | == Véase también == | ||
* | * {{L|Phong materials|Materiales phong}} | ||
* {{ent|$envmap}} (mapa del entorno) | * {{ent|$envmap}} (mapa del entorno) | ||
* {{ent|$lightwarptexture}} | * {{ent|$lightwarptexture}} | ||
Line 105: | Line 105: | ||
== Enlaces externos == | == Enlaces externos == | ||
* [https://tf2maps.net/threads/phong-on-brushes-the-hacky-way.26765 $Phong en sólidos*: The Hacky Way]: Una guía de TF2maps.net sobre cómo aplicar falsos $Phong en sólidos para juegos previos a CS:GO. También se puede usar para hacer phong falsos en | * [https://tf2maps.net/threads/phong-on-brushes-the-hacky-way.26765 $Phong en sólidos*: The Hacky Way]: Una guía de TF2maps.net sobre cómo aplicar falsos $Phong en sólidos para juegos previos a CS:GO. También se puede usar para hacer phong falsos en {{L|prop_static|objetos del mapa}} iluminados por vértice, sin reducir su calidad. | ||
*[https://share.substance3d.com/libraries/6595 SubstancePainter Sombreado phong complejo en motor Source] | *[https://share.substance3d.com/libraries/6595 SubstancePainter Sombreado phong complejo en motor Source] |
Revision as of 08:21, 11 July 2024
También está disponible en sombreado
LightmappedGeneric
y
WorldVertexTransition
en todos los juegos desde Counter-Strike: Global Offensive. proporcionando reflexión difusa a baja intensidad y resaltado especular, enmascarados con una textura que controla su intensidad mediante téxeles. Para una explicación completa, véase materiales phong .

LightmappedGeneric
y WorldVertexTransition
solo está disponible en 

.

LightmappedGeneric
también está disponible en 


"$halflambert_gbuffer_off" "1"
.Sintaxis
$phong <bool >


- Pendiente: Otros juegos que no necesitan parámetros phong (como Portal 2 en adelante)
VertexLitGeneric
{
$phong 1
$bumpmap [texture]
$phongexponent 5 // either/or
$phongexponenttexture [texture] // either/or
$phongboost 1.0
$phongfresnelranges "[0 0.5 1]"
}
Parámetros
Enmascarado

- Using $selfillumfresnel without $normalmapalphaenvmapmask will mask the $envmap using the $basetexture's alpha channel.
- Using $selfillumfresnel with $normalmapalphaenvmapmask will multiply the $envmap by
0.0f
. Effectively disabling the effect! - When not using $selfillumfresnel. The mask used for $envmap will be the $basetexture's alpha channel unless $normalmapalphaenvmapmask is also used.
- If $normalmapalphaenvmapmask is used, the $bumpmap's alpha channel will be used for Phong masking. Using either
$basemapalphaphongmask
or$basemapluminancephongmask
will override it.
$bumpmap
$basemapalphaphongmask
$basemapluminancephongmask
$phongexponent
$phongexponenttexture
$phongexponentfactor
$invertphongmask
$forcephong
$diffuseexp
$shinyblood
$shinybloodexponent
Brillo
$phongboost
$phongfresnelranges
$phongdisablehalflambert
Colores
$phongalbedotint
$phongalbedoboost

Brush phong in
Counter-Strike: Global Offensive using tile/hr_t/inferno/tile_a. Note the complete absence of the reflection in the shaded area.

Parámetros de sombreado de sólidos (only in
)(también en
)
$phongmaskcontrastbrightness
$phongamount
$phongbasetint
Comandos de consola
- mat_phong <boolean >
- Desactiva o activa el sombreado phong. Por defecto 1.
Véase también
- Materiales phong
- $envmap (mapa del entorno)
- $lightwarptexture
- $rimlight
Enlaces externos
- $Phong en sólidos*: The Hacky Way: Una guía de TF2maps.net sobre cómo aplicar falsos $Phong en sólidos para juegos previos a CS:GO. También se puede usar para hacer phong falsos en objetos del mapa iluminados por vértice, sin reducir su calidad.
- SubstancePainter Sombreado phong complejo en motor Source