hi, I’m making a game where the terrain is generated as you start, for that I’m making it load like
<— Number of Objects —>
6(1/64 of the whole map)
6(in a square form)
4(for each of the four sides)
4(each block have 4 subblocks)
16(each subblock have more 16 subsubblocks) objects in
total: 9216
<— Number of Nodes containing the objects —>
1(root)
4(quarter)
4(1/4 of each block)*
16(1/16 of the 1/4 of the block) nodes…
total: 256
when i press “B” to see the bounding boxes, i can’t really see anything but white… OK not that bad. here a screen two screens:
This is from the middle of the generated terrain:
This is from the boarder of the generated terrain, the terrain ends there, but the lines won’t O.o
does it causes any problem? and even if not, how to reduce the amount of lines? i will be unable to use “B” whenever i need if this keeps this way T.T
6(1/64 of the whole map)*
6(in a square form)*
4(for each of the four sides)*
4(each block have 4 subblocks)*
16(each subblock have more 16 subsubblocks) objects in
1(root)*
4(quarter)*
4(1/4 of each block)*
16(1/16 of the 1/4 of the block) nodes...
Don't really understand what this means, so it's gotta be quite complicated. No surprise your bounds are like that :)
edited quoted part to make it sound more logical, im not even sure if the number of objects being far superior than the number of nodes to contain then might be the problem, but you never know…
Well, Ideally the bounding box would end with your model, so perhaps this has a problem somewhere. Why don't you try with a smaller test case and go from there?
duenez said:
Why don't you try with a smaller test case and go from there?
hmm, as i get home today i will make 3 tests:
load 1 terrain radius in 1 direction: 64 objects(1*1*4*16)
load 1 terrain radius in 4 directions 256 objects(*1*1*4*4*16)
load 6 terrain radius in 1 direction: 2304 objects(6*6*4*16)
then i will post here what happens. but if anyone can give more sugestions untill then, i will only be at home in 7 hours from now ;D
thx for the help untill now.
So you have lots of subblocks, and subsubblocks, sides, forms and other things. No surprise you got lots of bounding lines? Level depth is Z, Node count per level is Y, so # of bounding boxes is (Z^2)Y, there are 4(top) + 4(bottom) + 4(vertical) + 6(diagonal) = 18 lines per bounding box, 18Y(Z^2) lines for your entire map, thats 165,888 for your object count?
Momoko_Fan said:
So you have lots of subblocks, and subsubblocks, sides, forms and other things. No surprise you got lots of bounding lines? Level depth is Z, Node count per level is Y, so # of bounding boxes is (Z^2)Y, there are 4(top) + 4(bottom) + 4(vertical) + 6(diagonal) = 18 lines per bounding box, 18Y(Z^2) lines for your entire map, thats 165,888 for your object count?
it's indeed normal to have a lot of then, but as you can see on screenshot 2 they are streching far beyound where there are no objects, and far above too(forgot to check below), tough there are no screenshots to see how it's above(neither below)
so… finished testing the separated cases.
Aditional note i should have said before: each quarter loads on a diferent thread… (seens that will be important for some reason)
First Test:
just quarter 1:
loaded perfectly, no crazy going to nowhere bonding lines
Just quarter 2:
all the nodes loaded on the same place… the bounding boxes loaded perfecly and where they are meant to be tough (with the nodes in the wrong position)
Quarter 1 and 2:
both loaded perfectly(the nodes) but the crazy bounding lines came again T.T
don't know what it should mean, if i load quarter 1 and 2, quarter 2 WILL get the nodes in the correct place, if i load both Quarter 2 and 3 they will both load wrongly… the code is exactly the same tough… all what changes are the direction of loading.
please help!!!
Perhaps it is something as easy as a call to updateGeometricState?
ooh. that fixed the problem with when i load the Quarters 2 and 3 without the Quarter1. how they go to the propper direction and they got no strange bounding lines, they just get perfect… then i decided to load Quarter 2,3 and 4.
worked perfectly!
then i decided to load Quarter 1,2,3 and 4…
…
the strange bounding lines that stenches to god know where were back…
Then i loaded the Quarter 1 alone!!!
everything was fine…
… just 3 sides missing…
…
so… i guess i got it, Quarter 1 is antisocial, he just can't get along with then!
jokes apart, anyone have a last idea on what the hell is happening? T.T it just won't make sense at all
Thread was at fault… this evening i loaded then all in a single thread and it worked fine.
gonna see what went wrong…