Hey there @Shredz7!
After doing some research on this, I have found a couple suggestions.
The approach probably depends on how many jars needed, and efficiency considerations.
Perhaps the easiest would be to model a simple rock, and then some sand. Fill the jar with both, and then hide the mesh renderer of a portion of the one you don't want.
If you're doing it over the course of like 100s of jars at once, at that point a particle system may be better, as rendering that many faces could get tricky.
But if it's just a small number of jars, I'd say:
• Model a Rock
• Model / paint a small layer of sand
• Create an array to hold onto the portion of rocks or sand being displayed, and depending on the slider, or player modification, increase or decrease the corresponding one.
Although, it does get more complicated again if you want the sand and rocks to interact with physics. Like the sand pouring between the rocks.
Does this first options sound like something that would be useful for you? Or do you have some more specifications on what you're trying to do with this jar filled with sand and rocks? The ultimate purpose of it helps shape the best method for creating it.