News:

Welcome to World of Banished!

Main Menu

Changing trees in the naturalresourcetree file... animations??

Started by Necora, March 21, 2017, 03:56:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Necora

Good eve all (at least, those on the Atlantic seaboard).

I am trying to replace the vanilla trees with my own, by modifying the NaturalResourceTree.rsc to link to my meshes rather than the vanilla meshes. It seems to work fine, for about 20 seconds into a new game when I get a crash. The first crash, something about not enough nodes to update. I figured it was something to do with tree animations, so took that line out of the template file. Same timing for a crash, but this time a fatal access violation with little information. The crashes seem to occur when the leaves are due to appear, but that might be just coincidental.

My tree files have no animation in them, because I could not figure out how to do it from the fig example. Is this why they will not work as natural resources? They work as decorations just fine, and they work when spawned by the forester just fine, but not as a replacement for vanilla trees.

Any help would be appreciated...

kid1293


No help, just sympathy.
I've been there for a long time. I was making trees and many times,
again and again I tried to adopt the fig tree animation to my trees.
I tried to remodel the fig tree. I edited the crap out of the rsource files.
Same experience - 20 seconds then crash.
There is something with animation that I don't understand.
There was a mod that made the trees not animate. I didn't test it but I thought about it.
Maybe the animation of an old tree falling down can be somewhere in the code.
Maybe just my bewildered brain playing tricks but I have no solution.  :(

Necora

@kid1293 thanks, it is so annoying! The strange thing is that the animations code in the NaturalResouceTree.rsc is calling only for the oak mesh for all trees... so I don't know why it doesn't work just replacing my own mesh in there, but why it works for the vanilla pine and birch. Unless it is one of those things that we're not aloud to do anything with. I tried using the wake particle from the trader boat for something else once but it would either refuse to build, even if I copied all files into my own folder, or eventually crash in game.

kid1293


;D I thought of making a glowing magical house with crop infestion.
We're crazy, you know. Trying to make a game real.


I bid you good night. Tomorrow is UV mapping and AO mapping (thanks)


RedKetchup

you took that line out .... but did you closed the animations from your resource file ?

   bool _animated = false;


because if you let the animations ON then you ll need to make all the animations: from frame 1 to 80 the tree is falling one side till at 75 degrees and then from 81 to 150 the trees go down under the ground line level.

you cant let it ON and not ask certain trees have some anim and some doesnt have.
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Necora

@kid1293 sorry about that, or maybe not...  ;)

@RedKetchup you are a GENIUS. Thank you. Now my trees are taking over the map!!!


RedKetchup

Quote from: Necora on March 21, 2017, 06:30:48 PM
@kid1293 sorry about that, or maybe not...  ;)

@RedKetchup you are a GENIUS. Thank you. Now my trees are taking over the map!!!

np :)
we help each other all the time :)

your forest is looking so great !!!
can you tell me each tree has how many poly and triangles ?

they are looking so awesome , i dont see the purpose anymore of all my things i am making lately... (out of learning) ^^
mine have all between 1500 and 5000 :(
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Necora

@RedKetchup  Well let's have a look... I have not yet gone through and seen if i can reduce them in anyway, that needs to be done now I've got them looking OK.

Small maple variant = 488 faces/952 triangles
Large maple variant = 401 faces/790 triangles

Birches range from 410 faces/796 triangles to 616 faces/1,220 triangles

Aspens range from 308 faces/610 triangles to 546 faces/1,068 triangles

All 4 firs have the same, 343 faces/676 triangles

Spruce range from 205 faces/400 triangles to 325 faces/640 triangles

And the white pines 720 faces/1,386 triangles to a whopping 1,916 faces/3,706 triangles.

Most are OK, I would aim for less than 500, but would not mind a few bellow 1,000. Most need some pruning, especially that monster of a white pine.

RedKetchup

maybe the 1,916 faces/3,706 triangles....

everything else dont touch them that more less than expected !!
mine have 1500-5000 !! and i cannot do better . i see nothing cause all these stupid planes. i get headache asap i try to understand what i am seeing :(

so if these number are ... thats super fine and in game they look gorgeous :)
i guess i ll go do something else ^^

but still happy of all these testings :)
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Necora

@RedKetchup how do you make yours? The maples initially were a real pain, I want crazy on the leaves and so had so many faces I ended up scrapping the whole thing and starting again.

The way I did this version, was to start off with a simple 6 sided cylinder extended a few times to make the trunk.

Then I put that to the side, and made a new object that consisted of 1 face, loop cut a few times for a but of curve, then give it a branch texture. Those trees you made and showed, the high def willow, I made the same thing using the sap generator in blender. I gave it a bark texture, then rendered it for the image which I use as the branch texture in this tree. I then put a few simple faces around it, for leaves.

Then, in object mode, I take the branch/leaf object, duplicate it, and each time arrange it around the trunk. I find it easier to keep all branches in objects, then join them all together at the end when they are in the right place. That way you don't get overwhelmed by hundreds of faces in 1 object and can easily adjust individual branches when they are separate objects. Unfortunately, I forgot to save these when I joined them all together, so pruning now will be a headache  :-[

I could probably save some triangles by merging the leaves and branch into 1 texture, then just subdividing it a few times, but that might loose too much of the definition in the tree. It just doesn't look so good when all of the branches are relatively flat.



RedKetchup

bah i was using a special feature in 3dsmax to make foliage. that tool is great but does alot of poly. i deleted everything i made. really not satisfied.

or i abandon all that or i decide to make a pack which we can call it "high rez" i think with meshes between 3500 and 5000. and it would ask to warn people they need a very good computer to handle these :P
i cannot do better. the thing is i am getting headach with all these stupid planes everywhere. if at least they would show only the leaves and let the transparent parts of the .png being invisible.... maybe i would see something :P
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

kid1293

Good Morning!

Yes @RedKetchup I took that line out and I have made several trees with billboards
that replace the vanilla trees. No crash, but they are not animated!  >:(
That was what I tried to say. I simply can not make ANY animation work in Banished.
It won't compile, or if it does there's been so much editing of the mesh that it does not work.

RedKetchup

i think it has to do with a root thing. it seems to call** the "root" instead of "mesh"
maybe it can be the problem ?


** EDIT : fixed a typo sorry happends to me too often
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Bartender

@kid1293 are you using Blender by chance? I have noticed that blender does not import and/or export the animations correctly with fbx files. It's probably something with the settings, but I have no idea how to fix it.

kid1293


@Bartender - Yes I use Blender and I have had several problems
which I have found ways to go around, but animations...
That's a completely different thing. It is not Blender only who is to blame.
It seems like Luke has his very own approach to animations.
I can not rig a mesh, but with already set models the modkit does not compile the code.

There are different ways to animate. Luke uses a bottom plane (or planes)
to have as reference points for motion. And somehow the root bone is not standard.
That can be Blender. I have no experience.
You are welcome to try. Even the smallest progress with animations can clear the way
for using them in Banished. First I'm thinking windmills and water mills. And a lot of
animals waiting to come alive.

Another thing is where to put the code. Luke has not left any insert points so we are
probably left with animating things all the time. There are no on/off switches.
I wish for a script language to be used with Banished where things could be called based
upon certain criteria.