News:

Welcome to World of Banished!

Main Menu

Beginner's Guide to Modding for Banished PART 2 - Clean Up / a simple fence

Started by scoutae4, November 23, 2023, 01:12:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

scoutae4

PART 2 – CLEAN UP / Beginner's Guide to Modding for Banished: a simple fence

This section will cover clean up and file prep for both the SketchUp and Blender models created in PARTS 1A & 1B. You can download copies of either if you need them, links at bottom. I am working in Blender v4. My thanks as always to @kid1293 for his advice and guidance.

A reminder that I am a beginner and this is just what I think I've figured out so far.

If you are working with a SketchUp model launch Blender and set up your workspace as described in steps 1 thru 4 of PART 1B. Then navigate to FILE > IMPORT > COLLADA (dae.) to import your "SketchUpFence.dae" file. If you will be working with the Blender model you can just open it, naturally.  ;)

Optional: If you would like to see your progress, toggle open the SHOW OVERLAYS button in the top right corner of the 3D VIEWPORT and enable STATISTICS.



SketchUp models import with extra information that will require a few more steps to prepare. Click the empty area next to the top item in your collection to display the details.



.01 REMOVE HIDDEN GEOMETRY / The bottom faces of our posts will never be seen in the game so let's delete them. Tab into EDIT MODE and select FACES. Adjust your view to see the bottom of your fenceposts. Select and press "delete" (or with the SketchUp version, select +shift click to load both Tris then press "delete"), then chose FACES from the popup options. In the Blender model we had created LINKED COPIES of the posts so when you delete the bottom face of Fence Post 1, Fence Post 2 is automatically deleted as well.



The version of the model that was created in Blender also has faces that are not needed on the ends of the railings where they are embedded into the posts. Enable the X-RAY TOGGLE (Alt+Z) to view, select, and delete these four faces as well. Once done, turn off X-RAY. This step is not necessary with the SketchUp model as those railings are hollow.



If you are working with the Blender created model you can jump down to part 6 where we look at NORMALS.


.02 APPLY THE SCALE / Notice that our scale is off. Tab into OBJECT MODE and Tap "A" to SELECT ALL, then press CTRL+A to open the popup, and choose SCALE from the APPLY options. This will reset our scale to 1,1,1.



.03 DELETE THE MATERIAL AND CAMERA / In your OUTLINER section (top right) toggle open the first mesh and delete both the Material and Camera (Right click, select "delete").



.04 MERGE BY DISTANCE / In older versions of Blender this was the, "Remove Duplicates" function. SketchUp imports with duplicate information and I think you'll need to do this for every import but when you are working with your own models you should save an iteration in case this removes more than you want. In EDIT MODE with VERTEX selected, select all then tap "M" to call up the MERGE OPTIONS, then select BY DISTANCE



.05 DISSOLVE VERTICES / If we don't seal up the posts with this build it will create floating artifacts in our UV map. Not sure why, but after testing everything I could think of this was the best solve I could find. Hide the railings in your Collection. Remain in EDIT MODE with VERTEX enabled, click to select the corners of the empty rectangles in your post then right click and select DISSOLVE VERTICES. Do this for both railings then turn the visibility of your railings back on.



.06 CHECK NORMALS / You can check your Normals with the SHOW OVERLAYS button in the top right corner of the 3D VIEWPORT by enabling FACE ORIENTATION. Blue indicates your Normals are facing outward (which we want for this model) while red would indicate Normals that are facing inward. You would have had to go wildly off script for this to be an issue with our small model but it's easy to flip them unintentionally with more complex builds so I'm adding it here as a cue to include in your regular workflow. Here is a tutorial that helped me understand how Normals function and how to reverse them when needed: https://www.youtube.com/watch?v=46fIGJ75z-k&ab_channel=CGCookie. Toggle off FACE NORMALS and STATISTICS and save your model for PART 3!



@angainor88 has a great tutorial on the SketchUp to Blender workflow you can find here: https://worldofbanished.com/index.php?topic=2345.0 It's with an older version of Blender but the basics are the same (Remove Duplicates is now Merge by Distance).


SketchUp Model: https://worldofbanished.com/index.php?action=downloads;sa=downfile&id=675;t=1700772104
Blender Model: https://worldofbanished.com/index.php?action=downloads;sa=downfile&id=676;t=1700772306


kid1293

Never delete bottom surfaces. They will provide a block for sunbeams that can be leaking out.
The light hits the upper surface - goes through - and is visible if you have the slightest gap between
your model and the ground. Not nice.

Light coming from behind (hitting the bottom from the inside) gets blocked.

scoutae4

Ah ok I have a question then: I took this advice from the @Discrepancy house tutorial...

Quotedeleting faces that are not visible is good practice to keep the poly count low.

...which he also pairs with creating a plane under the house before baking to seal out potential light leaks. That plane serves double duty as it helps to create an AO shadow where the model meets the ground. So if paired with a plane, this should avoid the problem, or just never do this?

kid1293

I have never used the plane method myself. Some say it is needed for a good AO.
Many Blender tutorials have it.

Without a bottom, you can set     bool _flattenGround = true;
and there will be no leaks. Not all models have use for a flattened ground, though.

Experiment! Test, test, test. ;D Yes, it is tedious, but then you know. :)

scoutae4

Thanks @kid1293 :) always good to know alternate workflows - especially if they can shave time!

angainor88

I usually do both the floor (added after I clean everything up) and the plane for making the AO. Sometimes I have light leak and sometimes not... but I can never tell what the factor that causes it is. I should try add the flatten ground thing and see what happens.

Having the separate plane improves the AO for me, though I sometimes have to manually lighten it after so the buildings aren't too dark.


scoutae4

Thanks @catty-cb !!  I'm sure there are errors in mine that will need to be corrected so linking is probably a good tactic for now.  ;)

@angainor88
QuoteSometimes I have light leak and sometimes not... but I can never tell what the factor that causes it is.

It's entirely possible that the amount of file size saved by "deleting bottoms" isn't worth the effort. Especially if it is the culprit for light leak issues. I wonder if anyone has tested file size with / without? I did for this little fence but it's such a teeny tiny model it didn't make a difference. Adding this to the (formidable) list of things not yet figured out.

kid1293

Just an observation.
If I don't 'remove doubles' from the walls and the bottom, it can leak light.
Maybe there are tiny gaps between the walls and the bottom.

scoutae4

Thanks for that clarification @kid1293  :)

It makes sense that it would be necessary with SketchUp imports since it's primarily an architectural software and (I think) it natively adds geometry "inside" to be able to work with the interiors of buildings. Hence the doubles. In the new version of BLENDER the Remove Doubles was changed to "Merge by Distance" and there are a lot of other options under CLEAN UP that probably would be good to understand at some point...

Another thing that I played around with was the TRIS to QUADS option under the FACE menu. It does a great job, but I didn't include it in the tutorial because I don't think it made a positive impact on file size and I have a suspicion that Banished would convert quads back into tris anyways. No point in spinning your wheels - there is enough "process" as it is!

kid1293

Sometimes I wonder what path I am walking. I am far away from my first Garden Shed. ;D

Keep on! You are doing a great job. :)