there are many exceptions to this rule. hawk moths form an exposed chrysalis which is underground. spongy moths sometimes form butterfly-style pupae, hanging on twigs or tree bark, although usually they create flimsy cocoons out of silk strands and a few leaves, partially exposing the chrysalis. a few skipper butterfly larvae also make crude cocoons in which they pupate, exposing the pupa a bit. the "parnassius" butterfly larvae make a flimsy cocoon for pupation and they pupate near the ground surface between debris.