Skip to content

Update ParallaxCorrectedCubemaps.md #102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ title: Parallax Corrected Cubemaps

![Click on the hand holding a mask](images/guide_parallax_cubemaps.jpg)

This page covers Strata implementation of Parallax-Corrected Cubemaps, created with a combination of custom entities and materials.
This page covers Strata's implementation of Parallax-Corrected Cubemaps. These cubemaps are created with a combination of the `env_cubemap` point entity and the `parallax_obb` brush entity.

## Overview
https://docs.momentum-mod.org/shaders/parallax_corrected_cubemaps/ it's came from momentum mod
This tutorial is from the [Momentum Mod Wiki](https://docs.momentum-mod.org/shaders/parallax_corrected_cubemaps/).

> [!NOTE]
> Thanks to Brian Charles for his work on this feature.
> More technical information can be found on the [Valve Developer Wiki Page.](https://developer.valvesoftware.com/wiki/Parallax_Corrected_Cubemaps)

## Prerequisites
* Be proficient in using the Hammer Editor
* Have the momentum/p2ce/revolution.fgd in your Hammer configuration
* Have the appropriate `.fgd` file for your game in your Hammer configuration
* Know how to use the developer console
## Components of a Parallax-Corrected Cubemap

Expand All @@ -29,16 +29,16 @@ In Hammer, Parallax-Corrected Cubemaps need two entities to function correctly:
![Click on the hand holding a mask](images/cube_0.jpg)

> [!NOTE]
> You may notice a box appear in the centre of the brush when you tie it to a parallax_obb entity like shown above.
> If you are using Momentum Mod, you may notice a box appear in the centre of the brush when you tie it to a parallax_obb entity like shown above.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really a momentum exclusive feature?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, from my testing just now, this doesn't happen in either momentum mod or p2ce. I put this here because I never saw this happen in P2CE, and if this came from the momentum wiki this then it must happen there.

but now, it looks like it doesn't happen in either game.
P2CE:
image

Momentum:
image

> This is normal and allows you to more easily select the brush if you have made it match the shape of the room.

Any regular LightmappedGeneric materials will still be able to use the cubemap as normal, this feature simply adds functionality on top of the existing env_cubemap in conjunction with an extra entity and shader to use inside .VMT files.

> [!TIP]
> There are some important things to take note of:
> The parallax_obb entity must be a single box brush
> The Parallax-Corrected cubemap is still built the same way regular cubemaps are.
> This means that you may have distortion in the reflections depending on where you place the env_cubemap and the shape of the parallax_obb brush.
> * The parallax_obb entity must be a single box brush
> * The Parallax-Corrected cubemap is still built the same way regular cubemaps are. This means that you may have distortion in the reflections depending on where you place the env_cubemap and the shape of the parallax_obb brush.
>
> This example has a wide room with a low ceiling as well as the cubemap entity not quite in the centre:

![Click on the hand holding a mask](images/cube_4.jpg)
Expand Down