Tip:
Highlight text to annotate it
X
Welcome back. In the previous video, you studied the ICE tree that generates this building.
In this video, you'll re-build the tree from scratch to see how it was put together.
Start by deleting the building.
You are going to create the building at the position of this null.
Get an empty mesh and call it "Building".
Then create an ICE tree on it.
There's a Merge Polygon Meshes node in the topology compounds, so let's start with that.
The first thing is to connect up the main floor.
There it is, but it's not where it should be.
And there doesn't seem to be any options for controlling its position.
So explode the compound and rearrange the tree.
There's an array of topologies here, but you won't be transforming all the topologies in the same way so you don't want to work with that.
Explode Build Topology Array and re-arrange again.
Here's where you get the topology, and right after that you can move it to where you want it.
Insert a Transform Topo node and use the null's global transform.
Now the main floor is in the proper place and can be controlled by moving the null.
Add the middle floor to the array and apply the same transform.
Notice that the offset of the original object has been applied automatically.
In some circumstance that may be desirable, but it's not in this case.
If you look inside the Get Topology compound, you can see where it's applying the transform.
Explode the Get Topology compound and get rid of any nodes inside that are not needed.
You don't want the extra Get Kine Global and Transform Topo nodes.
There's also an empty Get Data node that's just acting as a pass-through.
Do the same deletions for the main floor just to keep everything clean.
Now the main and middle floors are superimposed, so you need to move the middle floor up.
The amount it needs to move is the height of the main floor.
Because the centers of all the templates are at the bottom, you can get the height just by getting the maximum Y position of the main floor's points.
If the floors were modeled differently, then you'd need to use another strategy.
For example, if the center was in the middle then you could subtract the lowest Y point position from the highest.
Or if the floor had some little details sticking out that you don't want to take into account, then you could define point clusters for the top and bottom.
Luckily none of that is required in this case.
Get the main floor's point positions,
then get their Y values,
get the maximum,
use that to build a vector,
and use the vector to build a transform matrix.
Matrices are often used in 3D to represent scaling, rotation, and translation together.
You need to combine this transform with the null's transform by multiplying them together.
Matrix multiplication is not commutative, which means that the order is important.
The null is acting as if it was the parent, so it should be the last term, or in this case, the second term in the multiplication.
The offset should be the first term.
Use the result to replace the transform that you were using earlier.
The middle floor is now in place on top of the main floor.
The next step is to add the roof.
This time you need to offset it by the height of the middle floor as well as the main floor.
To get the height of the middle floor, let's re-use some of the existing nodes.
Select these nodes and create a compound. Give it an appropriate name.
Copy and paste it into the tree and get the height of the middle floor.
Add the heights of the main floor and middle floor together.
To calculate the offset transform from the combined height, make another compound.
Combine the offset with the null's transform and use it to transform the roof.
So now that the topologies are merged together. You still need to transfer the materials.
Because the building is simply 3 merged objects, you can use the Merge Material ID compound.
Connect the mesh names in the same order: main floor, middle floor, and roof.
You also need to copy the Materials array from the material container.
You can copy and paste those nodes from one of the other objects.
And there it is - the building with materials.
If you zoom in, you can see blue border edges at the seams.
The easiest way to connect these polygon islands is to apply Weld Boundary Points/Edges.
ICE modeling trees are just like regular topology operators, and you can combine them in any way.
So far, you've got a building with a main floor, a second floor, and a roof.
Save your results to this point and in the next video, you'll add a slider to control the number of floors.