Looking for advice

I’m in the process of trying to design a 2D game and most of it will be using dynamically generated pngs. The one part that would probably be better not as a png would be the sunrise and sunset.

I have lots of programming experience but I do not have any real game development experience. I’m wondering what would be the best way to create a sunrise and sunset in panda3d. I will be using a few NodePath’s for parts of things. Rotating stars and sun on one. Then probably a NodePath which I will use to fade out the stars as the sun comes up and they sky becomes blue. And then I’d want one where the sunrise and sunset are on.

I was thinking of designing some 2D EggData and creating them live in python so I can add a little randomness from day to day so that they are not always the same. I’ve got a very basic example set up with 6 vertex points (bottom center, bottom left, top left, top center, top right, bottom right, and bottom center to close the shape. The point values mentioned may not work as I’ve switched my version of pixel2d so that 0, 0 is bottom left and positive numbers go up and right (because I don’t like working in negative numbers).

data = EggData()

vertex_pool = EggVertexPool('Sunrise')
data.addChild(vertex_pool)

polygon = EggPolygon()

vertex = EggVertex()
vertex.setPos(Point3D(0, 0, 0))
vertex.setColor((0.984375, 0.890625, 0.4765625, 1))
polygon.addVertex(vertex_pool.addVertex(vertex))

vertex = EggVertex()
vertex.setPos(Point3D(-1200, 0, 0))
vertex.setColor((0.984375, 0.890625, 0.4765625, 1))
polygon.addVertex(vertex_pool.addVertex(vertex))

vertex = EggVertex()
vertex.setPos(Point3D(-1200, 0, 1200))
vertex.setColor((0.0, 0.0, 0.99609375, 1))
polygon.addVertex(vertex_pool.addVertex(vertex))

vertex = EggVertex()
vertex.setPos(Point3D(1200, 0, 1200))
vertex.setColor((0.0, 0.0, 0.99609375, 1))
polygon.addVertex(vertex_pool.addVertex(vertex))

vertex = EggVertex()
vertex.setPos(Point3D(1200, 0, 0))
vertex.setColor((0.984375, 0.890625, 0.4765625, 1))
polygon.addVertex(vertex_pool.addVertex(vertex))

vertex = EggVertex()
vertex.setPos(Point3D(0, 0, 0))
polygon.addVertex(vertex_pool.addVertex(vertex))

data.addChild(polygon)
pixel2d.attachNewNode(loadEggData(data), 0)

I’ve read through the egg syntax and have been trying to find an example of someone morphing colours (DRGBA) with no luck. I tried to looking at the egg api to see how someone would add a DRGBA to a dynamically generated egg in python with no luck as well. That got me looking for examples using Dxyz. I found a couple forum posts about that and that pushed me to reading a bit about Morph Targets.

I’m assuming that I am going to have to create something in Blender and then look at the Egg data that gets created from it so I can figure out how to dynamically create what I need in python. I also want to create the sunrise based on the persons game window size so it looks good for everyone.

Does anyone have any advice about what would be the best way to create a sunrise which will contain alpha transparency and be added to a NodePath? Am I slowly heading in the correct direction or should I be looking at something else?