- Home /
How do I get GameObjects to use a certain cubemap?
Hi,
I'm currently working on a pinball machine game in Unity 2019.2.5f1. I have a single reflection probe in the centre of my room which I would like all objects to use, apart from the pinball itself. I want the pinball to have accurate real-time reflections, so I have created a real-time reflection probe and made it a child of the pinball, adjusting the box size of the reflection probe to match the pinball's size so that ONLY the pinball gets the real-time reflections. This works fine for the most part.
However, the pinball machine seems to use the pinball's cubemap instead of the room's—I assume this is because the pinball is actually within the machine itself. This is frustrating as the machine currently uses a reflective material, so when the pinball is moving around on the surface of the machine, the shading appears to weirdly change on the pinball machine.
I can set the priority of the room's reflection probe to be higher, but doing this will make the pinball ignore its realtime reflection probe in favour of the baked reflection probe. I know in the Source engine there is a feature which allows you to manually set objects to use specific cubemaps. Is there a way I can emulate this feature in Unity, i.e. make the pinball's cubemap ONLY apply to the pinball and not the machine?
Here are some screenshots: https://imgur.com/gallery/Ttyis9X I am using deferred shading if it is relevant. Any help is greatly appreciated.
Your answer
Follow this Question
Related Questions
Dynamically Changing Cubemap Size for Real Time Reflections 0 Answers
Unity Pro water with a cubemap instead of real time reflections 0 Answers
Unity ParticleSystem collision with wall. Coords on wall. 0 Answers
Realtime Cubemap Reflections are Oversized. 0 Answers
Control cubemap reflection amount from metallic and smoothness properties 0 Answers