What I would like to do is use 12-3 with ground to wire new lights in my house. I have ran 12-2 with ground to the electrical box to a 20 amp breaker. In the attic I have a junction box where I begin my question. Here I connect the 12-3 with ground to the wire coming from the box by black to black, white to white, ground to ground and so far not working with the red wire. In the switch box I will leave the white wire nutted and not use. Then attach the black, red and ground wires to the switch. Back to the junction box in the attic, pig tail a 12-2 with ground that will run to the 1st light. This will look like red to black. White to white and ground to ground. Are there any problems?
The circuit layout is sound. A small point, I don't think you mean to actually use a pigtail (short additional jumper wire) in the junction box, just connect the light cable to the switch loop in the junction box.
It sounds like you're just going to have one junction box for all the lights and switches in the attic, rather than one per room. That is OK as long as the junction box is large enough to house all the splices - you'd need to do the box fill calculations to determine.
Your description is kind of a star layout from a single junction box. You more often see more of a daisy chain layout where the source power feeds the box for the first light for each room, and the switch loops for that room come from that box. That will usually use less cable and avoids the big junction box.
The star layout may have advantages too, for maintenance, troubleshooting, future additions, etc., but only if it's a BIG box easy to work in, not a disastrous tangle of unlabeled splices.
Yeah, that'll work fine.
I'm a huge fan of color coding, and for practical reasons, red is a great choice for "switched-hot" wires. On the lamp branch I would tape the black wire red using red electrical tape. They sell multi-packs of colored electrical tape for $4 at the big-box. When taping wires, always mark both ends the same.
Remember that you must forever be able to access the junction box lid without needing tools.
A good choice of junction box is a metal 4-11/16" square deep box**. This has 42 or more cubic inches, allowing 16 #12 wires* (or 19 #14's) to enter the box. They make that same size in "super-deep" also**, or you can get box extensions.
* #12 computes out at 2.25 cubic inches per wire x 19, plus 2.25 cubic inches (once) for all ground wires, plus 2.25 cubic inches (once) for all clamps.
#14 wires compute at 2.00 cubes per wire, and #10 is 2.50 cubes. With mixed sizes, clamps and grounds use the larger number, but still only once.
** You can save $2-3 a box by buying them at an electrical supply; big-box stores overcharge for them and may not even stock the "super-deep" version... weird, you'd think that'd be their specialty, since they're a big-box store lol!