Cinema 4D Tutorial - How to Export AR Ready GLTF/GLB Files

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
everybody it's EJ from iodine calm and today we are gonna have a lot of fun taking our 3d objects from cinema 4d exporting them out to a format that we can then post on Facebook and actually interact with our 3d model on a Facebook post have it on your phone with the gyroscope it's gonna be a lot of fun even gonna dabble into a little bit of body paint to be able to bake out our textures so that they can be uploaded to our Facebook post as well so a lot of stuff in this tutorial having a lot of fun uploading everything to Facebook so let's check out how to do it alright so I'm gonna be showing you two methods to be able to export out your 3d objects from cinema 4d and getting them into posting to Facebook and this first method is for any version of cinema 4d below are xx and then later on in the video I'm gonna show you for those of you that have our xx there's a much more streamlined way to be able to get your your 3d objects exported out the correct way to be able to post onto Facebook so first for everyone out there who has an older version of cinema 4d the way to get your objects outside of cinema 4d and on to Facebook is a multiple step process and again it's it's a little bit more of a thing than you'd need to do if you have our twenty well let's just jump into it the first thing you need to take note of no matter what version of cinema 4d you have or whatever method it is is watch your polygon count because the file that you're gonna export out needs to be below three megabytes for to upload to Facebook so that means keeping your subdivision renderer some different surfaces to a lower number and also you know primitives keep the segments low by default this is 24 so we don't need that much detail on those on the spheres for the little poppy seed or sesame seeds there same with any disk objects or primitive just lower the default segments here as I did and again keep your subdivision render down to like two one is a little bit too chunky but you don't want three or four or something higher than that okay so keep that in mind low poly count polygon count and now to export out a file so what we're gonna do is a process where we're gonna export out and you can export out a number of different files you can export out an FBX FBX I found is a much easier way to export everything out to have the materials kind of maintained and then some people use obj but I'm gonna recommend that you use FBX so just export out an FBX file and I'm Jeb it here I'm just gonna hit save and replace my old one and the only thing that's gonna be important is if you have subdivision surfaces that aren't baked already make sure you have this baked subdivision surface checked on so that I'll bake everything out and again make sure that your subdivision surfaces are low subdivisions we want to make sure the textures and materials are exported out and we don't need to worry about animation because Facebook does not support animation okay so I'm just gonna hit okay and it's gonna export that out and then we're gonna go to a website I'm gonna have the link to this website in the description of the video here but it's this black thread iog LTF converter now this glb file is what Facebook takes and you can see up here if you want to upload textures and actually have them come through you can export out an FBX with these kinds of formats of image files and have those as textures they'll be a little bit more accurate than just you know the shader but you'll see really quickly if I go ahead and just upload my FBX here so that's the FBX I just exported I'm gonna open that up and you're gonna see the original you can see that those colors that were in the color Channel of my materials came through a little bit shiny you know we didn't have this looking that shiny in cinema 4d and this is gonna be your result where it's a little bit darker so what we can do now is export out this gob and if this is showing that it's above three megabytes you're gonna need to take away even more polygons or more detail because Facebook only supports three megabytes and below so I'm just gonna export out this gob okay and let's just go on to Facebook and I got a post going and there's my GOP I'm just gonna drag and drop that into the post there alright so there we go we have a very shiny burger this is just kind of like the default specularity that's on the mid on your object so there's a limitation there for some reason my eyeballs are not there but the mouth is so while the FBX export is good as far as you know getting your objects out of cinema 4d and onto Facebook sometimes you can run into some issues like that and you might have to do some troubleshooting and figure out what the heck happened to the eyeballs so maybe I need to use fears instead of discs so who knows but you can see that the colors are a little bit washed out here as well so that's a thing to consider as well I'll cover later on in the tutorial how you can kind of mitigate the color difference there but face value that's how you can get a knob jekt from cinema 4d export it out using this website to export out this gob file format that you can then use to X to upload and post to Facebook now for those of you who have r20 stay with me because we have a much easier way to be able to export out files with way more compatibility and post it to Facebook alright so first things first you actually need to download a plug-in that allows you to be able to export the correct type of file format to be able to upload your 3d object and post it to Facebook and while cinema4d doesn't come packaged with it if you go to Mac's on labs if you don't know about Mac's on labs labs Mac's on dotnet there's all these kind of like cool plugins that you can try out that's not officially supported and you know added or comes with the actual you know vert full version of cinema 4d but if there's all these little add-ons it's like a you can test this out stuff we're tinkering with have fun with it so all this kind of stuff here but what we're gonna be needing for the Facebook 3d object posting is this gltf export okay so just click on that and this beautiful man right here basel i hope i'm saying his name right he's been very hard at work on this gltf format and if you've never heard of gltf before it's actually it's highly used in a lot of a RvR stuff WebGL kind of stuff and it's also for you know facebook just for posting to Facebook it just so happens that Facebook takes this GLB format so this gltf export can export either format okay so that's all you really need to know I don't want to get too too technical but basically to go ahead and download this there's a ton of stuff that it is supporting now used to not be able to support any animation but just recently animation is now supported so PLA and pose morph animation is is is supported and you know skin animations and stuff like that which is really cool and again that's more for you know a our VR kind of applications right now Facebook as of this recording Facebook does not support any animation as far as posting a 3d you can only upload your object and post your object and then kind of rotate it around and it's gonna be a static object not gonna animate so you can go through and see all of the different types of stuff that is supported of the one of the most important things is the materials you can use PBR materials here so you can basically load up a layer near reflectance with a specular or Beckmann reflection or whatever you want to choose here these are the items here that are boxed out here highlighted these are the things that are supported and it goes really in-depth this this whole write-up goes really in-depth with all that support the only major takeaway you need to take from this is as of right now the gltf export only supports one layer in your reflectance and channel so if you have three layers of specular or whatever you know one specular one reflection whatever it won't support all those layers so you can only support use one layer and your reflectance so just go all the way down it's gonna talk about pose morph animations again we're not gonna deal with animations today but right down here you can go and download the latest version okay so you'll download it unzip it and you're gonna unzip it and just put it into the plugins folder in your cinema 4d install okay so if I just go ahead and navigate to my applications at least on a Mac go to Mac's on you're gonna go to cinema 4d r20 and here is your plugins folder just place in that gltf export right there and your plugins folder another very important thing is that this exporter only works with version r 20 and above okay so you can see that's right there cinema 4d 20 20 and above so sorry if you don't have our 20 if you don't have it maybe this is a good time to upgrade especially if you want to get into AR of your stuff like you're gonna definitely this is gonna be very important so you don't have to like jump into blender and all this other rigmarole kind of stuff to be able to export out this cut type of file it is the future so download that install it restart your your cinema 4d and when you do that you'll just go to file export and you should see this gltf file format that you can now export which is which is perfect so right now I just have this like nicely lit donut okay and again we can go into our materials here and I'll just double click and select them all so basically right off the bat you can have your color channel supporters so choose whatever color you want in the color Channel and then again the reflectance you can add whatever layer of reflect whatever layer of reflectance that you want and you can use that layer and I'll show up in on Facebook okay so the one important thing to note is usually you know you can control your reflection strength a few different ways one is right here with the reflection strength but then you can control the overall layer strength using this percentage now this doesn't actually work okay so just leave this at a hundred percent and if you want to pull back or increase your reflection strength just control it this way okay with this reflection strength option right here so I'll just leave this at like 30 or something like that and then basically I have some lights one of the major things is that as of right now this gltf export does not bake your textures or bake your lighting or anything like that so it actually doesn't even matter that we have lighting or anything at all because basically what we're gonna be exporting out without baking any textures is just the reflection and color information I'll show you what I mean so let's just go ahead go to file export go to gltf okay I'm just gonna go ahead and I'll just save that and it's gonna prompt you with this gltf export options here and basically I think by default all of these are checked we're not dealing with any animations so I think this might be checked I just unchecked that we're gonna want to export normals UV coordinates even though I don't think we really need to for right now definitely want to export the textures and we want to make sure that this is double-sided as well sometimes you can have some issues there and I think this is by default unchecked so you're gonna want to check this because again this GLB file is what is supported by Facebook otherwise this would just put export out a gltf okay so make sure that is checked on GLB hit OK and let's go ahead and let's go to Facebook now alright so let's go to my folder that has the GLB and one of the great things is you can just drag and drop that gob file into Facebook and it'll create a 3d post one thing to note and you can actually move there you go you can see no no shadows anything like that but you can just rotate this around and once you post this you can you can then use your gyroscope on your eyes whatever phone you have and actually control the rotation the 3d rotation that way but wallah with very little effort we just exported out a 3d file from cinema 4d and now we have it inside of Facebook which is really cool you can you know put a background here whatever you want to do say something witty or snarky about some doughnut I don't know but we're gonna notice is that this is kind of being lit within the Facebook 3d renderer whatever it's doing I'm not a technical person so I don't know exactly what's going on there but you can see the two major things that we pulled from our cinema 4d file that I covered dive that I covered previously which is the color and the reflectance value okay so if we really want to crank up the let me just X out of this if we really want to crank up the reflection we can go and just select all of our materials here and let's crank this up to say 90 and maybe bring down the roughness so we got really super shiny let's go ahead export out again all of our settings should be all good and let's rename this to shiny and again make sure we're exporting as the binary GLB let's jump back in to the Facebook's and let's go ahead and let's get my folder up again and there's shiny I'll just drag and drop that into the share post and creating 3d post again doo-doo-doo-doo and now we got a super shiny metallic doughnut which actually does not look all that appetizing at all but you can see that those are the two major things you can export out of cinema 4d very easily the color and the reflection reflectance value and all that good stuff alright so here is another example of a different scene and I just kind of want to show how cool this exporter is is you know I have a cloner object on my little burger guy here I have a deform er that is deforming a little smile there maybe we can make him a little sad or I don't know let's just let's just do that he's just you know he's gonna get eaten why would you want to be happy I don't know so so we have the cloner we have push apart effectors we have all this kind of stuff right so let's go ahead and let's see if this exports out so we're gonna do gltf and let's do burger doo-doo-doo and again everything is the same and we'll hit OK and let's go into the Facebook's again and here I already had a burger there but let's go and drag-and-drop so I have my little doop burger here drag and drop that in there so there we go we got our guy in there all the cloners are baked and one thing that you might not have noticed on the donut that is really pronounced on this burger character is the colors are all jacked up they're all washed out and this is a very important step that I kind of like farting around with cinema 4d exporting different materials and stuff like that I discovered the one thing you need to do to have the color is kind of at least be way closer to the original file you can see in cinema 4d these are not that's definitely not those colors they're all washed out in facebook so one of the things I discovered is if you go to your project and go to your input color profile it's set to srgb if you disable this look familiar so this just converted all of our colors from srgb to to no input color profiles whatsoever and this looks all washed out okay so this is important when you're working with the GL be at least and working with Facebook disable the inka input color profile and now we're just gonna have to you know redo this so they've got a burger we got the red like that's a red that was red it's like just looks like crap so let's get the ketchup in there let's get the cheese back in there that if cheese looks like that color that it was don't eat it you might not be feeling too hot and then we got the let's pump a little bit color back into there it's yellow just come on pump in the color so this is the input profile our profile is just like really weird and then we got the buns let's grab a little bit more pump some more color in there and then we got the seed color so something like that so you can kind of mess around with all these colors and all that good stuff and so this is what we have now right we worked all these colors back in there got way more vibrant colors in here and now we can export out again and we got gltf let's do let's rename this to color dupe and hit OK and that's the washed out version let's X out and let's grab this color one this is without the this is what the color input disabled you know it's still a little bright but those colors way are way more close to the original colors we had in cinema 4d so it's a little bit wonky as far as color support goes but that's what I found is disabling that color input really helps out a lot so few things if you want to go and learn more about like what is the limitations and what's really good as far as what what Facebook gob files support one of the major things is you need to be under three megabytes in total so let's go back onto our donut if you have a very highly subdivided subdivision surface like if you have this at four by four what this is gonna do I'll just export this out again and we'll just do SDS and let's hit OK what this is gonna do if I go back into my folder and let's see the file sizes here it's gonna bake down that subdivision surface and you can see that we have a six point eight megabyte file now okay and that's just coming from the highly subdivided geometry because again this VG lb exporter bakes all that out and what you're gonna find is that when you try to upload this to Facebook it's not gonna work because you need to be under three megabytes in total okay and then it shows you if you want to bake out textures and stuff like that which I can get into right now so so here's the deal it's super super easy to be able to export out a 3d file using this jail gob gltf exporter again if you're in are 20 and above and that's basically all you need to know the only limitation is shadows in the occlusion all that stuff all of your lighting is not gonna come through now if you're fine with that you don't care about that see ya thanks for watching but if you want to see me stumble my way through like body paint in I can show you how to actually bake out your textures and correct some UV stuff to be able to then add a little bit more shading to your 3d model so what I'm gonna do and thanks for sticking with me as I fumble through body painting all this good stuff so what I'm gonna do is just not make this such a shiny doughnut so I'm just gonna bring these values down and what I'm gonna do is just go in do the easy thing first which is go to the donut and basically all we need to do I don't need to make this editable at all I'm gonna bake the textures in the color channel information that's gonna include all the lighting all the shadows all the ambient occlusion and I'm just gonna bake that into a texture save it out as like a JPEG okay so what I'm gonna do is with this donut it's gonna be very easy I'm just gonna go and go to bake texture under the objects menu okay so baked texture and the only thing we're gonna worry ourselves about is this color Channel okay now if I check that on you can see that this new little menu comes down here which is like alright well in that color channel what information do you want to be saved so what I'm gonna do is save the illumination I'm going to save these shadows that are gonna be cast by our lights and I'm going to save the diffusion okay and why I'm saving the diffusion because I want the ambient occlusion okay so if I double-click on any of my materials here I have the diffusion channel checked on and here I have loaded up an ambient occlusion chant a shader here okay so this is very important because if you want to bake out a ambient occlusion you can bake it out in the diffusion and have it just bake down into one color channel versus having the global effect which you'll need to then render out a separate JPEG pass and then you know composite those together in a layered material so basically what I'd want to do is just set this up so everything's just stored in a single color texture okay so what I can do now is just hit the preview button and you'll see what's going on I can go to the tag and this is where you can you save this as whatever you want so I'll just have that be as donut here is where we'll choose our format and facebook says that it prefers JPEGs and this is just a good way to optimize and make your file size a little bit smaller JPEGs are smaller and if we go back to the facebook information here you'll see that textures must be in a power of two in each dimension so one to two so 512 by 1024 and even says textures can be up to 4k I try to keep them under two so what we'll do is we'll just use this number right here so 512 by 1024 so let's go back into cinema 4d and let's do 512 1024 okay so that's all set up and the color profile let's go and use linear just so everything's a little bit more accurate as far as color space goes so now we can go and preview that again I'll see you the color shifted because the the linear color space and basically all we need to do now is just bake this okay so this is gonna bake there and you'll see if you chose your folder you want to save it - there's our JPEG okay so there it is and basically what we can do now is just drag and drop this JPEG into that texture channel of our color Channel okay so there we go now instead of using the actual color we're using this image that's going to have all the shading and lighting information on it okay so now we're gonna do the same thing for our frosting so I basically want to keep all these same settings so I'm just gonna command click and drag to duplicate this to the frosting object here and if we preview this let's just rename this frosting so don't write over the other file so frosting let's go ahead and preview what that looks like and let's do that again for some reason it's not it's kind of freaking out let's stop let's delete sometimes you need to delete so there we go you can see that we have this really weird janky kind of thing going on okay so let's go ahead and see what's happening there so let's go into our body paint UV edit mode hold onto your butts we're gonna go into body paint and let me just resize this window here there we go and here is our UV window to our right here all right what you're gonna see is we have all of this janky Nasir and what's actually happening is if we went and baked out the the textures we would have a lot of weird stuff going on now why we're needing to do this for this little frosting object is because I modeled this okay so sometimes when you model things from scratch UVs can overlap they can not be laid out appropriately because you know cinema 4d just doesn't know which way they should be laid out with a new piece of you know hand model geometry so the reason why we didn't need to do this with the actual torus here the donut part is number one it's just a primitive and primitives have a perfect UV layout as is by default so that's why I could just bake that out super easily and didn't have any issues but the frosting is a totally different story so if I go and select the frosting and my object manager here we need to fix all this okay so I'm not a pro at body paint you'll you'll find that out very quickly but I know enough to do a little bit of damage and at least hack my way through situations so basically the the game plan here is I'm only going to see the front bit of this frosting so I only need to make sure that the front polygons are looking good and laid out nicely so that when we bake our textures they look correct so what I'm gonna do is we have two different modes we have the UV edit mode and we have the just polygon mode so I'm gonna go into polygon mode and what I'm gonna do is basically do a loop selection by hitting you in L and I'm gonna select this back polygon here okay so loop selection there you can see the polygons being selected you can see they're all squashed and smooshed so again this is gonna cause us trouble so what I'm going to do is select that loop and then grab this loop selection too so I'm just gonna hold the shift key down and add in my selection you can see there's those flat polygons there too and those are kind of the two loops elections and basically what I want to do is fill in the gap and add to the selection all the polygons in between so to do that I'm gonna use the fill tool so use U and then F for fill selection so F and then I'm just gonna hold the shift key down again and click and add that to my selection too so there's all those polygons you can see this being represented not not very well in this low UV edit mode here okay so we got those polygons selection but polygons selected sorry and what we're gonna do now is go into projection and here is where we have a lot of different projection modes that you would recognize from you know selecting material tag and seeing all those different drop-down menus that you can do we can do box you can do cubic flat da-da-da and what I'm gonna do is with all these polygons selected I'm gonna choose flat okay and now look at that it actually looks like we have you know this is a lot more accurate okay so what we need to do is you can see we have all these polygons in the back here to all those you v's and that's the problem that we had from the get-go is we had all of those UVs overlapping and to bake out a texture like that you would just cause all types of errors and stuff like that so what I'm gonna do first is with this I'm gonna go and just go to the relaxed UV and hit apply and what that's gonna do is there are some overlapping polygons just there that when I hit relax polygons will kind of let everything just breathe a little bit and so now we don't have any overlapping polygons whatsoever and what I'm gonna do is I want to scale this down so what I'm gonna do is go to my UV polygons edit mode and hit the T key and just scale this down and reposition this right over here so if I click and drag we can move all these UVs over there and now we have all these remaining polygons or all these remaining movies that we need to then fix just like we did with the front okay so what I'm gonna do is go to select and then just invert the selection and we're gonna do the same thing so we're gonna go to the projection go to flat and we can go to relax UV and hit apply I don't know what all this stuff does I just know that sometimes this works it it helps relax all the polygons and prevent the overlaps so again we're gonna go hit the T key hold it down and scale this down and just move this on over so we can scale this up just enough we don't want this to be outside of this little box here okay so we just want inside and then just not overlapping any of the front UVs there okay so with that congratulations you just made it through a journey into body paint with me so now all this is set hopefully and now we can go back into our normal you know standard viewer wherever you use to you know regularly work in cinema 4d and now what we can do is go back to that baked texture tag and let's bring this up let's delete that and let's hit preview and now you can see we have that weird janky stuff before and now we're actually getting like okay I can tell what the heck that look that is like that is a you know low res version of the shading on my on my donut here okay alright so now we should be able to do is just read let's first reaffirm that we have this file names saved as something different and let's just bake this out again okay so let's do that and that's gonna do its thing now if we go to our folder we have the frosting color we have the donut color okay so what I'm gonna do is we already have the donut color it's go to frosting and let's just go and drag and drop the frosting color into the texture so now we have that there okay so this is gonna have all the fusion although all the color all that good stuff all the lighting okay and the reflection is gonna be added on top of all that so now we can go and with our textures bait let's go I'm just not gonna worry about the sprinkles or anything like that I'm just gonna go to export go to gltf and let's just name this donut baked okay and hit OK or ahead save and make sure the export is binary is on and go to okay now let's go back to Facebook check all of our friend requests from random people and let's just drag and drop this donut baked into the Facebook post window and it's gonna be creating a 3d post and there you go now we have the shading and lighting from our scene from our colors now the colors are not exact I'm not quite sure why that is but they are pretty close and then we can go ahead and you know add a little background here something like that but while we now have our shaded texture or shaded object from cinema 4d and again you can see a little bit of some weird seam stuff maybe I need to select a polygon loop selection more further in or further behind just to hide that you can see this is looking pretty good again if you really want to get into all this stuff I recommend watching a tutorial from someone who knows what the hell they're doing and body paints and not me packing my way through it but one thing that's very important to note is that hopefully our good friend basil is gonna be working on this gltf exporter continually and I believe having it so it automatically bakes all of your textures is gonna be a feature in the future so you won't have to go through all this rigmarole outside of actually making sure that your UVs are all goods you will have to at least do that okay so that's basically it that's kind of cool I can't wait to see what kind of stuff you guys are posting if you do post stuff on the Facebook's number one be sure that you like my page and go ahead and go up to our our mailing list sign up for that go to the community here and you can actually go and visit my eye design group and request an add to that and what I want you to do is go ahead go to my group join my group and post all of your 3d goodness there so I can see it and if you're you know you're just on Facebook be sure to tag me I don't know if tagging I guess tagging is a thing just tag I design here and just so I can see it so that would be really really cool I just want to see what everyone's posting and all that good stuff so have fun going and posting all of the cool posting all of your fun 3d objects to Facebook having cinema 4d kind of invade Facebook that should be a lot of fun alright so if you have any questions about anything I covering this tutorial except for the body painting stuff that's literally all I know about body pea V I'm having questions about anything else please leave them in the comments section below and I'm really anxious to see like what kind of stuff you guys are going to be posting so be sure to join my facebook group and post them on my facebook group so I can actually see that stuff tagged the I design page the I design Facebook page so I can get notified as well really excited to see all of the cinema4d renders our semaphore T objects on Facebook and that would be really really cool to see so if you liked this tutorial please hit the like button if you like what I'm doing on my channel please subscribe really appreciate it as always thank you guys so much for watching I'll see you in the next one
Info
Channel: eyedesyn
Views: 45,773
Rating: undefined out of 5
Keywords: facebook 3d, gltf, glb, 3d facebook, bodypaint, cinema 4d bodypaint, cinema 4d uv, c4d uv, c4d facebook, cinema 4d facebook, facebook, 3d to facebook, bodypaint tutorial, cinema 4d bodypaint tutorial, c4d tutorial, cinema 4d gltf, eyedesyn, c4d tut, cinema 4d tut, learn c4d, maxon, uv unwrapping, mograph, mograph tutorial, motion graphics, adobe aero, augmented reality, augmented reality tutorial, c4d gltf
Id: HCDniI0evAo
Channel Id: undefined
Length: 35min 21sec (2121 seconds)
Published: Wed Jun 12 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.