Author Topic: [Solved] Detail Box Problem  (Read 4241 times)

0 Members and 1 Guest are viewing this topic.

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Steam
[Solved] Detail Box Problem
Special thanks to zookeeper for pointing out my coordinates were wrong.   :)



Original Post Folows


Ok, I've started messing around with detail boxes but hit a bump in the road.

As a test, I only put one dish into LOD's and assigned their object properties like so:

Dish04a (LOD 0)
Code: [Select]
$detail_box: 1
$box_min: 0,0,0
$box_max: 72,72,72

Dish04b (LOD 1)
Code: [Select]
$detail_box: 1
$box_min: 72,72,72
$box_max: 79,79,79

Dish04c (LOD 2)
Code: [Select]
$detail_box: 1
$box_min: 79,79,79
$box_max: 104,104,104

Dish04d (LOD 3)
Code: [Select]
$detail_box: 1
$box_min: 104,104,104
$box_max: 117,117,117

Dish04e (LOD 4)
Code: [Select]
$detail_box: -1
$box_min: 117,117,117



See the guy on the left? That's my lowest LOD for the dish (Dish04e). He shouldn't be showing up until at least 116 units away in "Normal" detail.

Currently, however, he shows up for all distances, regardless of how close you are.


This happens even when all detail settings are maxed.

.exe version is: 3.6.12R  Inferno SSE2
« Last Edit: February 04, 2011, 02:14:37 pm by z64555 »
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

  

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
I'd suggest not trying to mix LODs and detail boxes. If you're sure that detail boxed LODded subobjects do work, then by all means, but I don't know if they do. Any particular reason why you'd want to use both?

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Pretty sure detail boxes are either on or off if you are in the box.  So you would have both of those on if your in the box and both off if your outside it.  Better just to use normal LODs unless you have something over 10k polies that can only be seen close up or from the inside of a hanger or something.
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Steam
I'd suggest not trying to mix LODs and detail boxes. If you're sure that detail boxed LODded subobjects do work, then by all means, but I don't know if they do. Any particular reason why you'd want to use both?

This is part of an experiment that I'm trying out, to see if using Detail boxes for sub-object LOD control is a viable option for smoother LOD transitions for standard and low detail settings. I figured that since the center-points of each sub-object where significantly far enough away from the detail0 center-point, that having the sub-objects switch LOD's by themselves would be worth testing.

Pretty sure detail boxes are either on or off if you are in the box.  So you would have both of those on if your in the box and both off if your outside it.  Better just to use normal LODs unless you have something over 10k polies that can only be seen close up or from the inside of a hanger or something.


The whole detail0 main object comes out to about 1800 tri's, but there's something about the way the mapping is set up that saps out a lot of fps for only one of these stations. (The map its designed to go into has 4 of them).

I edited the OP to include all code entries for the subobject LOD's.
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Well, there's also the issue that your coordinates are weird. This doesn't result in a 72x72x72 cube around the subobject:

Code: [Select]
$detail_box: 1
$box_min: 0,0,0
$box_max: 72,72,72

What it results in is a 72x72x72 cube sitting next to the subobject, with one of its corners touching the subobject center. I'd assume that what you really want is this:

Code: [Select]
$detail_box: 1
$box_min: -36,-36,-36
$box_max: 36,36,36

...which does result in a 72x72x72 cube that's centered on the subobject.

Your problems with Dish04e might be due to the fact that it doesn't have $box_max at all; I'm surprised the game doesn't just choke and die on it, but since it doesn't, it might be it just assumes that everywhere is outside such a nonsensical box. I think you're mistakenly thinking that the detail box coordinates specify distances at which the subobject should be visible/invisible, whereas actually they just specify the coordinates of a box inside/outside of which the subobject is visible.

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Steam
Well, there's also the issue that your coordinates are weird. This doesn't result in a 72x72x72 cube around the subobject:

Code: [Select]
$detail_box: 1
$box_min: 0,0,0
$box_max: 72,72,72

What it results in is a 72x72x72 cube sitting next to the subobject, with one of its corners touching the subobject center. I'd assume that what you really want is this:

Code: [Select]
$detail_box: 1
$box_min: -36,-36,-36
$box_max: 36,36,36

...which does result in a 72x72x72 cube that's centered on the subobject.

Your problems with Dish04e might be due to the fact that it doesn't have $box_max at all; I'm surprised the game doesn't just choke and die on it, but since it doesn't, it might be it just assumes that everywhere is outside such a nonsensical box. I think you're mistakenly thinking that the detail box coordinates specify distances at which the subobject should be visible/invisible, whereas actually they just specify the coordinates of a box inside/outside of which the subobject is visible.

Huh, ok. Tested it in-game and it solved the issue, thanks for that  :yes:

Originally I thought that coordinates determined the length, width, and height of the sides of the box, rather than the distance away from the centerpoint. Additionally, I thought that "box_min" and "box_max" defined a volume with a hole in the center of it.

Well, this is both good news and bad news, good in that I can offset the detail box like I originally wanted to (instead of it being radial, it would be eccentric, like with eccentric circles.) But bad/good in that only 2 detail LOD's may be used per main mesh LOD.

I think I can make it work now...
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline Flipside

  • əp!sd!l£
  • 212
Re: Detail Box Problem (Resolved)
As an aside, interesting looking model you have there, reminds me of the stations from X for some reason.... ;)

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Well, this is both good news and bad news, good in that I can offset the detail box like I originally wanted to (instead of it being radial, it would be eccentric, like with eccentric circles.) But bad/good in that only 2 detail LOD's may be used per main mesh LOD.

Assuming I understand what you're saying: no, you can use as many detail box levels as you want, as you can combine both detail box types on a single subobject. This would make the subobject get drawn only when your distance from is more than 100 but less than 200:

Code: [Select]
$detail_box: -1
$box_min: -100,-100,-100
$box_max: 100,100,100

$detail_box: 1
$box_min: -200,-200,-200
$box_max: 200,200,200

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Steam
Re: Detail Box Problem (Resolved)
As an aside, interesting looking model you have there, reminds me of the stations from X for some reason.... ;)

This is an updated version of the Fenris Arena corner-station from Tachyon: The Fringe. Carl was the one who made this, and I'm trying every trick possible to try and reduce the rendering load on this heap of junk I have.  :sigh:

Well, this is both good news and bad news, good in that I can offset the detail box like I originally wanted to (instead of it being radial, it would be eccentric, like with eccentric circles.) But bad/good in that only 2 detail LOD's may be used per main mesh LOD.

Assuming I understand what you're saying: no, you can use as many detail box levels as you want, as you can combine both detail box types on a single subobject. This would make the subobject get drawn only when your distance from is more than 100 but less than 200:

Code: [Select]
$detail_box: -1
$box_min: -100,-100,-100
$box_max: 100,100,100

$detail_box: 1
$box_min: -200,-200,-200
$box_max: 200,200,200

Hmm, the Wiki page may need updating, as I didn't see it mentioned that you could do that...
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Re: Detail Box Problem (Resolved)
Well, this is both good news and bad news, good in that I can offset the detail box like I originally wanted to (instead of it being radial, it would be eccentric, like with eccentric circles.) But bad/good in that only 2 detail LOD's may be used per main mesh LOD.

Assuming I understand what you're saying: no, you can use as many detail box levels as you want, as you can combine both detail box types on a single subobject. This would make the subobject get drawn only when your distance from is more than 100 but less than 200:

Code: [Select]
$detail_box: -1
$box_min: -100,-100,-100
$box_max: 100,100,100

$detail_box: 1
$box_min: -200,-200,-200
$box_max: 200,200,200

Hmm, the Wiki page may need updating, as I didn't see it mentioned that you could do that...

Now that I think of it... I'm not sure if that works after all. I had a clear picture in my mind of using that trick many times, but suddenly I'm not sure at all. :confused: Better test it first yourself.

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Steam
Re: Detail Box Problem (Resolved)

Now that I think of it... I'm not sure if that works after all. I had a clear picture in my mind of using that trick many times, but suddenly I'm not sure at all. :confused: Better test it first yourself.

It doesn't work.  :p

3.6.12R ignores the second entry, but 3.6.12D has a heart attack when trying to play in-game (Lab renders it just fine).

At any rate, having more than two D boxes per main mesh LOD would be pointless, as you'd be switching to a different main mesh LOD before switching to a third or forth D box.
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 
 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Steam
Re: [Solved] Detail Box Problem
3.16.13 Build 6974 SSE2 didn't recognize the second detail box entry for me, either.
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.