説明
主な学習内容
- Learn how VRED can import and optimize large CAD data sets
- Learn how to use VRED to create a VR experience
- Learn how to import the data set into Maya to prepare for Stingray
- Learn how to use Stingray to create a VR experience
スピーカー
- BKBarry KimballAt General Motors, Barry began designing body sheet metal components. That experience allowed him to work with exterior surface data from GM’s Styling group and eventually worked in the Cadillac styling department. During that time, he also realized the technical complexities of exterior and interior surface development. He had the opportunity to learn many software tools for analyzing and creating surface models. During that time he became aware that he had a passion for developing software tools that aided in class-A surface development. He moved from GM to AliasWavefront. From Alias, he moved to Ford Motor Co. and developed training materials and mentored AutoStudio™ users in the creation of production and conceptual surface models. The last 18 months at Ford,he spent working on the Ford GT production car in the Living Legends studio. Since then he has worked at Nissan Design America as a digital designer creating concept cars (Nissan Azeal) and many production vehicles.
BARRY KIMBALL: So we'll go through this pretty fast. I've got a lot of content. I uploaded last night the course material. It's a pretty good overview of what we're going to do. I've got a lot of screen captures in there. So it should help you out. What we're going to really talk about in optimizing your VR pipeline isn't necessarily about speed. I thought about this a couple days ago, and I asked a few people. So hopefully you took the name for what it is.
VR is just a display mechanism, right? It's just like a monitor. So what really we're going to talk about is how to take a data set that might be really large and optimize that for use in VR. So it's not about the fastest way to do it or things like that. It's about how to take data, optimize it for virtual reality. Because we're limited by hardware in today's day.
So change the subject. The wording doesn't matter. But in reality, the simplest model is the best for VR. And the simplest in terms of polygonal data, the simplest in terms of file organization. The simpler the file, the easier it is on the computer to display it in VR.
So we're going to really go through these kind of steps. Optimizing the scene has some tools for simplifying data's complexity. Creating UV maps that allow for some speed improvements versus not using UV apps. How to make textures and then bring it into Stingray and bring it into VRED.
The Stingray portion and the VRED portion are actually quite easy. Because again, it's just display. The first four are really where the meat of the work is and what's required to get things done.
So I'm just going to show you this really quickly. This is the slide deck that I put out. Now we've got everybody almost here. Hello, I'm Barry Kimball. My background is actually in what's called Class A surfacing. So I've worked in the automotive industry for over 25 years, basically making cars and interiors and exteriors and doing the production work for making cars.
So high quality surface data that meets all engineering criteria. So about three years ago, maybe four years ago, Autodesk purchased the VRED product-- purchased the company, PIVR, and they made VRED. And I had tried to do a lot of visualization things before VRED came out with other products from other companies. I've only been with Autodesk for about five years now, and I found VRED really easy to use. And then with the onset of VR headsets looking at car bodies on a 2D screen my whole life, once I saw it in VR, a car body, I was immediately a Kool-Aid drinker.
So the ability to see forms and to see shapes in VR is nothing like seeing it in 2D. OK. So there's quite a few slides. I'm going to go through those all live. So I don't really-- I'm not a fan of just a PowerPoint slide, so I'm just going to go through this stuff live. And I'm probably not going to have a lot of time for questions.
I'll try to give you a chance, but we've got only about 52 minutes. So yeah. OK.
So starting out here, VRED is really considered a visualization product. VRED stands for Virtual Reality Editor. But what I've found is it really has a lot of tools for cleaning up a file. And when I say clean up a file, this is a dataset imported from Catia. So I think this was given to us by IndyCar. This project started last year around the Detroit Grand Prix. IndyCar gave us the new data set for next year's IndyCar body. So what we're going to look at is next year's IndyCar.
So they've done a lot of body changes to their aero kits to make the cars more what people wanted to see. Right now, IndyCars have a lot of wings and a lot of weird shapes on them, and they've heard feedback from their fan base that they'd like a fresher looking car.
So we worked with IndyCar and got all the data from Dallara, who was the chassis manufacturer. And Chevrolet, and Honda, and all the people that have all of the drive train and everything. And we put together a VR-- a VR experience for them where their fans could come to an event, and we would bring some setups there, and they could get immersed and see the next year's car. Right? Before it's been out.
It was pretty successful. We went to three or four races, had a lot of positive feedback. Had drivers sitting in the car, had announcers in the car, so it went quite well. But the nuts and bolts of it are, what are the hard part? So we're really going to concentrate on the nuts and bolts of it.
So this is an exact import of a STEP file. So here's the original file. And what you get into here is if I click on it-- if I just grab a part here-- if you notice, the level from the top to get down to the part is quite deep. And by deep I mean there's a lot of directories to get down to the actual piece of information. Right? This is the piece of information that the software needs to render.
But to find it, it has to go through every one of these folders. That's inefficient for the software. So when we look at the statistics on this file, there are 367 nodes drawn, and there's two about 2 and 1/2 million polygons drawn. So what I would say here is I don't want to say they're 50/50 of importance, but the number of nodes is almost equal in performance hit as the number of polygons. You need to get your node levels down to a very thin structure, almost where it's really only data in the file. The software isn't having to look down through a bunch of directories to see the data to then pipe it to the graphics card. It immediately can find the data, and it's the fastest way to get it to the graphics card. OK?
So how can we optimize some of these things? So one of the first things that I might do here is just grab it-- grab the whole file and, from a level up at the top, I can just grab this and go to Scene, Optimize. And one of the first things that I want to do is get rid of any transformations that are in this file.
So when things are made in-- this came from Catia. So when CAD softwares model parts, what inevitably happens is you get things called transformations on these components. So this little component right here, if we look and I do an isolate, OK, it's a little fastener. Right?
So that little fastener is all the way under here in some more nodes. But that blue and red indicator, that means that-- that actually knows where it was originally put. So if I look at the Transform tool here, when the software looks at those-- when the software looks at each vertice on that little component-- and I think the easiest way to understand it probably, every one of these-- every one of these polygons, so every one of these triangles, right, has three vertices.
Every one of those vertices has an xyz value, RGB value, and it knows where its neighbors are. But what we're doing by giving it a transformation is we're telling the computer, OK, it starts over here at 0, 0, 0. But then the fastener was used over at this location.
And the computer now, instead of knowing where that polygon is, first it has to track it through the scene tree. Then it has to put it through a transformation to get it where it actually is. And all of these things are inefficient for the software. OK?
So that is what we need to clean out of there. Now as you can see, the software still knows where it is. And potentially, what you do in a software like Catia is you clone that object a number of times in the scene. So each object isn't its own entity. It's actually referencing back to another entity. And whatever that entity does, this entity will do. Well, that also is slow for the-- you want everything to be stationary, where it is. So the computer isn't calculating where it is, it knows where it is. OK?
And then you want to take-- let's say there are a bunch of those in here. We want to take every fastener and combine it into one piece of geometry. Even though they're not touching, we want the software to see it as one entity. Because they're all the same, They're all going to be the same color. It's the most efficient way.
So first thing we need to try to do here is optimize this. And I can tell you, without doing it, things that are cloned, you can't optimize and get rid of this flesh-- or you can't get rid of this transformation, because it needs it to put it where it is. It's a clone from something else.
The first thing we need to do is grab this entire file and right mouse button and do an edit, unshare, unshare sub tree. That means now everything in the scene will be its own entity. It won't be a clone of something else. It will be real data. So I'm going to hit that button. It goes pretty quick. It's not undoable, sure. OK. We'll turn the Isolate back off, and then we've got the car back on.
OK. So now every item in the scene is its own entity. Now if I grab this at the top level-- and I'm going to go through this in stages, but you could do this optimization in one click. I'm just going to show it in a series of steps so you can see what happens to the scene tree and the data as we combine it and do some things.
So Scene Optimize-- and this stuff is highlighted in the document, but these top six check marks flesh the transforms. This means get rid of them. So now if I hit optimize and you watch this little node and the ones below it-- OK? All those transformations now go away. Now all the data is locked into where it is. It's not-- it doesn't wonder where it is, it is where it is.
OK. The next thing that I'm going to do here is I'm going to clean up the group nodes. So I want to take this data. And instead of this piece of data being underneath a series of nodes, I want to compact all that stuff up the scene tree. So I'm going to hit Optimize with Clean Up Group Nodes. And I just took that scene structure and compacted it up high. All right?
And that really starts cleaning this scene up. This kind of look right here is just from zooming in-- my near clipping plane is small. You can set that to 10 and get that back. Again, it's not-- this isn't really a VRED training course. There's a lot of courses on VRED. So I will go through this stuff kind of quickly.
So next step might be-- and there's no particular order here, a little bit. But if I go right here and I grab one of these guys-- and I'm just going to hit F, and that zooms to it. So that right there is a little fastener, right? It must have been something I said. Two people. I'll grab this little guy here, 25602. And you can see a few more. If I go to this search bar right here and I put in 25602, that just grabbed every one of those fasteners in the scene.
So now I grabbed all these guys, and all I'm going to do is hit this group button right here. That will put those now under one node. So now, instead of those being spread throughout an entire scene, all over the place, I just grouped all that data one node-- I might call it fasteners. All right? And then, with that guy selected, the next step I'm going to do is say Scene Optimize, and I'm going to say, merge the geometry that's underneath that node. Optimize.
OK. All of those entities now are considered one object for terms of visual display. OK? Even though they're a bunch of polygons, they're one entity. And I would just rinse and repeat, right? You just start going through the scene and seeing what objects you can combine and what objects need to be left alone.
Now I would say for-- next, I might start just grabbing the body components. And once I get all of the pieces of data that are supposed to be painted material, I want to get those guys selected and do the same thing, combine those into one object. Right? We're not going to be doing anything dynamic in VR. We're not going to be moving vertices at this point. We're not going to be moving vertices and changing things. So the fact that they're all unified in one entity is only going to help in performance. Because again, we're just-- it's a display trick that we're doing. We're only-- it's not displaying it on this monitor or this monitor, we're just doing it in a headset.
And the thing about the headset is-- I'm not sure how familiar everyone is with VR, but we need to have a high frame rate. 90 frames per second is what you would like. So it's difficult to get 90 frames per second piped out of a computer when you have a complex scene. And when you don't get 90 frames per second, you get frame buffering.
So for me, it makes me sick constantly. Because your eyes are expecting, when you look around, not to be blinking every once in a while. If you walk around always blinking, it makes you nauseous.
So when you're looking in VR, and the frame rates drop, it makes people nauseous. And that's the worst thing to do for people, especially if they're a new person to VR, is to give them a bad VR experience. You won't get a repeat customer.
OK. So that, I think, is a pretty good synopsis of some of that combination. And in the end, what happens? Well, we get a-- I've done this with all the exterior of this thing.
So that's the whole body kit. Right? And if we look over here, I've got the original data. So if I turn on the statistics, you can see there's 3.7 million polygons and 173 nodes. By the time I've gone gone through and modified that, I have 17 nodes and 1.9 million polygons.
Now how did-- the key that we just looked at was going from the nodes drawn. We're going from 173 nodes-- and actually, that's not quite realistic. There were more than that. But you might go from 300 nodes. When you bring it down to 17 nodes, now you get better file performance.
Why 17 nodes? Like why wouldn't I just make it one node? You can't have objects. You can't have an object. For instance, if this wants to be one color and this wants to be a different color, you can't have them be the same component. How does it know where to stop and where to start?
So that front wing was actually probably-- it was a nose cone, it was the splitter, a couple of wind flickers and things like that. That was probably 15 nodes. But I just combined it into one node for a couple of reasons. And why didn't I combine it with the rest of the body?
One, painting the textures on, which we're going to do next. To bring in 2 million polygons into the texture painting tool, my box is performance hit. It's going to be hard to paint them on, because you have so many polygons in the file. And I like to kind of separate it out into areas, because that way it's easily changeable too. I don't have to remap the entire car for stencils, which are decals. I can only do the front wing separate from the body separate from the rear wing, right?
So you want to kind of selectively pick your objects-- in this case, it's a car. But if it were a washing machine, I might want to combine all the stuff that's up on the display area where the controls are going to be. And then maybe the rest of the painted enamel stuff, combine that. Right? Not combine the display and the painted panels and the glass, because I need to separate things by materials. Hopefully this makes sense.
OK. So once we have this body in here, I would just select this and say File. You know, Export Selected. I'm not going to do it. I've already done it. But I would export it. The best way to transfer stuff between VRED and Maya and Mudbox and Stingray is the Filmbox format, FBX.
So, at this point, I would just save the body as one entity and FBX format and then open that body in Maya. All right? So that is basically the same data open in Maya. You can see the number of faces. It's the same. Here's our node structure. If we look at this, there's our nodes. OK.
Now what do we do with it in Maya?
AUDIENCE: I thought you had 17 nodes. There were many more.
BARRY KIMBALL: I'm sorry?
AUDIENCE: You had 17 nodes, right?
BARRY KIMBALL: Yeah.
AUDIENCE: That list for hardware said 17?
BARRY KIMBALL: Yeah. I think it was just-- I left-- I think it was just staging and when I saved the file. I could export it, and it would be 17. In this case, like this one and this guy are not combined yet. All right? I haven't done that stuff yet. And part of that is for-- what I want to do now before I actually am finished--
And it doesn't really matter the number of nodes, because I'm not finished with prepping this yet. What we're going to do now in Maya is get rid of the backsides of material. Because in VRED here-- if we come back and look at this really quick-- if I turn on the interaction clipping, I'll just enable this guy here and turn the clipping off and turn the grid off and set it to x.
Let's just move this guy back here where it was some-- maybe like that. OK. So if I look at the original-- in this monocoque area right here, you can see that. Right? This thing is constructed with a lot of support-- crush zone, basically. I mean, at IndyCar, the driver's rear end is a cigarette pack off the ground. So if that car bottoms out for some reason, that's his cushion. And that cushion is carbon fiber. So it's not soft, but it does-- it's a crush zone.
In VR, I can't see any of that. Right? And again, this is for VR. If a person wants to cut a section and check distances and all these things, that's fine. That's what they make CAD tools for, like Catia. What we're doing is we want to give the person a visual experience of what it's like to see the car. And I can just tell you, you can't have all that data in a VR scene with the level of technology that we have right now to display it. The graphics cards aren't good enough. OK?
So I need a way to get rid of all that backside of material without picking it. Can you imagine each one of those little entities is a single surface? So each of those little towers, where the cursor is, that might be made up of 25 surfaces. Going through there and picking every one of those to get rid of it, I can give you a tack hammer and you can hit yourself in the forehead, too, but that's no fun.
So what they have then-- this is the clean version. So if we now look at this, instead of seeing both sides of material everywhere, we'll clean this thing up. And that's what I'll show in Maya. We'll clean this thing up and go from those many pieces of-- sides of material-- to only the shell that we see. OK?
Now the toolkit in Maya for doing that is a little known gem called the Creative Bridge. It's a add on to Maya, and that allows you to have two tools that are very efficient at removing backsides of material.
Now in something like the body of this, it's a single component that might have quite a bit of shape. So I'm just going to pick-- let's just say this guy. I'll show you how to do it on this one. Alt-H hides everything, and F key will zoom to it.
So if we zoom in on this guy, you can see that it's got both sides of material. Right? It's got top and bottom. But we only see this side. I want to keep this face on this face so that if there's a gap between two parts I don't see through that gap. Right? But I want to get rid of all of the other information. Question?
AUDIENCE: [INAUDIBLE].
BARRY KIMBALL: Oh. I'm not a huge Maya person. How do you change the background color?
AUDIENCE: I believe that you can make the [INAUDIBLE]. Alt-B.
BARRY KIMBALL: Alt-V?
AUDIENCE: Alt-B, with B, "better." Alt-B, and then [INAUDIBLE].
BARRY KIMBALL: OK. Now I haven't tried any of this demo in Alt-B mode, so it's your fault if it doesn't work. Because that just put us in a different selection mode I think. So I'm not sure if we're still in object mode, but we'll see. Good. So all you do is click on this guy. And this brings up the Tangent Select tool.
There's an automated one that I'll show you next, but the tangent select tool is great. And I like it on a body panel like this, where I want to be selective about what I get rid of. I don't want to get rid of things that are going to make holes in the scene. Because people will look at it, see through to the ground, and go, that looks strange to me, why is there light coming out of that gap?
So on something like this where the body is really what we want to show, I kind of take time and use this tangent select tool. And basically, you just grab an area-- oh boy, yeah, the display looks a little different than what you've done here. But I hit B side, and that now just tangent selected every surface that it could find that was within 45 degrees of its neighbor and picked them all.
Now I could kind of go over here-- we need to be in the render legacy-- and grab this guy and his little friend here and make those B side. Right? Now. I could grab this and say, you know what, I don't really want that as part of the B side. So I'm just going to right mouse button, add existing material and go back to the body material that it was-- metallic car paint. OK.
So you can go back and forth and pick different things and figure out a way to get your data out of there. And then once you hit Delete, now you've gotten rid of that one side of material. So you can pretty quickly go through a body like this and get rid of the backsides of material. All right? And then for the next trick, something like the monocoque.
So this guy here. So right now, this is 737,000 polygon faces. So that's pretty-- that's kind of a lot. And as we looked before, right, there's all kinds of stuff internal to this monocoque that we can't see. So what we can use in this creative bridge tool, you select it and you grab this little gentleman here. This is automatic polygon B side cleanup.
I've precalculated this. I can tell you it took about eight minutes to calculate this on high settings. And what the software does is it puts a sphere outside of-- it makes a sphere larger than the data. And then it takes, based on your calculation sensitivity and accuracy, it fires photons at this data. And wherever a photon touches a surface, it tags it is a surface. Where it can't touch a surface, that's tagged as a B surface. Right?
So in 8 and 1/2 minutes of computation, I can just select all the B sides in the current scene. It stays with the scene. They're tagged. And now, it's kind of a weird looking mode in this Alt-B.
AUDIENCE: No, no, no. [INAUDIBLE].
BARRY KIMBALL: There we go. Oh, good. OK. So now you can see that what it's done is it's picked everything that's not the outside of the material. It's only grabbed all the stuff below the outside of material. And you can see right here, I've gone from 737,000 polygons-- I'll be deleting almost 500,000 polygons that would never be seen in VR. All right? So all we do then is say, delete all of the B side in the current scene. All right?
Now I've got that same thing. Visually, no one will tell the difference. But I've only got 270,000 versus 750,000 polygons. Critical. OK? Critical step. It's not the fun-- this isn't the fun glamorous work, but this is what makes the VR experience good versus unusable. OK?
AUDIENCE: Is that tool part of the creative bridge?
BARRY KIMBALL: Yes. Those two tools are part of the creative bridge. There's a lot of other things that we don't really have time to talk about. What time do we got? 8:30. OK. Good. Pretty decent.
OK. Now next, what we really need to start thinking about is UV mapping. Now I'm not sure how familiar everybody is with UV mapping. This class is intermediate, so I'll talk about it a little bit. But every surface has a U and a V direction and a normal direction. This monocoque might be made up right now of-- it's not the number of polygons, it's the number of faces that were-- the number of surfaces that were tessellated to make this dataset. And there might be 5,000 surfaces.
So individual strips of surface that are then tessellated to display it. Because we can't shade surface data. Right? All you can shade is polygons. There's only one software that-- well, I shouldn't say that. Some other person could have come up with a software. There's only one Autodesk software that can actually shade NURBS data, the actual surface data. And that's VRED, pixel based shading. In almost every other product-- Catia, our competitive products, AutoCAD, Inventor, you can never shade the surface. You can never shade the surface. You're tessellating it and then shading the polygons. You're not looking at the actual surface. OK?
So we have to get beyond that. Because in this case, we're not looking at any surface data anymore. We're looking at a tessellated version. So a thin candy shell of the original. And we need to take all of those individual strips of surface and flatten them out onto a plane so that we can then draw textures on them.
Now we need to do that for a couple of reasons. If we go back and look at VRED here, in this front wing-- let me turn this clipping off for a second. Because I did this a few times. I'm actually fairly new to some of this stuff. So I wouldn't call myself an expert. There are definitely people who know-- certainly more than me.
But statistics right now, if we do an Isolate, that's 235,000 polygons on that object. OK? If I came over here-- and I'm just going to do a little-- let's go to here and maybe-- just to show you this. Let's go to IndyCar, Verizon.
So if I just, for example, took this number 12 and plopped it on here, and I'm going to add it as a decal. OK? So let's just put that decal on there. I'll raise this thing up off so it goes a little bit. How come there's 400,000 polygons now? I didn't duplicate any data. In softwares like VRED, when you make a layered shader, there has to be two passes to draw that shader.
So now, the polygons on the screen, by putting that one detail, doubled. If I put another decal, I double it again. Put another one, add that. Put another one. So in a thing like an IndyCar that is basically-- I mean--
AUDIENCE: It's covered.
BARRY KIMBALL: It's covered. Right? They don't race just for the fun of it. It's all about sponsorship. That's the only reason to do it, right?
So when you take something like this and you start putting decals on it, all of a sudden you're like, oh, wait, I went through all this optimization. How did I all of a sudden come up with 25 million polygons on this thing? It's the drop passes that it has to do.
So we can avoid that by using UV maps. And now we can put 10 stickers on this front wing in one extra pass, versus having to put 10 stickers on and causing 10 extra passes. OK? And the UV maps are used in a lot of products-- or in a lot of products, in a lot of processes-- just for like in Stingray they're for the light baking, so to have the shadows in Stingray. But UV maps are a critical thing to have for this kind of work.
So how do we make the UV maps? So I'm just going to open this guy. Yeah I don't have-- OK, this is perfect. Actually, that segues in nicely. That doesn't look very good, does it? OK. I don't write the code, so I can't explain some of this stuff.
But in this case, all that happened saved this file. Save this file, open it back up, and look what I have here. What happened to my-- you know, what's going on is, somehow in the save-- I'll just say, somehow in the saving process, it's gotten confused between the vertex normals and the face normals. So some of the faces think that they're supposed to be the opposite direction. But the normal isn't correct then. So you have you have individual polygons where the normals at the vertex points at each corner are flipping.
So now you have two vertices on top of each other, but the normals are pointed in two different directions. Pretty easy to fix, though. It looks like, oh man, I got to start over.
But no, pretty simple. You grab this guy and say, mesh display, set to face. Again, this is in the-- just to show you really quick what we've been going through here. And what you're going to find in your document here is I literally go through this kind of thing right here and fix-- show you how to fix this stuff. So it's in the document that I gave you. I highlight-- I highlight some of this stuff.
So first thing that I do is set the normals. But that now gives me? I hope you can see that. See how it's faceted? So now all the normals are pointed the right way. They're pointed out. But it's looking-- you know, it's faceted right. If we zoomed in, it's not a smooth surface. It's a faceted surface. That's what happens when you tessellate objects. And right now, where the two polygons come together at an apex point, the normals are pointed two different ways. We need to average those two normals. That's a regular display. And you can get back to that by just picking on the object and going to Mesh Display, Soften Edge. And now we're basically exactly back to where we were before. OK? Yeah.
And you'll see that happen. When does that happen? I can't say when it happens all the time. But let me just-- I just want to grab this one really quick and show one more thing. Actually, opened the wrong file. Just going to come back. You can pick the whole thing. It just takes a little longer. I'm going to do that same thing on this guy-- Mesh Display, Set To Face, Mesh Display, Soften Edge fixes that guy.
Another thing that I've seen happen is little stuff like this. We've got a part here and-- where'd that polygon go? I don't know. Somehow when this file was saved-- and you can't blame me, because I didn't write the software. But somehow that polygon disappeared. I don't know.
This is visual. This is what I kind of like about-- coming from my background of Class A surfacing, if a gap between two parts is supposed to be five millimeters, it can't be 4.97. Used to be five. This is visual. And what I love about Maya and this visual stuff is, if it looks right, it is right. You can't argue with me. It looks right. Look it. So it's a nice thing about this. Some people might say, oh, you fill that polygon in, and it doesn't look like the original. That's one polygon out of 2 million. Take it easy. It's going to be fine.
So you can fix that guy with mesh-- let me find it here. No, that's not the one I want to use. I like to use Append. It's OK. It's all right. I want to use-- I want to grab this guy, and I want to say Mesh Tools, Append to Polygon. And I'm just going to pick this guy and this guy and it's good. Q gets you out of there, and I fill the hole.
Fill Hole. The thing I don't like about Fill Hole, it's looking everywhere. Careful. When you pull that trigger, I don't know what hole to fill. So I like the Append to Polygon. I can just find one, hit it and do it. Plus I'm not a super Maya expert. So those are the tools that my friend Rich [INAUDIBLE] has shown me.
By the way, I was supposed to have a co-presenter for this. But since they kind of switched up AU to a different week, he had already planned a vacation. I'm the VRED guy. He's the Maya guy, the Mudbox guy, and the Stingray guy. This should have been his department. But I had to do it. So he would be a lot more skillful at this, I would say.
All right. So I fixed those guys. And I just wanted to show that little Append To Polygon and a couple of those things. We go back here now to the UV mapping. Oh shoot. Mesh display. Good thing this doesn't take that long. Set to face and soften edge. OK.
So UV mapping, it's kind of like taking this guy and unwrapping every surface to a flat plane, like unwrapping a present. Right? You got wrapping paper all around it, well, I want to take all those and lay them out flat. So how do we do that? UV. And I'm going to pull up the UV editor. So right now, if we zoom in on this, it looks fantastic. Every single surface is just jammed on top of one another, right?
So the software has no idea what each phase looks like. They're just all on top of one another. So if I tried to paint on this, it basically just wouldn't work. It doesn't know how to differentiate when it's painting on one surface versus another. OK?
So what we want to do here is just go to this UV. And UV mapping is a whole art in itself. I'm going to show you some-- let's say this is intro to UV mapping. So UV automatic. All right. What that just did is it just took every one of those faces and put it on a flat sheet. And that's a 2D view of every one of those.
Now, when we zoom in here, what can happen is, if you don't have enough space between-- oh, and I think I already have it here. Oh, the padding is already in there. Shoot. So I don't know if it'll redo it.
The padding is something that's important. Oh, god. See how there's a distance between each of those? And then there's a distance actually at the border where it's not right on the border of this texture block? OK? This is my texture area right here, this square.
So I need to have what's called padding in those areas. So that way-- because the texture wants to start. If this was my one surface, if it's touching another one in that UV map layout, if I'm painting, it likes to have a little area so that it can start the texture here and it knows where it is when it gets on. If you have too many close together, it gets confused on which one it wants to paint on. Because they aren't necessarily laid out in 3D space. OK? They're laid out in 2D space. So we need to have what's called padding in there.
Now if you saw me right there, just hit Modify Layout to adjust the padding. And when I hit Apply, it gives me an error. Mesh has non-manifold edges. Clean the mesh before you can use this tool. Mesh, clean up. And what you want to do is set two things in here. Again, this is in the document that you guys can download. You want to delete lamina faces, which are two faces on top of one another. And you want to delete non-manifold geometry.
Think of non-manifold geometry as something that can't exist in real life. It's an entity that isn't real. OK? It's not realistic. So if we grab that stuff and we hit Cleanup, go into Object mode here and grab it and hit Clean Up. Sure. Now I can go to Modify Layout, Apply.
All right. And if we zoom in here, these guys are going to be a certain distance apart. And then as I hit Modify Layout, I can add in shell padding and edge padding and apply that guy, and these things will move around and get different distances in between them. I lost it. That's crazy.
Did anybody see me type that in there? I just don't know where it went. That's an interesting-- it disappeared. OK. Probably not to worry. So our next step, once-- now we've got these UV-- and you need to do this on the individual components, right? Everything would have to be UV mapped.
Then we're going to take this thing and do a File, send to my box. And I'm going to send it as a new scene. It gives me some rigamarole there, high resolution mesh, sure. You go away. Oh, I killed that. Mudbox.
OK. Now here's the mesh in Mudbox. It's got some air shown. I'm just going to turn those off. Display, Mesh Errors, turn that off. OK? I'm going to go to Ortho mode, because we're painting on decals and I want to do it from a direction without perspective. OK?
I'm going to go to the top view, because I want to paint a couple of decals on this thing. So I'm going to use the image browser here. All I've done is just browse the directory, and now it shows me the images that are in that directory. I can grab one, like maybe this guy. Hit this thing. So that's what that decal looks like. Right here is Set Stencil.
So now it's made it a stencil in this view. We zoom this thing down. Oh, why did it do it? I'm not sure why it does that sometimes. So it's not showing me what I think is the correct stencil. OK? Image browser. I want to use this guy, set. It's only showing me one little piece, and I can't explain that right now. I don't know why it does that every once in a while. I'll just paint a different one, because it doesn't really matter.
Grab this, Fit to Window, Show a Stencil, 3D View. Uh-oh. OK, there it is. So we zoom in on this. This could have to do with when I just brought those UV maps over incorrectly. Is the UV view-- there's something-- all right, I broke it. There's something wrong in the UVs that I did on this part.
So I need to do that again. I messed something up when I hit the padding. I don't know. Mesh Diplay, Set To Face, Mesh Display, Soften Edge, Object Mode, UV, Automatic, Mesh, Cleanup, Apply. Apply UV editor and Layout. Object Mode, Layout.
I set something in here and destroyed this. Reset settings. 25, 20, apply. There we go. OK. Now we've got some UVs. Now we can send to my box. Keep it. OK.
Now we have UVs in here. That's why it wasn't letting me paint well. We got a 3D view. Set this to Ortho mode, go to the top view, image browser. I want to put this one on, set a stencil, 3D view. OK. You're killing me. It always happens in the demo. Huh. It's a bit of a pickle.
All I can think is I had that open previously. I don't know. All I can think is it's got a issue. Because this has UVs, we should be able to pain ton them.
All right. I'm just going to paint that one on. That'll have to do. It will not let me. Oh. See this button right here that says Projection? I said, it's Rich's fault. So I was in painting mode, not in stencil mode. So now that I get that turned on, you just position it and size it and then just paint it on. Once you paint it on, you can rotate it. I can turn that stencil off, and now I've got that in 3D.
OK. One other thing that I might want to do is I'm going to make a new layer. And then I'm going to switch these to put that new layer on top. I'm going to grab this and now I'm going to paint. And this is something that Stingray will like, the game engine, is I'm going to just flood the paint layer.
So I just painted underneath that texture. So now I have a couple of textures up here, right? I'm going to grab these guys and I'm going to say, Duplicate and Merge Visible. Now that gives me a combination of color and texture. I'm going to right mouse button on that, because we're running out of time. I'm going to right mouse button on that and say, Export Selected. And I'll just do Painted or Paint Wing. All right?
Then I want to grab just the texture layer, because I want to use that in VRED to show you something else. I'm going to say Export Selected and I'm just going to say, Stencil. All right.
Now when I come back here to Maya, there's my little-- here's my part. I'm going to grab this guy and say Assign Material. And I need to put a-- to go into VR and Stingray, I'm going to use a Stingray PBS shader, which is a physically based shader. I'm going to come over here to the color channel on that shader, and I'm going to say, I want to put a texture on there. And that texture is in this little directory, and I just made that Paint Wing. See how it looks kind of funny? Like wouldn't you expect to see that say, you know, Shell and those things next to each other? You might.
But what you're really seeing is, each little face that's set apart, it's put the texture where it needs to be on each of those. So now when I apply it to that 3D model that I've UV mapped, it knows where that should be on each individual face. So I say Open right here. It doesn't show me anything. I just need to come back here and say, use the color map and then the key in Stingray is 6 to show textures.
And now I put that texture back onto this part. OK? Color and texture. Now I can grab this guy and go File, Game Exporter. This is how you would bring things to Stingray. So really, the Stingray portion is-- I mean, if you're not doing-- if you're not programming a lot of logic in there, it's pretty easy. I'm just going to go to my game data, and I'll call this Front Wing.
Oh, actually. That's kind of wrong. That's choose the directory, and then give it a name. Front wing. So this is the component that I'll have in Stingray. So I say Export. Export succeeded. I'm going to open up Stingray now. This is actually the first Stingray scene I built in the class that I took from Paul Kind, who's the rocket scientist of Stingray. So I've got a pre-defined scene.
If you don't have your own scene, when you open up Stingray, you get a choice of like eight templates. One of those templates is five VR. You open that scene, and you would do the exact thing, the same thing that I'm doing. I just like this cool little factory that I made. So I'm going to put it in here.
So I'm going to go to my Models folder, right mouse button, create a folder. I'll call it front wing, and I'm going to grab that folder. Front wing. And I'm going to import that right from the game data-- it's all live-- right from that game data right there. Open, and just say Import. I don't think that should take that long. Data compile completed. There's my front wing.
In Stingray, all you have to do is put it in a scene. So I'm just going to stick it in scene right there. F key is look at, and there it is. It's kind of a dull shader right now. We can grab that guy, and I can look at the Stingray PBS shader that came right from Maya. And I could come over here. And if you turn the roughness down-- I'll make that roughness, like, 0.05-- now it gets shiny. And it's reflecting the scene.
These are just all-- again, it's not a stingray class, but I mean that is basically all that there is to do. You want to move this guy around, you can move it up and down. I duplicated it, sorry. Control-Z. It's different in here. If you grab something and you shift, it duplicates it to move it. So I can make a bunch of these guys in here. And they're all considered the same objects, so it shades really fast.
See how it's getting reflected in the floor? You know when you can scale it and do things like that. Lastly though-- we've got only a couple of minutes left here-- I wanted to show how that would work-- what we could do with that same decal in VRED. So we've got VRED up here. I'm going to do File, New. And into this file, I am going to add-- and I'll go to my game data.
So I'm going to add the front wing that we just worked with. I'm adding that front wing. And the reason why is, I need the UV map sign that I made in Maya. OK? So when it comes in here, I've got Stingray PBS shader, right? Just like it was in the other one. But it's plastic material and it's black. It's just confused. VRED likes things called true light materials. That's the kind of material that it uses.
I wish-- and I don't know why-- I wish every software used one shader model, but no. It doesn't work that way. Every single software that we kind of have is out there, everything uses its own shader model. So I'm just going to create a material, unicolor paint. And I'm going to put that unicolor paint on here. I could make it yellow if I wanted. It doesn't really matter at this point. All right? Accept. Oops.
Accidentally flipping some normals. Now, remember we're 234,000 polygons. If I put a decal on, right, it doubles that. So what I'm going to do in here is now I'm going to just create a material, a reflective plastic material, and I'm going to right mouse button and put that on. And that says, well, what do you want to do? Add it as a switch or add it as a multi pass?
Well, multipass material means it's going to layer materials on top of one another. So I'm going to add it as a multipass material. Then I'm going to go to its diffuse texture, and I'm going to go right over here to this guy. I saved that stencil right there. Open that guy.
And if we zoom in here, see how it's got a ton of them? Little guys mapped everywhere? That's because right now it's being triplanar mapped. If we come up here to-- I know there's a lot of stuff, but a lot to learn. If we look at the scene UV editor-- I wish it would show me. I'm not sure why it's not showing me. There it is. Those are the UVs that I made in Maya, right?
They come through in FBX. It's the same way they got into Stingray. So now that I have the same model, it's got the correct UV map, the correct UVs. All I'm going to do is go to my reflective plastic shader here and switch it from triplanar mapping to UV mapping. And now I've created-- I could have put 10 decals on here, but I've basically now made that stencil and UV mapped it and brought it all back. And I can use that in either Stingray or VRED depending on which software I use.
And there's differences to use Stingray versus VRED. VRED I think may be higher fidelity. You can get a little bit better visual appearance, I would say. But you can't get the interaction that you can in Stingray. Stingray we can program logic that can-- basically like a game can be.
So this guy now, literally, to make this happen in-- to be in VR in Stingray, if we wanted to be in VR and see what that looked like, you would just hit this guy, run project. Hopefully it doesn't care. We don't have a display going here.
I don't have an HMD, so it might not work. But that's really what you would do to see it. And, ah, there it is, it's doing something. So basically, you just turn on VR and you're in. There it is. Right? I'd be looking at this now in VR in my headset. And there's my part. There's my parts over there. All right?
In VRED, it's switched to-- it's just a viewing mode. You would just say View, Display, open VR HMD and you're looking at this in VR. Right?
So that pretty much-- I know it was kind of fast, but it's, you know, a lot of stuff to learn, I guess. But that is pretty much the most efficient-- the ways to make the most efficient data for use in VR. You've got to optimize things, make the scene tree as small as possible. UV mapping is required for Stingray use. And to get more decals versus a ton of polygons, if you just keep adding and adding and adding. And I'd appreciate it if you'd fill out the feedback form. I'm supposed to mention that.
I appreciate everyone's attention. It was fun for me. Hopefully you learned something. Thanks.
[APPLAUSE]