Color displays as black if Horizon color is too low (Engine Bug) #2

Closed
opened 2021-06-24 21:21:41 +02:00 by ABelliqueux · 1 comment
ABelliqueux commented 2021-06-24 21:21:41 +02:00 (Migrated from github.com)

If Far color / Horizon color is < 100 (0.10 in blender), the corresponding channel color will display as black.

Example level0.c file :

CVECTOR level0_BGc = { 100, 218, 216, 0 };

results in :
2021-06-24-211924_682x505_scrot

CVECTOR level0_BGc = { 0, 218, 216, 0 };

2021-06-24-211901_685x506_scrot

Might be an error in the linear to RGB conversion function.

Also could be due to psyq dpq calculation. See LibRef47.pdf, p.450 and LibOver47.pdf, p.133, "Light Source Calculation" :

LLV = LLM * v0
LC = BK + LCM * LLV
v2 = (1 - p) * v1 * LC + p * FC
If Far color / Horizon color is < 100 (0.10 in blender), the corresponding channel color will display as black. Example `level0.c` file : ```c CVECTOR level0_BGc = { 100, 218, 216, 0 }; ``` results in : ![2021-06-24-211924_682x505_scrot](https://user-images.githubusercontent.com/1405255/123320326-e199d100-d531-11eb-952e-0fa1b5cf9494.png) ```c CVECTOR level0_BGc = { 0, 218, 216, 0 }; ``` ![2021-06-24-211901_685x506_scrot](https://user-images.githubusercontent.com/1405255/123320333-e2cafe00-d531-11eb-8806-1f0bb69bc74b.png) Might be an error in the [linear to RGB](https://github.com/ABelliqueux/blender_io_export_psx_mesh/blob/c3522939f5e8d36d7e4122a125a8cb22d8f9f6cb/io_export_psx_tmesh.py#L596) conversion function. Also could be due to psyq dpq calculation. See [LibRef47.pdf](http://psx.arthus.net/sdk/Psy-Q/DOCS/LibRef47.pdf), p.450 and [LibOver47.pdf](http://psx.arthus.net/sdk/Psy-Q/DOCS/LibOver47.pdf), p.133, "Light Source Calculation" : ``` LLV = LLM * v0 LC = BK + LCM * LLV v2 = (1 - p) * v1 * LC + p * FC ```
ABelliqueux commented 2021-07-01 16:28:58 +02:00 (Migrated from github.com)
See here : https://github.com/ABelliqueux/3dcam-headers/issues/1
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ABelliqueux/blender_io_export_psx_mesh#2
No description provided.