-
Notifications
You must be signed in to change notification settings - Fork 16
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
base: dev
Are you sure you want to change the base?
Conversation
|
||
### Naming | ||
|
||
Outdoor portals materials have followning naming convention: |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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 .
There was a problem hiding this comment.
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`. |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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`. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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). |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo potrals -> portals
The list at the end also seems overly complex, but here is my limit, I don't know how to simplify it 😢 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 |
Demo