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

paramtype="light-top", paramtype="light-bottom" etc. #15642

Open
kno10 opened this issue Jan 5, 2025 · 4 comments
Open

paramtype="light-top", paramtype="light-bottom" etc. #15642

kno10 opened this issue Jan 5, 2025 · 4 comments
Labels
Feature request Issues that request the addition or enhancement of a feature @ Script API

Comments

@kno10
Copy link
Contributor

kno10 commented Jan 5, 2025

Problem

Certain nodes such as slabs block light vertically, but not horizontally.
Others, say a hollow log, may allow light to pass through but only vertically.
More complicated, it may even depend on the orientation of the nodes, unfortunately.

Minetest Game slabs for example have paramtype="light", so they let light pass.

This means if you build a roof from slabs, it lets in light despite it being walkable and non-transparent for the player.

But if you would make slabs non-light, a wall of alternating top and bottom slabs has holes of one node height each, but will not let in light then.

Solutions

Add some variant of paramtype="light" that has a direction, so that slabs pass light only vertically (it may be necessary to have paramtype="light-top" and paramtype="light-bottom" for top and bottom slabs, as one should likely receive its light value from the top only, the other from the bottom only.

This is a lightweight idea, much simpler than the ones below.

Alternatives

Also add an attenuation value, such that e.g., 50% indicates an increased drop-off in brightness. #13288, but that one was closed.

#3554 would like to use mesh/nodebox to compute light, which is also much more expensive.

#13905 proposes to add a lighting_box to node definitions, but this appears to aim at modeling particular kinds of lamps.

#15371 proposes "point light sources at arbitrary floating-point coordinates". An overkill solution that is likely not going to happen anytime soon, I fear, as this somehow is the opposite of the entire node light level system here.

Additional context

No response

@kno10 kno10 added the Feature request Issues that request the addition or enhancement of a feature label Jan 5, 2025
@sfan5
Copy link
Collaborator

sfan5 commented Jan 6, 2025

This sounds like it's covered by #15371.

@kno10
Copy link
Contributor Author

kno10 commented Jan 6, 2025 via email

@sfan5
Copy link
Collaborator

sfan5 commented Jan 6, 2025

I might be reading too much into the "Let modders customize the node lighting system." point but for me this includes custoamization of how nodes pass through light.

@kno10
Copy link
Contributor Author

kno10 commented Jan 6, 2025

The solution for the "slab problem" proposed here is much simpler, and hence more likely to happen, than a full blown "do anything you want with light" solution, isn't it? In particular as it does not add anything to the map data itself, only to the node metadata used during light computation (such as paramtype).
Or any change to the rendering, for that is. Custom lights at arbitrary coordinates will require rendering engine changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request Issues that request the addition or enhancement of a feature @ Script API
Projects
None yet
Development

No branches or pull requests

3 participants