How do I make smoke fill a specific object How do I make it so that smoke only fits a specific object like a cube or sphere so the smoke makes the shape of the object.

Let's say I have a single object of a hat and what I want to do is make the smoke in the shape of the hat.

Help
I think this has been asked previously here:

Why isn&#39;t smoke flowing with the shape of the domain?

Basically - use a cube as usual as your smoke domain, and within that add your hollow hat-shaped object, make it a 'collision' object in the physics properties, and place your smoke emitters within that object.