Thursday, February 27, 2014

Something from last semester.

Learning the material editor last semester was a lot of fun. I applied most of the things I learned to this lantern shader.
















One of the most interesting things I learned about last semester was gradient mapping, which I used here. It allowed me to store the diffuse in one channel of a texture and use a second, very small texture to color it. With only one channel dedicated to the diffuse I could pack everything else I needed in the same texture: flicker clouds, a hot spot, and the internal wires / paper folds.
People used this asset all over their levels, often hanging in a line on ropes. Because of this I had to offset the flicker using Object World Position so that they didn't all dim and glow at the same time.
The most complicated part of this asset was getting the hot center. After experimenting with less elegant solutions I came across a technique used by several people, but one which none of them could explain to me; that is, masking a Camera Vector that has had 0.5 multiplied and added to it. After reading the entire Material Compendium I figured out that this is to bias the output of the camera vector (which goes from -1 to 1) to positive numbers. This can also be done with a Constant Bias Scale (which I left floating in there as a reminder) but it's more expensive. The mask simply allows the X and Y channels of the Camera Vector to be used as texture coordinates.

If I had to change one thing I might make the Divide by 8 into a Multiply by 0.125 because computers can multiply faster than they can divide. The difference may or may not be negligible but I'm sure if you talked to a real programmer they'd tell you to use Multiply, especially since you won't get any rounding errors representing 0.125 as binary, though that's getting awfully anal over the part of my shader nobody even used.

This semester we're going into custom lighting, which is an extremely powerful tool. I especially like having a lot of control over my specular highlight.

Tuesday, February 25, 2014

GA240 Blog: Exploding Barrel video

Wasted all of my time trying to get blend shapes to work. Even though they work in the AnimTree Editor, when you try to keyframe the Morph Targets in Matinee, it doesn't work.

Saturday, February 22, 2014

Simple solution to Electrical Arc

Because I was determined to set the BeamEndPoint of the particle to the player location, I missed the obvious solution of reversing the end points. Since the source is the emitter, I simply set the emitter location to whatever instigates a Touch on the trigger. I tried using an Attach to Actor node but that didn't work on players or vehicles so instead I had to use Set Location.

This solution requires no external programming to make work. Thanks to Marty, I now know about changing the target type to Actor and so this is much easier to use than before where the end point vector coordinates had to be manually set for each copy.

Set Actor Location doesn't seem to like taking vector variables in for rotation so I have typed 90 pitch in that node to get the arc to face up. The activate delay on Turn On is to prevent the beam from being briefly visible when it's triggered from a new location.
Just found out you can plug an object directly into the Location input for Set Actor Location. This eliminates the need for a Get Location. 

Friday, February 21, 2014

Proof of concept: Electrical Arc

I wanted to make an effect that made electricity arc to the player when they passed within a certain radius of the source. This example was thrown together very quickly using the default Link Gun particle system. Delay on finding player position is set to .05 seconds. I could have made it smoother but I didn't want too many executions per second.

To get this to work I had to put a new action into Kismet because Set Particle Param doesn't take vectors. I have to iron out some kinks because it gives me some errors when compiling scripts as well as a kismet warning as you can see in the video.

GA240 Blog: Exploding Barrel

I'd like the head to be a physics object that is propelled upwards and then bounces around with spores gushing out of the bottom. It might be nice to have some sort of regrowing animation, just a simple blend shape should work. Burn phase is shaking and emitting light / spores from the head.


Friday, February 7, 2014

GA222 Blog: High Poly Car

Finished the resubmit work; it's 49,965 triangles. Didn't get it as smooth as I wanted but overall, I'm happy with the result. The lights have bulbs (you can see them on X-ray shading).

Thursday, February 6, 2014