Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
greenpavel
15
Years of Service
User Offline
Joined: 13th Jun 2011
Location:
Posted: 25th Jun 2012 17:56 Edited at: 26th Jun 2012 06:23
It seems the storm has ceased.
I want to make a demo:
-will be a forest,
long-horizon forest
-I will use the RTS-skybox
so here!
The problem with performance.
If I use a lot of models that performance very low.
But how to make the forest a forest?

Thx

translated translator yandex or google
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 25th Jun 2012 19:22
Did you mean:

Quote: "If I use a lot of models will performance [ = proizoditelnost?] be very low"


?

I guess the answer is "possibly".

You could try:

- cloning and/or instancing for trees near the camera
- re-using a "small" (i.e. 200?) number of trees as you move around
- use low-poly versions or even sprites when your trees are very distant from the camera.

Of course if the forest is very dense then you won't see much anyway.
greenpavel
15
Years of Service
User Offline
Joined: 13th Jun 2011
Location:
Posted: 26th Jun 2012 06:21 Edited at: 26th Jun 2012 06:23
Thx Green Gandalf

translated translator yandex or google
Mr Bigglesworth
18
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 26th Jun 2012 08:14 Edited at: 26th Jun 2012 08:16
You could use INSTANCE OBJECT, I can get a solid FPS with 1500+ objects, just a little over 1.8 million poly's. I think this is part of what Green Gandalf was saying, I use all three of those in my game.
mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 26th Jun 2012 09:39
You should search TGC newsletter (approx last year) in which Lee provides 10000 trees technology snippet.

«It's the Pony, pony me this, pony me that» — Bronies
«I sell apples and apple accessories» — Applejack
Derpy delivers: watch?v=g4Kgz4Us_RI
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 26th Jun 2012 15:14
I'm actually having a similar problem and beginning to think that DBP has a limitation (on low end machines that is)...

I'm setting up quite a lot of base objects, hiding them (and just tried EXCLUDE OBJECT ON), and then making many instances from them. The FPS drop is serious to the point of going from 30-40FPS without all the base objects set up, to 1 FPS. The objects are only cubes and the textures are very tiny and the memory footprint is minimal.

At this point I'm considering researching the DX API to see about moving this forward. I know an easy solution using openGL for instancing.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 26th Jun 2012 15:47
Quote: "I'm setting up quite a lot of base objects, hiding them (and just tried EXCLUDE OBJECT ON), and then making many instances from them."


What sort of numbers are you talking about? I could test this on my oldish laptop to see if I get the same problems (or find a solution ).
Sph!nx
17
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 26th Jun 2012 16:31 Edited at: 26th Jun 2012 16:32
Well, I'm going to use a lot of on screen objects in my project. I will use occlusion, LOD models and imposters. Imposters work great for vegetation in a distance.

Regards Sph!nx
www.mental-image.net
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 26th Jun 2012 16:51 Edited at: 26th Jun 2012 16:54
Wasn't there a plugin to use a tree/forest management package in DB? I can't remember what the system was called.

SpeedTree, that's it! Wasn't there a plugin for it?

"You're not going crazy. You're going sane in a crazy world!" ~Tick
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 26th Jun 2012 21:27
@Green Gandalf - The main project is quite huge at the moment but I'll try and simulate the same problem. For each cube tile I am setting up 64 more objects (to account for faces of the cube being hidden by another cube in the scene).

Hard to explain but I will try:

A single cube object has 6 sides, which any of these can be covered by another cube in the scene. So I have created separate objects too account for any sides that are covered...



So if a block only exposes the top and front sides then it uses: objects_offset + 32 + 1

Where as a block with no exposed sides will have a value of zero and ignored.

Currently I only have 5 base cubes being set up like this and the FPS drops from 30-40 down to 1-2 FPS. Even though those objects are hidden and excluded. When I switch this optimisation off (some optimisation huh?) and just using a full cube the FPS shoots back up.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 26th Jun 2012 22:11
Are you saying you have only 5 base cubes and 5x64 = 320 hidden and excluded instanced versions of them and that the fps is 1-2 fps in that case? Also, when you say the FPS drops from 30-40, what objects are used in that case and what are their hidden and excluded status?

It's not very clear what two situations you are comparing.
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 26th Jun 2012 22:24 Edited at: 26th Jun 2012 22:26
Ah... I didn't think I made it clear... Sowwy... :-(

1st case: 30-40fps

Just setup cubes, hide then, when drawing the map instance them.

2nd case: 1-2fps

Create 5*64 objects of various sides showing, hide them, when drawing the map, instance them.

EDIT: In both case now, they are hidden and excluded. The 1st case still has a high frame rate. I'll try and rip out some of the code and setup an example...

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 26th Jun 2012 22:51
Hmm? When I exclude an instanced object the base object gets excluded as well.

Actually, I still don't really understand what you're doing or what exactly you are comparing. In particular, in the second case, why are you instancing the cubes? I thought the 64 copies were the instances.
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 27th Jun 2012 00:01
Grrrr.... I've ripped out a chunk of code but I'm having an issue with it... Hopefully it will explain it better than what I type up...

Okay, currently not working on the other test mode, but in the main project using the many base tiles for instancing, the FPS drops...



Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 27th Jun 2012 01:27 Edited at: 27th Jun 2012 01:37
Thanks. That should keep me quiet for a while.

Just tested it and I get "Unknown exception occurred at line 149". Perhaps I've got an out of date Matrix1 dll somewhere. I'll investigate.

Edit I did have an old version - but I get the same error with the latest version.
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 27th Jun 2012 02:17 Edited at: 27th Jun 2012 02:18
Yeah, that's what I'm getting with that snippet, but when I run it in the main project it works fine... I'm gonna go through it with a fine tooth comb... In the main project, as soon as I switch over to the tile sets, trying to speed things up, it slows things down. Typical really...

ie. in that snippet, I've got two test modes, 0 for normal, 1 for the test... (That's when I get it to work.)

Another idea to try out is to have the base tile sets, which that function creates, at higher ID numbers to cut down on DBP's internal sorting when they are excluded. It's a thought and I'll let you know how I get on with it...

Sorry about the large snippet...

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 27th Jun 2012 14:40
Neither test mode works here. When TEST_MODE is set to one the program finds certain objects are missing at line 61. This seems to be because those objects are only created when TEST_MODE is set to zero.

Perhaps I should wait till you've got your snippet working as you intend?
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 27th Jun 2012 16:48 Edited at: 27th Jun 2012 17:04
Ah, I forgot the FVF constants...



EDIT: I am thinking that storing a lot of hidden media in memory is slowing it down a lot... Even though it takes up little memory.

EDIT2: Ignore that code for the time being until I've changed some of the testing stuff...

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 27th Jun 2012 20:19
Here we go. Frame drop even though there's less faces being drawn...



Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 27th Jun 2012 22:26
I'll take a look later this evening and report back (unless I get distracted by Diablo yet again ).
greenpavel
15
Years of Service
User Offline
Joined: 13th Jun 2011
Location:
Posted: 28th Jun 2012 07:09
I can not write this, I'm noob in programming

I do not quite understand in what you wrote here

translated translator yandex or google
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 28th Jun 2012 11:36
@pavels - I think what you're after is the instancing. For example, is you make one object for one type of tree (for faster trees use an X billboard object). From this object you can use the INSTANCE OBJECT to create as many copies as you need.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
greenpavel
15
Years of Service
User Offline
Joined: 13th Jun 2011
Location:
Posted: 28th Jun 2012 13:41 Edited at: 28th Jun 2012 13:44
this trees make with clone object.

look fps plz

used dynamic shadows in plugin EXTEND

translated translator yandex or google
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 28th Jun 2012 13:50
Try using instance object not clone object.
greenpavel
15
Years of Service
User Offline
Joined: 13th Jun 2011
Location:
Posted: 28th Jun 2012 14:45 Edited at: 28th Jun 2012 14:47
Now shadows

does not work

thx

translated translator yandex or google
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 28th Jun 2012 15:32
Quote: "Now shadows does not work"


That would be annoying.
greenpavel
15
Years of Service
User Offline
Joined: 13th Jun 2011
Location:
Posted: 28th Jun 2012 17:28 Edited at: 28th Jun 2012 17:29
Look plz

Quote: "That would be annoying. "


I annoy you?

translated translator yandex or google
Matty H
17
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 28th Jun 2012 18:10 Edited at: 28th Jun 2012 18:13
Not quite related but you might be able to improve how the trees look with this command:

set object texture 1, 0, 0

I think your trees(leaves) are losing texture detail due to mipmapping, I had similar issue with imposters which is a slight variation on normal billboarding.

As for shadows, you should probably look for a shader which you can apply to only the closest of trees, although shadows and shaders are not my strong point.


EDIT: Another small tip, the transparency takes up lots of cpu when your camera is up close. I try to make my trees very large so camera level is always far away(below) from transparency, helps a little.

greenpavel
15
Years of Service
User Offline
Joined: 13th Jun 2011
Location:
Posted: 28th Jun 2012 18:25 Edited at: 28th Jun 2012 18:44
the problem is that the command intance object IT does not allow them to make a shadow, with the aid of the command SET SHADOW SHADING ON

translated translator yandex or google
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 28th Jun 2012 22:01
Quote: "I annoy you?"


No. I was agreeing with you. Something got lost in the translation I guess.

I hadn't realised that instancing interfered with the set shadow mapping commands. I'll do a bit of investigating.

Shadow mapping should work though - but that is harder to get right.

Lightmapping is another possibility.
greenpavel
15
Years of Service
User Offline
Joined: 13th Jun 2011
Location:
Posted: 29th Jun 2012 16:24 Edited at: 29th Jun 2012 16:26
@Green Gandalf
-you have a command intance object with the command SET SHADOW SHADING ON give a shadow or not?

that's what they write in the help of the command:


and the FPS drops to create shadows

translated translator yandex or google
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 29th Jun 2012 20:40
I can't get instance object to work with set shadow shading on either.

I haven't tested earlier versions of DBPro though - a few shadow related things were broken in U7.7 and this might be one of them. I'll try to remember to check and report back.

Login to post a reply

Server time is: 2026-07-07 15:11:44
Your offset time is: 2026-07-07 15:11:44