Skip to content
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

[Meshes] Portals article #139

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

muczc1wek
Copy link
Contributor

@muczc1wek muczc1wek commented Oct 14, 2024

@muczc1wek muczc1wek marked this pull request as ready for review November 10, 2024 16:45
@muczc1wek muczc1wek changed the title [Meshes] Portals article (WIP) [Meshes] Portals article Nov 10, 2024

### Naming

Outdoor portals materials have followning naming convention:
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo followning -> following

P[N]:Front_Back
```

All materials of portal type, have to start with `P:` or `PN:`, the difference between each of them is only in game engine, `PN:` stands for Portal NonFading, and`P:` stands for Portals and if player is standing close by, then opacity of near portals will increase.
Copy link
Collaborator

Choose a reason for hiding this comment

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

then opacity of near portals will increase.

when a player is close to the portal then it becomes more transparent,
so the opacity decreases

All materials of portal type, have to start with `P:` or `PN:`, the difference between each of them is only in game engine, `PN:` stands for Portal NonFading, and`P:` stands for Portals and if player is standing close by, then opacity of near portals will increase.

!!! Note
Material names with the prefix `PN:` (“N” for NoFade) “open” visually as the camera approaches, but do not fade out like the other `P:` portals. This makes sense, for example, if there is a texture with an alpha channel on such a portal.
Copy link
Collaborator

Choose a reason for hiding this comment

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

“N” for NoFade) “open”

What are those weird \“ they're not normal ", are we using them anywhere else in the docs?

All materials of portal type, have to start with `P:` or `PN:`, the difference between each of them is only in game engine, `PN:` stands for Portal NonFading, and`P:` stands for Portals and if player is standing close by, then opacity of near portals will increase.

!!! Note
Material names with the prefix `PN:` (“N” for NoFade) “open” visually as the camera approaches, but do not fade out like the other `P:` portals. This makes sense, for example, if there is a texture with an alpha channel on such a portal.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you provide a specific example in base game either G1/G2 of such portals? Even if we can't provide two different images, then it would make it easier to understand when to use which. Me as a non-modder / "less than beginner" I don't understand why it makes sense when a portal has an alpha channel .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well it is copy-paste from Gothic Editing Wiki, but I will try

!!! Note
Material names with the prefix `PN:` (“N” for NoFade) “open” visually as the camera approaches, but do not fade out like the other `P:` portals. This makes sense, for example, if there is a texture with an alpha channel on such a portal.

For every portal, 2 materials have to be created - one for each direction. Their names have to be set in proper order. First name `Front` is always place or room to which you are entering from, and second `Back` name is place where you want to go. For example, if you are entering room 2 from room 1, then you need to name portal `P:room1_room2`. If you want to go back from room 2 to room 1, then you need to name portal `P:room2_room1`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

A bit overly complex.
For every portal, 2 materials have to be created - one for each direction. Their names have to match the direction they're facing. For example, the portal for entering room 2 from room 1 should be named P:room1_room2. And vice versa the second portal to go back from room 2 to room 1 should be named P:room2_room1.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@muczc1wek
It struck me now, that I don't know from where are those room 1, room 2 names coming from?
Is this some Spacer object id, or what? Also worth adding to showcase the connection.

Copy link
Contributor Author

@muczc1wek muczc1wek Nov 12, 2024

Choose a reason for hiding this comment

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

These are only example names taken from the image below, the sector names aren't hardcoded and any string can be used


For every portal, 2 materials have to be created - one for each direction. Their names have to be set in proper order. First name `Front` is always place or room to which you are entering from, and second `Back` name is place where you want to go. For example, if you are entering room 2 from room 1, then you need to name portal `P:room1_room2`. If you want to go back from room 2 to room 1, then you need to name portal `P:room2_room1`.

In addition, the empty string `""` is used to mark the portal to the outside world. For example, if you are entering corridor 1 from the outside world, then you need to name portal `P:corridor1_`. If you want to go back from corridor 1 to the outside world, then you need to name portal `P:_corridor1`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Names don't match with the explanation above and the image below, could be a bit shorter or even a bullet point list 🤔
In addition, a blank string "" is used to refer to the outside world. For example, if you are entering corridor 1 from the outside world, then you need to name portal P:_corridor1. If you want to go back from corridor 1 to the outside world, then you need to name portal P:corridor1_.


![](../../assets/images/portals/outdoor_modeling2.png)

Also the polys inside the sector must be connected to the walls of the setor. If some polys will be floating in the air, the engine could not render them properly.
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo setor -> sector


Also the polys inside the sector must be connected to the walls of the setor. If some polys will be floating in the air, the engine could not render them properly.

![](../../assets/images/portals/outdoor_modeling3.JPG)
Copy link
Collaborator

Choose a reason for hiding this comment

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

JPG 🤔 while all other are png

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it a problem? I could convert it but i don't see a reason for doing this

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's not a problem. Just like the comment about the two spaces gap in the text below, it's more of a nitpick.
However, thinking long term, as in, future-proofing the docs it might be better to keep the photos in PNG format.
But they can always be changed later on when the time is right. 🤷
https://squidfunk.github.io/mkdocs-material/plugins/requirements/image-processing/#pngquant


### Ghostoccluder

Ghostoccluders are polys in outdoor levels that have a material called `GHOSTOCCLUDER`. Such polygons are not displayed in the game, but serve to mask areas of the level that are unnecessary for visualization (“Occlusion”). Unlike other polygons, Ghostoccluder polys do not depend on size, and also do not need to be segmented, as in the case of [water modeling](water.md#segmentation).
Copy link
Collaborator

Choose a reason for hiding this comment

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

polys do

two spaces 😁




[^1]: Inspired by the article about potrals from [Gothic Editing Wiki](https://wiki.worldofgothic.de/doku.php?id=zengin:portale)
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo potrals -> portals

@kamilkrzyskow
Copy link
Collaborator

kamilkrzyskow commented Nov 11, 2024

The list at the end also seems overly complex, but here is my limit, I don't know how to simplify it 😢
Once you resolve my comments, then request auronen for review 😆

Also how to check if the portal is working other than, you know, looking at it, not seeing it etc?
Is there a way to get a log message when a portal doesn't work according to the engine, or does the engine not keep track of such things?

@muczc1wek
Copy link
Contributor Author

Also how to check if the portal is working other than, you know, looking at it, not seeing it etc?

I think if the portal doesn't work it A - couldn't be passed B - provide weird graphic glitches

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants