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
The Viking
17
Years of Service
User Offline
Joined: 21st Oct 2008
Location: Asgard
Posted: 20th May 2010 06:11 Edited at: 20th May 2010 06:13
Ok, another question, which I could have asked in my current thread, but I thought since this is unrelated, it may be best to ask it in a different thread.

Anyways. I have been able to figure out how to load a base terrain (planes) as required and exclude the unwanted ones. Now the issue comes with foliage on the large terrains. I'm using the Instance command to clone many of these objects, although the issue comes with the grass. There is so many of these objects that to make it look like a dense grassy area, I'm looking at >1500 objects, just for the grass, not including trees. The objects are simple planes, although it slows down the system significantly!

So, to make another long story shorter, how would I go about repositioning the objects which are off screen to specific locations in the next map section. (each section is 1000x1000 units)

Here is some code for you all:

For loading the files and instancing


For the LOD:


Finally the Map Update Function:


So, I'm sure there are better, and easier ways to go about this issue. Any ideas on how to optimize this section, or minimize the number of objects. Minimizing objects would be best, because this is not even close to the size of the map I would like to have.

Thanks all!

www.myspace.com/norseblod
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 20th May 2010 09:24
Split the map into a grid, depending on the size of said grid, only display the grass on the current cell. Or add the grass as a limb and let the LoD code show/hide it.

My signature is NOT a moderator plaything! Stop changing it!
The Viking
17
Years of Service
User Offline
Joined: 21st Oct 2008
Location: Asgard
Posted: 20th May 2010 15:38 Edited at: 20th May 2010 15:44
Well, currently my map is split into a 5x5 grid at 1000 units each section. I only show the surrounding tiles, 2 in depth at a time. I didn't think of adding them as limbs, that would work.

Although, the issue still becomes, how would I reduce the number of objects if they are attached as these limbs, then there would have to be even more objects made.

I am convinced that the drop comes from having TOO many objects. For instance, I would have just the plane visible in some spots, and it would show ~1000 poly's, although the rate is ~40 and if I show the required amount which is the surrounding tiles as well, this drops to ~11 FPS. From which it use to run at >400 if I didn't have those extra objects.

So, is there any better way to get tall grass and a large terrain without having to use so many objects?

www.myspace.com/norseblod
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 20th May 2010 16:01
You can just load a mesh in, and keep adding it as a limb until the required amount of grass is made. You can do this for LOD by for example, creating 1 object with 100 grass limbs for hi quality, 50 limbs for med quality and 25 for low quality. The new built in LOD commands then make drawing them simple as pie.

My signature is NOT a moderator plaything! Stop changing it!
The Viking
17
Years of Service
User Offline
Joined: 21st Oct 2008
Location: Asgard
Posted: 20th May 2010 19:12
Sorry Mobiius, I guess I'm not fully understanding. It still sounds like there are going to be many objects made from this because I would have to load x number of grass limbs per section of map... so, with 100 on each section x 25 map tiles = 2500 objects.

What I would like to do, I don't know if it'll work, if not please tell me, is to make the 100 objects for grass, and position them in specific locations infront of the camera, and when one moves off screen, reposition it to the position specified by the section which moved on screen. (If that makes sense) Though, I'm hoping to have the grass fairly dense looking in some sections.

So, if I add a .x object as a limb, would it be any different positioning it as an object (any faster)? Because it's the large amount of objects which are killing me ultimately.

On another note, isn't the built in DBPro LOD command kind of slow? It's been a while since I worked on LOD stuff, so I don't remember.

www.myspace.com/norseblod

Login to post a reply

Server time is: 2026-07-25 10:58:13
Your offset time is: 2026-07-25 10:58:13