Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: DaBrain on June 03, 2006, 07:04:51 am

Title: Subobject lod
Post by: DaBrain on June 03, 2006, 07:04:51 am
I'm building something really big for SoL. There is no way a PC will be able to show the whole thing with a decent performance. So I'm using subobjects to utilize the subobject lod system. It's a bit complicated to use, but that's not the problem.

My problem is, that so far, I've only seen one model that is using it, but in a different way, I'd like to use it.
Omniscaper's Deathstar seems to 'add' stuff at close range. So it's not beeing rendered at all.

I'd like to use two lods for my subobjects. I don't want them to disapear at all. No matter how far they're away.

How do I have to set this up? (subobject01a, subobject 01b ?)
Title: Re: Subobject lod
Post by: Flaser on June 04, 2006, 04:43:21 am
The thing you're actually speaking of is "detail box"-es.
Bobbau coded this, so you can put high poly detail subobjects onto a ship that will only show up when the player ship enters a given box around it.

(Actually LODs do pretty much the same, except its a variable distance from an arbitary point instead a box and they change the whole model, not just a part of it.)

It was originally made for putting the hangars into the WCS capships.
Omniscaper has shown its true potential with the Death Star.

The prime reason why you should be using them instead lods for very big objects is that only the boxes close to the camera will be drawn, so only a limited number of high poly objects instead all of them. (So in essence you can force the engine to only calculate/draw the visible part of the model without wasting processing power on other parts of the model.)

The real trick though is that you can put further detailboxes into the bigger ones.
Omni's Death Star was not that optimized in this regard.
In your shoes I would build the model with all the detail I wanted to, then start zooming out....whenever some features blur together I would group them togherther and put them in a detail box.
Then I would cull all of that stuff or collapse it into a simpler geometry and readd it to the model.
I would repeat this process until I'm at a scale where I can finally make LODs that affect the entire model.
Title: Re: Subobject lod
Post by: DaBrain on June 04, 2006, 10:06:09 am
Well... is there a way to actually 'switch' subobjects depending on the distance?

I don't really want to group things.
Title: Re: Subobject lod
Post by: StratComm on June 04, 2006, 11:32:16 am
So you just want groups of one.  The system is more flexable than that (though not substantially so).  The general idea is to make the high and low detail objects both children of the primary LOD that they will appear on and then to set the detail box up for each so that one appears inside a certain radius and one appears when you are outside.  You cannot make them span primary LODs though, and I'm not sure they will work out of subsystems.  I can't remember the exact syntax but it should be in the wiki.