Monday, 30 September 2024

Simple Crate Project Part 2

 This week we worked on sculpting and importing meshes into Substance Painter to bake High Poly sculpts on. 

Rendered in Arnold with only a normal map
High Poly bake in Substance Painter
Reference




Thursday, 26 September 2024

Use of Perspective Week 5

 This week we were assigned to create a prop and render it in a one point, two point, and three point perspective view. I chose to design a Greek vase, specifically a Greek Amphorai, which was used to store and transport wine and foodstuff. We were also thinking about potentially being able to shatter the vase when you throw it. 

Final rendered design

The vase has Hercules rendered on both sides of it. 

PureRef board

different types of greek vases

Vases with Hercules specifically on them



Looked at shape language used in despicable me movies




Monday, 23 September 2024

Simple Crate Project - Part 1

 This week we started the Simple Crate and Barrel Project. I chose to go with the crate for this assignment. 





Going for this Crate design


Unreal Screenshots


The Proxy Cube imported into Unreal to establish the pipelin




Friday, 20 September 2024

Constraining NURBS curves to joints

Quick and Fast Instructions

  • Create your NURBS curve
  • Put your Curve into an empty group (Ctrl + G). 
  • Make sure you freeze and delete history on both the curve and the group. 
  • Modify > Center Pivot for the group
  • Select the group, then select the joint you wish to match, then go to Modify > Match Transformations > Match All Transforms. 
  • The group should snap to it and the curve should still have its transforms zeroed out in the channel box. The pivots for the joint and curve should also be the same. 
  • Finally select your curve, then select the joint, go to Constrain > Parent. 
  • Now your curve should control your joint, and you can put it into your curve hierarchy. 
    That's all there is to it. If you want more info + pictures you can continue reading on. 

Setting up the NURBS curve

    When constraining curves to joints, a good practice to keep in mind is to have the pivot of the curve match the pivot of the joint. Start by creating a NURBS curve and scale it to approximately the size you want. Keep it at the origin for now. Then delete history and freeze transformations. Rename the NURBS curve to something descriptive for what it is controlling.
Outliner hierarchy

Making a curve to control my head joint. 


    We want the NURBS curve to be completely clean of any transform, rotate, or scale data. But we need to move it so that it's near the head joint to move it. What we can do is create an Offset Group to put all of the transformation data when moving the curve, while the curve remains clean. While selecting the curve, hit Ctrl + G to create a group.
The outliner's hierarchy


The groups pivot when first created should be at the origin

        It's important that the Offset Group's pivot and the NURBS pivot should be exactly the same (if you haven't translated the NURBS curve, the pivot should still be at the origin). 

Matching all Transformations

    We've completed all of the setup we need for this. Now with the Offset Group selected, find the joint you want to control. You need to add the joint to your selection. This can be done in the outlier with Ctrl+left click or in the viewport Shift + left click. 

 

 

 

Offset Group selected first

 

Then the joint is added to the selection

Now you can go to Modify > Match Transformations > Match All Transforms.
Under the Modify tab

    Now the Offset Group and the curve snaps to the joint. And you can check the pivots by selecting the curve and then the joint. The translate manipulator should not change direction toggling between the two. 
Head Control Pivot

Joint Pivot

    Here's an example of the pivots not aligning correctly. 

 

the joints y pivot points up

 

the control's y pivot is at an angle


    We're using the translate manipulator to check. Notice how the pivot of the joint does not match the pivot of the control. 
    Going back to our head control example. We can also check the the controller's attributes in the channel box. It should still all be zeroed out. Instead all the 'garbage' transform data was put onto the group, and we can check this by selecting the Offset Group and looking in the channel box. 
The Ctrl Curve is clean with no transform data


But when you select the Offset Group, it has all the 'garbage' data used to get the curve into place

    The final step is to select the Curve, then select the joint, go to Constrain > Parent. You can go into the options box and turn off "maintain offset" to check if you've done it correctly. If your curve seems to move a bit when you constrain it you might have something off. If it stays in place you've done everything correctly. 

Changing the shape of the NURBS Curve without changing transformation data

    Now that your curve is in place, you may want to adjust the shape more. You don't want to move the object cause that will move the pivot out of place. What you can do it change the objects shape using the NURBS curve's control vertices.
    Select the NURBS curve. Hold right click and select "Control Vertex" from the radial menu.
The NURBS curve radial menu
    Sometimes this radial menu won't come up initially. It's context specific so make sure you're right clicking over the NURBS curve line. 
NURBS curve control vertecies

    You should see a bunch of purple dots appear around the NURBS curve. These points determine the shape of the curve. You can adjust any of them in anyway, rotate, translate, scale, etc. 
I have an easier time selecting all of them when you turn off 'select joint objects' in the toolbar

select joints turned off

Here I translated and scaled the vertices up
    When you go back into object mode, you can notice that the pivot stays in the original position. 
I've moved up the curves vertices, but the objects pivot stayed the same

That's all there is to it. Have fun making new shapes!

Monday, 16 September 2024

ZBrush Hammer Sculpt Project

    This week we were assigned to sculpt a hammer within ZBrush. 

Rendered Stills

 

In Progress Shots













Tuesday, 10 September 2024

Tech Art Class Demo - Blueprints

 Making a Teapot Glow

    For today's class we had gone through Unreal's Blueprints and programmed a teapot to glow red when a button was pressed. 

Getting Started

    Create a new empty basic level and create a folder to hold all of your objects and Blueprints.

    Right click on the content browser and create a new Blueprint class. It's going to ask you to choose a parent class. Choose actor. Everything in Unreal that you see in the viewport and the player can interact with is called an actor. 
Popup that appears when you create a new Blueprint
    With your new blueprint and inside the blueprint tab, go to the components subtab and make a new scene object. A scene object is like an empty group node in maya. It is used to hold other objects and allows them all to share the same pivot point. Drag in the meshes you wish to use. For us we had used a teapot with a lid. We also assigned the Burnish material from the starter content to the teapot and lid.
Everything should spawn in at the origin of the Blueprint

Event Graph

Blank Event Graph

    Inside the event graph, you can drag an actor from the components tab and bring it as a node into the event graph. This creates a pointer to that object.

Event Tick Node

    The event tick node will play every tick. A tick occurs every frame. Grab the Scene node that holds your objects and bring it into the event graph. Drag click on the output of this node, and type add local rotation axis. Whenever you drag from a input/output of a node, the nodes that show up are ones that would most likely apply to this output. 
Dragging from a node and releasing brings up this menu to look up new nodes to automatically connect to

    Go to the event tick node already in the event graph, drag the white arrow output to the white arrow input of the local rotate node. Now create a make rotator node, and plug in delta seconds to the z, and the return value to the delta rotation. Now compile and save.
Nodes so far
    When we play the game so far with our blueprint. It doesn't look like our object is rotating. But if you look closely, it is rotating, albeit very slowly. This is because we are running at 60 frames per second, 1 second divided by 60 is 0.016667 (Note: the frames you are running at is dependant on your computer, so this can vary). We can actually check the exact value that the object is rotating at every second by creating a print node
    You will be troubleshooting Blueprints a lot, and the print string node comes in handy. Connect the string node with the Event Ticks node white output and delta seconds, and Add Local Rotation nodes white input. When you input the Delta Seconds to the in string input, it creates a new node that automatically converts the delta seconds from float to string. Now when you hit compile you can actually see the number of degrees it wants to rotate the teapot, which is 0.01667!
Notice the colors of the lines connecting each node. Green appears to be a float data type, while pink seems to be a string data type

The printed text will appear in the left area of the viewport when you start up the game
    Now we want to increase the speed of the rotation. We can create a multiply node and multiply the delta seconds by 25 Now every click is almost rotating half a degree , at 0.41666 (0.01667 times 25 is 0.416667). You can also use the print node to check the degrees the item is rotating after applying the multiply node.
    At the end we can clean up our nodes and put a comment box around it by selecting the nodes and pressing c (similar to the material editor). 
The print string node is not necessary anymore, so you can delete them.

Event Begin Play Node

    The Event Begin Play only happens when the game starts and only once. When you want the game to listen to player input, you have to tell it to with the Event Begin Play node (why it doesn't do this automatically we don't know). Drag the white arrow from Event Begin Play, and look for enable input node. Then from the enable input>player controller input, drag it out and search for getPlayerController Node. Now it is listening for player input.
Simple setup to listen for player input

Getting Player Input

    Next look for a keyboard g node to check when the g key is pressed. Create two print string nodes and put both the g pressed and g released outputs into both of them. Change what each string says (g pressed/released). Compile the BP and check the game to see if it worked.
using the Print String node to debug
Pressing and releasing G will print this text to screen

   Setting up the Glowing Material

    Now we want to duplicate the burnish material that we've assigned to the teapot (in the starter content) and name it M_MagicLamp_Template. Inside the material editor create a vector parameter and change the default color (this will be the color for the emissive color to glow). Create a scalar parameter (how much you want it to glow) and then multiply the two together and put it into the emissive material slot. Make sure you remember what you named the scalar parameter because this will be used in the blueprint. 
The added material parameters we made. We had named the scalar parameter "Glow Amount"

Programming the Glow

    Go back into the event graph. From the g pressed print string. create a dynamic material instance. Choose the one that says SM_teapot. This will create a pointer to the SM_teapot automatically.
Create the node by dragging from the white output. Make sure to get the SM_teapot one because that is the object we want to glow
This will setup the node correctly with a pointer already for the target

    Change the source material to the material template you just made (M_MagicLamp_template). Now drag from the return value and create a Set Scalar Parameter value. This will not work correct if you don't drag from the return value. Change the parameter name to the parameter name you made for the material (we had named it Glow Amount) and change the value to something big to make it glow. Do the same for the g released key.
You have to drag from the return value to get the correct Set Scalar Parameter Value node
All the nodes necessary

Pressing and holding G will make the teapot glow. Releasing it will stop the glow

Timeline Node

    The previous method works, but there is a more elegant solution that uses less nodes AND lets you control the transition between glowing and not glowing. 
The timeline node connected to the g key node
    Create a timeline node. The pressed key output of the g node goes to the play input of Timeline and the released key output of the g node goes to the reverse input of Timeline. 
    Double click on the Timeline node to go to the timeline editor. Create a new float track and make it 2 seconds long. Rename this track to "Hot Amount" (we will use this later). Right click on 0 to make a key, then make a key on the final frame and make it 10 value. Press f to show entire graph. Right Click on the final keyframe and change the interpolation to auto. It should make a curve at the end instead of a linear line.
The Timeline editor
    Note: for some reason when I tried to recreate this, it would not change from a linear line, so i made another keyframe, made it auto as well and adjusted it until it made a nice curved transition. 
Finished node setups
    Make sure the Hot Amount output is connected to the value input of the Set Scalar Parameter Value. If you've set everything up correctly, we now have a smoother transition from not glowing to glowing and vice versa!



LIGHTING ISSUES

 To set up to bake lighting:  Project Settings: Engine - Rendering:  Allow Static Lighting to True Disable Lumen: Change global dynamic illu...