Author Topic: Basic crowd sim possibility  (Read 39392 times)

Offline Hannes

  • Member
  • *
  • Posts: 4469
Re: Basic crowd sim possibility
« Reply #105 on: August 17, 2015, 08:34:23 AM »
That's what I have in mind. I'm sure it'll work somehow, and if the tedious work is done, you can use this over and over. We'll see, if I'll succeed or not....

I'm not quite sure about the actual features in Vue, but at that time you could import animated objects, and somehow the animation was stored inside the object. No idea how... :(

Offline Kadri

  • Member
  • *
  • Posts: 8502
Re: Basic crowd sim possibility
« Reply #106 on: August 17, 2015, 09:41:12 AM »
That's what I have in mind. I'm sure it'll work somehow, and if the tedious work is done, you can use this over and over. We'll see, if I'll succeed or not....
...


The part where the objects meets together can look awkward too.
But don't listen to me.I made only a very basic test there might be better ways you find.
That was with only in object mode 1-2 years ago with basic cubes . I haven't tried it in a population.


...
I'm not quite sure about the actual features in Vue, but at that time you could import animated objects, and somehow the animation was stored inside the object. No idea how... :(


I searched and found that Vue does have a rigging system. You can import animations etc in it.
That makes much a difference of course.
« Last Edit: August 17, 2015, 09:46:11 AM by Kadri »

Offline Dune

  • Member
  • *
  • Posts: 15196
    • www.ulco-art.nl
Re: Basic crowd sim possibility
« Reply #107 on: August 17, 2015, 09:50:05 AM »
I am here alright, and following your private discussion with GREAT interest! Just not in the position to do much atm. I love these kind of experiments to push TG's limits, and you never know what Matt will pick up and use to the advantage of TG(4). I've been thinking about movement in the medieval harbor town (for an animation they proposed), but walking people would be really hard, as they won't follow paths, and get into trouble (walls, water, other people). Wind and water is 'easier' to accomplish.

I was also wondering if you made an object rotate 4x every X frames for 90º and place diferently on the corners of a square, would you be able to make it go in a circle? Or would it walk following the square? I think the latter (so not vector like), so you'd need far more points of rotation.
Also, if you place an object too far from its 0/0/0 origin, you get strange behavior in  population, like pops that only make a circle, or (in older days) would crash TG.

Following your amazing footage daily, guys. Keep at it.

Offline Kadri

  • Member
  • *
  • Posts: 8502
Re: Basic crowd sim possibility
« Reply #108 on: August 17, 2015, 10:07:24 AM »
...I've been thinking about movement in the medieval harbor town (for an animation they proposed), but walking people would be really hard, as they won't follow paths, and get into trouble (walls, water, other people)....

For a basic straight road kind of crowd walking animation, it is very easy to avoid collision of people.
Make a mask-density texture with straight white and black lines for example.
Use one for one population that goes to one side.
Then use another population where the people goes to the other way with the same texture but with a negative one.
You know these things much better and there is so more you can do.

You don't have to overthink all these thing Ulco.
For example if the animation is viewed from a certain distance a rotating population or even 3-5 hand animated-placed object sequences with walking people would look like they are walking the corners if you really need them.

I don't know if you can bend,warp etc. populations without objects going funky. Anyone tried it?
If this is possible there are more we could do.
« Last Edit: August 17, 2015, 10:11:08 AM by Kadri »

Offline Dune

  • Member
  • *
  • Posts: 15196
    • www.ulco-art.nl
Re: Basic crowd sim possibility
« Reply #109 on: August 17, 2015, 10:12:11 AM »
The problem with people walking streets and paths is that they need to be oriented in a specific way (following a road, not facing walls), so I have had to edit the pops. And I don't know what would happen to an edited pop in animation, especially with a mask for their distribution... they might just pop out.

Offline Kadri

  • Member
  • *
  • Posts: 8502
Re: Basic crowd sim possibility
« Reply #110 on: August 17, 2015, 10:25:05 AM »

If you have one walking object sequence all you have to do is to rotate the population in which way you want them to go.
You do it with the other different object too so much you need it.
If there are problems all you have to do is re orienting them in Lightwave (for example) and exporting one again Ulco (as you said).

In my tests the most problem i saw was different sized objects.
Resizing them before use in Terragen to a meaningful similar size avoids some unneeded hassle.

If you don't mean anything different of course Ulco?

A basic way to walk around a corner is animating the object in its object node only and not the population (depends what you want).
Put the start point of the guy where you want it to begin to walk. Then translate it to the point where it will begin to rotate and so on.
When you do this animation in the object node directly your population can stay put (if you will).
You can then use millions of guys walking around a corner like an army that is turning to one side at ones :)

If you have a corner walking guy object sequence that would be nice too of course :)
« Last Edit: August 17, 2015, 10:26:45 AM by Kadri »

Offline Kadri

  • Member
  • *
  • Posts: 8502
Re: Basic crowd sim possibility
« Reply #111 on: August 17, 2015, 10:36:24 AM »

There could be one problem i think with translating the object in the object node.
When you translate the object to the X side for example it looks like it sees the ground as it was originally.
So it can be over or under the ground.Have no looked more closely although.
But for  roads or so this is not much important at least.

Offline Kadri

  • Member
  • *
  • Posts: 8502
Re: Basic crowd sim possibility
« Reply #112 on: August 17, 2015, 10:38:51 AM »

It is mostly just theoretical of course.Haven't tried if will work :)

Offline Kadri

  • Member
  • *
  • Posts: 8502
Re: Basic crowd sim possibility
« Reply #113 on: August 17, 2015, 10:44:59 AM »

Just had a look a little (walking corners). Direct changes in the object node will not work as it looks.
Without offset kind of animation options it looks limited.

Baking the corner walking animation directly as a sequence looks much more meaningful now.

Curious if you can work this out guys.
« Last Edit: August 17, 2015, 11:01:31 AM by Kadri »

Offline Kadri

  • Member
  • *
  • Posts: 8502
Re: Basic crowd sim possibility
« Reply #114 on: August 17, 2015, 11:10:37 AM »

When you translate objects in the object node the density shader is translated too.
This might be desired or not. Transform input shader with or without "Use world space (final position)" made no difference.
You have to animate the density shader too if you want to stay it put in the place you want.

« Last Edit: August 17, 2015, 12:28:27 PM by Kadri »

Offline Dune

  • Member
  • *
  • Posts: 15196
    • www.ulco-art.nl
Re: Basic crowd sim possibility
« Reply #115 on: August 17, 2015, 02:09:17 PM »
Good thinking, and I hope I can get into this some day, but atm it's no priority. I am more interested in getting a slight windgust movement in trees, and currently testing a setup with 2 T&S and a PF, all animated. Maybe it doesn't work at all.... we'll see.

Offline Kadri

  • Member
  • *
  • Posts: 8502
Re: Basic crowd sim possibility
« Reply #116 on: August 17, 2015, 02:38:21 PM »

This is mostly how far i will go for now too. Hope you, Hannes and others will continue.
I am going to work on the animation. Although the render times might allow to do some test ones again :)

Offline TheBadger

  • Member
  • *
  • Posts: 7416
  • what's the difference?
Re: Basic crowd sim possibility
« Reply #117 on: August 17, 2015, 05:27:38 PM »
Hannes,
that fight is pretty cool. I see what you mean about the models fighting the air in some places. Which begs the question, can you edit a population of object sequence as you can a normal population in TG?

Has anyone tried to edit out a instance yet? or move it or anything?
It has been eaten.

Offline Hannes

  • Member
  • *
  • Posts: 4469
Re: Basic crowd sim possibility
« Reply #118 on: August 17, 2015, 10:17:53 PM »
OK guys, lots of new questions. I have no idea how to move a whole population around a corner. I'd expect, they all walk around the corner at the same time, but not where the actual corner is, but where each of the instances actually is at the moment. Hmm...

Anyway here is a small walk cycle I created by cutting a model into pieces in 3ds Max. Shadows are disabled for testing purposes.
First of all I scaled it!!!!!!!!!!! Did a test export to see if the guy has the right size.
Then I cut off the legs and the arms in Max. I put the pivot of the torso right between where the legs would be if I wouldn't have cut them off. Then the pivots of the limbs were put to the joints where they are usually connected to the body. Important: I had to place all the objects at 1,1,1, otherwise rotation wouldn't have worked for some reason (no idea why... :()

In TG I imported each part into it's own population (one instance for better orientation) and moved the limbs in the object nodes at the correct places. Then I rotated the legs and the arms (X-axis) to their initial state, which is left leg and right arm forwards, the other ones backwards. I changed the positions to the opposite 15 frames later.
Now comes the fun part. I wasn't aware that you can copy keyframes in the animation editor. It was a piece of cake to copy the cycle and paste it. Like that I was able to create a 500 frames walking cycle in less than a minute for all of the limbs.
The walking cycle isn't as good as a motion capture walk of course, but given the fact, that there is no object sequence used, I think it won't look too bad at least from a distance.

AND: creating populations with an offset isn't that hard, if you just copy the whole set of populations, select all the keyframes in the animation editor, move them, let's say 7 frames backwards (for all the populations that belong together), and voilà!
« Last Edit: August 17, 2015, 10:20:04 PM by Hannes »

Offline Kadri

  • Member
  • *
  • Posts: 8502
Re: Basic crowd sim possibility
« Reply #119 on: August 17, 2015, 11:54:07 PM »
OK guys, lots of new questions. I have no idea how to move a whole population around a corner. I'd expect, they all walk around the corner at the same time, but not where the actual corner is, but where each of the instances actually is at the moment. Hmm...
...


I saw that problem too today. As you can see above i thought in theory it should work too :(

After trying it seem quite normal that the instances behave as they are.
It works more like "begin now to rotate" to all the instances.
Without a way to kinda be able to say "begin here to rotate" it doesn't work.
Not sure if there is a way.


...
Anyway here is a small walk cycle I created by cutting a model into pieces in 3ds Max. Shadows are disabled for testing purposes.
First of all I scaled it!!!!!!!!!!! Did a test export to see if the guy has the right size.
Then I cut off the legs and the arms in Max. I put the pivot of the torso right between where the legs would be if I wouldn't have cut them off. Then the pivots of the limbs were put to the joints where they are usually connected to the body. Important: I had to place all the objects at 1,1,1, otherwise rotation wouldn't have worked for some reason (no idea why... :()

In TG I imported each part into it's own population (one instance for better orientation) and moved the limbs in the object nodes at the correct places. Then I rotated the legs and the arms (X-axis) to their initial state, which is left leg and right arm forwards, the other ones backwards. I changed the positions to the opposite 15 frames later.
...



Nice work. Looks tedious, but the result works much better then i thought it would really :)



...
Now comes the fun part. I wasn't aware that you can copy keyframes in the animation editor. It was a piece of cake to copy the cycle and paste it. Like that I was able to create a 500 frames walking cycle in less than a minute for all of the limbs.
The walking cycle isn't as good as a motion capture walk of course, but given the fact, that there is no object sequence used, I think it won't look too bad at least from a distance.

AND: creating populations with an offset isn't that hard, if you just copy the whole set of populations, select all the keyframes in the animation editor, move them, let's say 7 frames backwards (for all the populations that belong together), and voilà!


Wow! I wasn't aware too. This makes many things much easier Hannes. Great :)


« Last Edit: August 17, 2015, 11:57:07 PM by Kadri »

 

anything