This topic is 2 pages long:   1  2  |
Author Topic:   Anyone have questions/projects to discuss, etc?
JamesC
Member
posted May 22, 2000 01:53 PM            
Hey Bryan, have another question or 2 about the variance tree... more of a C++ question than anything. In the patch class, 2 to variance trees are defined like: unsigned char m_VarianceLeft[ 1<<(VARIANCE_DEPTH)]; Whats going on here? It looks like your bit shifting 1 to left by 9 (value of VARIANCE_DEPTH) which would be a multiply... I don't see how this works... also, is there any reason for the () around the 9 in #define VARIANCE_DEPTH (9) maybe this is another trick that I'm not seeing here.. enlighten me oh grandmaster roam man

IP:

Bryan T
Member
posted May 22, 2000 02:12 PM            
JamesC,

Heheh, so my years of C coding is showing through.. *sigh*

The parenthasis around the digits in the #define macro are a C coding style. It forces the macro to be atomic, so there are no questions about its use in an expression.

The bitshift used in the definition of variance is based on the size of a full binary tree for a given depth. A binary tree of depth 1 is of size 1, for depth 2, it is of size 3, depth 3 is of size 7, 4 == 15, 5 == 31, etc.. This corresponds to 2^depth. Thus the shift calculates how many nodes will be needed for a tree of depth VARIANCE_DEPTH. (in this case, 9)

Does that figgure?
--Bryan

IP:

nico
New Member
posted May 24, 2000 07:21 AM            
Bryan,

I'm new to LOD, but I think I'm starting to get my brain wrapped arroud ROAM (great article by the way ) I have a couple questions thoug..

I read somewhere that split/merge, frame coherent implementations of ROAM are slower than split-only implementation.. This makes no sense to me.. I though a split-only version would require more split operations, because the whole tree has to be rebuilt. ?

If I choose to go with split/merge, is there really a need for 2 separate queues? Couldn't I just use the variance tree as a queue, choose the diamond with the lowest variance when I need to merge, and the one with the highest variance when I need to split?

- Nicolay Ramm

IP:

Bryan T
Member
posted May 24, 2000 11:56 AM            
Nico,

Tough question. I've read several articles describing the problems with ROAM split / merge implementations. Since I have not tested this directly, I can only agree with them on an intelectual level.

So, back to your question. Split/Merge is not slower than Split Only. The articles discussed Split/Merge versus other frame coherent methods, not Split/Merge versus Split Only.

The queues are required because the Variance Tree only has surface roughness information, not distance-to-eye or desired resolution. The actual Split Metric takes this additional data into account on top of the surface roughness.

The queues thus hold the calculated information about what triangles are not only roughest, but also closest to the eye.

Thus, when splitting with the priority queues, you will always split triangles by their distance-to-eye first then by roughness.

--Bryan

IP:

shawge
New Member
posted May 24, 2000 02:08 PM         
I was wondering if people have mapped other
terrain characteristis like overhangs and
caves. Height maps can be used but you have
to find a way to overlay multiple maps. Are
there other terrain formats that take into
consideration other land forms? What about
algorigthm considerations? How would one go
from a ROAM or adaptive Qtree algo to a
BSP or octree algo when transitioning from
outdoors to indoors?

IP:

JamesC
Member
posted May 29, 2000 03:38 PM            
Hey Bryan, found 2 interesting bugs in your ROAM implementation. The first is a spike that appears in the last tri of the last patch being rendered... it shoots the z value straight up instead of using the last heightmap value... this is in both your OpenGL implementation and the port to d3d that I did. I'm sure this one won't be too difficult to fix... I'll look into it if you already haven't.. or if you know about it (can't really miss it when viewing the last patch) and know how to solve the problem let me know before I start ripping up code The next bug is a little more involved and doesn't matter unless one plans to use multiple Landscapes linked to create infinite sized terrain. When you (the view position) leave the terrain, (therefore causing negative view position numbers) the Tessellation increases the variance and renders more detail the farther away you get! This one I dunno about.. looks like the way distance and current variance may need to be refitted to fix this one... what are your thoughts?

IP:

Bryan T
Member
posted June 06, 2000 02:16 PM            
JamesC,

Aw, is that spike back again? I could have sworn it was fixed for the demo... Last time I fixed it, it was accessing the byte directly after the HeightMap.

I fixed this as part of an optimization by adding another row at the beginning and end of the Height Map which wrapped the terrain correctly. For some reason I guess this didn't fix it on your end? Odd. I'm using a completely different engine now and it has the same error (different reason tho).

As for the view position, that should work fine, I'm using absolute value around the distance calculations. The distances should be correct regardless of negatives.

If this is truely a problem I suggest moving all your landscapes to be in the first quadrant, so you won't have negative view positions. This was the intention when originally designing the class, but there is no mention of this in the article or code (my fault). Still, the distance calculation should be working..

--Bryan

IP:

JamesC
Member
posted June 06, 2000 07:45 PM            
Weird about the spike, the add an extra row above and below is still there and I didn't modify that part.. the spike is in the original zip that came with the tutorial you did. I see what you mean as far as the distance thing was concerned.. I was moving into different quads.. doesn't matter, it was just a heads up, for what I'm planning its fine if the terrain stays in the first quad.

IP:

This topic is 2 pages long:   1  2