LoD/billboarding on an entity?

Everything related to 3D programming
Khorne
New User
New User
Posts: 7
Joined: Thu Dec 06, 2012 2:49 am
Location: Cascadia

LoD/billboarding on an entity?

Post by Khorne »

Is there a way to make an entity use different meshes or switch to a billboard as its distance from the camera decreases (or the other way around, switch a billboard to an entity)? I have a program with about 200,000 billboards that I would like to be able to switch into entities as the camera approaches.
User avatar
Comtois
Addict
Addict
Posts: 1432
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Re: LoD/billboarding on an entity?

Post by Comtois »

I have a program with about 200,000 billboards that I would like to be able to switch into entities as the camera approaches.
so your entity will be a plane using the billboard's material ?
Please correct my english
http://purebasic.developpez.com/
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Re: LoD/billboarding on an entity?

Post by Num3 »

You have to code it yourself...

I don't know if you know this, but this is the technique used in Farcry (CryEngine) to do the massive jungle scenarios (after a certain distance all the vegetation meshes are replaced by static billboards).
Khorne
New User
New User
Posts: 7
Joined: Thu Dec 06, 2012 2:49 am
Location: Cascadia

Re: LoD/billboarding on an entity?

Post by Khorne »

Comtois wrote:so your entity will be a plane using the billboard's material ?
Not quite. My entities represent stars and I want to have a model and decent shader/lens flare loaded when the camera is close, but don't want 199,999 × 14 extra faces in the scene.

Num3 wrote:You have to code it yourself...
I don't know if you know this, but this is the technique used in Farcry (CryEngine) to do the massive jungle scenarios (after a certain distance all the vegetation meshes are replaced by static billboards).
Thanks. I am aware that that's how it's done, but I wasn't sure if I had to code it myself in PB or if OGRE already had LoD support covered.
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Re: LoD/billboarding on an entity?

Post by Num3 »

OGRE meshes can be saved with pre-calculated LOD levels, but it only effects the polygon count.

AFAIK the engine itself does a texture LOD on-the-fly when they are loaded, but in terms of model meshes it does not....
Khorne
New User
New User
Posts: 7
Joined: Thu Dec 06, 2012 2:49 am
Location: Cascadia

Re: LoD/billboarding on an entity?

Post by Khorne »

Num3 wrote:OGRE meshes can be saved with pre-calculated LOD levels, but it only effects the polygon count.
Thanks, that's working perfectly!
Post Reply