Aller au contenu

Photo

Area Optimization - Placeables


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

#1
Banshe

Banshe
  • Members
  • 557 messages
Hi all,

As some of you know, I am working extensively with Nytir's BCK. Having an entire Oriental City (broken into different areas) made of his building blocks, not to mention the other placeables, is going to lead me into the hundeds (possibly over a thousand placeables) per area.

Therefore I have taken the following steps:

1. Set 100% of them to "Don't Receive Shadows"
2. Set 100% of them to "Don't Cast Shadows"
3. Changed about 95% into environmental objects
4. Haven't tried this yet but for the placeable walls, I was thinking of changing the "fade" and "Block LOS" options in the placeables.2da file to stop the fading and to block LOS. How well does this work? Can you change the "fade" option in the 2da only and it will no longer fade? I think in NWN1 you had to edit the model itself.

In some places, I am using SGK's Collision helpers to stop walking through walls, block los and affect the camera.

I'm looking at making a shadowless city it would seem. Does anyone have any thoughts or suggestions on what I am doing? Should I turn off all shadows? Is there another step that I should take to reduce the strain of these areas?

Once I start to lay down the city prefabs I have made, it will be a lot more painful making modifications so it would be good to do these things now rather than later.

#2
kamal_

kamal_
  • Members
  • 5 240 messages
Have someone else run through a city area for you as soon as possible to check performance.

Personally, I wouldn't worry about it, other than converting to environment objects. The people who tested the first exterior of Crimmor didn't complain about performance, and I had way more placeables than that (I have several areas with 3000+ objects in them), with full shadows. Essentially, modern computers can handle it now. And remember, shadows are a game setting, players can turn them down if they want.

#3
Banshe

Banshe
  • Members
  • 557 messages
Ok. Thanks.

The city is not made yet. I wanted to get some feedback before I built it. I'll go back through the prefabs and reactivate the shadows.

#4
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
I set most of my placeables and EO's to "cast shadows from directional light only", which means you get the big shadows from the sun/moon, but placed lights and torches don't throw out their own shadows.
Also, with big areas, keep your texture load in mind. Reusing placeables with the same texture over and over is better than a fewer number of placeables with more variety of textures.

#5
Banshe

Banshe
  • Members
  • 557 messages
Cool. Thanks! Luckily, the OA BCK set uses the same textures everywhere so the count is low.

As for directional light, that sounds adequate. ;)

#6
kamal_

kamal_
  • Members
  • 5 240 messages
You can always use fraps to get an idea of framerates as well.

#7
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
There's a frame-rate button in the toolset that will spit all the stats on the screen, though I don't know enough to make any sense of it.

#8
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
I made an area with a little over 1,400 trees. The area is a 32x32 and it runs fairly smoothly. I heard that trees are treated similarly to environmental objects, if that helps.

#9
Banshe

Banshe
  • Members
  • 557 messages

kamal_ wrote...

You can always use fraps to get an idea of framerates as well.


I splurged on a decent rig so I'm a little concerned that what may be true for me, may not be true for others. So I probably would get someone else to test it when it is done (as you suggested). ;)

#10
Dann-J

Dann-J
  • Members
  • 3 161 messages

M. Rieder wrote...

I made an area with a little over 1,400 trees. The area is a 32x32 and it runs fairly smoothly. I heard that trees are treated similarly to environmental objects, if that helps.


As long as you use only a low number of tree types, and they all have the same seed value (so they look the same), then things run pretty well - provided you don't turn on shadows. Lots of trees of any kind can play havok with your frame rates with full shadows turned on (probably because trees are constantly moving).

I generally have no trouble with full shadows on my new computer, but when I recently played Harp and Chrysanthemum I had to turn them off in one of the forest areas, where lots of trees were packed tightly together (even though they were mostly of the same tree type).

#11
M. Rieder

M. Rieder
  • Members
  • 2 530 messages

Banshe wrote...



I splurged on a decent rig so I'm a little concerned that what may be true for me, may not be true for others. So I probably would get someone else to test it when it is done (as you suggested). ;)



Keep in mind that the end user can turn off shadows on their machine if necessary.  You may be able to leave the shadows and then if someone is having framerate problems, just put in a note with the module documentation that it may be necessary to turn off shadows for some older machines. 

#12
Morbane

Morbane
  • Members
  • 1 883 messages

M. Rieder wrote...

Banshe wrote...



I splurged on a decent rig so I'm a little concerned that what may be true for me, may not be true for others. So I probably would get someone else to test it when it is done (as you suggested). ;)



Keep in mind that the end user can turn off shadows on their machine if necessary.  You may be able to leave the shadows and then if someone is having framerate problems, just put in a note with the module documentation that it may be necessary to turn off shadows for some older machines. 


I agree with this pov - let the player decide how to handle the fps. Granted I havent designed such elaborate areas but if I did I would go the message in the description route.:D

#13
Banshe

Banshe
  • Members
  • 557 messages
I'm sold. I didn't want to turn off shadows in the first place so leaving it up to the end user is fine by me. ;)

It should be interesting/scary from a performance persepctive because the city is mostly lived in "out of doors". Merchant shop are open to the street and packed with goods, restaurants place tables outside their front door (or on balconies) and there are stalls here and there where more goods are bought/sold.

Aside from a few key locations, there won't really be many interiors at all.

#14
Axe_Edge

Axe_Edge
  • Members
  • 278 messages
I remember reading on these forums, about a month ago, how to stop the trees from swaying. I may be mistaken, but I believe Shaughn78 was the person who posted. I've looked, but the post was buried within a thread. You might try to pm him. Non-swaying trees may help you out.

Edit:  DNO made a post immediately after the non-swaying post.  He may vaguely recall what the main thread was concerning.

Modifié par Axe_Edge, 08 novembre 2011 - 03:26 .


#15
kamal_

kamal_
  • Members
  • 5 240 messages
I have the non-swaying trees, I tested them for the person. They work fine, the leaves still move, but apparently that's either much harder or impossible to fix. You can have both sway and non sway in an area.

#16
PJ156

PJ156
  • Members
  • 2 982 messages

Banshe wrote...

I'm sold. I didn't want to turn off shadows in the first place so leaving it up to the end user is fine by me. ;)

It should be interesting/scary from a performance persepctive because the city is mostly lived in "out of doors". Merchant shop are open to the street and packed with goods, restaurants place tables outside their front door (or on balconies) and there are stalls here and there where more goods are bought/sold.

Aside from a few key locations, there won't really be many interiors at all.


Screeeeeens, you can't say all that and not provide screenies. It's just not decent.

PJ

#17
Banshe

Banshe
  • Members
  • 557 messages
Hehe. I haven't put the city together yet. I just finished making the prefab buildings and some of the prefab shop interiors. Yesterday was the first time I actually started laying down buildings in my city. The "lived-in" stuff will go in after the basic outline of the city is complete.

However, I did manage a couple of hours of city building yesterday so this should give a vague idea of what I'm heading towards:

Posted Image

Uploaded with ImageShack.us

Here are some of the shops:

Posted Image

Uploaded with ImageShack.us

Here is a closeup of the Chinese pharmacy:

Posted Image

Uploaded with ImageShack.us

That is where the players will go to buy their teapills (aka potions) etc. for adventuring.

I still have to fill in the shops with some wall hangings. I have hundreds of Chinese paintings from Wikimedia that I need to add into the toolset with cloneMDB.

Modifié par Banshe, 09 novembre 2011 - 08:49 .


#18
-Semper-

-Semper-
  • Members
  • 2 256 messages
after seeing those roofs hopefully there are lod models too. else you will get slowdowns with a flat camera angle and lots of houses in the view. it's the exact same with the city hakpack with extracted oblivion models. the engine simply can't render this amount of polygons and your map horribly stutters.

#19
Banshe

Banshe
  • Members
  • 557 messages
lod models? I do have SGK's collision helpers on the first floor of most buildings but no higher than that. Are SGK's collision helpers lod models?

#20
Banshe

Banshe
  • Members
  • 557 messages
I just went in and it ran very smoothly. However, I don't know how it would be on other computers.

I did try the fps thing in the toolset and when I looked down on a small area, it had 60-70 rigids.When I went horizontal with the camera in went to 1700-1800 rigids. So it would seem it is picking up a lot of stuff in the background.

#21
Banshe

Banshe
  • Members
  • 557 messages
Still some gaps to fill in but most of buildings are there now. I have designed it so it can be split into 4 pieces if the load gets too heavy:

Posted Image

Uploaded with ImageShack.us

Red: The Red light district includes gambling halls, brothels, not so nice martial arts schools, criminals of all kinds and an open air theater (you can see the awning over the stage)

Blue: The main square of the city (shaped more like a triangle). The first place that travellers from the north will see upon landing

Yellow: Tradesman quarter. Papermaking and cloth dying/spinning are the primary industries of this city. Here you will find their production facilities (downwind of the wealthy quarter of course).

Purple (Lavender): The wealthiest families inhabit this area along with many upscale shops and services (jewelers/goldsmiths/moneylenders etc.).

Green: Will be the garden district. Pavillions on the water as well as a restaurant or two. The red house is the governmental building (known as the yamen) where city affairs are handled. Most visitors to the city (especially those from foreign lands) will arrive in this city directly in front of the yamen in the gardens giving a positive first impression of the city.

Brown: These are the docks and the warehouses are for the city. As a primary port of entry into the empire, this city sees a great deal of merchants. Especially those carrying spices from the islands.

Modifié par Banshe, 09 novembre 2011 - 01:52 .


#22
kamal_

kamal_
  • Members
  • 5 240 messages
Now that there's a screenshot I can make a better estimate of performance. On the assumption that you are going to stick with that area size and treat each district as it's own map, and just use terracoppa on a completed version of the city, I can't see any performance problems unless you go super crazy with trees. Much of the detail from a district can be removed when the district is part of the unwalkable edges area of the map.

Outside the walkable area, I convert everything to environmental of course, but I also remove any detail that won't be visible (it's pretty easy to make estimates of what won't be from your playing experience). I even remove doors, and entire buildings if they're outside the lines of sight.

#23
Banshe

Banshe
  • Members
  • 557 messages
Good to hear. As for splitting it up, it won't be along district lines but will be in four pieces. The two square strip above the yamen will be an area (the gardens, some of the docks and some of the wealthy area). The rest will be divided into three areas:

1. Central with the main square
2. Side with the red light district and part of the docks
3. Side with the tradesman district and part of the wealthy area.

As it is a fairly dry city, there won't be many trees except in the garden district (which has very few buildings). So it should work out well.

#24
rjshae

rjshae
  • Members
  • 4 485 messages
Just a thought: grid placement of buildings was a relatively modern innovation; roughly 18th century I think. Medieval towns are all irregular in layout. Check out a map of Segovia in Spain, for example.

#25
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
Ancient Chinese cities are crammed into big square walls, but sometimes with irregular alleys and sidestreets: