View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0000895 | OpenClonk | Engine - Rendering | public | 2012-12-26 10:39 | 2017-08-12 19:40 | ||||
Reporter | user22 | ||||||||
Assigned To | Luchs | ||||||||
Priority | low | Severity | minor | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Platform | 64 Bit | OS | Windows 7 | OS Version | - | ||||
Product Version | |||||||||
Target Version | 8.0 | Fixed in Version | 8.0 | ||||||
Summary | 0000895: SetMatAdjust() does not work with high resolution landscape | ||||||||
Description | I tried SetMatAdjust(RGBa(255,127,127,127)) from http://docs.openclonk.org/en/sdk/script/fn/SetMatAdjust.html via console and scenario script. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files |
|
![]() |
|
2012-12-26 10:41 |
Can be closed. Found a equivalent in bugtracker. |
Newton (administrator) 2013-11-10 19:32 |
I can reproduce this. SetMatAdjust does not work with high resolution landscape option on. |
Newton (administrator) 2013-11-12 17:57 |
PeterW can perhaps say if this is even possible to implement for the highres shader. (I don't think the function is used anywhere / doesn't make so much sense to me) |
PeterW (developer) 2013-11-12 18:05 Last edited: 2013-11-12 18:07 |
It is certainly possible. You'd just need to pass it to the shader and process it there accordingly. You could now even make it per-material if you really wanted to. However, you would probably want to disable this in the default case, so it doesn't end up causing performance reductions (Guenther's old shader went to some pains to do this). So the question here is - is the use case important enough to warrant a special case? If yes, the actual change is actually not too complicated, so it might be a good project for somebody trying their hand at engine development (Paelleon?). |
Newton (administrator) 2013-12-04 14:18 |
Paellon is working on it |
Clonk-Karl (administrator) 2015-11-10 20:35 |
This has not happened, has it? Should we just drop SetMatAdjust? For a constant MatAdjust, the same effect can be achieved by overloading the landscape shader in a custom scenario. And once we have shader parameters that can be changed in C4Script, that would be a full replacement. At the moment, only ScorchedGardens uses SetMatAdjust (and probably hasn't worked there since a while now...) |
Sven2 (developer) 2015-11-11 00:20 |
I agree it's not needed by default as it's another per-pixel operation done in the shader. Custom scenario shaders can now gain much more control over how to draw the landscape and other things. |
PeterW (developer) 2015-11-11 16:06 |
On the other hand, the "material shinyness" patch pretty much introduced exactly what's needed for this - a material property map that is sent to the shader. For example, it would be trivial now to change material's emittence dynamically. |
Sven2 (developer) 2015-11-11 16:09 |
That's actually a good idea. PeterW would you want to implement that? |
PeterW (developer) 2015-11-11 16:13 |
I could easily change SetMatAdjust to change the emittence, if that's acceptable (it's an adjustment - just a different one!). For a new dynamic property, I'd grumble a bit more, because it means yet more shader code for a fairly rare use case. |
Sven2 (developer) 2015-11-11 16:21 |
Yes, changing the emittence is what I had in mind. |
PeterW (developer) 2015-11-12 22:26 |
Hm, the current material adjustment is actually global, had not realised that. Is that how it should be? If we want it per-material, this raises the question of how we should save it. As a big NameList in the scenario core, possibly? ... what exactly would we want to use this for anyway? ;) |
Clonk-Karl (administrator) 2015-11-12 22:38 |
As a first step I think it's fine to just restore (the global) SetMatAdjust functionality. At the moment the function just does nothing. |
Sven2 (developer) 2015-11-12 22:45 Last edited: 2015-11-12 22:49 |
Yes, it would just store the global adjustment as MatAdjust in C4Landscape, synchronized/stored via Game.txt. C4MaterialCore would keep the static value defined in the .c4m and the C4Material would have the dynamic value as the static value multiplied by the current MatAdjust. Multiplication would happen at game start (for savegame resume), on SetMatAdjust() and when a material is reloaded. I don't think we need a Scenario.txt entry. Individually adjustable materials sound nice, but I don't really see the use case. Maybe to do scripted material animation? (e.g.: "Boiling" lava changes its brightness between bright and very bright). But we can always add that later by adding a parametger to SetMatAdjust (SetMatAdjust(adjust) sets all materials and SetMatAdjust(adjust, material) sets only one material). |
Sven2 (developer) 2015-11-12 23:10 |
> ... what exactly would we want to use this for anyway? ;) Actually, the only use case I know was in sequences, people liked to do SetSkyAdjust, SetMatAdjust and SetClrModulation on all objects to make everything except the UI darker. I guess now you can just use SetGamma? |
PeterW (developer) 2015-11-13 09:02 |
> the only use case I know was in sequences, people liked to do SetSkyAdjust, SetMatAdjust and SetClrModulation on all objects to make everything except the UI darker Which would be a very bad fit for the "emittence" SetMatAdjust, because it would make everything strictly brighter. And yeah, the best use case I could come up with would be "pulsating" Lava or Crystal - and even then it would arguably be more natural to achieve this by material texture animations (not bound to game tick) or object overlays (so you can "bloom"). Not sure... |
Luchs (administrator) 2017-08-12 19:40 |
Not sure about all the extra discussion, but I fixed SetMatAdjust in 19395b23ae67a0a037ba887177f1281750aea50f a while back. |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2012-12-26 10:39 |
|
New Issue | |
2012-12-26 10:41 |
|
Note Added: 0002368 | |
2013-11-10 19:32 | Newton | Note Added: 0002737 | |
2013-11-10 19:33 | Newton | Status | new => acknowledged |
2013-11-10 19:33 | Newton | Summary | SetMatAdjust() does not work => SetMatAdjust() does not work with high resolution landscape |
2013-11-12 17:57 | Newton | Note Added: 0002748 | |
2013-11-12 18:05 | PeterW | Note Added: 0002749 | |
2013-11-12 18:06 | PeterW | Note Edited: 0002749 | View Revisions |
2013-11-12 18:07 | PeterW | Note Edited: 0002749 | View Revisions |
2013-11-12 18:24 | Newton | Priority | normal => low |
2013-12-04 14:18 | Newton | Note Added: 0002795 | |
2013-12-04 14:18 | Newton | Status | acknowledged => confirmed |
2015-10-16 00:33 | Sven2 | Target Version | => 7.0 |
2015-11-10 20:35 | Clonk-Karl | Note Added: 0004098 | |
2015-11-11 00:20 | Sven2 | Note Added: 0004099 | |
2015-11-11 16:06 | PeterW | Note Added: 0004100 | |
2015-11-11 16:09 | Sven2 | Note Added: 0004101 | |
2015-11-11 16:13 | PeterW | Note Added: 0004102 | |
2015-11-11 16:21 | Sven2 | Note Added: 0004103 | |
2015-11-12 22:26 | PeterW | Note Added: 0004104 | |
2015-11-12 22:38 | Clonk-Karl | Note Added: 0004105 | |
2015-11-12 22:45 | Sven2 | Note Added: 0004106 | |
2015-11-12 22:47 | Sven2 | Note Edited: 0004106 | View Revisions |
2015-11-12 22:49 | Sven2 | Note Edited: 0004106 | View Revisions |
2015-11-12 22:49 | Sven2 | Note Edited: 0004106 | View Revisions |
2015-11-12 23:10 | Sven2 | Note Added: 0004107 | |
2015-11-13 09:02 | PeterW | Note Added: 0004109 | |
2016-01-02 19:42 | Clonkonaut | Target Version | 7.0 => 8.0 |
2017-08-12 19:40 | Luchs | Assigned To | => Luchs |
2017-08-12 19:40 | Luchs | Status | confirmed => resolved |
2017-08-12 19:40 | Luchs | Resolution | open => fixed |
2017-08-12 19:40 | Luchs | Fixed in Version | => 8.0 |
2017-08-12 19:40 | Luchs | Note Added: 0005720 |