Repository for SDGM-560 Project
For the first week as we as a group decided on what the project would be and the kind of effect we are doing. Since we are dealing with a transition effect where a car transforms from and old model into another I decided to do a quick prototype shader in UE4 that we could use as a Previs element in out pitch.
The shader is essentially driven by a linear gradient generated from the Forward Vector of a Location Blueprint. The geometry is masked and swapped based on which side of the locator BP it is on.
The Location of the Blueprint Actor is fed into the shader using a Material Parameter Collection fo Convenience.
BP Locator Setup
For the final effect we intend to make use of Houdini’s game sheld tools to bake out Pivot Points and also bring in cached geometry animation from houdini and implement these in Unreal using shaders and Blueprints to drive them in real time.
This week I spent some time looking into the Game Shelf Tools in Houdini, specifically the Pivot Painter SOP. I used this tool to bake out seperate pivot locations for each poly on the surface of the car into the UV channels, and accessed them in unreal to create the dissappation effect. The limit with this effect is that it is dictated by the topology of the Mesh.
Test on Car Model
Houdini Setup Below you can see the setup I am using to bake pivot locations to each face, I scatter points at the center of each poly, and transfer a name attribute to the points that make up each primitve so it knows which scattered point to use as it’s pivot. The Pivot Painter SOP then bakes these locations into additional UV channels of the mesh.
Setup in Unreal Engine
In Unreal I modified my Shader from last week to make use of the baked pivot locations to displace the polys based on the location of the blueprint to drive the Transition. There are Parameters to control Displacement Amt, Falloff and Effect Radius.
Displacement Amt: 32
Displacement Amt: 512
Troubleshooting: The Pivot Painter SOP sometimes still exports geometry with incorrect Pivot Locations and flipped faces, resulting in unclean geometry inside unreal.
1.Try and export pivot locations for each part of the car so that we can prototype the Disassmbly type effect that was suggested by Todd last week.
2.Try exporting out vertex animations from houdini instead of driving the effect procedurally in unreal.
This week I spent some trying to implement Todd’s suggestion of having individual pieces of the car disassmble and reassemble. For this I needed to update my houdini setup to chunk pieces together and assign the same pivot location for each piece. I also tried a quick variation shader in UE4 where the car would swirl and morph into the other.
I had modify my houdini setup to account for chunking and find a way to scatter the pivot location points at the center of each group.For now I am using spherical normals for the pivot direction, which is what casues all hte pieces to fly out in an outward spherical direction. Moving forward these will be grouped to work better gor how we want the effect to play out.
Scattered Pivots Visualized:
Below is the VEX code that scatters points at the centroid of each group.
And below is the VEX code for creating groups from attributes, in this case using the @class variable generated by the connectivity Node.
In unreal I updated the technique I was using to drive the transition, instead of using the forward vector of one blueprint to drive the transition mask, I switched to using a linear gradient generated from the distance between a BPstartLocator and a BPEndlocator. This allowed to drive the transition from any 3 dimensional axis we want instead of being limited to the XY plane with the old technique.
I’ve updated the shader to have more parameters to control the final look of the effect in realtime, like influence radius, Displacement Amount, Enable/disable Rotation, Falloff etc.
This week has mostly been troubleshooting on my end, moving individual pieces by hand and transferring data from the processed mesh to the Final Shaded Mesh, is proving a little difficult as the Mesh Topology has changed on the actual mesh. So this may require a little bit of backtracking on my end, as well as redoing some of the tedious bits by hand.
The other problem was getting houdini to export the model with the Assigned Material ID’s, the obj format reads Material ID’s into houdini but when exporting FBX the the Material ID’s would not transfer, so that required a bit of wrangling.
Below I’m moving individual pieces by hand to get more deifned movement
Pivot rotation based in location in space
Vex Code to set normal rotation based on location in space
Pivot locations Transferred to pieces on base model
Since a lot of my work this week had been trouble shooting, I needed to take abreak and work on something else, so I created a variaiton on the shader based transition effect.
Car Schematic View This was a test for aholographic schematic view of the car. The idea is to have the car transition into this schematic view before the pieces fly away to try and sell the original effect better.
For this week, I converted the shaders into Functions and added it to all the car shaders in our project. To see the effect on the shaded models.
I also tried another variation for the transition effect using pivot painter and curl noise in the shader to drive the motion. Below you can see the test on the UE4 mannequin:
And below the shader modified to work as a transition effect
This week after the feedback from the mentor’s, the primary goal for all the teams was to start putting together the shots, and keep showing progress on the mfor the rest of the quarter. So we did the same, I made a rough pass of the FX in the Animated shot, I still need to work on the Timing and Keyframing of the FX transitions. We also, ran into some challenges with the Camera Animation for this particular shot as the Camera Pan would desync, when we tried to render out the Frames from the Engine.
Rough keyframed Shot
As I had alluded to last week, we decided to ahve the cat transform into a hologram before it transformed into the other car, jsut to sell the effect better. Below you will find the shader setup for the Hologram.
This week I spent some time making a glitch FX for shot 01. The group felt that we needed some sort of anticipation in Shot 01 before the full transition happened in shot 02. For this we referened the glitch-teleport effect in Wreck-it Ralph where the character Vanellope would occassionally glitch out and teleport around.
Our implementation in shot 1
We also put together an FX Pass, so that the FX could be comped on seperately from the beauty render.
FX Pass shot 02
Beauty Render 02
To Do: Figure out a way to render a FX lighting pass.