Summer Work (Day 18)
Instancing Hell & Future Plans
Both yesterday and today I have worked on editing the settings data assets to be instanced like they should have been from the start as well as coming up with ideas for what features I should add once I'm done with planets.
Instancing:
There are two reasons that I decided to do this now. 1) When I made that video yesterday showing off the planet rotation, in order to get two different looking planets I would have to change one planet at a time, therefore tricking it into not updating the changes that were made to subsequent planets. This whole process was much more time consuming and cumbersome than it should have been. 2) When looking ahead in the tutorial series, I noticed how many data assets I would have to make, which would just compound issue number 1. Now, it took some time but I finally have it working.
My first target for instancing was the color settings because the next part of the tutorial required an array of data assets for biome data. I started as I always do with these kinds of things and looked into UPROPERTY and UCLASS specifiers. The thing is, I thought I had already solved this problem with the EditInlineNew class specifier. But in reality I needed to use EditInlineNew in conjunction with DefaultToInstanced (recommended by this discussion board). On top of that, with lots of trial and error I found that you also need to use EditInstanceOnly on the property in order to edit the instance (duh). The last thing I had to do was delete the old data asset. To get it to fully work I had to replace the old data asset which I can only guess had some cached memory for being non-instanced. Now all I have to do is the same thing for all the shape settings data assets and everything should be good to go.
All of these changes (plus some smaller ones not mentioned here) can be seen at the github repo
Future Plans:
Also, completely unrelated to instancing, I started thinking about other things to add once I'm done with these planets. I began thinking about other things you have in space and landed on at least a few things that I also want to add besides these planets.
The first of these is gas giants. They make up half of the planets in the solar system and would also add variety to the planets having something other than just terrestrial planets. I am thinking the best way of making these kinds of planets would be to have a basic sphere with some sort of procedurally animated texture to look like turbulent gas movement. I have no clue how to do this as of yet but I'm sure I will figure it out when I get there.
Another thing that is possibly more important to add would be stars. These would be quite similar to the gas giants but would emit light. This light I see as being a possible problem and something that I might have to do myself as the way that I know light in UE4 a spot light would completely overexpose close bodies and would leave bodies further away completely in the dark.
The last thing I thought of for now is asteroids. I would want these to be minimally compute intensive but also react to the gravity of other planets. I'm thinking this is a job for the new niagara particle system, I just don't know if it is capable of running the gravity script faster than a full actor would be.
Comments
Post a Comment