So with my terrain being in a good place, namely it's procedurally displaced and I can collide with it (albeit simply), I wanted to move onto my racer.
And I'm glad I did.
I hadn't realised quite what a task the podracer is going to be. I obviously knew the project as a whole is a large undertaking, but I didn't think about how much I wanted to put into the racer itself.
The first issue I came across was how exactly I was going to create these podracing engines from multiple model modules. The answer of course, was instancing.
And I'm glad I did.
I hadn't realised quite what a task the podracer is going to be. I obviously knew the project as a whole is a large undertaking, but I didn't think about how much I wanted to put into the racer itself.
The first issue I came across was how exactly I was going to create these podracing engines from multiple model modules. The answer of course, was instancing.
For my previous project, I just needed to get some shit rendered without giving a second's thought to whether there was a more useful method of doing it. It was only towards the end that I realised if I needed the same model more than once (which for that project I didn't) then I'd need to recreate the entire model, which is pretty dumb.
This however hadn't cropped up again until now. Now I needed to change the model object so that I could render instances of it and dammit it was a ball ache restructuring the code, compared to how exciting it is when things are going right, tedious coding like this can be a drag. Fortunately I managed to get it to render again and then tested that I could render many instances of it. The next step was to rewrite my half finished podracer generation code so that it could take advantage of the instancing. The result was really simple but it demonstrated what I wanted to see: the engines could be moved around local to the pod (which would be vital later on) while their individual parts could be moved around local to the engine and then the whole thing could be moved. Below are the images from my initial tests. The first was to check they rendered and then the second checked the method for adding engine parts. The grey items are the engines with the sand one being the pod.
This however hadn't cropped up again until now. Now I needed to change the model object so that I could render instances of it and dammit it was a ball ache restructuring the code, compared to how exciting it is when things are going right, tedious coding like this can be a drag. Fortunately I managed to get it to render again and then tested that I could render many instances of it. The next step was to rewrite my half finished podracer generation code so that it could take advantage of the instancing. The result was really simple but it demonstrated what I wanted to see: the engines could be moved around local to the pod (which would be vital later on) while their individual parts could be moved around local to the engine and then the whole thing could be moved. Below are the images from my initial tests. The first was to check they rendered and then the second checked the method for adding engine parts. The grey items are the engines with the sand one being the pod.