Aller au contenu

Photo

How many characters a cutscene can show without lags? (Approximately)


  • Veuillez vous connecter pour répondre
13 réponses à ce sujet

#1
andysks

andysks
  • Members
  • 1 654 messages
As the topic. I would like to have a cutscene with a huge army cheering to the leader who is standing on a cliff thing. How huge could I make this army? I guess it has to do with polygons, which I have no idea what it is, but read some threads on the custom content forums concerning custom models. If it is any help, the army will consist mainly of undead. So if a lot of them, the extras there in the back, are skellies and zombies who wear no armor, will it help the situation? Also, some of them might have fx on them, does that put extra effort on the machine if it's a lot?

Thanks a lot.

Andy.

#2
Tchos

Tchos
  • Members
  • 5 079 messages
I can't answer the main question, but I can tell you a few ways to put less strain on the PC. First, strip them of all of their scripts. If each one has its own scripts firing, it puts a lot more strain on the computer than if you control all of them with a single puppetmaster script.

Second, for the distant ones in the background, you can use a trick of applying an animated texture to an object, with the animated texture showing a creature (or group of creatures) cheering. Use this like the "cards" of houses and such that are meant to be used from far away, and at the right angles, it'll allow you to create the illusion of a much larger crowd.

#3
kamal_

kamal_
  • Members
  • 5 259 messages
Crimmor routinely puts 100 or so npcs in exteriors. It gets away with this by assigning a lot of those npcs heartbeat scripts that are set up only to carry out specific animations (using my commoner ai scripts). My commoner ai includes a demo module, so you could easily set up as many npcs as you feel like to test, it also has a script for cheering.

If you wanted some truly massive army then you're going to need to do something like Tchos wrote.

#4
rjshae

rjshae
  • Members
  • 4 506 messages

Tchos wrote...

I can't answer the main question, but I can tell you a few ways to put less strain on the PC. First, strip them of all of their scripts. If each one has its own scripts firing, it puts a lot more strain on the computer than if you control all of them with a single puppetmaster script.

Second, for the distant ones in the background, you can use a trick of applying an animated texture to an object, with the animated texture showing a creature (or group of creatures) cheering. Use this like the "cards" of houses and such that are meant to be used from far away, and at the right angles, it'll allow you to create the illusion of a much larger crowd.


Having some animated texture cards is a pretty cool idea. I could imagine layering multiple cards for a background street scene showing people walking about; maybe a cart crossing now and then; somebody riding a horse; a woman chucking slop out of a top window...

#5
andysks

andysks
  • Members
  • 1 654 messages
kamal_: In the capital city of my campaign, on the main district I also had some 100-150 NPCs. It was causing sometimes my frame rate to drop extremely low. After I assigned the heartbeats from your commoner AI to about half of them I saw big difference.

Tchos: This... animated texture. I haven't even heard of the term before, lol. How does one do that?
Because I guess I will need both solutions, for some truly massive army. The cheering ones, or worship heartbeating, and the animated texture on the really far ones, to give the scene some depth.

#6
Dann-J

Dann-J
  • Members
  • 3 161 messages
There is a tutorial on creating animated textures here.

#7
Tchos

Tchos
  • Members
  • 5 079 messages
I think that tutorial may be confusing to someone who doesn't already know what he's talking about, or the concept of a film strip. You would set up the whole animation as a kind of film strip in a single image file. The process Camb describes happens entirely in Photoshop.

First, of course, you'll need some animation, which can be frames from a NWN2 animation captured to video and converted to single frames, or something like an animated GIF.

It's a complicated process, I'll say that. But it would work well.

When I referred to a puppetmaster script, I was saying that I'd do it by having a single heartbeat either on the area heartbeat slot, or on an ipoint, which controls the actions of all of the cheering creatures, and they would not have heartbeat scripts in their individual slots.

#8
MERP UK

MERP UK
  • Members
  • 25 messages
I'm finding no issues with up to 100 npc "spectators" with no attached scripts being active in an arena area during a cutscene, though my use of them is strictly limited to the cutscenes - outside of the cutscenes, they are script hidden.

Interesting to see how many npcs people have been able to get into city environments. Well above my estimates. Perhaps I can afford to be more generous. Does area size need to be smaller if the npc population is more dense?

#9
kamal_

kamal_
  • Members
  • 5 259 messages

MERP UK wrote...
Does area size need to be smaller if the npc population is more dense?

My understanding is area size doesn't directly affect things. It's more about when npcs go into perception range, causing the OnPerception to fire. Of course combat is also ai heavy, but that's not a question here. My commoner ai generics has most everything stripped out, the npc plays the animation and that's about it unless it's in combat. The demo module included with the commoner ai makes it easy enough to test whatever population you'd like. One issue in densely populated areas is "click to move" becomes a problem when the area is dense with npcs (especially if they are moving around), as you are likely to click on an npc and then go try to talk to them because you clicked them.

You can play Crimmor and simplly walk around the city after leaving the intro area if you want to get a feel for it. I don't think I got any complaints about the city being too sparsely populated. :D

PainOfDungeonEternal (wherever he went) has AI that handles 100 a side combat without issue, special abilities and all. While I have a copy of that, I was unsure on the implementation.

#10
andysks

andysks
  • Members
  • 1 654 messages
This puppetmaster heartbeat, or any heartbeat, can fire different stuff on every hb right? I can make them cheer, then relax, then worship or whatever? I think I'll read this guide and try to do this, even if it's complicated. It's a good thing I am quite familiar working on photoshop.

MEPP, I don't think the area size/population are related. 500 NPCs, will be 500 NPCs on a 16x-16x and on a 32x-32x. Talking about a cutsene here with panoramic views and what not. On real gameplay, I think it does play a role,since on a 32x-32x you cannot even see the far ones.
Of course, a 32x-32x is lagging on it's own, doesn't need NPCs to do that :).

#11
Tchos

Tchos
  • Members
  • 5 079 messages

andysks wrote...

This puppetmaster heartbeat, or any heartbeat, can fire different stuff on every hb right? I can make them cheer, then relax, then worship or whatever?

Of course.  It can even make each creature do something randomly different if you want, and with a loop using DelayCommand measured in fractions of a second, you can spread out the orders between the different creatures so that they're not all acting in unison.

#12
andysks

andysks
  • Members
  • 1 654 messages
Yes, I remember I did something similar a while ago when I needed some dock workers who would not walk around. Like, hammer something for some time, then yawn, then stretch and so on. I guess this will be no different. On the end of these hb scripts though, I need to call the default if I remember correctly. Is that true?

#13
Tchos

Tchos
  • Members
  • 5 079 messages
Only if you want them to run through the whole standard system of walking waypoints and doing whatever else creatures do on their heartbeats. For a cinematic, you definitely don't need or want the default heartbeat.

#14
andysks

andysks
  • Members
  • 1 654 messages
That's good information. As for the main question, I read camb's guide and got dizzy, even if it was just 10 lines. I think I'll give it a shot with no scripts assigned, except heartbeats, see how many I can fit without problems. Of course everything in the area should be as light as possible. Meaning environmental objects, go easy on vfx and so on. It should be interesting to see what the result will be. Maybe I shoot it on video to show the results.