hi I'm Michael belusive I'm a software engineer at Bentley systems expanding the iTunes platform I'm also lead developer of the iTunes export for daysmith which helps you integrate your iTunes with unreal if you're new to the iTune platform it is an open Cloud platform to enable creating digital twin applications across the infrastructure lifecycle and you can find out more here at developer.bently.com if you're new to Unreal Engine it is an industry-leading game and real-time content engine which is used to create interactive and static media in the architecture engineering and Construction Industries is used for things like lighting studies high quality demonstrations and even developing entire custom applications including with ar and VR you can find out more at unrealengine.com now let's navigate to the iTune for unreal page under documentation and iTune for game engines on the right here we find the iTune for unreal page home of the iTune export for data Smith the item export for data Smith is a free Standalone application that helps you export your iTunes geometry and data into unreal's Data Smith format this lets you bring into unreal all the formats you've connected to your iTune and leverage unreal's data prep pipeline to automate transforming your scene as you import it using your iTunes data we also support a special combined scene export mode for large models where performance of many many Unreal Engine objects could be a problem where the scene static meshes are combined and the animation can be controlled with a special API there's a download button over here for the iTune export for daysmith or you can scroll down and check out our documentation you can also find our tutorials either here or all our tutorials under the special section but we're going to get started getting our eye model into unreal by opening the exporter which you must have downloaded back at the slash unreal page over here let's open it up so we come to the sign in page uh if you if you haven't signed in yet if this is your first time installing it then you will have a new tab in your browser open uh if you can't find it it automatically opens so look for it and that lets you sign in using whatever credentials you already have in your browser so it's a little bit easier we also have at the top here once you've signed in or actually before a feedback button to go to our ideas portal where you can request features or vote on features other people have requested or you can go straight to the documentation from there other than that we can navigate through projects you could look at all of them but I'm just going to go to one that I set up for this that's already in my recent projects list and I'm gonna open it up but before I do I just want to note that here's the install button for the iTune unreal data Smith plugin which we're going to need to install into our unreal project so you can only go back to this page to install it but um it's important to do it sometimes you might want to do before you even open your thing but we haven't made our own real project yet so we're not going to do it yet so instead we're gonna you know we're gonna just go ahead and open our eye model um you can hit view or click on the image you could also just directly export without even viewing it but there are a few more options inside the viewer itself so we're just going to hit View mine opens pretty quickly because I have already opened this one before if yours isn't cached and you haven't opened it yet it may take a bit to open when I open it up you see that there's sort of nothing interesting going on here that's because this eye model has a schedule which is important for us because one of the features of the iTune export for data Smith is that it will import your scheduled data so you can get your animation streamed on real without any work and we want to see that in unreal so we have this building process which we're going to take a look at in unreal and now we actually have everything here so another thing that we can do with the viewer which might be important is the properties panel you might have it at the bottom if you haven't opened it yet but you can click on elements and check out some of their properties here depending on how they were imported or what your eye model is made up of depends on what metadata and what uh properties you will actually have if you notice for instance that you hover something and you only want so let's see so you hover this floor but when you click it um it selects everything you just need to change your selection scope from Top assembly to element and now when you click on the individual element it'll only select that and that's going to be useful because we can now hide those two x to restrict it from our export so I just hit that element and you can actually use some of the filtering features for the export to not um not have that thing exported uh we actually have three export buns at the top here when you're not using the visibility tools um so we have the Standard Export which is going to do what's called a combined mesh export that takes pretty much all the meshes in your scene that don't have some sort of transform animation that moves it around anything that doesn't move but might have any visibility animations or cutting plane animations that's going to be combined into one mesh because that's usually much more performant in large scenes this scene in particular I know renders extremely slowly like two frames per second if I do not use this option so it's a good option for large scenes so we're going to be using it here um it also just does all the other uh default export options you can set the options by using the advanced export and you can also choose various filtering features there before I even go into these this middle export button just exports the current view which is one of the view filter options that you will have in the advanced export and exporting the current view just means like hey if I hit this then that's going to be not in the export anymore so let's take a look at the advanced options here so we have some metadata Behavior Uh unfortunately when you are combining all the meshes you'll notice so fine so it's just element metadata when I click this it's gonna it's gonna get rid of that and tell me element labels only and it's actually going to disable the other options because when you're combining all the meshes you actually don't really have the uh the granularity of actors in unreal to use data Smith's metadata system and it can be slower to include the metadata into the file since there's a lot of it so we just you you don't you aren't allowed to uh get the metadata when you're combining your mesh for smaller scenes or if you're hiding a bunch of stuff then uh you well in large scenes you might have to hide a bunch of stuff but for a medium-sized scene or for a scene where you hide enough for it to be possible you don't have to combine meshes and then you can use the data Smith visual data prep tools to uh do whatever changes you like so sometimes hiding parts of the scene or processing it differently exporting it differently so that you can use data Smith recipes might be useful depending on your use case um this metadata Behavior so it only applies when you're doing the uh separate objects when you're not combining the meshes you can either get only the element metadata which is not going to include what's called element aspects um it will include one kind which is the um element Source external Source aspects so basically just where did this element come from so it's the information on the element itself and the where did it come from if you want if you need all the metadata like one of your properties isn't showing up then you can go for all metadata which is the slowest option but it will put all the metadata in your data Sim file for you so you'll be sure to be able to to find whatever metadata popped up in the properties panel you'll be able to see it in unreal and select on it when doing visual data prep recipes the next thing that we have here is this origin offset which lets you for very large scenes maybe you want to move them around while exporting it defaults to moving the object to the center of unreal because for very large scenes especially ones that are placed very far from the origin if you don't do that then you're going to have Precision issues in unreal like the geometry will be too far away from the center to be accurate so this just automatically recenters it for you but you can change it back to zero zero if you like and finally we have filters so by default it doesn't filter anything but you can switch to filtering on a view the current view is the uh the one that you um that I mentioned before it's the same thing as that current view export button where it just takes whatever is currently hidden and uh whatever is in the current view basically you can also switch to either saved views that you have or any view definitions that are in the model uh because this eye model comes from some connected Synchro data I have a couple of Synchro view definitions that were created during the connection but I also have two saved views here which will look at the same views widget in a second that we can manage there but we can select them here during the export and that way we don't need to manually choose the saved view every time before we hit export so I'm gonna hit the save views widget so here we have the list of views and then the desktop views are the same as the what I call the view definitions earlier that come in through your connection we can create views we can hide something and then create a new view so I'm just going to select a couple elements here and I'm gonna hide them and then open this and just create a new view I'm going to do new stadium roof just name it that and then I'm gonna open the new buildings View which brings you back to the same scene but without any buildings and then go back to the no roof View and there we go our buildings are back and our roof is gone so yeah so very useful for uh setting up sort of uh excluded elements from The View so that way you're you can redo and Export with the same excluded elements that's pretty much most of what we have here you can go through the model tree to to manage visibility on a hierarchical whoops keep double clicking on a hierarchical level um you can also get like hide entire categories there's only one in this model so it's not very useful but that covers most of the visibility tools that we need here so with that said we can actually just start exporting our model here so I'm going to combine like I said I'm going to keep the same origin offset I'm not actually going to filter it I'm just gonna hit export and I have a little data Smith exports here I'm going to make a new one I'm gonna call it Stadium demo poo and then you can just wait for this to finish actually while this is going I might as well open up unreal and start a new project so I'm going to launch Unreal Engine 5 which we recently started supporting that export should finish soon so in unreal I'm gonna go straight for the architecture templates and choose a blank one the thing that's important about using architecture templates is the data Smith plugins are only activated in them you you have to manually activate them otherwise so in order to avoid having to do that I'm just going to use the architecture blank um let's just get that started and we can actually see that because that toast is gone that it actually finished exporting unreals loading up our new project so let's actually navigate back to the home page here and we're going to install our plugin so the the first step of of starting a new iTune a project that has support for the iTunes data Smith pipeline is to add in our plugin so in order to support more Unreal Engine versions We actually let you recompile it from source so that's what this install button does so we're going to navigate to to that unreal project that I just created and you just select the U project after you hit the install button so I'm going to hit install it's going to add a new plugins folder there and unless you're using the latest version of unreal you will have to recompile that and it also depends on when we officially support the new version but as of as of today in this video we we are supporting unreal 5 as the latest version so what I have to do is reload now that I've added the plugin so I'm just gonna use the Epic Launcher should start up but this time should load the uh the plugin yep it's starting up here all right great so didn't ask me to compile it might for you if you're not using the exact version that the plugin is designed for but it is guaranteed to compile as long as you have the dependencies for it from 4.26.1 and on actually a bit earlier but there is a bug in the dates with them importer in 4.2 6.1 and earlier our 4.26.0 and earlier so watch out for that if you do need to recompile it from scratch then you need to make sure we have the list of requirements in our tutorials you need to make sure that you have Visual Studio installed and you need to make sure that you have the game development C plus and the.net c-sharp workloads installed so that the unreal editor can recompile things as it needs and no matter what that's actually going to be a requirement if you're shipping an unreal game you will need to recompile the plugin uh for the shipping engine version so no matter what you are going to need to recompile or you are going to need Visual Studio at that point but the latest version is supported without it so anyway let's start our import now that we have it so I'm just going to hit the add stuff button in unreal5 and just under Dave Smith filing Port again that will only be visible if you have the data Smith plugin installed um actually before we do that let's real quickly make sure that we have the right plugins installed so I'm just gonna search iTunes in the plugin menu and here we have it checked so that's how we know that we have it installed um so now then I can hit the file import on data Smith again go to the data smooth exports and select that Stadium demo 2 that I created and just drop it straight into my content folder it's gonna take a bit to load all right so just loaded uh you'll see that um the large static mesh isn't actually there yet it's still being prepared if it's if it's a big one it might take some time I'm just going to change the camera speed here to six so that way I can fly in faster I'm gonna wait for that to load um we can actually go into the con there we go if you go into the content drawer and in the stadium demo folder that was created when I imported this there's an animations folder which I'm going to go in and just drag and drop that schedule animation asset into the scene to get a level sequence actor into our scene using that sequence so this sequence is going to guide the transform animated objects in our scene like the cranes here the things that actually move and rotate around so everything else for efficiency reason is going to be animated through textures through um through the plug-in and shaders basically so we need to synchronize them which we will do in a minute so now that we've dropped that in we can go and set in its settings Here auto play and I'm going to change it to Loop indefinitely and I'm also going to set the play rate to three times because it'll just be easier to get to interesting Parts in the level sequence more quickly another thing that I want to do just to make things a bit easier for us is open the post process volume and search exposure I want to set the um visit some okay so speed up and speed down I'm going to set those to 20 each because it takes like like 10 seconds for the exposure to to properly adjust when starting the the level and I don't like that um I'm gonna grab our player start and move it so that we're staring directly at the building as soon as it starts so let's bring it closer and then this x-axis of this guy is going to be where he's facing so let's change the 90 degrees let's actually have it look down at this thing and then we'll see how it looks in a second let me grab that one more time yeah the player start okay there we go so now we're staring at it nicely uh so if I start you'll actually see that things are already moving um what's not happening is that things aren't synchronized because of the way that um the days with API creates the level sequence so we're gonna synchronize stuff and then we won't have floating crane heads so to do that let's search schedule in here because there there's one important uh item of our data Smith scene called the schedule actor which is what the plug-in controls and by coincidence our schedule animation asset our level sequence actor really is already named schedule animation so these are the two things that we're looking for so I'm going to open up the level blueprint and drag that to be part of the main window and what I'm going to do is I'm going to select our schedule animation and then in the level blueprint you have this Nifty feature we can use the context menu to create a reference to that item in there and I'm going to do the same thing for the schedule actor great so we have a blueprint API to use the from the plugin so the schedule actor has a class in the plugin which is why you need the plugin to load the scene at least with the at least with the combined mesh scene and we can just drag out our scheduled actor and access the API so I can actually just click iTune and you'll see all there sorry I can type in iTune you'll see all our stuff what we want though is correct level sequence end on begin play so like I said API um doesn't let the exporter set the level sequence end correctly so we just have a little blueprint function to do it for you very easily and then the second thing we're going to do I'm going to copy and paste these again with the schedule actor is we want to synchronize so I'm going to start synchronize I'm going to synchronize the level sequence and that just means that wherever the level sequence is in its play time is where we're going to move the combined mesh the schedule actor to copy so now if I hit play we won't get floating cranes things are growing quickly because we set the play rate to be three times but there now our cranes actually spawn together and rotate as necessary and that's all good and well so with those things in sync let's actually do something interesting with the blueprint API which is going to be adding a little scrubber to our to our game here to scrub through the animation dynamically and let the let the player basically control it so to do that let's open the content drawer and let's make a ton of classes so I'm going to go back to content I'm going to create a user interface item I right clicked here by the way to be able to open to add a new item you can also just hit the add button here I'm going to create a user widget I'm going to call it timeline widget I'm going to create a blueprint class that is going to be a HUD so I have to open all classes there and search for the HUD class um I'm just going to name it HUD actually gonna need my HUD so it's easier to find I also need a game mode base I'm just gonna call it my game mode and I need a player controller which is also just here my I'm just going to call it controller so let's let's set the world settings to use this game mode so that way we can there so in the game would override for World settings we're just going to override it to be my game mode which will let us override other stuff such as using our HUD my HUD and my controller and that will let us set our widget up to spawn on the HUD of this controller so if I just go back to the content drawer and double click the HUD let's spawn the widget we created I'm gonna go to the event graph on begin play of this widget here sorry I'll begin playing this HUD class I'm going to spawn a widget so I believe that's create widget and I'm just going to set its class to timeline widget which we created and then immediately I'm going to drag this out and add to viewport so this HUD is going to add the widget just create the viewport and that's perfect Although our widget has nothing so we won't see anything in it now we also want to open our player controller here and change some settings in it so let's see I want to show the mouse cursor and enable clicks and enable mouse over events why not and I believe that's all that we're gonna need to uh manipulate the screen and not have this thing steal the uh the mouse from us all right so then the last thing that remains is to make our timeline so I'm gonna go a bit quickly with that because UI is a whole different subject so let's see if we can do that quickly here um I'm going to get a vertical grid I'm just going to throw a vertical Grid in there and then throw a horizontal grid for the labels that we're going to use and then we need a scrubber slider um I want a slider underneath that horizontal box and in this horizontal box I want text um yeah text blocks so I'm just gonna throw three text blocks whoops just tried adding it to the wrong thing just going to give that horizontal box three text blocks I'm going to name them um start current and end because we're going to use the blueprint API to attach the or to write the start current and end times of our schedule I'm going to take this current guy I'm going to set him to fill and give him the centering horizontal alignment so that way we have everything in the middle nicely I'm also going to set the padding of this slider expand it and I'm just going to set the bottom padding to 50. and actually the left and right padding also to 50. whoops that's the top because we're going to uh we're gonna move it to the bottom yeah so let's get the vertical alignment to the bottom and this horizontal box is also going to go to the bottom so you set that slider to Auto perfect okay so uh I also want some padding on this horizontal box so it doesn't look super duper weird actually let's make the slider have even more padding let's give it like nice and then we'll just give a lit actually let's make it even more and let's just give this horizontal box a little bit of padding perfect so one thing we're actually going to want to make sure is we're going to want to hit the is variable button on all of these make sure these are variables because we're going to use them when we use the blueprint API to to insert some text on them actually the padding's a bit off but that's kind of okay um we can move on to the graph from there I believe I don't think there's anything else we need okay so what we do need is to go down to the slider again and scroll all the way down and then we need three events from here so we want on value changed because when the value changes we want to set the schedule and when the uh when it gets clicked we want to pause the schedule so let's go and let's capture both the on Mouse capture begin whoops and the on Mouse capture end and we're just going to pause things there so to get our um to get our stuff in order to get our um references this isn't a level blueprint so we cannot just fancifully grab them we're gonna have to get all actors of class we're just going to get active class because we expect one you may have to use some actor tags in your case if you have multiple so I'm going to get all actors of class schedule whoops that's scheduled actor and then I'm gonna promote that to a variable in my blueprint I'm going to name that to schedule actor and I'm going to copy that I don't need that and you're gonna change it from schedule actor to level sequence actor to grab our sequence and I'm also going to promote that whoops I want to grab that guy nice and name it level sequence great so what we want to do is pause our level sequence since the schedule is going to be synchronizing to it we only really need to just to pause it based on that just on the level sequence basically so let's grab this on begin we're basically going to check if it's paused and if not we're just going to toggle on both capture and end so let's grab our level sequence and then check if it's paused whoops that's not what I want just want to clean that up a bit and then branch so both these are going to go there and then if it is paused then we want to play let's do it this way pardon my dirty blueprints um so we're going to want to pause if it isn't paused and then that should have it pause when we when we start trying to manipulate it great so then the other thing that we want to do is we want to actually set the set the value of where level sequence is at to scrub when the values change so we get a value between 0 and 1. and we want to convert that to a part of our level sequence so let's do that let's grab our start time and their end time and we're going to convert the zero to one value to a start time and end time sorry to the middle time so I'm gonna get the seconds equivalent of this of the uh the frame time that's actually in the level sequence because that's all we really need to do this so we want to convert the zero to one so what I'm going to do is I'm going to use a lerp because the Lurch takes a zero to one value and then Blends between the two uh the two parts so that's exactly what we need in this case so we're just going to blend between those and the return value here we're gonna so this is going to be the the seconds so we want to set are actually going to grab it from this guy we want to scrub to a frame so I don't think it's scrub it's a set playback position that's what we want and we're gonna make a playback parameters and it's going to set the position type by time rather than frame and we're gonna give it that time and we're also going to set up the method to scrub I actually do not very well know the difference between them there are some minor differences between the update methods like which events get in the level sequence get um updated and whatnot or played but there is a slight difference all right so with that done we should be able to check out if it works and then see if there's anything else we need to do so everything's grabbed let's let's see what we forgot to do so when I hit play okay so we forgot to set the uh so we forgot to update the slider on tick and I forgot to update these values so let's do that so first thing we do on tick is we're going to set the slider value so I'm going to grab the slider variable and I'm gonna set the value and we want to set the value basically we're going to do the reverse of what we just did accept well that's going to require more math than using just alert mode so let's copy and paste this over because we're going to use it but we're also going to want to get the current time in seconds so get current time and translate it to seconds for that nice blueprint math so we won't do the reverse of a LARP which means we want to let me think do some subtractions so we want to First subtract the start time from both of these basically the start time from the end and from the from the current and that'll give us the two magnitudes which we can then come up with a proportion by dividing So What proportion is the current magnitude from the final magnitude and that actually gives us our value so I believe that is it um there are a couple of things we're going to want to do on tick so I'm going to move this over here um I'm just going to create a sequence because I think it's going to look nicer maybe we'll see and we're just going to set our start and such um now we're not actually going to use the levels things for that we're going to use the schedule actor so the schedule actor has an actual date associated with it so the animation time is stored as a date and we're going to use that there is a as date time yes there's a way to convert it to text called as date time it's kind of hard for me to find but we have a deprecated utility for getting the date but this is better so we're just going to do this so that's the animation time we also want to get the start time and the end times so let's do start get animation start time animation in time great and then just going to copy this over a couple times and going to uh yeah we're going to grab the start and we're going to set the text and it's going to be oops that's the current so um yeah animation start time and then I'm just gonna copy this a few times and then this is going to be the animation time so that's going to be get current and this is going to be and so these are the text labels that we created variables to and let's hook these up I wish I did these in order I guess that's not too hard to fix there we go good enough and now it's gonna set that so we're just gonna hit play okay and now you can see that April 20th 2022 is a start and the ends February 29 2024 and the center is going crazy and the slide is updating and we can click on it if we can catch it and move it ourselves and see the current time updating everything moving all these cutting plane animations coming in cranes going away and whatnot things moving so that is a full link up with the blueprint API and control over our nice schedule the blueprint API by the way is in our manual so if you go to our documentation that I referenced earlier there's a blueprint API reference which will list the uh the classes you can also go into the actual plugins since like I said we ship the source so if I want to go to settings show plugin content I can take a look at the the actual plug-in materials which you can play with if you want to change stuff but you can also open the C plus classes and yeah just open the scheduled actor yourself don't know why that's doing that but yeah so you can uh take a look at how we uh feed the animation data into the combined scene obviously if you're not using the combined scene or if you want to play with the transformed elements then you're going to want to open the schedule animation and then you can scrub through it there I guess there's one thing that I almost forgot that I'd like to do which is take a look at adding a fancy material because one of the advantages to Unreal is the excellent material systems and you can use pre-built materials huge libraries and lots of a Marketplace content so let's see if I remember how to do that here in unreal so I believe if I there we go so if I go to starter content we can find some materials and we're gonna throw a new glass material on these windows and then we're going to let me turn down that camera speed that I turned up earlier that's much better let's drag and drop in a glass material here it's a little bit too uh see-through maybe there's a different one not really but we can edit it because we're gonna have to anyway because the engine is Shader driven when you are using the combined mesh you actually need to opt in to the visibility controls that the Shader uses in any custom shaders that you apply so that goes for our glass here because it has its own form of opacity and really all materials do they're all generally you know fully opaque not transparent at all when the clip plane animation occurs you'll see the cutting plane you'll see that well you'll see a number of issues by using the glass material but it just is there it's it's no longer um hiding until it's part in the animation comes up so we're going to fix that real quick by using the material function so what you want to do is just call a material function so there's a material function call node and we're just going to use the it's called the Synchro visibility animate and it's inside the plug-in uh I believe it's possible in some configurations that you actually need to in the content drawer activate the plugin so what I did earlier we go to settings and hit show plugin content that may be required sometimes if you don't see it coming up so yeah so we have this and we want to do is we want to combine our original opacity with the synchrovisibility with the output of the visibility in the animation basically so we're going to use a multiply because that's basically going to say whatever the the animated visibility is make sure that our opacity only reaches like a maximum of 0.35 uh yeah so it's like an and operation between these so the opacity of 0.35 and only be visible when this thing says so and you might have noticed or you will in a second after I apply this that there's still going to be shadows even with it invisible so if we scrub through it again you'll see there's still Shadows so we just want to disable that um you can just look up Shadow here oh whoops forgot to select the right thing got to select the material output to look at this so you don't want to cast retrace Shadows basically when you're translucent material here because otherwise they're going to show up even when um the translucent sees it or the opacity is at zero so now when we play they won't show up but there will be one more problem uh which is kind of hard to see I think um yeah there so there's like a little bit of refraction going on where the windows are that's hard to see okay now they're zoom in close you can see a lot better um so we want to disable the refraction in the Shader itself using that visibility material function so what I'm going to do is here's the refraction setting down here um I'm going to hit if and I'm going to basically say if our visibility coming from the Shader is greater it really if it's a if it's equal to or zero so basically if the thing's not visible then we want our refraction to be default so the default refraction the refraction of a vacuum is one so I'm just gonna set the value of this to one and like I was saying so the things we're comparing are um the synchrovisibility animation and to zero so basically it's greater than zero so our constant B is actually already set to zero great so if it's equal to zero or less than zero we want the fraction to be one otherwise we want the fraction be whatever the material already wanted it to be and whoops plug that into the wrong thing there we go our B is set here is the value and now when I apply it that refraction should be gone um well gone uh once we uh play so we should no longer have any visual issues but when we actually get to the point where the glass starts building out we should see our glass come in with the standard cutting plane animation um yeah so no more refraction here trying to not go inside the building during the build up there it is okay so should soon be getting our building there we go so now our glass our High Fidelity material builds up and you know we could just populate the entire scene with Fidelity materials like that and have everything looking like a real uh like a like it's using real unreal materials because it will be so I'll just plop in one more and then I think that'll be it um let's I don't think these kind of buildings are made out of bricks but maybe it'll look okay we'll see how the UVS are unless the there we go okay great so now we have our brick glass building in Unreal Engine you can see the um the same materials actually it's derived from the colors in the uh in the model so you'll have to set different base colors for each item but uh if it shares the same color it shares the same material slot in the combined mesh so presumably we probably want to choose not bricks since we don't want our Stadium to be bricks um but yeah you can also just change your Source information to have separate colors and that will split up the material slots if that's what you want to do and yeah so all our glass is applied because they have the same material slots and we can go through and do more stuff but that that's basically that you could even put this in a data prep recipe and even though data prep recipes like I said aren't great for Combined measures because so much stuff isn't there you can still set up a material substitution table and then just if you ever need to reimport this stuff get all your materials placed in the correct material slots instantly so that that'll make it a lot easier and faster and that's a great thing about having the integration with the data Smith pipeline with that done uh really it's up to you to customize your iTunes geometry and using the data through any data prep recipes uh to get your iTune and all your engineering data and connected models into unreal here and just use the the tools in unreal to do whatever your heart desires of this stuff so thank you very much