Mask Data between Blender and Unreal Engine Using Vertex color

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello I'm je from Studio I would like to show you a very useful trick to uh to transport information from blender to Unreal Engine or the other way around if you want it's uh pretty simple but very very useful here is something that is absolutely not um from something was please Disney don't strike my channel for this thank you as you can see I'm using some colors to identify some surfaces these are called vertex colors in blender if you want to see them easily just shade it flat you ask to display an attribute and it will uh just show this one our rename color the default will be probably just attribute it is here if you want to if you need it if you as example you want to make a material that will uh display it directly you can call the color attribute shift a or right click now and uh call the attribute here and select color so now if I do this I see the same thing it can be used to bake if you want to bake it in a in a in a texture you can click here you create material you add a texture here up I just called the attribute get it straight here no no need for Shader just put it here you simply go to render Cycles GPU this doesn't matter uh blah blah blah blah blah and you go to bake directly bake the emit as long as the image is selected when you click bake it will uh create it will bake these colors in the texture if you really need it here we don't need it for the method I'm using here it's just uh if you want it differently and you want to use with a quick cell mixer as an example where you need a map of the colors because this stupid this software cannot read a ver anyway what we want here is to Simply paint this these things so what I usually do is uh is that I select the the faces I want to to work on uh let's say I want to work on this uh then vertex pains click here pain mask so I won't interfere with the rest here here I'm using the red channel to tell what kind of a material it is and kind of a surface it is cuz I'm only using one material of course for optimization uh reasons so this red is used as depending on the value it's something different so here the 25 I decided that it would be the the steel I don't want to use the texture so uh I will only use this an information source of information so red 25 I want the green to to tell us what's the roughness level so this one is used from zero to one the first one is just an index o25 is steel one is the light zero is uh rubber so it's just me I decided this you can choose as you want this green I want it I want to use it differently I want to use the full range I could also use Simple index but Ju Just want to to be simple here so green here uh I want to add a bit of roughness so oh we's say p three up up I click a little bit here here here here okay then what I can do is use the blur to make it less less brutal anyway you see what I mean you can adjust things way you want also here I wanted to fix a a problem which is this part as you can see here it's reflecting too much light for rubber it's not not great I will select it so Al I will select the the ring so face alt click and I will say red zero since I said that rber was zero and I want the roughness to be full contrl X to paint the whole thing at the control X control x uh oh by the way uh keys can change from version to another so just in case know that you can go to preferences here and you can change the KE Maps sorry see set vertex color say vertex colors is here you can change the The Binding if you want something else can even use a I don't know a mouse button maybe never forget that blender is very um easy to to adapt to your needs so you can change the keys and when it's updated you have the always have the option to re import now I've modified this I will simply do a file export uh export export here I'm using fbx we can use another is very promising but within real engine right now I'll just use a good old FX here's my profile you just I just selected deselected the useless stuff I don't need to export this to un real obviously you can once you've done this you can click the plus here and type a name to create these profiles so you can do like me and click so uh we'll export it here poop then on un real side I will reimport of course the regular way to do this is you can drag and Dr in your folder or you can click import I mean nothing crazy T and as you can see things changed here and it's pretty cool I'm happy so how does it work in the material uh promise you it's very simple I mean way way more simple than it looks here we have a simple lurp for the base color that is using this if gate to to know if the color is the right value I take this uh vertex color that's the trickest trickiest part sorry uh by far it's that you need to uh to eliminate the decimals you you don't want so I multiply by 100 round it so there's nothing else than the value I want as an example if it's 25 I multiply by 100 I get 25 I round it so I remove everything that's behind the the comma then divide it so now it's 25 but nothing else has no risk there are some decimal that will um make this false when you type 25 you want we want it to be exactly 25 or it will say uh no no sorry it's wrong it's this value you know it won't say this is strictly equal it's the the only uh a bit tricky thing but everything else is very simple I say if a25 is equal to the value of the vertex then one else zero so when it's one the lurp understand oh yeah it's one okay so here same thing here it's it's one so TR go to uh metallic since it's a the Steel part the only one I want to be metallic so I just plug it here and it works uh also vertex color for the the green since it's directly painted roughness as I said it's very it's way more simple so I can just plug it say and about the emissive part it's the the light here with a nice blue effect it can be very beautiful maybe I'll show you so um I put this light here multiply it so it's it's a color you know um it's a vector parameter okay can get the name you want I suggest that you always use these Vector parameters so you can make instances of this material and uh adjust it the way you want so because sometimes colors in game don't exactly look like this cuz you know this is a default rendering you in your game you might have a lot of postprocess I don't know what you're creating so can tell anyway uh here I check for the for Value one and oh you multiply like by one else it's mulp by zero so zero emission anyway Let's uh yeah I'll show you whoa sorry if you have like me motion sickness uh here's our friend Duke and as I said uh I'm going to show you something very simple and funny post process volume I want it to be Unbound du and ask for the balloon value make it CL as I said previously we can use a a nice instance so up use this instance of the material open it and we will have a bit of fun a light look I'll say 10 50 I'll show you what it [Music] does control L here like this see it's contr l by the way the control default some people sometimes forget see it works pretty well pretty pretty well I think I've obtained what we wanted as you can see the difference in U in ress is uh not very very noticeable but very useful very uh realistic the basic light like this can be cool in game play that's thanks to Lumen and it costs well very few thanks to L again as you can see you can transfer information pretty easily if you paint some new here uh and B them of course you can send them back to uh export back to to blender mesh paint you paint your colors the way you want blah blah BL you do what you want you paint and then once it's done you select it I mean here you right click export and in blender you import the fbx uh of course you can also use texture to add some more details but it's uh oh it's a one less texture in your in your memory you probably notice but I didn't care about uh UV at any point in time here since uh I'm just using the the verus colors so it's not important hope it's useful don't forget to like subscribe blah blah blah blah oh and check my patreon you have so resources for my videos over there so you might want this and they're mostly free so no it's p is very useful for that it's nice hosting in the end and also if you want to get something I want complaints cu the channel uh is is work too anyway have a great day see you uh soon bye-bye
Info
Channel: Jau Studio EN
Views: 29
Rating: undefined out of 5
Keywords: Indiedev, indie, indiegamedev, blender3D, blender, unreal, unreal engine, UE4, UE5, unreal engine 4, game dev, shader, material, mask, vertex, color, vertex color, vertices, vertices colors, vertex data, data, transfert, blender unreal, unreal blender, tuto, tutorial, trick, data mask, mask texture, roughness, color mask, values, shader values, material values, gamedev, indiedev, simulation, 3D simulation, 3D animation, 3D model, 3D material, blender tuto, unreal tuto, blender3D tuto
Id: PcK4WPHYZKI
Channel Id: undefined
Length: 14min 1sec (841 seconds)
Published: Fri Mar 29 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.