Building huge crowds: a new tool for demo editors.


airhead

 

Posted

After I posted that last video with the 3000 heroes, two things became apparent to me. One, placing characters in a straight line looks unnatural and cruddy. Two, it's freaking hard and I never want to do it again.

Thus, I made tools to make it easier and better looking.

My first script takes a demo, locates the player ID, and creates an image out of everywhere he moves. This means I can take my hero to the top of City Hall, start a demo recording, walk around the perimeter, and then I start my script and it draws this:



That's the roof of City Hall. After cleaning up for a few seconds in a graphics editor, I have this:



My second script takes an image like that one, and spawns random entities wherever red is above 64. The density (how close characters will be together) is customizable. After running it, it creates the demo and also this log image:



Each black dot is a spawned player, and the white space around them is the buffer. Here's what the demo looks like, straight out of this second script:



Placing a crowd in such an irregularly-shaped place would be a pain in the neck to do via math-based placement, and it would be horrifically tedious to do manually. But this script did it in seconds. Also, notice the way the characters are facing: each shade of red corresponds to a different facing. This allows you to "paint" areas to spawn characters in, and they'll face towards a place that makes sense.

Now, what happens if you want to spawn them in a place that is not flat, like stairs? This is what my first script generated after walking all over Atlas Park:



The different shades of green are elevation. The brighter the green, the higher the place is. To add the spawning information, just add red to the existing green. So if green = 160, and you want to add red = 111, the final color is r=111,g=160,b=0. Easy! Even easier if you have a graphics program that supports layers: create a new layer, and just paint the red parts in it. Then set the blend mode to Screen.

This is what it looks like after I painted the stairs heading up to City Wall:



The central area I filled in, but since there's no red, nothing will spawn there. After the second script:



And the demo output:



That looks a lot more natural than the crowd I animated on Saturday! But still, it looks off. People usually gather in groups, with some buffer space between them. They are facing all over the place. Some of them are flying. What to do?

Well, noise is the answer:



I added two layers. In one, I added pockets of red noise, and that's the only place where characters will spawn. The noise went from r=64 to r=255, so people would spawn facing different directions.

In the second layer, I added a flat high level of blue=138. The blue channel can be used to make the script do something special to the mobs tagged with it; in this case, they'll be playing the Flight animation. All the pixels that have this level of blue ALSO have a higher level of green; this will make them float slightly higher than the grounded characters.

After the script runs:



And the demo output:



Now that's a nice and natural-looking crowd!


www.SaveCOH.com: Calls to Action and Events Calendar
This is what 3700 heroes in a single zone looks like.
Thanks to @EnsonsDeath for the GVE code that made me VIP again!

 

Posted

This post used to contain the scripts, but I made a new thread with a video tutorial, so go here for the new and improved script, now a lot more user friendly:

http://boards.cityofheroes.com/showthread.php?t=297268

If you use this thing to populate your demo, some attribution in the credits would be nice. "Freaking huge mobs generated by some crazy scripts by Leandro" would work.


www.SaveCOH.com: Calls to Action and Events Calendar
This is what 3700 heroes in a single zone looks like.
Thanks to @EnsonsDeath for the GVE code that made me VIP again!

 

Posted

Very cool stuff. Thank you for sharing. Resources like this may be very important to those of us who wish to keep CoH alive visually in the long term.


Blue
American Steele: 50 BS/Inv
Nightfall: 50 DDD
Sable Slayer: 50 DM/Rgn
Fortune's Shadow: 50 Dark/Psi
WinterStrike: 47 Ice/Dev
Quantum Well: 43 Inv/EM
Twilit Destiny: 43 MA/DA
Red
Shadowslip: 50 DDC
Final Rest: 50 MA/Rgn
Abyssal Frost: 50 Ice/Dark
Golden Ember: 50 SM/FA

 

Posted

This is great Leandro! I will be playing around with this for my next video. Oh and of course you get the credit, that looks like quite the undertaking all around.

Well written tutorial here.


Blue
American Steele: 50 BS/Inv
Nightfall: 50 DDD
Sable Slayer: 50 DM/Rgn
Fortune's Shadow: 50 Dark/Psi
WinterStrike: 47 Ice/Dev
Quantum Well: 43 Inv/EM
Twilit Destiny: 43 MA/DA
Red
Shadowslip: 50 DDC
Final Rest: 50 MA/Rgn
Abyssal Frost: 50 Ice/Dark
Golden Ember: 50 SM/FA

 

Posted

Quote:
Originally Posted by Kitsune Knight View Post
Excellent work, Leandro! I have a feeling the demo folks are going to squee when they see this.


I squee....squeed? (haha) when I saw this. Really cannot wait to get going on this new video now. My latest video was edited line by line to get the NPC's in the back to be protesting and the heroes in that emote to look defeated. Anything that saves this much time is a gift from the gods.

You rock Leandro!


Quote:
Originally Posted by ShadowNate
;_; ?!?! What the heck is wrong with you, my god, I have never been so confused in my life!

 

Posted

I was wondering how you figured out the coordinates for placing a crowd that size. Clever.


Father Xmas - Level 50 Ice/Ice Tanker - Victory
$725 and $1350 parts lists --- My guide to computer components

Tempus unum hominem manet

 

Posted

Holy...
Wow...

This is so great. Thanks for the PM and thanks for this amazing tool!
This should come in extremely handy. Now I have to do a few ideas I was putting off...


@Zethustra
"Now at midnight all the agents and the superhuman crew come out
and round up everyone that knows more than they do"
-Dylan

 

Posted

KLONG!!!!!

(sound of jaw hitting floor percussively)


 

Posted

Amazing


Quote:
Originally Posted by Iggy_Kamakaze View Post
Nice build

 

Posted

Wow... that is amazing!


"What counts is not what sounds plausible, not what we would like to believe, not what one or two witnesses claim, but only what is supported by hard evidence rigorously and skeptically examined. Extraordinary claims require extraordinary evidence." - Carl Sagan

 

Posted

Quote:
Originally Posted by Leandro View Post
Something that goes without saying, but that I figured a picture would express better.

You are not limited to filling in shapes found in the game. You can draw anything.

For example...



Holy flarking schnidt!



Clicking on the linked image above will take you off the City of Heroes site. However, the guides will be linked back here.

 

Posted

Damn it, stop making the rest of us look bad.

We are threatened by your awesomeness.

Edit: FBARN?


Father Xmas - Level 50 Ice/Ice Tanker - Victory
$725 and $1350 parts lists --- My guide to computer components

Tempus unum hominem manet

 

Posted

Stolen for Facebook


Andy Belford
Community Manager
Paragon Studios

 

Posted

Quote:
Originally Posted by father xmas View Post
damn it, stop making the rest of us look bad.

we are threatened by your awesomeness.
We're not worthy!

We're not worthy!



EDIT: OH! And my very first FPARN ever! Keen! ^_^


 

Posted

Leandro... this is epic... you are a darn frigging genious! If I had a budget I'd frigging hire you...


 

Posted

This seemed the best place to post this, and I am sorry if it's not....that being said, here is a beautiful tribute for supporing our troups done by an sg. Is there some talented base builder out there that could do a 'save our city' tribute?


�Many things worth doing in the world had been declared impossible before they were done.�

 

Posted

Quote:
Originally Posted by Zwillinger View Post
Stolen for Facebook
Beat you to it by 20 minutes!



Clicking on the linked image above will take you off the City of Heroes site. However, the guides will be linked back here.

 

Posted

Very cool. Thanks!


CatMan - some form on every server

Always here, there, and there again.

 

Posted

This just blows my mind. I hope someone is gathering all this stuff together for those of us who never previously learned to demoedit, but who've been trying to learn now. (A lot of the old resources died of linkrot.)

Thank you!


@Glass Goblin - Writer, brainstormer, storyteller, hero

Though nothing will drive them away
We can beat them, just for one day
We can be heroes, just for one day