Questions on animating environmental props in source 2007

Got problems with your models? Struggling with textures? Get help with your custom assets.

Questions on animating environmental props in source 2007

Postby Hawke on Sun Mar 17, 2013 3:23 am

I've got a couple of questions and I thought I would ask the repository of all Half Life 2 knowledge, the Gentlemen of Interlopers. If these topics have been covered elsewhere I apologise in advance.

Basically I'm heading up development on a mod based in Source 2007, and I'm wanting to update the graphics as much as I can. My main forte is modeling so that what I'm concentrating on for the moment. Specifically I've been plugging away on environmental models, trees, bushes etc.

Now the question. I want to be able to have trees swaying in a breeze. Nothing extreme since this is a multiplayer mod but some movement would be good. Now is this something that has to be animated, and if so would that involve bones? Or could I use a env_wind modifier in hammer?

Related to this is getting the detail sprites to move as well, to simulate wind blowing through grass. Any ideas on how that is done?

Thanks in advance.
User avatar
Hawke
Dumpling
Dumpling
 
Joined: Sun May 27, 2012 8:30 pm

Re: Questions on animating environmental props in source 200

Postby ErikKiller on Sun Mar 17, 2013 9:43 am

Hawke wrote:Now is this something that has to be animated, and if so would that involve bones?

Yes. I assume so.
Hawke wrote:Or could I use a env_wind modifier in hammer?

No.
Hawke wrote:Related to this is getting the detail sprites to move as well, to simulate wind blowing through grass. Any ideas on how that is done?

Not sure if it's ever been done in Source. Never seen anything like it.
Image
Image
First rodeo? Use the Source SDK Documentation for reference!
User avatar
ErikKiller
May Contain Skills
May Contain Skills
 
Joined: Sun Sep 09, 2007 4:05 pm
Location: Estonia

Re: Questions on animating environmental props in source 200

Postby Sathor on Sun Mar 17, 2013 9:46 am

You might be able to use an animated texture on simple grass stuff to simulate some movement, but I have no idea if that would look any good.
User avatar
Sathor
Senior Member
Senior Member
 
Joined: Sat Jan 20, 2007 10:31 pm
Location: Germany

Re: Questions on animating environmental props in source 200

Postby Mehis on Sun Mar 17, 2013 12:40 pm

You can make detail sprites sway from the whatever.vbsp in your gamefolder.
There's even a tutorial about: http://www.interlopers.net/tutorials/33402

Swaying props need to be animated. There are probably some modifiers for 3ds max and other modelling programs that mimic wind.
User avatar
Mehis
Regular
Regular
 
Joined: Fri Jan 28, 2011 8:41 pm

Re: Questions on animating environmental props in source 200

Postby Epifire on Sun Mar 17, 2013 4:10 pm

If I am correct though you could theoretically simulate realistic wind if you could toggle the wind animation to turn on and off from the actual wind entity in Hammer. Therefore you could combine a lot of your wind properties all into one controller, unifying your wind effects.

Now of course your trees need animations that would go accordingly but done right it should look pretty good when finished.
Image
User avatar
Epifire
Senior Member
Senior Member
 
Joined: Fri Mar 25, 2011 8:54 pm
Location: Minnesota, where you're froze 24/7

Re: Questions on animating environmental props in source 200

Postby Plague on Mon Mar 18, 2013 3:54 am

In terms of getting the model to react to the env_wind you can't do it straight up.
Your best bet is an idle swaying motion, which is just an animated model naturally.

If you wanted to get complex, you could potentially add the support for "wind physics" on top of the existing jigglebone system. I'd assume this would be difficult, although something could be taken from the rope entities which can interact with env_wind's if I recall right.

Depends on the situation I suppose.
Contact. The EU welcomes the pain free. That's emotional impact.
I actually think limitation is good for creativity. If we had an engine that could do everything, we would be in trouble. It gives us focus. ~~ Randy Lundeen
User avatar
Plague
Veteran
Veteran
 
Joined: Tue Jun 22, 2010 7:12 pm

Re: Questions on animating environmental props in source 200

Postby Gary on Mon Mar 18, 2013 4:01 am

CSGO used a shader to make their trees' leaves sway. That way they could move and still be a prop static.
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Questions on animating environmental props in source 200

Postby Hawke on Mon Mar 18, 2013 5:10 am

Thanks for the replies all, I can see I have my work cut out for me.

CSGO used a shader to make their trees' leaves sway. That way they could move and still be a prop static.


Any idea if that system would work in 2007? It seems like they added a few bells and whistles to CS:GO that aren't exactly doable elsewhere.
User avatar
Hawke
Dumpling
Dumpling
 
Joined: Sun May 27, 2012 8:30 pm

Re: Questions on animating environmental props in source 200

Postby Black_Stormy on Wed Mar 20, 2013 8:41 am

I think if you have access to the vertex shaders you should be able to make the leaves sway, it's not a particularly new feature. You may need to educate yourself on them a bit first though.

As for animating the tree, your best bet will be to rig and animate it in your modelling program and then export the animation as the idle animation. Try to use as few bones as possible, keyframing tends to get expensive AFAIK.
User avatar
Black_Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Re: Questions on animating environmental props in source 200

Postby Hawke on Thu Mar 21, 2013 7:32 am

Hmm, vertex shaders sounds the most promising. Am I correct in assuming that vertex shader animation, and flex animation is the same thing?

In any event I see I have my homework cut out for me. If I get any decent looking results I'll post them up here.
User avatar
Hawke
Dumpling
Dumpling
 
Joined: Sun May 27, 2012 8:30 pm

Re: Questions on animating environmental props in source 200

Postby Black_Stormy on Thu Mar 21, 2013 11:30 am

Negative. Vertex shaders that manipulate the vertexes are defined in code (in the vertex shader file) and flexes are defined by pre-set meshes. It's like cheese and chalk. Keyframing is yet another sort of animation, where meshes are rigged to bones and animated using keyframes. It's too much to explain right now but as you look into it you'll get the idea.
User avatar
Black_Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Re: Questions on animating environmental props in source 200

Postby Hawke on Thu Mar 21, 2013 10:46 pm

Black_Stormy wrote:Negative. Vertex shaders that manipulate the vertexes are defined in code (in the vertex shader file) and flexes are defined by pre-set meshes. It's like cheese and chalk. Keyframing is yet another sort of animation, where meshes are rigged to bones and animated using keyframes. It's too much to explain right now but as you look into it you'll get the idea.


Ah I understand now.

Apparently someone already did exactly what I want to do.


However, while I feel I understand the basic concepts now, I have no idea how to translate it into real work. I understand static models, planes on the models for leaves but how do I use vertex coding to get them to move? If you can help point me in that direction I would be very indebted to you. Coding is rather above my head.
User avatar
Hawke
Dumpling
Dumpling
 
Joined: Sun May 27, 2012 8:30 pm

Re: Questions on animating environmental props in source 200

Postby kraid on Mon Apr 01, 2013 12:48 pm

Since you possibly will need a lot of grass, adding it as animated models isn't a good idea at all.
Such things are usually done with vertex shaders, at least in Unity or UDK and other engines supporting this by default.
In source you'd need to write your own custom shader for this.

As for the Trees, it depends on a few more things.
If the whole tree should sway, including the branches, it should be an animated model.
If swaying of the leaves is enough, then it might be doable with the same custom vertex shader as well.

One issue i see is how to determin the wind direction within the shader, since i don't know if reading it from the entity is possible in source. So it might be neccessary to use a predefined direction.
Goldeneye Source v4.2.3
get it now and play for FREE!!!
http://www.goldeneyesource.net
kraid
Been Here A While
Been Here A While
 
Joined: Thu Jan 22, 2009 12:09 pm

Return to Custom Asset Help

Who is online

Users browsing this forum: Google [Bot]