Spline Tools Advanced Usage Examples

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
the showroom level contains a few examples of how to use the spline tools functions for more complex Solutions one example shows chairs arranged for an audience in multiple rows and with a walking aisle in the center the blueprint doesn't contain a lot of nodes in the first example we will recreate the blueprint and in the second example we'll create a version that allows multiple aisles and groups of chairs to be placed first create a child blueprint of the blueprint BP meshes on spline parent rename the blueprint to BP my chair rows and open it first connect a spline placement e equal size to the parent construction script pin then add the total spline length function to the spline segment next add a simple mesh on spline node and use the chair in the furniture folder as the static mesh compile and save place the blueprint into the level I've hidden the existing chair blueprint to have more space the blueprint keeps having only three chairs for now open it to change this the placement node has two options the default is to place a given amount of chairs no matter how long the spline is the other option is to place chairs by distance until the spline is is filled with chairs we need this option tick the box to place a mesh at the end scale to fit will scale the chairs so we won't use this tick box the chairs shouldn't be perfectly placed place a add transform node between the mesh on spline and the placement node set the transform type to random at the bottom of the new node this will create random values for each placement setting the offset value for x X to 15 will create an offset between Min -5 and + 15 if the transform type is set to random standard type transforms will take the value as is incremental will increase the value for each instance zero for the first 15 for the second 30 for the 3 and so on I'll try some values it's easier to tune the blueprint in the details panel instead changing values compile save and then check the outcome promoting the offset and rotation to parameters will allow us to do this I'll also add parameters for the static mesh and the distance between chairs next we will create the walking space or aisle in the center we have to divide the spline segment into three parts a fixed part in the middle and two equal parts left and right of it that's what the AFA segment divider node does place it between the total spline length and the placement node then connect the start segment pin to the placement we will need a duplicate of the placement node for the end segment add a sequence node between the construction script and the first placement node then connect the second placement to the second pin of the sequence node both placement nodes can share the chair distance and the mesh on spline node promote the fixed segment value to a parameter and call call it Isle width don't forget to make parameters visible to be able to see them in the details panel the for Loop node will create multiple rows place it between the construction and the sequence node we want to repeat all nodes we placed so far for each row created the loop node will loop from the first to the last index enter one as the first index and then promote the last index to a parameter named amount rows after saving we can see that there are multiple rows of chairs placed on the spline we will need to offset the additional rows place a mesh on spline add offset node between the mesh on spline and the random transform node the offset should increase with each index we need to multiply the index from the loop node with the distance the chair rows should be apart from each other create a parameter for the row distance drag off a make Vector node from the location offset pen we only want the Y value to change the index is an integer and the vector values are float values unreal will automatically place a conversion node now we can see our three rows of chairs the first row should not be offset I change the first index to zero and subtract one from the amount of row rows that goes into the last index of the loop this way the first row doesn't get an offset I'll clean up the blueprint layout a bit the values for the row offset should be negative I add a PIN to the multiply node and set it to minus one this way the rows get added to the back of the first row the blueprint seems to work try to find the best values for it I think NB is enough for the row distance the final step is to change the color of each instance of the chair slightly we can do this by changing the Hue value of the material the chair uses place a mesh on spline random mat scaler between the random transform node and the placement nodes locate the material that the chair is using open the mesh with a double click and then open the material from the slot with a double click it is a material instance with a hue option the parameter name is fab3 diff Hue go back to the blueprint and use the exact name of the Hue parameter in the nodes parameter name set the random range to 0.1 the Hue is a value between 0 and one we should see some changes but we don't all chairs are still looking the same the reason is that we haven't set the material for the chair anywhere in the blueprint and the blueprint doesn't know what to change add a single material node between the random transform and parameter nodes then use the current default material for the chair as the material I'll promote it to a parameter then I do the same for the random Hue range don't forget to tick the I icon to make them visible in the details panel now the Hue values can be Chang the chair material can be swapped as well the blue material has a different Hue value set and the random result will be different here is a recap of the main elements used in the blueprint the loop will create the rows the offset is multiplied by the loop Index this increases the distance per row every row has three segments an aisle with a fixed width in the middle and two side segments for the chairs the chairs get a random rotation and location offset with a random transform node the material color of each chair is changed slightly by modifying the Hue of its material your material may not have a parameter for changing the Hue of the texture it's easy to add one it needs to go between the diffuse or albo Texture and the base color pin of the main output type Hue to find the hu shift node connect the texture V3 pin to your diffuse node string and the result to the base color pen hold down the one key and then click somewhere next to the hu shift node to add a scalar value convert the scalar value to a parameter name it and connect it to the hu shift node now you can use its name in the mesh on spline random material node as described before you may want to move the blueprint to another folder you can do this in the content browser grab the chair blueprint and drop it into the furniture folder you will get the option to move or copy it the rightclick menu has an option to find an asset in the Windows Explorer let's check the blueprint V3 folder you'll see that an asset with the same name is still in this folder this is a redirect that unreal places there in case someone else uses this asset and his unreal version expects it to be in this folder it's a good idea to get rid of these redirects select the spline tools s. folder the rightclick menu has an option to fix up redirects save everything before you fix redirects and afterwards you may run into an issue where unreal wants to save a copy of your current level close the editor without saving the level when this happens it will be okay when you open your project again let's improve the blueprint by adding the option for multiple aisles duplicate the existing chair blueprint and rename it to BP my chairs multi- Isle then open the new blueprint we will use the segment repeater node this divides the segment into equally sized sections the node outputs an array element with all the sections drag off the output pin and add a for each Loop we won't need the sequence node anymore it can be deleted connect the construct script to the new Loop instead connect the white output pin of the loop to the placement node the array element pin goes to the spline segment pin of the placement the AFA spline divider node can be deleted we only need one placement node so the second placement can be deleted as well save the blueprint replace the existing one Isle blueprint with the new one for now it has no aisles set the segment length in the repeater node to 300 then promote it to a variable and name it chair segment with the segment size consists of the chairs plus the aisles hold the plus key and click near the node to add a plus node connect the two variables to it and the result to the segment length pin move the placement node a bit to the right side add the segment AF node between the loop and the placement node it will create a fixed space for each aisle duplicate the aisle width variable and plug it into the fixed size pin of the new segment divider node compile and save the new set of chairs now has an aisle the chair segment width can be used to set the desired width it will not immediately react to every value change instead it will use the closest Value to fill the entire spline length the tick boox scale to fit is ticked in the segment repeater node we can adjust the spline End by pushing it through the wall there is an extra aisle at the end it would be better if the blueprint has a segment of chairs at the end instead we'll need a fixed segment at the end of the spline to add a set of chairs but no aisle put a new AF segment divider node before the repeater node this node will split the end part off and leave the rest for the repeater Loop now we need another placement node again duplicate it and connect it to the white completed pin of the loop once the loop is finished the blueprint will place an extra set of chairs plug the variable chair segment width into the fixed pin of the new segment divider node check the blueprint in the scene there are no chairs at the end the space seems to be there but the chairs aren't the connection from the a pin of the segment divider to the new placement node is missing now the blueprint is complete you can order the variables in the blueprint to make more sense to the user the order in the blueprint will be the same in the details panel the showroom level has two blueprint examples placed outside the windows one places either a bush or a statue randomly select this blueprint and then press contrl and E to open the blueprint editor the mesh on spline random mesh node will pick a mesh from an array of meshes added the inputs are promoted to parameters we'll look at the details panel in a moment then it adds a random transform to the meshes placed the placement itself is a equal siiz placement set to by distance the blueprint uses parameters for most variables let's have a look at the details panel the random meshes array has two elements index zero is for the bush and index one is for the Statue the material array contains the main material and another array called randomizer here is where you can add random values for each material of each mesh the randomizer array contains one element its type is set to scaler and the parameter name of the material is Hue the value range of a scalar parameter is set in the first channel of the value Min vector 0.15 means the value range will be between minus and plus 0.15 the second random mesh the statue has also one material the randomizer type is set to color the color type uses the Min and Max values to tint the statue a white texture cannot be Hue shifted it will always be white I'll close the material arrays for now the priority values will determine which mesh will be more likely picked it is random that means many bushes can be appear next to each other setting the priority of the statue a lot higher than the priority of the Bush will make the majority of the mesh's statues you can see that each statue has a slightly different tint and rotation the other blueprint outside is creating a path made of wood planks it only uses one plank mesh but each plank looks slightly different the blueprints placement node is a standard Auto placement there are three nodes that modify material parameters one node defines the material another node adds has a random transformation to each mesh placement the mesh on spline node has a transform as well this transform will be applied to all mesh placements before the random transform is applied to each individual placement the random transform scale values are multiplied 1.1 means maximal 10% bigger random rotation of up to a couple of degrees is applied depending on the axis the location offset amount also depends on the direction the next node defines the material it's the default material of the plank but the random material parameter nodes would not work without defining the material first the first node randomly applies a hue shift same as in the other example previously explained the second node applies contrast the third node modifies the material UV the material uses a vector Four Color parameter instead of four individual scalar parameters to scale and shift its UVS be sure to use the exact parameter name in any of the random material nodes the category of the parameters can be used to group parameters here all random parameters are separated into a group this is the end of the tutorial I hope this gives you an idea of the many ways you can use the spline tool nodes to create useful blueprints for your projects
Info
Channel: Stefan Doetschel
Views: 178
Rating: undefined out of 5
Keywords: Unreal Engine, Unreal 5, Arch Viz, Splines, Blueprints, Architecture, Railings, Fences
Id: IoNOSGHtAWw
Channel Id: undefined
Length: 24min 46sec (1486 seconds)
Published: Thu Jan 04 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.