Jump to content

Need Blender Help Please!


Recommended Posts

Hey,

So I am new to Blender although I have some background in Computer Science and computer use in general. I am currently trying to work on this ticket 1017 but I am quite stuck in the abyss that is Blender. Just wondering if anyone was willing to chat with me about the exact steps I'll need to complete this task (we can chat in the IRC if we set a date to do it). I generally learn things pretty slow, hence me asking for help here despite having watched a ton of tutorials about Blender and whatnot. Please only offer help if you are willing to, as I don't want to waste any ones time with this since its not a very important fix for the game (that's the very reason I am working on it, since I can fight with it for a couple months :)). I think I have harassed bruno, philip, and feneur about this to some extent, but I don't want to bother them anymore.

I guess I should also say that I am NOT looking to become an expert in blender since I am by no means an artist; rather, I want to just worth with the existing stuff and try to tackle the ticket above. I think philip's idea of making the tree rotate 90 degrees might work since from what I understand its kind of like "cropping" (so to speak, since you can't just do that) the tree right above the bottom (to leave part for a stump) then you just gotta do some magic with a falling sequence/animation of some kind.

Try to keep your answers to ones that you can help me directly please (i.e. posting links to blender tutorials probably won't help since my head might explode ;)).

Appreciate any help for my nooby self though.

Edited by fiasco
Link to comment
Share on other sites

I think for this task you won't need to use blender very much. I am not experienced with blender so I won't try and help you there, you can work on animation without tree stumps without touching the models though so I will try and give some pointers for that.

For the animation it would be simplest to do this in the code. So you just keep the same geometry and rotate the object in the game world. For a rough example of what this looks like I added a rotation into the render code which gave this http://i.imgur.com/TBYrW.jpg picture. I don't think it will be necessary to crop the trees, adding a tree stump would be good, but I don't think anyone will notice the growth of a felled tree and it saves modifying tree models.

This idea is currently used for building destruction, the code is in source/simulation2/components/CCmpDecay.cpp. Helpful pages related to the components system are found at http://trac.wildfire...ionArchitecture and http://svn.wildfireg...om/entity-docs/. You will probably need to interface with binaries/data/mods/public/simulation/components/ResourceSupply.js, it seems to be sending a message whenever the resource amount changes already so you should just be able to listen to that to determine when the tree should fall down.

It would be best if you can keep the changed fairly self contained in a single component, this keeps the source tidy.

It might be possible to do this in javascript, i am not sure whether the necessary components (CmpPosition seems to be the main one) are exposed, it says on the simulation architecture page that javascript is preferred when possible.

Hopefully that is helpful, I am not very experienced with the code myself since I have mainly just worked on AI so hopefully I haven't mislead you. If you have any other questions don't be afraid of asking, if people are too busy then they can always ignore it ;).

Link to comment
Share on other sites

You will probably need to interface with binaries/data/mods/public/simulation/components/ResourceSupply.js, it seems to be sending a message whenever the resource amount changes already so you should just be able to listen to that to determine when the tree should fall down.

That's what I was thinking and it would be a good start. Then we'd need to add some nice effects like a "tree falling" sound, maybe some leaf/dust particles, and adjust the worker's position and animations so they chop down into the fallen tree instead of attacking the air. I don't know whether it should work like AOK, where you have to chop down the tree before gathering, probably by reducing HP to 0 (that sounds like a pain to allow trees to be attacked), or whether the falling should take place when a fixed percentage of the resources have been gathered. Even though we have different shapes and types of trees, it might be good enough to just use the same behavior for each, not worrying about slight visual differences (cypress vs. baobab) since it's just an approximation.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...