PGD Home

P-152: Virtual World Concept Update 166: Planet-sized Terrain: Part 45

by on Aug.28, 2016, under Astral Realms, P-0, Software and Games, Spiritus Astrum

I believe I have confirmed what the problem actually is with the terrain’s floating origin system.

I have also learned that the 64-bit/32-bit node translation code is not responsible for this problem, as the problem still exists in the untranslated nodes. This makes sense, since the issue is caused by the spherical nature of the terrain, and not the translation.

I have tried various means of solving this, and none have shown much promise as of yet. The only solution that really makes sense is to translate to spherical coordinates, rotate, and translate back, but I am not at all confident about that solving the problem.

I have also discovered that the issue still occurs when I move every node in the renderlist, and not just when I move the nodes from within the terrain parsing code.

Plotting the nodes with gnuplot seems to indicate the the nodes are not actually scaling, they are moving closer to the camera, making them appear larger. In actual fact, the nodes are being correctly moved along the x-axis:

wgnuplot 28/08/2016 , 08:19:20 AM Gnuplot (window id : 0)

wgnuplot
28/08/2016 , 08:19:20 AM
Gnuplot (window id : 0)

The seem to overlap correctly on the X and Y axes, however:

wgnuplot 28/08/2016 , 08:19:15 AM Gnuplot (window id : 0)

wgnuplot
28/08/2016 , 08:19:15 AM
Gnuplot (window id : 0)

There is an offset on the z axis, this is the problem, and it is causing the apparent scaling I am seeing.
Gnuplot also shows that the terrain blocks are moving correctly as the users position changes:

wgnuplot 28/08/2016 , 08:06:23 AM Gnuplot (window id : 0)

wgnuplot
28/08/2016 , 08:06:23 AM
Gnuplot (window id : 0)

wgnuplot 28/08/2016 , 08:06:07 AM Gnuplot (window id : 0)

wgnuplot
28/08/2016 , 08:06:07 AM
Gnuplot (window id : 0)

wgnuplot 28/08/2016 , 08:05:55 AM Gnuplot (window id : 0)

wgnuplot
28/08/2016 , 08:05:55 AM
Gnuplot (window id : 0)

My latest idea is to ignore the complex spherical algorithms and formulas, and simply try to correct the offset on the Z-axis manually. The distance that the terrain will need to be moved is constant (10,000 meters) and the radius of the planet is constant, so the offset on the z-axis *should* be the same too. This would mean that once I discover what this offset it, I can manually apply it when I move the terrain. This is not an ideal solution, but it may work for the moment.

 

P152_DEBUG 28/08/2016 , 04:13:55 AM Torque 3D MIT - P152

P152_DEBUG
28/08/2016 , 04:13:55 AM
Torque 3D MIT – P152

P152_DEBUG 28/08/2016 , 04:13:35 AM Torque 3D MIT - P152

P152_DEBUG
28/08/2016 , 04:13:35 AM
Torque 3D MIT – P152

P152_DEBUG 28/08/2016 , 03:57:39 AM Torque 3D MIT - P152

P152_DEBUG
28/08/2016 , 03:57:39 AM
Torque 3D MIT – P152

P152_DEBUG 28/08/2016 , 02:54:10 AM Torque 3D MIT - P152

P152_DEBUG
28/08/2016 , 02:54:10 AM
Torque 3D MIT – P152

 

Facebooktwitterredditpinterestlinkedinmail

Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!