Page 1 of 1
falling leafs from a tree HELP!
Posted: Mon Dec 16, 2019 7:20 pm
by Ginev
So i am making a forest map and i remembered yeaaaars ago that i played (i dont remember) some of the original BF1 or 2 maps and there i saw small leafs falling from the trees.I found the texture its called leaf.tga but i do not know how to put it on my tree.I have my own custom trees with hardpoints but i do not know how to implement them.I added godrays,leafpatches which are basically big bushesh imitating tree leafs with branches but i do not know how to add falling small leafs.If someone know please help me i spend literaly 4 hours trying/looking.Could it be a .fx file (effect) ?
Re: falling leafs from a tree HELP!
Posted: Tue Dec 17, 2019 2:29 pm
by AnthonyBF2
I think that the loose leafs that float around are not from trees, they are just random, operating in a similar manner as the fish and birds. Check the Dagobah assets, you will see the leaf texture and you will see the leaf in dag1.req
Re: falling leafs from a tree HELP!
Posted: Tue Dec 17, 2019 3:55 pm
by Ginev
Thanks for pointing that out friend.I really apreciate it.I checkd all of the files and the lua but i cannot find what is actually making them spawn.I looked ingame for the maps Yavin4 and Dagobah but the leafs are not there aswell.I think BF1 only used this feature.If someone have installed BF1 please go to maps like Naboo Plains,Kashyyyk or Yavin4 and check the trees if they spawn such falling leafs.
Re: falling leafs from a tree HELP!
Posted: Tue Dec 17, 2019 5:09 pm
by Teancum
From SWBF1's yav_prop_leafpatch.odf:
Code: Select all
[GameObjectClass]
ClassLabel = "leafpatch"
GeometryName = "hoth_prop_grass.msh"
[Properties]
Offset = "0.0 0.0 0.0"
HeightScale = "0.5"
MinSize = "7.0"
MaxSize = "8.0"
Alpha = "1.0"
NumParticles = "30"
MaxDistance = "1000"
Texture = "yav_leaf"
Radius = "12"
Height = "1"
MaxFallingLeaves = "6"
MaxScatterBirds = "3"
DarknessMin = "0.5"
DarknessMax = "1.0"
Key is MaxFallingLeaves = "6"
If that line does not exist it won't do the falling leaves trick. I haven't looked at the SWBF2 tools to see if it's there, but it's there in the SWBF1 tools. I can't imagine they'd take the feature out, but it might have broken between games. If you already have this line it must be busted.
Re: falling leafs from a tree HELP!
Posted: Wed Dec 18, 2019 6:49 pm
by Ginev
Yes Teancum i already found it and tested it.Ingame its giving me to moving piles of leafs that are used for the top of the trees.I think this feature is busted and broken in BF2...sadly.I was going to make such an amazing falling leaf effects but ohh well thank god we still have godrays
EDIT:It seems i will have to use some sort of particle effect or the dust effect with changed texture with leafs.
EDIT 2:
This is example from the CIS AAT.I have an idea.
CHUNKSECTION = "CHUNK1"
ChunkGeometryName = "cis_hover_att_Chunk1"
ChunkTerrainCollisions = "2"
ChunkTerrainEffect = "dirtspray"
ChunkPhysics = "FULL"
ChunkOmega = "1.0 2.0 1.0"
ChunkBounciness = "0.35"
ChunkStickiness = "0.45"
ChunkSpeed = "15"
ChunkUpFactor = "25"
ChunkTrailEffect = "com_sfx_chunktrail_sm"
ChunkSmokeEffect = "com_sfx_smokeplume"
ChunkSmokeNodeName = "hp_smoke"
The trick is to add this to a destroyable tree and to change the physics from FULL to LEAF. (I was reading all odf extensions and codes from a documentation about BF2)
I have not tested that yet but the idea is to shoot the tree and when its destroyed i will use the same not destroyed tree for destroyed model (the player won't notice) but when chunks start flying from the destruction they can be replaced with leaf models and when using this LEAF physics they may fall just likes..well leafs.I think this might work.When i test it i will say more
