Aller au contenu

Photo

Placeable Settings


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

#1
Banshe

Banshe
  • Members
  • 557 messages
Hi all. Just a quick question.

I'm changing most of my placeables into environmental objects. The ones that I do not change are the blocking type (i.e. walls to prevent movement through the object).

The only setting I am changing on the placeables is setting "Dynamic Collisions" to "True". Just want to make sure this is the right step before overcommiting myself.

It occured to me after setting down many placeables that I better make sure I'm doing it right! Posted Image

#2
Morbane

Morbane
  • Members
  • 1 883 messages
Environmental Objects do not need to have the Dynamic Collisions set to TRUE

You would want to set Dynamic Collisions say for instance if a placeable was useable and you did not want people to be able to run through it.

Environmental Objects will not have collision possible - but I do not think it would make a difference if you did set Dynamic Collisions to TRUE.

Also -  Dynamic Collisions do not need to be baked and are nice if you are dynamically placing a placeable

Modifié par Morbane, 17 novembre 2011 - 09:48 .


#3
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
You should use dynamic collisions sparingly. For most placeables, like walls, the baked walkmesh will keep players from walking through objects. You might even want to convert the walls to environmental objects, and lay down a walkmesh cutter to block movement. You should only use dynamic collisions for objects that can be either created or destroyed during the game.

#4
Dann-J

Dann-J
  • Members
  • 3 161 messages
Indeed - dynamic collisions play havok with path-finding. Creatures have a tendancy run up to those placeables as if they're not there and then stop dead when they hit it, unable to figure out how to go around it.

Dynamic collisions are really only for placeables that you want to block progress of the player, but that you also want to be able to destroy at some point. If you have no intention of destroying a blocking placeable, then it's best to change it to an environmental object and paint down a walkmesh cutter (or for outside areas set some of the terrain mesh to unwalkable).

#5
Shaughn78

Shaughn78
  • Members
  • 637 messages
As a basic rule if you are going to interact with an object, either in game (selectable) or by script, make it a placeable. Don't use placeables to block or define your areas, as the other said either make those areas unwalkable with the terrain or use walkmesh cutters. If the object is there for looks then it is an environmental object.

The exception to the blocking rule is if you are going to open up a pathway. Then use the the collision object in the misc folder. I have done this for force fields and other such objects that can be deleted along with the collision object to open the path.

I have run into some problems switching back and forth between placeable and environmental objects. When returning to placeable from environmental the on use or on click script does not seem to work. The only solution I have found was replacing the object that was switched with a new placeable then assigning the scripts.

#6
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
Placeables also block camera movement and line-of-sight for ranged weapons. Accordingly, you might still want to keep large static objects, like boulders, buildings or high walls, as placeables.

Also, with the pathfinding in the game as weak as it is, you might want to keep your walkmesh as open as possible. I let my PCs and NPCs walk through most small objects, even low fences.

#7
Banshe

Banshe
  • Members
  • 557 messages
Thanks guys. My two issues are blocking walking and line of sight. I have quite a few walls around town that funnel players through the city.

For blocking walking, I can change the terrain under the wall to unwalkable. But for line of sight?

#8
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
If you just have a big wall, I'd just keep it as a placeable. If it's a bunch of little pieces stuck together, you might think about converting them to EO's and then adding another placeable to block the LOS. The battlement placeable in particular blocks LOS even though it's really short. Invisible collision boxes could also work.

#9
Banshe

Banshe
  • Members
  • 557 messages
No big walls as a single placeable. Lots of small pieces.

Do Dynamic Collisions create major performance hits or is it just the pathfinding issue?

#10
MasterChanger

MasterChanger
  • Members
  • 686 messages

Banshe wrote...

No big walls as a single placeable. Lots of small pieces.

Do Dynamic Collisions create major performance hits or is it just the pathfinding issue?


When I play modules, the pathfinding issue is a performance hit. Pathfinding problems really impact the freedom of gameplay. When I click on some point in the middle distance (within line of sight) and the character makes a huge loop around a different direction, or worse yet, stops dead in their tracks, this is real problem. To some extent, the only distinction is whether the burden is on the GPU or the AI processes.

A word about line of sight as well: unless it is critically important to hide something on path A from someone walking along path B, I'd avoid deliberately blocking line of sight. I have played many modules where the camera jumps around horribly when I zoom in/out or bring my view closer to the ground (using 3rd person view, don't remember what it's called...Exploration?).

I suspect that some campaign authors create line of sight blocking to give the impression of a crowded urban environment or a maze-like feel, which I think is fine. In these situations, however, the author should be aware that they're essentially mandating that the player keep their camera zoomed right in on the character.

#11
Banshe

Banshe
  • Members
  • 557 messages
I tried not to make the pathways too constricting so I hope that wouldn't be an issue. I was thinking of keeping the walls as placeables and fixing the terrain walkmesh. That way I still block los and don't get the walking into walls AI effect.

#12
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
It will cause a performance hit since the game cannot use what is basically cached information on what is walkable, which mean the game has to keep dealing with those areas instead of ignoring them, you really want as much as possible to be ignored by the engine. It also will make the area file sizes larger as it's caching things the player won't actually be able to enter. If the NPC's are acting funny due to your terrain, well that means they are thinking a lot, which is in itself a major problem.

It also means you are using more expensive types of objects, when you could be using walkmesh cutters and LOS blockers, and environment objects. Remember the game thinks you might want to be able to destroy anything put in as Dynamic, so every AOE spell is going to iterate across it.

Always use the smallest object to achieve the given level of value to the player, the game is not robust enough to optimize performance and that falls on the area builder. It is quite easy to make a town which brings most computers to a screeching halt, and generally you want to have the load on the engine coming from lots of NPC's running around and not coming from the walkmesh.

Note that when player complain about the camera, or WASD, it's really issues created by the area maker which can be addressed. You should try to get out of the players way as much as possible so they are not thinking about the terrain, but instead are thinking about the story.

Modifié par painofdungeoneternal, 18 novembre 2011 - 09:56 .


#13
Banshe

Banshe
  • Members
  • 557 messages
nvm... Posted Image

Modifié par Banshe, 20 novembre 2011 - 04:56 .


#14
Banshe

Banshe
  • Members
  • 557 messages
So I turned off dynamic collisions on all placeables. I baked the area and as the remaining placeables are set to walkable false, the baking process carved out quite a few non-walkable areas for me which is good.

However, in some places it made certain parts non-walkable that should be walkable. How do I fix this? Just use the terrain tool and re-bake?

Modifié par Banshe, 20 novembre 2011 - 05:37 .


#15
Morbane

Morbane
  • Members
  • 1 883 messages
that might mean that the placeables are dense enough that you might consider making some of them environmental

#16
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
What's blocking the walkmesh? Placeables? Then set the offending placables to walkable-true. The terrain mesh will only make steep terrain unwalkable, but the walkmesh brush allows you to edit that, cleaning up the walkmesh on an irregular mountainside and blanking out unreachable areas.

#17
Banshe

Banshe
  • Members
  • 557 messages
Ok. So I hit the bake button and for about 90% of the placeables (Dynamic Collisions = False, Walkable = False, Static = True) it cut out the wall very nicely for me. It also cut out the walls nicely on the buildings that are using the SGK Collision helper (has Dynamic Collisions set to True).

But some spots did not come out too well. I need to figure out how to fix those.

In this picture you can see the walls with the white outline (very nice!).

Not so nice: The building on the bottom right has the walkmesh cut out in front of it. Also, there was another cut in between two compounds. Also on the left in the large compound in front of the stairs. This is my problem. I'm not sure what is causing it nor how to fix it.

As for performance issues, I will bake then convert to EO so that should solve that problem

Posted Image

Uploaded with ImageShack.us

Modifié par Banshe, 20 novembre 2011 - 08:29 .


#18
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
I think that's the infamous too-many-placeables in a square bug. It happens unexpectedly, sometimes with even just one or two placeables in the affected area. The first thing to fix it is to change the objects to EO's or walkable, and then draw simple walk-mesh cutters to get the shape you want. For square shapes, you can just paint the unwalkable terrain directly using the walkmesh brush. If you can make that alley a little bit wider, that might help too.

#19
Banshe

Banshe
  • Members
  • 557 messages
About 90% of those are already EOs (like the roofs). It is just the walls that are placeables. But I guess there are too many already as you said. Thanks. :)

#20
kamal_

kamal_
  • Members
  • 5 250 messages
Lugaid already suggested this, but I'll echo it. You might want to make the walls made of lots of pieces environmental, but hide a single LOS blocking placeable like a resized battlement inside the wall.

#21
Shaun the Crazy One

Shaun the Crazy One
  • Members
  • 183 messages
Looking at the image you provided I would guess it's those stairs that are causing the walkmesh to crash in one spot. Stairs are notorious for causing these sorts of problems, you may have to turn them to enviormental objects and cut them out entirely with the walkmesh cutter.

On that note you might want to consider using the walkmesh cutter for any building the player can't enter. It looks like large groups of placables are what's causing the walkmesh to crash and typically turning the objects to environmental objects and cutting that section out with a walkmesh cutter is the best solution.