Wednesday, September 15, 2021

Converting Those Free 3D Printer Shapes To MSTS Elements

Thought I'd share a glimpse of the process in converting one of Louis Fournier's files. The files were intended to be used for 3D printers. Considering the complexity I'm not sure how well that worked out. Such detailed shapes probably take days to print. Unfortunately you need a pretty pricey printer (with a large print volume) that won't screw up half way through the process (unlike my cheap Malyan). Also, since I print HO scale vehicles solid shapes are much better. The thin details and walls from models like these don't print too well in such a small size. All the interior detail must be removed in some manner and replaced with a solid shape.


Converting these shapes to a solid is probably more work than converting them to MSTS s files. In the MSTS process I only need to select all the outer shell of the model and visible parts. Tedious I guess, but I'm getting pretty proficient at it. In some cases, Many shapes aren't quite right and require a lot of point manipulation to get the proper proportions.

These beasties start with hundreds of thousands of polygons. I work to reduce them to less than two thousand.so that something like this...



...becomes something like this




The first step id to cut the thing in half. This goes a long way to easing the process. I switch the edit setting to points and delete half the shape in one swipe.




Once that's done I switch to poly editing and begin separating the shape into manageable parts. Here I'm starting to make the side of a 1932 Ford. A lot of the shape isn't necessary. In the original things like the door handles and window frames are completely detailed and assigned a material. Since I'll be using "skins" or UV maps, all these things will be represented in the textures. The polys are not always straight forward. Many things such as the windows are created using Boolean geometry. The shape of the window is subtracted from the general model. This works great when creating the model, but results in all kinds of weirdness when taking it apart.



The red lines represent the polys already separated. In some cases I had to delete interior detail so I could find the centers of polygons I wanted to keep. It's a shame these retails have to be removed. You can see the gauges on the dash, even the belts and hoses on the flathead four cylinder engine. Those louvers on the hood sides will go too, replace by a picture of louvers. Even if  I printed this model I'd have to remove them. They wouldn't really print well. The resolution of my printer and many other filament extruder printers (FUD) is not fine enough in small items. The resin printers (STL), which use light to print have a much higher resolution and can reproduce much of this small surface detail.



The other thing that needs to be done is reducing the number of polys. Although Blender has tools for simplifying a mesh they don't do what is required without destroying the overall shape. Even flat surfaces have more polygons than required for our purposes. Curved surfaces have many more segments than I'll ever need. A curve on the roof side can be reduced to 3 segments and look just fine in MSTS.




More details to throw away.... The rear view mirror, hinges and etc. will go. The windshield is shown open on the model so I will only be saving the actual frame (orange)  All the window shapes will become part of the surface they are surrounded by. In most case replaced altogether when I redo the surface with one or two polys.




For this windshield, for example, I'll keep only the outside edges and use one polygon (orange).



Keep in mind that when I use the term "poly" I talking in Blender terms. In Blender I select edges, or points in this case, and the program fills out the area. Here I used 5 points so it's not a perfect rectangle. When I export this as an MSTS file it will end up with triangular polys to make the same shape.

Some parts, like the wheels, are ridiculously complex with tire tread, wheel spokes, even the air valve in three dimensional detail.



These will be replaced by simple 12 sided cylinders. More sides could be used for a smoother looking tire, but I'm trying to keep the poly count under a certain limit. All those wire spokes will be replaced by a wheel texture.



The process continues like that until all I have is a shell of the original. Then it's time for the fun part, the textures.

I search the internet for photos of the car I'm working on. One place I found Vanguard. The site has a plethora of photographs for each car, from dozens of angles. I only need a few, all exterior shots. I start with the side view.

NOTE: when using the Vanguard site don't use the image on the main page. Right click on the thumbnail you want and display in a new tab. The main page won't let you copy, the one in the new tab will.



I copy it to the Paint Shop program I use (out of date but fine for me) . After trimming most of the background away I rotate the image until it sits level with the running boards horizontal. The image gets trimmed again to delete more background.


You'll notice that the bumpers and other parts are cut out. I only need the body side. The fenders will disappear too, The front fender hides part of the louvre detail and the lower part of the hood side. This and the rear fender will be replaced with solid color and hidden details later on.

The side view is then copied to a new 2048 x 2048 image named for the model and saved as a TGA file. With the Vanguard images I usually have to resize them to 200% their original size. I feel that otherwise, the image is a bit small for high resolution textures.


I keep copying images, trimming them down and such till I get something like this....




I found a nice image of bright red wheels to replace the modern chrome wheels. notice that wheel background is square. Many modelers make their wheels with square inner and outer faces. This results in two triangular polys on each side in MSTS. It also require transparent alpha channels, something I try to avoid on these models. Causes some weird issues and requires too many layers of alpha. (same reason I also don't use alpha channels for windows)  This square actually makes the texture easier to make and allows a bit of wiggle room when mapping the wheel skins.


You may have also noticed there are only three wheel textures. two fronts and one back. I only actually need two. A front and a back. The same texture can be used for a number of parts. Parts that require no details can shhare the same skin. I typically map anything black to a black square I use for just that purpose. Same with body parts that lack detail. I make a square of the body color OR use a part of the existing view which shows no details.


Which brings us to another stage of creating these textures. I do not like using photo realistic textures for MSTS objects. To me they don't match the look of other MSTS elements. The shadows and/or highlights don't match properly. The result is a glaringly obvious "standoutishness". They look too real, if you take my meaning. So I cover all the nice visual nuances with blank color. This allows the simulator to provide the shading to match the rest of the scene, not the textures. What I do instead is outline body line using a shade that almost matches the body color, or use a contrasting color as was often done of the actual cars being modeled. In the case of this Ford, I'm going with the subtle look. Maybe the toughest part of this phase is matching the body color. Since the color in our images are often composed of different shade pixels you have to pick one you think looks right and stick with it.


In Paint Shop I set the background to this color, Rather than brush on the color, I delete the existing color. This replaces that with the background. Large areas are deleted using the choose tools, small area are cleared using the eraser tool. You can see where I have "replaced" the glossy paint finish with the black background.






Windows can be tough, but on these older cars the glass was flat. They hadn't developed the auto glass we had since the late '40s. Windows were often rounded rectangles. I use the object tool for these with a rounded rounded rectangle brush and gray color. Voila! Instant window, sorta.

I don't leave the windows plain gray. That just allows me to select the entire window with the magic wand tool for the next step. I use the flood fill tool set for linear gradient for that. I do each window one at a time. I select the window with the magic wand and then flood fill it. Using a gradient without the selection means the flood will average out across the entire image and the effect will wash out. Same thing happens if you select all the windows at once. I also set the opacity low to something like 10% so the effect doesn't overwhelm the rest of the model



As for the rest of the car, I keep replacing the color. Using the lasso selection tool I carefully outline various parts of the original image I want to keep. Again I'm deleting the selected areas to replace the color.



Here I end up with the louvres. They have to be extended down into the area where the fender used to be. I use the selection box to grab the center section of the louvers and then use the deformation tool to stretch them.


Once the louvres are stretched out the way I want them I got back and copy the top of the louvres, paste them and flip them. I line them up as best I can.



So it goes. I repeat all these procedures for each texture for each part. I only use the part of the original photos I need. That's why you see just a windshield and a radiator rather than an entire front view. You may also notice that in many places the side view continues far beyond the part itself. Such "extensions" allow me to texture the side and the hood with the same image, even though they are separate parts.  Same at the rear. The molding on the side actually extends across the front cowl and back of the car. Things like this makes it easier to line up the details on each part of the model.


Once I start to map the textures I also refine the parts. It may be that the texture doesn't line up the way I need it to. It may mean I have to fool around with polygons until I get what I want, or change the geometry in some other way. The 1930 Ford Tudor had to be stretched to better proportions. The radiator was too narrow, the hood too long and the body too short. Perhaps this should have been done when the shape was made. Not my call.


God, I have rambled on quite a bit.....


You may ask why I don't just make the shapes from scratch. You would think it might be less work. The issue is my skillset at this time. I have created many shapes over the years, but the compound curves found on automobiles stump me. It's one thing to do the nose of an ALCO DL109. It's a totally different scenario when creating the curves on this Ford. That blended curve from four different directions is killer. I have to say working on the shapes has taught me quite a bit about how to make them. It's also taught me quite a bit about Blender and its functions. I have started creating some of the curves on these models from scratch


Sorry to take up so much of your time. Please forgive the haphazard way this post goes. The actual process is a lot more organized. I don't jump back and forth like this. I just wanted to give you an idea of what's involved. Thanks for your patient forbearance.