Parallax obb: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
(26 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{P2CE topicon}}
{{LanguageBar}}
{{Entity|parallax_obb|game=Portal 2: Community Edition|type=e2}} It is also available in {{mapbase|4}}.
{{this is a|brush entity|internal=1|name=parallax_obb|type=e3|game=Strata Source|game1=Hunt Down the Freeman|game2=Mapbase|notext=1}}
==Overview==
This brush entity defines the boundaries of [[Parallax Corrected Cubemaps]], which are {{ent|env_cubemap}}s that move with the camera, giving a slightly more accurate reflection on brushes. The [[Cubemap]] Bounds keyvalue on the desired cubemap must be set to this entity's <code>[[targetname]]</code> in order to function as intended. The recommended texture for this brush entity is the <code>[[Tool textures|tools\toolstrigger]]</code> texture.
==Creation==
{{ModernNote|This tutorial uses pictures and methods from a game running the {{chaosbranch|3}}, however it should be a similar method for {{mapbase|3}} games. {{ModernConfirm|Is it actually similar?}}}}
Creating a parallax cubemap is fairly easy, and can be done with relative swiftness. To start, create a room with 1 or more reflective surfaces. Floors work very well with parallaxed cubemaps.<br>
[[File:Parallax obb showcase2.png|350px]]<br>
Next, place an {{ent|env_cubemap}} in the ''exact'' center of the room: Halfway up, equadistant between each wall. It is recommended for more reflective surfaces to specify a higher cubemap resolution. You can also place some props for reference. <br>
[[File:Parallax obb showcase3.png|350px]]<br>
After this, create a brush the size of the room and tie it to a <code>parallax_obb</code>. Name it something similar to "parallax_room1". Finally, go into the <code>env_cubemap</code>'s properties and, in the "Cubemap bounds" keyvalue, specify the targetname that you gave your <code>parallax_obb</code>.<br>
[[File:Parallax obb showcase4.png|350px]]<br>
<br>
Now, compile and load up the map in your game. Open the [[Developer Console]] and build the cubemaps using the {{ent|buildcubemaps}} command. The game should flash and image on screen and then reload the map. After this, you will see that your surfaces now reflect your room somewhat more accurately compared to a non-parallaxed cubemap! Now, you may notice that when viewed from certain angles, objects may appear to be 2D, similar to what is shown here:<br>
[[File:Parallax_obb_showcase1.png|350px]]<br>
Notice how the reflection in the tile appears to be flat and not 3D. This is because cubemaps are actually similar to skybox textures, being that they are multiple orientations of the same place, combined to give the illusion of one continuous space. Cubemaps cannot accurately give 3D images from all angles. This is why less reflective surfaces use cubemaps, while more reflective surfaces like water use a real-time reflective shader. However, while there is a limit of 1 high-quality real-time reflection at any time in the [[PVS]], there is no limit on Cubemaps, because they are a lot more inexpensive to render.


==KeyValues==
 
== Overview ==
This brush entity defines the boundaries of [[Parallax Corrected Cubemaps]], which are {{ent|env_cubemap}}s that move with the camera, giving a slightly more accurate reflection on brushes. This entity basically tells the game how to display and warp the reflections by setting the dimensions of the effect to the dimensions of this entity. The [[Cubemap]] Bounds keyvalue on the desired cubemap must be set to this entity's <code>[[targetname]]</code> in order to function as intended. The recommended texture for this brush entity is the <code>[[Tool textures|tools\toolstrigger]]</code> texture, although any [[%compiletrigger|trigger]] texture will work. {{Todo|I have a custom tooltexture made specifically for parallax obb that had parallax instead of trigger on it. I will provide download link somewhere here
- [[User:Equalizer5118|Equalizer5118, an idiot who cant spel]] ([[User talk:Equalizer5118|talk]]) 22:08, 21 August 2023 (PDT)}}
 
== Creation ==
{{Main|Parallax Corrected Cubemaps/Creation|Parallaxed Cubemap Creation}}
 
== KeyValues ==
{{KV Targetname}}
{{KV Targetname}}
==Flags==
 
== Flags ==
This entity has no flags
This entity has no flags
==See also==
 
*[[Parallax Corrected Cubemaps]]
== See also ==
*[[Cubemaps]]
* [[Parallax Corrected Cubemaps]]
* [[Cubemaps]]
 
[[Category:Cubemaps]]

Latest revision as of 19:00, 14 May 2025

English (en)Translate (Translate)

parallax_obb is an internal brush entity available in Strata Source Strata Source, Hunt Down the Freeman Hunt Down the Freeman, and Mapbase Mapbase.


Overview

This brush entity defines the boundaries of Parallax Corrected Cubemaps, which are env_cubemaps that move with the camera, giving a slightly more accurate reflection on brushes. This entity basically tells the game how to display and warp the reflections by setting the dimensions of the effect to the dimensions of this entity. The Cubemap Bounds keyvalue on the desired cubemap must be set to this entity's targetname in order to function as intended. The recommended texture for this brush entity is the tools\toolstrigger texture, although any trigger texture will work.

Todo: I have a custom tooltexture made specifically for parallax obb that had parallax instead of trigger on it. I will provide download link somewhere here - Equalizer5118, an idiot who cant spel (talk) 22:08, 21 August 2023 (PDT)

Creation

KeyValues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Flags

This entity has no flags

See also