Skip to main content
gamedev.net
🔒 Locked

ROAM sphere

Started by immuner 1 reply 1.5k views
Original Post
immuner
immuner
Hello, i have a problem generating a ROAM sphere out of my cube (6 patches). I am calculating the midpoints normally such as for the top patch x and z according to the parent vertices and y as a fixed value for the height. Then im normalising, multiplying by the radius and adding the offset for my displacement to this vector. The result is a quite messed up mesh after my 2nd level. Clearly i am doing something wrong, but any ideas? thank you
Keyboard not found. Press F1 to Continue.
zedzeek
zedzeek
post screenshot of the LODs (wireframe)
also r u sure this is an issue with ROAM (i assume by 2nd level u mean the level after the highest level of detail?)
immuner
immuner
no i am not saying this is an issue with ROAM i just mentioned the technique i am using. I already have an LOD patch so im sure it works. Here is the image: http://img119.imageshack.us/my.php?image=terrain3bq.jpg

I was wrong about the 2nd level....It generally comes messed up after any subdivisions. By levels i mean the levels of subdivision...level 0 = two triangles, etc....

the actual code is:

//if top patch

vertices.x = vertices[left_triangle].x + vertices[right_triangle].x;
vertices.z = vertices[left_triangle].z + vertices[right_triangle].z;
vertices.y = top_patch_initial_height;

vertices.normalise();
vertices.multiply(radius);


the result is nothing like the top part of a sphere
Keyboard not found. Press F1 to Continue.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.