Thursday, 30 November 2017

[Assignment Models] Tie Interceptor: Part 5 - Texturing the model

My final model to add texture and colour to was the Tie Interceptor. As this model was the most complex of the models I created in the earlier stages I decided to try my hand at adding a bit more detail in the texturing. I found a texture online to use for the grating found on the Tie Interceptors wings.


Using this texture, I applied it to all of the panels to see what it looked like by default. The back middle panel looked almost perfect for what I wanted, but the other panels appeared skewed, or stretched in a way that I wasn't happy with.


To rectify this problem, I assigned the texture on the rear top and bottom panels "planar" projection. This made the texture appear much neater than the previous screenshot. To match the detail found on the other panel I also set the UV repeat settings in the attribute editing for these panels to "20x20", which looks like the screenshot below.


I repeated this process for the panels at the front of the ship, adding planar projection and UV repeat settings to them. This time I had to set the UV repeat setting to "8x8" to achieve the result as shown in the screenshot below.


Next, I changed the default lambert colour to a white colour to match the actual Tie Interceptor. 


With the wing panels and basic colour set, I then turned my attention to the cockpit. First, I textured all of the outside detailing around the cockpit glass as a dark carboncolour, to make it appear like a dark metal. I then applied a blinn texture to the cockpit class and made it almost pure black, as shown below.


Below is a rendered picture of this model with some directional lighting, showing the extra detail created by shadows thanks to the detail I made in the original model.


[Assignment Models] A-Wing: Part 4 - Texturing the model

Next to be textured was the A-Wing model. Once again, I opted to go for block colour. To begin, I added the red stripe down the centre and underside of the ship. I also added black accents to the guns and the metal sections of the cockpit. I also added a red texture to the end of the guns, to match my reference images.


Next I added the red at the back of the cockpit and then a glass texture to the remainder of the cockpit. Much like the aethersprite, I made the cockpit glass a blinn texture using a desaturated blue colour to make it appear more like glass.


After this I added the final colouring detail to the ships engines and the reverse of the ship.



Below is a screenshot of the final model with the block colour texturing in place.


[Assignment Models] Delta-7 Aethersprite: Part 4 - Texturing the model

Before adding my models into my animation scene I needed to add some detail to them, mainly colour so they don't appear as flat grey models. For this reason, I chose to mainly block colour my models instead of doing full UV map texturing as I didn't feel it was necessary for how close to the models the camera would be. To begin, I started to add block red colour to some of the sections of the top of the ship. I changed the default colour to an off white, to match the actual ship colours and also made a couple of extra cuts so I could add the detail around the vents at the top of the ship near the cockpit.



Next, I used the line naturally created by the model to add the red colouring found near the cockpit.


After this, I added the gold coloured bands found around the back of the cockpit and the edges of the fins on the main ship body and cockpit.


Next came the glass for the cockpit. To give this texture a glassy look I applied a blinn texture to it and made it a desaturated blue to match the reference images I have been working from.


Colour detail for the droid found on the aethersprite came next. I added black to the top in a spoke pattern and some black half way down, matching the reference images. Finally, I added a small lens texture to the front part of the droid to give it an authentic look.



Finally I added some colour to the ships rear engines. Below is a screenshot of the finished model.



[Animation Scene] Asteroid Field - Populating the scene with asteroids

Now that I have created 3 different types of asteroid, I need to populate my scene with a lot of the quickly. In order to achieve this, I decided to create a particle emitter. I placed this emitter in the middle of my scene and created it with the settings shown below in order to achieve the correct spread needed from the emitter.




With the emitter created and in place, I then selected my 3 asteroid objects and the particle object created by the emitter and then selected the "Instancer" option in the nParticles menu. This adds the 3 asteroid shapes as particles for this emitter, however the emitter currently just creates instances of the first shape in the list in the exact same angle. We will change this later using code.



In order to make the particle emitter randomly create asteroids based off of our 3 asteroid objects we need to go into the dynamic attributes settings of the asteroid particle shape. Clicking on the "General" option in this menu brings up the menu to add a general attribute to this shape. As shown below, I create an attribute called "asteroidIndex" which will be the array that holds my 3 asteroid shapes



With this attribute added, I can move on to creating an expression. This is essentially some code that will tell the emitter how I want it to create these objects, if I want them to have any special settings on creation and which objects to use as particles for the emitter. Below is a screenshot of the expression I have made. This expression is telling the emitter that for the shape of the particle assigned to it, it should assign a random shape from my newly created "asteroidIndex" between zero and 2.99. This is because the asteroidIndex variable is an array, which has an index starting from zero (and in this instance) going up to 2. In Maya, this value has to be a float, so we set the maximum number to 2.99 to ensure that the code doesn't try and get a value out side of the size of the array, but still maintains a fair ratio of randomness between the 3 objects in the array.



With this code in place, I then assigned it to an instancer under the object index option in general options. This will then make sure that the code is used to select randomly between the 3 asteroid objects. I found that using code in Maya to achieve a task that otherwise would take a very long time manually incredibly effective. This also played into my strengths as a programmer.


Below are the pictures of the resulting asteroid field, now looking much more random and sporadic.


This effect could be better however as all of the asteroids are created at the same size and rotation so I decided to go back into the expression editor and create some more code to randomise these elements. Below is the code that I used in order to randomise both the rotation of each asteroid by a random set of vector 3 coordinates and also to scale each asteroid differently. With the scaling options I had to ensure to make the asteroids scale by a uniformed number (I picked a random number between 1 and 3 each time) so that they didn't scale skewed on each axis (for example, 1 on X axis, 3 on Y axis, 2 on Z axis) and appear squashed or malformed. Below is a picture of the finished asteroid belt effect.



The final thing I did to set the scene was to keyframe the position and scale of the asteroids after my code had created a random spread. I set this keyframe at frame 100 and made sure to stop the emitter from creating any more asteroids at this point. I also made sure that the conserve setting was at 1 for the asteroids, this gave them the effect of slowly floating in space and made them appear less static and more dynamic.


[Animation Scene] Asteroid Field - Creating the asteroids

This blog post will the first in a series of posts detailing the creation of my 30 second animation scene from start to finish. This first post covers the creation of my space "skydome" and creating some asteroid assets to be used later to populate the sky with asteroids. To begin I created a sphere to use as a skydome, I then went to the "Mesh Display" menu and reversed the faces so that the inside faces are texturable.



I also went into the attributes for the shape component of the skydome and made sure to turn off it's ability to cast and receive shadows as this would affect the scene in a way I wouldn't want. 


Next, I applied my space texture that I found online. Applying it by default I found it appeared very stretched, almost like it was smeared across the shape at a low resolution. The solution to this issue was to make sure that inside the "place2dTexture" component of the texture file I set it to repeat the UV of the texture over 8 times on the X and 5 times on the Y axis. This made the texture repeat seamlessly across the sphere shape and appear much higher resolution as you can see below.



With the space skydome in place I now turned my attention to creating some asteroid assets to populate my asteroid field with. I decided to create a low poly asteroid shape as I would be populating my scene with hundreds of them and this allowed me to keep the render efficient. To create a basic "low poly" asteroid shape I started with a cube shape and then used the "smooth" tool. This effect tries to smooth all the corners from this cube, creating a rock shape that was a good basis for my asteroids.



With this basic rock shape created I then grabbed some of the vertices and dragged them out to create a more jagged rock effect, similar to an actual asteroid.



To finish the effect I applied an asteroid rock texture that I found online. I applied this texture as a blinn instead of lambert in order to give it a bit of a shine with my lighting in the scene, making them appear a bit more detailed. I also added the asteroid texture as a bump map in order to give the surface of the rock a bit more depth.



With the first base asteroid created, I then duplicated the object twice and edited the shape of the new asteroids by dragging the vertices around a little bit to create 3 different types of asteroids.


Friday, 17 November 2017

Week 8 Class Practical: Animation UI and Settings

With us moving onto part 2 of the assignment, this weeks class practical revolves around the animation suite that is bundled in with Maya. To begin, I will be getting acquainted with the Maya animation user interface. At the bottom of the screen, underneath the viewports, Maya has a time slider and playback controls. The numbers along the time slider correlate to the starting/ending time of the animation and playback.


For our assignment we will be using animation at 30fps for 30 seconds. To set this first go to "Window", then "Settings/Preferences" and finally "Preferences". Whilst in this menu, we have to change the "Time" option under the settings category to "NTSC (30fps)". To finalise these changes in I need to change the outside numbers on the time slider to 1 and 900 (30 fps x 30 seconds = 900).


To help see the frames on the time slider more clearly you can also change the height of the slider and the size of the keyframes in the slider. These settings are accessed from the same category as the previous settings but under the "Time Slider" sub-menu. Changes the settings as shown in the screenshot make the time slider and keyframes easier to see while working on an animation.


This menu also has options to change the playback of the animation to real time, so you can see an accurate representation of the animation in the viewport. You can also set the animation playback type in this settings menu, for example you can set it to loop once, continuously, or oscillate (back and forth looping).