godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.92k stars 21.06k forks source link

GridMap is visible only on the first cull_mask layer #40245

Open tropical32 opened 4 years ago

tropical32 commented 4 years ago

Godot version: Godot Engine v3.2.2.stable.custom_build

OS/device including version: 5.7.0-3-MANJARO, OpenGL ES 3.0 Renderer: GeForce GTX 1050 Ti/PCIe/SSE2

Issue description: GridMap is only visible on the first Camera's cull_mask layer. Once the first bit of the camera's cull_mask is disabled the entire grid disappears. Since it's not extending VisualInstance wouldn't it make more sense to not react to cull_mask layers?

Steps to reproduce:

  1. Launch the project below
  2. Press the checkbox to toggle camera's first cull_mask bit

Minimal reproduction project:

gridmap-cull-master.zip

giabeni commented 3 years ago

Up! Lost some time trying to figure it out what's was I doing wrong...

jamesdkay commented 3 years ago

I also spent some time trying to figure out what was going on here. I need the ability to have some lights affect certain GridMaps but not others, but this issue also prevents you from using light cull masks with GridMaps. Does anyone know if this issue is related to #41374 or if the solution to that issue might resolve this one too?

4CoDev commented 2 years ago

I wanted to use different layers for different cameras to overlay the interior of a building on its exterior while maintaining the lighting, but it turns out this is not possible with gridmap :(

escapade-games commented 2 years ago

I have created a proposal that could potentially solve this bug, link is at https://github.com/godotengine/godot-proposals/discussions/5438.

CodeSmith32 commented 4 months ago

+1.. Was looking to apply decals to a GridMap on a layer other than 1. Apparently my only option now is to make everything else on a different layer since GridMap is hardcoded to layer 1.

RobTheFiveNine commented 4 months ago

+1.. Was looking to apply decals to a GridMap on a layer other than 1. Apparently my only option now is to make everything else on a different layer since GridMap is hardcoded to layer 1.

This was the situation I ran into too.

AThousandShips commented 4 months ago

@CodeSmith32 @RobTheFiveNine Please don't bump without contributing significant new information. Use the :+1: reaction button on the first post instead.