openSimEarth gets statics, and goes back to decal roads.

  • 1
  • 2
18 posts Page 1 of 2
chriscalef
Posts: 326
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Thu Nov 12, 2015 8:04 pm
Hey there, just a quick update on the recent progress...

First off, the next major world building component is now in place: in addition to terrain, forests, and roads, we can now place TSStatic objects with the World Editor, save them to the database, and page back through them at will.

Image

As you can see, I didn't do much with this godlike ability yet, because that devolves quickly into countless hours of art time, but in this image the Zero (from flightgear, textures still broken) and the wharf and industrial shacks (many thanks to 3TD Studios for the free art!) are placed using this method. Note that scale also works, as demonstrated by the taller building in the background.

The other big news is, thanks to a most helpful comment from @
User avatar
JeffR
on my last blog, we are now able to return to DecalRoads instead of MeshRoads, due to the containsPoint() function. In addition to being much more efficient, in this way we also are able to get rid of the absolutely unusable Z fighting which always seems to follow my MeshRoads around, possibly due to float error from being too far from the origin (running around six or seven thousand meters out here).

However, I'm still having major problems with raycasts at the edge of the terrains. Here is an older image with MeshRoads and trees, demonstrating my problem:

Image

As you can see, reported heights become wildly inaccurate at the terrain edges. Which actually makes for some pretty amusing bugs on the mesh roads, but hardly desirable. Lacking the time to really dig into this, I've been simply avoiding putting trees close to the terrain edges, and I fear I will have to do the same thing with roads, for now. While mesh roads show the problem as seen above, with decal roads the symptoms are different - from one side, but not the other side, of the divide, any decal road crossing from one terrain to another will shoot vertically up in the air, not infinitely but for quite a distance:

Image

Since this whole world is meant to be more for fun and experimentation than for a perfect simulation at this point, I think I'm just going to work with what I have and create a little DMZ style "no man's land" between each terrain tile. Eventually I plan to move this to T6, and/or fix the problem here, but other parts of the project are calling my time harder than this. If anyone has any ideas, I'd love to hear them though!

As a final note, this might be a good time to mention: openSimEarth needs art! If anyone out there in Torque world has public domain artwork, or private models they'd be willing to share, including trees and other vegetation, animals, houses, industrial buildings, and/or anything else you think would fit in, please consider contacting me, I'd love to give you credit and include some of your work!

So anyway, that's where we are for now...
JeffR
Steering Committee
Steering Committee
Posts: 694
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Thu Nov 12, 2015 9:18 pm
I'd seen a few other people comment about casts and stuff breaking down on terrain edges, but hadn't had much luck with replication. I take it it happens with every block seam?
chriscalef
Posts: 326
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Fri Nov 13, 2015 6:27 am
Yeah, this has been regular as clockwork for me. It's interesting because the heights go crazy, but only within somewhat reasonable limits, they definitely don't go completely NaN0 on me. I'm also not at all sure that the problem with the decal roads is exactly the same problem as what I'm getting with the mesh roads and trees.

For the forests and mesh roads height values are being set through a server container castRay. I'm suspicious about whether it could be trying to interpolate heights to the other edge of the same terrain tile. (Will have to test it on flat terrain.) I know through earlier help from Andy Wright that a similar problem is what causes the dark shading on many terrain edges - it is more prominent on tiles with a larger height difference between opposite edges.

The decal roads seem a little different. Observed behavior is they pretty much all stick up to the same maximum height when a road goes completely across a terrain border, but a very interesting lesser effect was noted: when you move a road gradually across a terrain border in the road editor, the edge of the road sticks straight up at the terrain edge, and goes higher as you bring it farther over the border. It would seem that the road decals can't figure out how to cross from one terrain to another.

Also interesting was that the decal road behavior is only visible from one side of the border, from the other side it looks fine. :? One sided polygons?

Anyhow, I'll poke around on it but I don't think it's going to be my highest priority at the moment. And who knows, it sounds like @
User avatar
andrewmac
has a terrain engine that's running laps around this one, so maybe I'll just have to try dropping all this into there pretty soon...
Azaezel
Posts: 368
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Fri Nov 13, 2015 7:47 am
chriscalef
Posts: 326
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Fri Nov 13, 2015 8:12 am
OMG, that looks like an _extremely_ helpful PR, yes, thank you Az. I'll be sure to profile some of those disputed methodologies in there while I'm at it. :-)
JeffR
Steering Committee
Steering Committee
Posts: 694
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Fri Nov 13, 2015 3:43 pm
Yeah, I did pull that to test, there was some issue with the terrain texture fix they added, so I'll try and get that sorted out and we can get it merged in.

As for the edge issue, I did create a new map with 2 terrains side by side, both flat, and plunked the cheeta right on the seam, and all 4 wheels correctly matched to the ground(which uses raycasts)

So the best-guess so far is that - going off your mention it seems to be a problem when the opposite sides of the terrain block have differeing heights - the terrain is trying to have wrapping occur, even if that setting is off. If that's the case, that should narrow things down quite a bit.
chriscalef
Posts: 326
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Fri Nov 13, 2015 5:23 pm
Yup, sure enough, I tested it in a place with less height difference, and the problem is much reduced. This is kind of a messy screenshot because of the road interference, but here you can see the trees right in front of the camera only slightly higher than their neighbors, while the trees going off to the left, with a major height difference, are much higher. Bingo.

Image
JackStone
Posts: 67
Joined: Fri Oct 02, 2015 1:03 am
by JackStone » Mon Dec 28, 2015 2:45 am
This project looks amazing! It is quite similiar to my current main project, which is to create a kind of "Sandbox Universe". I am not creating a flight simulator or a representation of the real life earth, it's more of an artificial life/simulated reality project.
The challenged you are facing will be very similiar to what I will be facing, I suspect, particularly the paging terrain.

Is your terrain spherical, like mine is/will be? Or is it a very large "flat" terrain?
chriscalef
Posts: 326
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Wed Mar 16, 2016 3:05 am
Good lord, how time flies! Sorry I somehow missed your comment from MONTHS ago, @
User avatar
JackStone
, but thanks!

To answer your question, my terrain doesn't deal with the earth as a sphere, except in the sense of getting data that comes from the spherical earth... ie, since I'm focused on primarily a first person view, with some perhaps generally low elevation flying, I'm only planning to load a reasonable amount of 3D terrain at a time, not enough to justify messing around with the slight curvature that would be present at this scale. If you were to keep walking, you would eventually loop around (assuming the game didn't crash before you got there, lol) but at any given place, the heightfields are assumed to be coplanar.

Good luck with your project, look forward to hearing more about it!
JackStone
Posts: 67
Joined: Fri Oct 02, 2015 1:03 am
by JackStone » Sat Mar 26, 2016 1:48 am
Thanks a lot for that explanation, your project is very interesting!
  • 1
  • 2
18 posts Page 1 of 2

Who is online

Users browsing this forum: No registered users and 1 guest