preparing tree mesh factory