logo
Main

Forums

Downloads

Unreal-Netiquette

Donate for Oldunreal:
Donate

borderline

Links to our wiki:
Wiki

Walkthrough

Links

Tutorials

Unreal Reference

Usermaps

borderline

Contact us:
Submit News
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Add some wiggle to plants (Read 316 times)
gopostal
Betatester
Offline


Hack coder

Posts: 942
Joined: Jul 31st, 2008
Gender: Male
Add some wiggle to plants
Jan 21st, 2019 at 3:41pm
Print Post  
I've been working through the tree classes adding effects and environment for my coop server. I'm now on the low plants, the scrubby stuff shorter than the player stands.

I'm doing a full replace so I'm not limited in what I can do (bstatic). Is there a way to tweak the plant mesh so that I can add the effect that you brushed past the plant? I don't want to alter it forever, just add some movement (and some rustling sounds) to it as you touch past it and your velocity is high. I can't animate so is there a way to just wiggle the thing via script?
  

I don't want to give the end away
but we're all going to die one day
Back to top
 
IP Logged
 
Skywolf
Betatester
Offline


Just placeholding...

Posts: 832
Joined: Aug 2nd, 2009
Re: Add some wiggle to plants
Reply #1 - Jan 22nd, 2019 at 11:19am
Print Post  
This is something I thought about doing myself. But my lack of scripting skills never made me actually implement it. A few ways I considered doing this:

There is something called pocedural meshes, which is used by the water surface class that has a grid mesh deform when the player touches it to create waves. But not sure if and how you could apply something like this to regular meshes though.

Not sure if this is possible but my idea was to try to create a simple skeletal mesh and then move the bones around from script to match the direction the player is walking into. For bushes and small plants it could consist of two bones. One root at the bottom and one controlling the leafs on top. For more complex plants like the palm trees a more complex skeleton would the required.

If you can't control bones directly from script will pre-made animation be your only option. I would try to make multiple animations with the leafs moving in 4 or 8 directions and picking the right one depending on the player's velocity vector. Animations could just be 1 frame for each direction using tweening to make up the smooth motion. I would make these vertex meshes to allow for more convincing folding of leafs.

If you can't animate it you could try to make sure the root of the meshed are at the base of the leafs and then just rotate the mesh a bit back and forth when the player walks over it. Not the most convincing way of doing things but with some added particle emitters to spawn some leafs could it still look pretty decent.
  

I hate it when people ask me what my favorite game is. Just try to explain you're not talking about Unreal Tournament Roll Eyes.
Back to top
 
IP Logged
 
gopostal
Betatester
Offline


Hack coder

Posts: 942
Joined: Jul 31st, 2008
Gender: Male
Re: Add some wiggle to plants
Reply #2 - Jan 22nd, 2019 at 2:10pm
Print Post  
I ran a few tests yesterday and added small movement in rotation, pitch, yaw, roll, etc via both tick and timer. None of it looks good at all, it just looks like the mesh is glitched somehow.

Bleeder suggested the same thing about adding "surfaceoscilationinfo" though I couldn't find much about this and I have no idea how to implement it. Not sure that's going to look convincing either.

I may just bite the bullet and learn to do simple animation in Blender. The basic plant just needs a couple of 3 or 4 frame movements and maybe a lay-down for getting trampled/blasted. Aside from this I'm not sure there exists a good solution.
  

I don't want to give the end away
but we're all going to die one day
Back to top
 
IP Logged
 
Skywolf
Betatester
Offline


Just placeholding...

Posts: 832
Joined: Aug 2nd, 2009
Re: Add some wiggle to plants
Reply #3 - Jan 22nd, 2019 at 5:23pm
Print Post  
FluidSurfaceInfo is written in native C++. So it would be difficult to modify it to make it suit your needs.

Can't find anything about being able to script bone animations (although finding any documentation about UE1 is difficult). So it seems that pre-made animations are the only way to do things. Iirc there was an UE1 game that did have bushes shake when you walked over them but even in that game this was just one simple preset animation and thus nothing complex.

If you need help with with animating in Blender you can always ping me on Discord. You know where to find me. Wink
  

I hate it when people ask me what my favorite game is. Just try to explain you're not talking about Unreal Tournament Roll Eyes.
Back to top
 
IP Logged
 
gopostal
Betatester
Offline


Hack coder

Posts: 942
Joined: Jul 31st, 2008
Gender: Male
Re: Add some wiggle to plants
Reply #4 - Jan 23rd, 2019 at 4:40am
Print Post  
Thank you so much! I probably will have a question or two but I try to be careful to not be annoying to people. Been putting off modelling for years, it's about time to get that out of the way.

Would you rig these with a skeleton or just make mesh animations?
  

I don't want to give the end away
but we're all going to die one day
Back to top
 
IP Logged
 
Skywolf
Betatester
Offline


Just placeholding...

Posts: 832
Joined: Aug 2nd, 2009
Re: Add some wiggle to plants
Reply #5 - Jan 23rd, 2019 at 3:35pm
Print Post  
Personally would go for mesh animation. Vegetation is generally speaking pretty low poly and for this purpose you don't need a lot of animation frames. It also gives you more freedom with folding an waving the leafs. Something that would require quite a lot of bones to be done with a skeletal mesh. Defeating the whole advantage of using that.

See it as doing a cloth animation using a skeletal mesh. It can be done but is easier if you could just animate the vertices directly.
  

I hate it when people ask me what my favorite game is. Just try to explain you're not talking about Unreal Tournament Roll Eyes.
Back to top
 
IP Logged
 
dustinechoes849
Senior Member
****
Offline


General Protection Fault!

Posts: 348
Location: /home/dustinechoes849/unreal/
Joined: Feb 28th, 2015
Gender: Male
Re: Add some wiggle to plants
Reply #6 - Mar 11th, 2019 at 8:59pm
Print Post  
you could just slap together an animation in milkshape 3d Cheesy
  


don't bother trying to message me over AIM, I haven't used that in years lol
I have a Discord, the number thingie is #6413
Back to top
IP Logged
 
Dr.Flay™
Senior Member
****
Online


ChaosUT-333networks

Posts: 378
Location: Kernow, UK
Joined: Dec 9th, 2012
Gender: Male
Re: Add some wiggle to plants
Reply #7 - Mar 12th, 2019 at 1:54am
Print Post  
Feel free to borrow the reactive vegetation from Chaos. They mostly suit Earth based maps as they are based on real plants, but will work in many themes.
  
Back to top
IP Logged
 
han
Global Moderator
Unreal Rendering Guru
Developer Team
*****
Offline


Oldunreal member

Posts: 594
Location: Germany
Joined: Dec 10th, 2014
Gender: Male
Re: Add some wiggle to plants
Reply #8 - Mar 13th, 2019 at 6:35pm
Print Post  
I'm just thinking how well it would look to just import into Max or whatever, and just apply some bend modifier and see how that looks...
  

HX on Mod DB. Revision on Steam. Löffels on Patreon.
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo