There are a couple of ways diet affects your output of solid wastes .... a high fibre diet, contains a lot of stuff that cannot be digested by the human gut, so it adds to stool bulk, which in turn means the stuff moves through your gut quicker. The stools in this case would be called firm. The longer stuff spends in your gut, the more water is reabsorbed and the harder it gets, which is why when you are constipated, you produce stool that feels like rock.
Too much sugar in the form of those high glucose gels, can cause diarrhoea.
Human beings did not evolve as obligate carnivores, we are omnivores, therefore the basis of a healthy diet should be fruits, vegetables, nuts and grains, with a small amount of animal protein.