Just wanted to do a small update on the game. There are new game builds that can be downloaded, so you can try things out for yourself, but the sun and a preliminary moon are in the game now with controls for the latitude, length of day, and the rotation of the game’s compass. I did a recording of the changes below, complete with the rather interesting polar circle sun rotation :). Right now the game’s calendar is set to be in July, so the sun’s position will be a bit different from what can be seen outside right now. I’ll have it so the user can set the calendar in one of the next updates. You can also see the trunk of the Aspen tree in the game if you play it.
One other exciting thing is that I was able to figure out the system for doing Winter to Spring seasonal transformations on the leaves using two mask textures that, combined, will make it look like the leaves are growing from the branch over a period of weeks. I’m not done modeling the leaves and branches that will be baked into the final texture, so I don’t know for sure how it will look in the final texture, but I have been testing it out on the models in Blender, and I’m pretty sure it will work all right. I really give the glory to God on this one if it does. I’m just not that smart to figure it out on my own.
Lastly, here is the rest of the previous post that shows the material setup I used that made it easier to create the texture atlases in Blender.
Here is how the overall material looks:
and here is one section of the material that is duplicated to the other sections:
and here is what is inside the node groups:
The basic idea for it is that it creates a mask for each texture by using the Object’s ID number. So each time a different texture is added to the texture atlas and applied to one of the objects talked about in the previous post, you just assign a different ID number to those objects with that texture. Then in the material, the Object Info node is able to retrieve all of the ID numbers for all of the objects.
One downside though is that, because the Object Indexes can only be integers, all of the objects will be white if you use the node directly since they are all over one. So, in order to use it, you have to isolate the objects that have the number you want to use by using the node group in the second image above. Basically it leaves any values greater than or less than the value you want black, then multiplies them together, leaving only the objects with the ID you want as white.
It’s fairly self explanatory if you try it out, so I won’t go into the details, but one important thing to remember is that you’ll want to have the incoming value you want to isolate a little bit less than the value you want. So if you want the objects with an ID of 2, you’ll want to use a value like 1.9. This way the only numbers that are left white are the values between 1.9 and whatever value comes out of the add node in the node group, which would be 2.1.
The great thing about it is, once you have all of it setup, all you have to do to pass a change from one of the textures to the final texture atlas is hook up the appropriate set of nodes for that texture atlas, like normals, diffuse, etc., and click on render.
I guess that’s it. On to the next adventure!