Ambient Occlusion (AO)

a think i am wondering is how you can put and load the AO file in your channel 2 while still have the real diffuse in your channel 1 [img]<fileStore.core_Emoticons>/emoticons/tongue.png[/img]/emoticons/tongue@2x.png 2x" title=":P" width="20" />

if i understood correctly


<a contenteditable="false" data-ipshover="" data-ipshover-target="<___base_url___>/index.php?/profile/3183-ketchup/&do=hovercard" data-mentionid="3183" href="<___base_url___>/index.php?/profile/3183-ketchup/">@Ketchup</a> which do you mean, for the model or for the AO.png? I don't know what you mean by 'real diffuse'... I'm not very good with terminology which is much harder when every darn piece of software uses different words for the same thing just to be different from one another [img]<fileStore.core_Emoticons>/emoticons/sad.png[/img]/emoticons/sad@2x.png 2x" title=":(" width="20" /> 


i dont know, you say you use the channel 2 for AO. where this AO came from ? a file ? so how you loaded it and make it as texture chan 2 ?


You don't need to assign the AO to the model as a texture, you only need to unwrap your faces on channel 2 to bake your AO, and to then tell the game the layout for the AO. The game will link the two together itself. The game will read channel two in your model, to find out the layout of the faces. It will then read the AO .png, and use this layout to put the shadows in the right place.

I don't have time right now to do it, I gotta go watch a bunch of people take a polar plunge into ice cold waters, but this evening I can lay it out better if you like.


alright , thanks you bro

Have a great day !!


Hey <a contenteditable="false" data-ipshover="" data-ipshover-target="<___base_url___>/index.php?/profile/3183-ketchup/&do=hovercard" data-mentionid="3183" href="<___base_url___>/index.php?/profile/3183-ketchup/">@Ketchup</a> could you do me a favour... could you tell me the unwrapping options in Max or post a screen shot of different options?


all the screenshot i posted since yesterday are the UWV unwrapping.


what you need , i name you all the buttons ?



<a contenteditable="false" data-ipshover="" data-ipshover-target="<___base_url___>/index.php?/profile/3183-ketchup/&do=hovercard" data-mentionid="3183" href="<___base_url___>/index.php?/profile/3183-ketchup/">@Ketchup</a> hmm, I did some digging, and it seems the processes might be a bit different. So I'm going to take a few screenshots that demonstrate the different channels in blender. Don't worry too much about the process, but the output will be the same. Hopefully if you see how the different channels look in blender, you can try to replicate this in 3Dsmax to get the same results. I'm sure you already know most of it, but I think it helps if I go through from the start, plus others might have the same questions.


UV Channels and AO.

Picture 1 - Overview of our model and the 1st UV Channel.

In this example I will use a house from the Sherbooke set, the white one (the red one isn't finished). 

1 - This is the 'Object Data' menu

2 - Under the UV section, you'll see we have 1 UV channel. This is the default channel which is made when you make an object, I have re-named it to 'UVChannel_01'. In 3Dsmax, it is 'Mapp Channel :1' in the channel selector menu.

Note about Channel names = In blender, you can name the channels what ever you want. For Banished, the names do not matter, it is the order of channels that matter

3 - To note, the first view panel is in 3D View with 'Edit Mode' and 'Material View' selected and the second view panel is in 'UV/Image Editor' view.

<a class="ipsAttachLink ipsAttachLink_image" data-fileid="1642" href="<fileStore.core_Attachment>/monthly_2017_03/Channels_Pic01.jpg.fcc11a232a8c4938eb807bb7f9b30056.jpg">[img]<fileStore.core_Attachment>/monthly_2017_03/Channels_Pic01.thumb.jpg.c0bed50a917b7e4b3d8cff78f94b4e51.jpg[/img]</a>


Picture 2 - UVChannel_01 - What a mess!!

This second picture is what my UVChannel_01 looks like when all faces in the model are selected... a mess! This is because I am using materials. Each face is assigned a material, and the UV are unwrapped and scaled to make the look good.

<a class="ipsAttachLink ipsAttachLink_image" data-fileid="1643" href="<fileStore.core_Attachment>/monthly_2017_03/Channels_Pic02.jpg.6096286a16180da56020d8a6c945de5a.jpg">[img]<fileStore.core_Attachment>/monthly_2017_03/Channels_Pic02.thumb.jpg.1578f3d515bfc0f569ac4c7f96536fa6.jpg[/img]</a>


Picture 3 - UVChannel_01 - Texture Example of 'UV Reset' and a wooden beam.

So to explain the last picture a bit, let's just choose 1 of these faces. This is a wooden beam. You'll see in the UV/Image Editor view I have loaded up the material, a green beam, so you can see how the UV overlaps. In this case, I used the option 'Unwrap' -> 'Reset' to get this UV layout for this face. In Blender, you have a few options in your unwrap dialog.

<a class="ipsAttachLink ipsAttachLink_image" data-fileid="1644" href="<fileStore.core_Attachment>/monthly_2017_03/Channels_Pic03.jpg.08f662a629decd4349eee7275f9720c7.jpg">[img]<fileStore.core_Attachment>/monthly_2017_03/Channels_Pic03.thumb.jpg.0582f32a7dc26ec668078011bb7f4b0f.jpg[/img]</a>


Picture 4 - UVChannel_01 - Texture Example of 'Project from View' and a wall.

This is another example of a different type of blender unwrap, in this case 'Project form View'. You select the face of interest, in this case the wall, and while looking straight on in ortho view you project the UV exactly as you see it. Then, you scale the UV to make the material fit.

<a class="ipsAttachLink ipsAttachLink_image" data-fileid="1645" href="<fileStore.core_Attachment>/monthly_2017_03/Channels_Pic04.jpg.99336c8f8d0c702fa8eb88b6d1fd2583.jpg">[img]<fileStore.core_Attachment>/monthly_2017_03/Channels_Pic04.thumb.jpg.75b46ee1c9351a9f6a6669e5f665bcf7.jpg[/img]</a>


So that is an overview of different UV unwrapping I used to texture the model in UVChannel_01. Now we move on to the next channel.

Picture 5 - Making the 2nd UV Channel, UVChannel_02

1 - clicking the '+' under the UV Maps menu will create a new UV channel. In blender, it automatically calls this 'UVMap' or 'UVMap.001' depending on what you already have. I rename it to UVChannel_02. In 3DSMax, you change the channel you are viewing using the 'Channel' menu in the same place (See the image posted by ketchup in the previous post to compare). Change this to 'Map Channel :2'. You will get a warning asking you to either move or abandon. Don't worry! If you 'abandon', it basically will make the new channel start from fresh. If you choose 'move', it copy the UV lay out in the first channel to the second. You can see in blender, you don't get asked, it just automatically copies the UV lay out from the first channel.

<a class="ipsAttachLink ipsAttachLink_image" data-fileid="1646" href="<fileStore.core_Attachment>/monthly_2017_03/Channels_Pic05.jpg.2941a43cc0a299794d697d979bfdf23d.jpg">[img]<fileStore.core_Attachment>/monthly_2017_03/Channels_Pic05.thumb.jpg.cc70291c48f48c5806b479332d41a46f.jpg[/img]</a>



Note - You can have up to 99 UV channels in 3dsmax, I don't know how many in blender. Each face can be mapped onto each UV channel in a different way, so each channel can be used for different things such as texturing, lighting, AO etc. In this case, Banished only cares about the 1st and 2nd uv channels for buildings. The first is for the texture, the second is for the AO. ON each channel, the faces can be unwrapped in very different ways, and this is how...


Note - When you have more than 1 UV channel, any unwrapping that you do only occurs on the channel you are viewing. So if I am viewing UVChannel_01, any changes I make will not effect UVChannel_02, and vice versa.


<i>Picture 6 - UVChannel_02 - The 'Smart UV Project' for Ambient Occlusion.</i>

UVChannel_02 is highlighted in blue, which means this is the channel we are currently viewing. This is the channel that Banished reads to get the AO information. Here is an important note - the AO is not assigned to the model like a texture. Instead, what Banished does is read the 2nd UV channel to find the lay out of the faces, which will represent the layout of your baked AO image. It is basically using the 2nd channel to line up the faces with the image of the AO. This is why AO should be done last, and once it is done, don't change the UV wrap on channel 2! If you do, you'll end up with odd dark patches all over your model! (I'll show an example).

So Blender has an option to 'Smart Project' your UV wrap. First, I selected everything, then marked a seam on every edge which will make sure each face is separate. I then selected the 'Smart UV Project'. I'm not going to go into detail here, but basically this unwrap option means that each face is displayed on its own little island on the map, as you can see in this screenshot.

<a class="ipsAttachLink ipsAttachLink_image" data-fileid="1647" href="<fileStore.core_Attachment>/monthly_2017_03/Channels_Pic06.jpg.4d5aae921877263c51c4d2547b8ca870.jpg">[img]<fileStore.core_Attachment>/monthly_2017_03/Channels_Pic06.thumb.jpg.616af27b359f07297de72e6133f2345b.jpg[/img]</a>


Picutre 7 - UVChannel_02 - After the Bake

So we have smart unwrapped out model, and baked our AO (I wont go into detail of that here, it is for another time. If anyone wants me to write a blender bake tutorial, I'll be happy to oblige).

Blender automatically makes the AO bake a background for our UV map. See how the AO is lined up with the UV map? This is what Banished will look for. If we move into 'Texture' view in our model screen, we can the result of this.

<a class="ipsAttachLink ipsAttachLink_image" data-fileid="1648" href="<fileStore.core_Attachment>/monthly_2017_03/Channels_Pic07.jpg.1c2de4c3cecb715b0fceffe42a478890.jpg">[img]<fileStore.core_Attachment>/monthly_2017_03/Channels_Pic07.thumb.jpg.d863833dcbd1d7c7b7593576d910588d.jpg[/img]</a>


Picture 8 - Another view of the AO

<a class="ipsAttachLink ipsAttachLink_image" data-fileid="1649" href="<fileStore.core_Attachment>/monthly_2017_03/Channels_Pic08.jpg.f86aa904f120abdf214d45ac2d844675.jpg">[img]<fileStore.core_Attachment>/monthly_2017_03/Channels_Pic08.thumb.jpg.096230668c9d99f0b1c0e90c25ff1d92.jpg[/img]</a>


Picture 9 - Oops! I changed up the UV Wrap in UVChannel_02, now we have some funky shading!

<a class="ipsAttachLink ipsAttachLink_image" data-fileid="1650" href="<fileStore.core_Attachment>/monthly_2017_03/Channels_Pic09.jpg.f23bc9d8a080cf0305ec772846503f46.jpg">[img]<fileStore.core_Attachment>/monthly_2017_03/Channels_Pic09.thumb.jpg.5d3c1b88d4b8b3be7c6dc944efec112f.jpg[/img]</a>




<a contenteditable="false" data-ipshover="" data-ipshover-target="<___base_url___>/index.php?/profile/3183-ketchup/&do=hovercard" data-mentionid="3183" href="<___base_url___>/index.php?/profile/3183-ketchup/">@Ketchup</a> So that is all I can think of to explain the different channels. Export your model with these channels like this, and the AO.png separately. It doesn't have to be 'assigned', Banished will do that... in fact you do that in the 'Models/HouseMesh.rsc' when you tell it what AO to look for. All Banished does is use the UV map in Channel 2 as a guide to where the shading is in the AO.png.



I hope that helps, or I just told you everything you already know in which case I'm sorry!


thanks you @Necora [img]<fileStore.core_Emoticons>/emoticons/smile.png[/img]/emoticons/smile@2x.png 2x" title=":)" width="20" /> Thanks you.

gonna check tommorow and see we what i can do in 3dsmax to try to get the same results because when i provide an AO file to banished.... it is no spectacular effect and change as you guys do.


[img]<fileStore.core_Emoticons>/emoticons/smile.png[/img]/emoticons/smile@2x.png 2x" title=":)" width="20" /> thank you <a contenteditable="false" data-ipshover="" data-ipshover-target="<___base_url___>/index.php?/profile/5518-necora/&do=hovercard" data-mentionid="5518" href="<___base_url___>/index.php?/profile/5518-necora/">@Necora</a>,

I was always wondering why sometimes I baked the AO it worked correctly and others it didn't. Now I know why, I didn't realize the importance and the benefits of the other UV channels.

I re-did my Celtic house model with proper AO and the results speak for themselves:

(top is before, bottom is with new AO)

[Image: 3t3Pz9H.jpg]