moving with the wind
#6


I posted this originally in another thread and will bring it here...




Hi guys,




 




So <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> I am by no way any good at modelling and am still figuring it out but I might be able to help you with the swaying of the leaves. I managed to do it with my trees and was very excited to see them sway in game. It is down to your UV maps. If you look at the model of the fig tree example, it has 3 UV channels. 'UVChannel_01' is your texture mapping, 'UVChannel_02' is your AO, and 'UVChannel_03' is the swaying. 




I'll show you the spruce tree. So we have three UV channels for our tree.




<a class="ipsAttachLink ipsAttachLink_image" data-fileid="1561" href="<fileStore.core_Attachment>/monthly_2017_03/Spruce01.jpg.dcfbbbdc02772d666aba08aafb7a3ccc.jpg">[img]<fileStore.core_Attachment>/monthly_2017_03/Spruce01.thumb.jpg.718adb135d0e73d978b326effbbf7eba.jpg[/img]</a>




 




The first UV channel is for the texturing. In this tree, I've used two materials, one for bark and one for branches. I've scaled the tree trunk rather large to make the bark look detailed... in vanilla trees it is very stretched.




<a class="ipsAttachLink ipsAttachLink_image" data-fileid="1562" href="<fileStore.core_Attachment>/monthly_2017_03/Spruce02.jpg.85e81ad4a88e929e76801445f79711df.jpg">[img]<fileStore.core_Attachment>/monthly_2017_03/Spruce02.thumb.jpg.5631d8369663445aeba41b561be3b3ca.jpg[/img]</a>




 




The second is for the AO. I've used the 'Smart Project' unwrap to get this, then baked the OA.




<a class="ipsAttachLink ipsAttachLink_image" data-fileid="1563" href="<fileStore.core_Attachment>/monthly_2017_03/Spruce03.jpg.c01bac157388eee14d39a64254088ebc.jpg">[img]<fileStore.core_Attachment>/monthly_2017_03/Spruce03.thumb.jpg.356590893d877dfaae82ba3828155a91.jpg[/img]</a>




 




The third UV channel is for the swaying. There are two things to note. In this, I have used 'Reset' unwrap to make all of the branches a square, piled on top of each other, filling the whole UV map. My branches in this example are only 1 face each, I've not yet tried doing more but that is what I want to do next.




<a class="ipsAttachLink ipsAttachLink_image" data-fileid="1564" href="<fileStore.core_Attachment>/monthly_2017_03/Spruce04.jpg.e789bd19588e4f5e39eb0bd2df98777c.jpg">[img]<fileStore.core_Attachment>/monthly_2017_03/Spruce04.thumb.jpg.e5c336529f922b8b94af7054d66b2f71.jpg[/img]</a>




 




If we zoom in on this one, that dot is my tree trunk. This makes it not sway in the wind! I added this channel last, so the only way I could do this was to scale the UV coordinates down until they were all on one spot.




<a class="ipsAttachLink ipsAttachLink_image" data-fileid="1565" href="<fileStore.core_Attachment>/monthly_2017_03/Spruce05.jpg.99b2c46384b4bbe6c27bffa1b571c077.jpg">[img]<fileStore.core_Attachment>/monthly_2017_03/Spruce05.thumb.jpg.7805f3306d9393f94ab27961421e1769.jpg[/img]</a>




 




 




And that is pretty much it.




 




As for the leaves dropping, I think this is the 'BillboardMaterial' that is referred to in the 'Models/MaterialInstance/FigTree.rsc' of the example file...



Code:
MaterialInstance resource
{
    Material _material = "Material\Billboard\BillboardMaterial.rsc";
    Texture _textures
    [
        {
            String _name = "diffuse";
            ImageBuffer _texture = "Models\MaterialInstance\FigTreeTexture.rsc";
        }
    ]
}



I used this for my maple and aspen and the leaves appear in spring, sway, always face camera, and disappear in winter. Again, I think this reads the 3rd UV channel, so you have to have the tree trunk at 0'0'0 otherwise it will also sway and disappear... maybe. I might go to 2 materials for the maple and apsen to make the leaves look better because I don't like how they look in game at the moment.




Oh and the billboard material also makes them change colour in the autumn... it made mine change and I never did anything for it so it must be this.




There is a camera, target, and armature in the scene of the fig tree example, I have no idea if this does anything, but I decided to keep all of those things in my files just in case.




As for the Spruce, that uses the 'Models/Trees/MaterialInstance/PineTree01.rsc'  from the Resource file in the mod kit.



Code:
MaterialInstance resource
{
    Material _material = "Material\Foliage\FoliageMaterial.rsc";
    Texture _textures
    [
        {
            String _name = "diffuse";
            ImageBuffer _texture = "Models\Trees\MaterialInstance\PineTree01Texture.rsc";
        }
        {
            String _name = "snow";
            ImageBuffer _texture = "Terrain\TerrainSnowTexture.rsc";
        }        
    ]
    Constant _constants
    [
    ]
}



I think the 'FoliageMaterial' makes them sway but not disappear and grow during the seasons.




 




<a contenteditable="false" data-ipshover="" data-ipshover-target="<___base_url___>/index.php?/profile/11115-bartender/&do=hovercard" data-mentionid="11115" href="<___base_url___>/index.php?/profile/11115-bartender/">@Bartender</a> I agree with <a contenteditable="false" data-ipshover="" data-ipshover-target="<___base_url___>/index.php?/profile/10211-jesta/&do=hovercard" data-mentionid="10211" href="<___base_url___>/index.php?/profile/10211-jesta/">@jesta</a>, I don't think you need spheres. Try using a dome instead? You could probably cut out some faces and not loose any visual detail.


  Reply


Messages In This Thread
moving with the wind - by Ketchup - 03-06-2017, 01:50 AM
moving with the wind - by Kralyerg - 03-06-2017, 05:36 AM
moving with the wind - by Ketchup - 03-06-2017, 05:39 AM
moving with the wind - by Necora - 03-06-2017, 05:39 AM
moving with the wind - by Ketchup - 03-07-2017, 11:52 AM
moving with the wind - by Necora - 03-17-2017, 09:39 AM
moving with the wind - by Bartender - 03-17-2017, 10:30 AM
moving with the wind - by Necora - 03-17-2017, 10:35 AM
moving with the wind - by Necora - 03-17-2017, 11:36 AM
moving with the wind - by Ketchup - 03-17-2017, 12:17 PM
moving with the wind - by Necora - 03-17-2017, 01:46 PM
moving with the wind - by Ketchup - 03-17-2017, 03:16 PM
moving with the wind - by Bartender - 03-17-2017, 03:19 PM
moving with the wind - by Necora - 03-17-2017, 03:35 PM
moving with the wind - by Necora - 03-17-2017, 03:37 PM
moving with the wind - by Ketchup - 03-17-2017, 03:43 PM
moving with the wind - by Ketchup - 03-17-2017, 03:47 PM
moving with the wind - by Ketchup - 03-17-2017, 03:53 PM
moving with the wind - by Necora - 03-17-2017, 04:02 PM
moving with the wind - by Necora - 03-17-2017, 04:17 PM
moving with the wind - by Ketchup - 03-17-2017, 04:32 PM
moving with the wind - by Ketchup - 03-17-2017, 04:41 PM
moving with the wind - by Necora - 03-17-2017, 04:53 PM
moving with the wind - by Ketchup - 03-17-2017, 05:07 PM
moving with the wind - by Necora - 03-17-2017, 05:09 PM
moving with the wind - by Ketchup - 03-17-2017, 05:13 PM
moving with the wind - by Necora - 03-17-2017, 05:17 PM
moving with the wind - by Ketchup - 03-17-2017, 05:24 PM
moving with the wind - by Necora - 03-17-2017, 05:33 PM
moving with the wind - by Ketchup - 03-17-2017, 05:41 PM
moving with the wind - by Necora - 03-17-2017, 05:42 PM
moving with the wind - by Necora - 03-17-2017, 05:43 PM
moving with the wind - by Necora - 03-17-2017, 05:45 PM
moving with the wind - by Ketchup - 03-17-2017, 05:53 PM
moving with the wind - by Ketchup - 03-17-2017, 05:54 PM
moving with the wind - by Necora - 03-17-2017, 05:56 PM
moving with the wind - by Necora - 03-17-2017, 06:01 PM
moving with the wind - by Ketchup - 03-17-2017, 06:01 PM
moving with the wind - by Ketchup - 03-17-2017, 06:02 PM
moving with the wind - by Ketchup - 03-17-2017, 06:11 PM
moving with the wind - by Necora - 03-17-2017, 06:18 PM
moving with the wind - by Ketchup - 03-17-2017, 06:26 PM
moving with the wind - by Necora - 03-17-2017, 06:27 PM
moving with the wind - by Ketchup - 03-17-2017, 06:46 PM
moving with the wind - by Ketchup - 03-17-2017, 07:03 PM
moving with the wind - by Necora - 03-17-2017, 07:08 PM
moving with the wind - by Necora - 03-17-2017, 07:12 PM
moving with the wind - by Necora - 03-17-2017, 07:23 PM
moving with the wind - by Ketchup - 03-17-2017, 07:27 PM
moving with the wind - by Necora - 03-17-2017, 07:45 PM
moving with the wind - by Necora - 03-17-2017, 07:50 PM
moving with the wind - by Necora - 03-17-2017, 07:55 PM
moving with the wind - by Necora - 03-17-2017, 08:40 PM
moving with the wind - by Ketchup - 03-18-2017, 03:32 AM
moving with the wind - by Ketchup - 03-18-2017, 05:38 AM
moving with the wind - by Ketchup - 03-18-2017, 05:47 AM
moving with the wind - by Necora - 03-18-2017, 06:26 AM
moving with the wind - by Ketchup - 03-18-2017, 06:33 AM
moving with the wind - by Ketchup - 03-18-2017, 08:29 AM
moving with the wind - by Ketchup - 03-18-2017, 08:37 AM
moving with the wind - by Discrepancy - 03-18-2017, 04:00 PM
moving with the wind - by Necora - 03-18-2017, 04:50 PM
moving with the wind - by Ketchup - 03-19-2017, 08:09 AM
moving with the wind - by Necora - 03-19-2017, 08:37 AM
moving with the wind - by Ketchup - 03-19-2017, 12:42 PM
moving with the wind - by Necora - 03-19-2017, 02:08 PM
moving with the wind - by Ketchup - 03-19-2017, 04:43 PM
moving with the wind - by Ketchup - 03-19-2017, 05:52 PM
moving with the wind - by Necora - 03-19-2017, 06:22 PM
moving with the wind - by Ketchup - 03-19-2017, 06:25 PM
moving with the wind - by Necora - 03-19-2017, 07:41 PM
moving with the wind - by Ketchup - 03-19-2017, 08:05 PM
moving with the wind - by despo20 - 03-20-2017, 02:13 AM
moving with the wind - by jesta - 03-20-2017, 04:42 AM
moving with the wind - by Necora - 03-20-2017, 06:55 AM
moving with the wind - by Necora - 03-20-2017, 09:56 AM
moving with the wind - by ShockPuppet - 05-14-2017, 05:17 PM
moving with the wind - by Ketchup - 05-14-2017, 07:42 PM
moving with the wind - by ShockPuppet - 05-14-2017, 08:15 PM
moving with the wind - by despo20 - 05-15-2017, 01:18 AM