Dynamically 'slicing' background image

Dear community,

I’m fairly new to Unity and not quite sure how to handle this problem.

I have two images, one has clouds on it (day) and one has stars on it (night). What I want to do is show the clouds in the top of my scene and the stars on the bottom. There is a ground object in the middle of the screen where the player will be walking on, this should be the dividing line between the two images. The ground however is not one straight line but can have height differences.

The solution I came up with is to use the ground object(s) to slice the images so it kinda serves as a dividing line. But not sure if this is even possible. Maybe I could do something with 2 different camera’s or mask the images somehow… (Just throwing my own thoughts in here as well)

I put in an attachment to (hopefully) make it more clear.

Greets,
Niels “Lukie” Brink

I would look into Unity - Manual: Sprite Masks
im sure theres a creative way to solve this problem with a little trial and error.

Thanks for you reply. I’ve been looking at this and it seems really nice.
I found a different solution in between though which is working fine for now. What I’m doing now is instantiating objects with the background as material, I instantiate them using the position of the ground objects.