Jump to content

Big world impostor test, 128m.


animats
 Share

You are about to reply to a thread that has been inactive for 292 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

One of my ongoing projects  for Sharpview - automatically generated sim surrounds for distant regions. This is a simple test. The goal is to create the illusion of infinite draw distance.

bonifaceiodistfs1.thumb.jpg.e4177a801ea1d54e4ca1948531cc4fd9.jpg

Looking into the next region, ultra mode. This is in Morris on the beta grid, looking into Bonifacio. Firestorm. 128m from region edge.

bonifacioinsdist1.thumb.jpg.43045006c1a18ac0b644f76be9f783ad.jpg

Faking it in Sharpview. Those buildings in the distance are just a flat picture of the next region. 128m away.

The picture is on a big prim I set up at the edge of Morris on the beta grid. This is in Sharpview, and the distant mountains in the background are a surround I have built into the viewer for now. This is just a proof of concept image.

The concept here is that the viewer would draw the nearest four regions only. So you're always at least 128m from the edge of the world. More distant regions are just flat surrounds. The idea is to have a database of surrounds, like map tiles, updated once a week or so. (No need to do this for anything smaller than four regions, of course.) This is a test to see what that would look like.

The radio tower looks better in the flat picture. No holes in the right hand building in the flat picture. This deals well with bad lower LODs. The parallax is slightly off, though. Here, that's not noticeable. But this trick would not look as good if you were in a city such as Bay City and on a diagonal road. It's not a perfect solution.

It would be better to draw 9 regions for real - the one you're in, and its 8 neighbors. Then you're never closer than 256m to the flat picture. At that range, this illusion holds up really well, and that's about where GTA V switches to a flat background image. It takes a lot of resources in the viewer to draw 9 regions at a good level of detail, though.

The idea is also to have pictures from above, so if you're high above the ground to see ground in the next region, you see the top view, or something like my slippy map of SL.

This is just to show that it could be possible to see a long, long way in SL. Nowhere near implementation.

The goal of all this is to make SL mainland feel big, like modern open-world games.

 

  • Like 6
  • Thanks 3
Link to comment
Share on other sites

29 minutes ago, CandyCole said:

I wish I could say that I understood what an 'impostor' is, but I have no idea. I was lost at the title.

An impostor, in this context, is a simplified object that, at distance, looks like the real thing, but takes less computer work to draw.

Here's an image from Grand Theft Auto V.

https://www.kitguru.net/wp-content/uploads/2015/03/GTA-V-PC-2-e1427483637185.jpg

Nice house. A good SL creator could make a house like that in Second Life. SL can handle that kind of detail. What it can't handle are those long vistas in the background.

There's a trick here. You're seeing a 3D model of a house against a background picture. If you look carefully, you can see the transition, behind the house. The background is softer and a bit blurry, and dims into haze. Only a small part of the world is shown in full 3D.

It takes more than that to do a big world well.

GTA V tourism. No violence, just a long quiet drive. This gives you a chance to watch the graphics system at work. Watch what's happening out at the limits of how far you can see.

Things to notice:

  • You'll see those softened, slightly blurred images in the distance everywhere. Some places, you can see to the horizon, but it's hazy far away.
  • As you get closer, there will be a transition from a background image to 3D. The transition takes about a second, so it's not  jarring and you rarely notice. During the transition, the object coming into range gets shadows and shinyness. SL does not have this feature.
  • As objects get closer, more detail appears. SL has this, but it's up to creators to create good levels of detail. SL supports four levels of detail, but only in a few places, such as New Babbage and Crack Den, will you see that feature consistently used properly. (That's because New Babbage, SL's steampunk city, has building inspection.) Also, GTA V, like most games, makes level of detail transitions as slow fades, not sharp cuts, which makes them less noticeable.
  • Other cars appear and disappear in the distance, about 250m out. The 3D world is not that big. SL does this in pretty much the same way
  • Much artistic effort went into making everything look good in GTA. There were art directors to pull it all together. There are many carefully placed impostor images in GTA. We don't have art directors for SL, and have to do it automatically. It helps that it's rare for complex objects to cross region boundaries in SL. So placing impostor images at region boundaries is a reasonable compromise. There will be places where that won't look quite right, but it's better than having the world just tail off into empty space or water.

To summarize, SL could potentially look almost that good. This technical discussion is about part of how to do that. Impostors are part of it. Levels of detail are part of it. Smooth transitions are part of it.

There's been considerable improvement over the last few years. Linden Lab started hiring more video game developers who've done this sort of thing. GTA V is a decade old, and this stuff is well understood. Getting SL up to the GTA V level is quite possible.

I do technology demos to push on what's possible, despite the limitations of SL content and servers.

  • Like 4
  • Thanks 1
Link to comment
Share on other sites

3 hours ago, animats said:

It would be better to draw 9 regions for real - the one you're in, and its 8 neighbors. Then you're never closer than 256m to the flat picture.

That's why I always use a minimum draw distance of 256m in SL (512m in islands without neighbour regions)... With a 256m DD, the outdoors surroundings always look good.

Of course, it impacts frame rates, but my viewer is fast enough (> 60fps pretty much everywhere, and usually around 200-400fps without shadows and 60-200 with)...

I'm not sure impostor buildings would look quite as good, even if they would of course help with frame rates on ”weak” PCs, as well as with poorly designed mesh buildings which LOD crumbles too fast with distance (I implemented a ”mesh boost factor” in my viewer for those).

On the other hand, long distance background sim surrounding looks like a very desirable feature, even with large DD. However, I am not sure how these could get baked in SL to look good whatever the draw distance chosen by the end user...

Edited by Henri Beauchamp
  • Like 6
Link to comment
Share on other sites

Hi 

Interesting read there on the technical side.  Like Henru - I normally run DD 256 but wow your FPS - what client and hardware are you using?  unless the regions are empty >60fps is rare.

Question - how would these imposter images be generated and a user changing environment?   In games like GTA fuseing your example -the 3D world is controlled and the dev know where is where and does not change.   Or thinking from SL - Importer image generated - empty field for example - then a use adds a building.  If the imposter image is not updated - then looks to the user road is empty ahead then a X distance - swtich the 3D - whammy! there is a building.

  • Like 1
Link to comment
Share on other sites

19 minutes ago, Love Zhaoying said:

it reminds me of Google StreetView

I really hope not: see how street view horribly distorts pictures when you ”move” your FOV with the arrows, as it tries to interpolate between two views...

There is the same risk with building impostors: to minimize this risk, we would need to divide the sim in a number of squares (16m x 16m or 32m x 32m, perhaps) with a set of building impostors (one impostor per building and per square) for each of them...

But there is also the problem of lighting... Building impostors would have to look differently between night and day (and sunset and sunrise), and the lighting would have to match the environment settings chosen by the end user (which most of the time is not even the ”parcel environment”).

As I see it, building impostors would be too complicated to implement in SL (as @Norris Mainline remarked SL is not an AAA game with predefined scenes/buildings/environments).

Edited by Henri Beauchamp
  • Like 3
Link to comment
Share on other sites

I have 256m draw distance all the time too.  I get FPS similar to Henri's.  TBH with a performant computer most of the problems with performance become a distant memory.  It's only really busy places that have lots of avatars that make a difference and those are much rarer than they were.  I can imagine impostered backdrops making a difference for those with low end hardware.

  • Like 4
Link to comment
Share on other sites

2 hours ago, Henri Beauchamp said:

Cool VL Viewer. As for the hardware,  Core-i7 9700K, recently updated to a Ryzen 7900X (both give similar fps rates in simple scenes, with a +20% bonus for the 7900X in complex scenes), with a RTX 3070.

Thanks will try that - got a Ryzen 5900x and RTX3080 here.  I know SL is based on old legacy code?  from many many years ago.   Will try that viewer.

Link to comment
Share on other sites

For imposters, the idea solution would be for them to be generated server side per sim - but on a shedule.  Adding more for server/sim to do will be a tall order and then coverting 3D to a image.

Could have worked like:  Sim generates imposters (maybe at a few LOD level/focal points from each direction North, South, East ,West.   Then a client can request the imposter at a LOD level depending on how close the user is to the there current/next (requesting sim) boundary.  

Eg - User in Sim A in the centre, looking due East to Sim B - client requests from Sim B's West facing imposter at a mid level LOD.    if the user moves east more towards sim b - request West facing imposter a a high level LOD until a point then the Draw distance over laps then client renders the 3D objects form that sim.

Just a idea. not a program or games dev so may have missed a lot of issues there.

 

Mystic

  • Like 1
Link to comment
Share on other sites

7 minutes ago, Norris Mainline said:

I know SL is based on old legacy code?

I'd say SL is based on code written back in the early 2000s, yes... 🤣

If you meant the viewer in question, its current incarnation was based off Snowglobe v1.5 (older versions were based on LL's v1.18 to v1.23 viewer code), which I forked and to which I backported the v2+ viewers code over years. The UI taken apart, it is no more v1 at all... But I kept it lean and clean, and thoroughly optimized it at the C++ code level.

  • Thanks 1
Link to comment
Share on other sites

5 hours ago, Henri Beauchamp said:

But there is also the problem of lighting... Building impostors would have to look differently between night and day (and sunset and sunrise), and the lighting would have to match the environment settings chosen by the end user

Yes. GTA V cheats.

GTA-V-4-1030x579.jpg

GTA V, incorrectly using a full night impostor image behind a scene lit at dusk. Did you notice that they cheated?

Everything beyond the bridge that goes from left to right is from a background image that's for full night. Notice all the lights. The rendered parts of the scene don't show bright lights, because they are sunlit and it's not full dark yet. This is a graphics cheat. Even critics of GTA V graphics, of which there are many, don't seem to notice this.

I'd be tempted to make background images for noon, sunset, midnight, and sunrise. That covers most of the cases. Maybe do a slow cross-fade between two of those textures as the day progresses. Have them updated once a week or so by a bot that flies around taking pictures. Like the SL map, the distant backgrounds will sometimes be a little out of date. Only mainland and estates bigger than four regions need coverage. Private sims have no visible distant neighbors, so they never need a bot visit. This is a relatively easy cheat, and there's a big payoff.

(Yes, it's not perfect. We cannot yet have Hollywood-level rendering for SL. That's not technically impossible for games. Look up the Unreal Engine V "Matrix Awakens" demo. This is the current upper limit of game rendering. It  takes a lot of preprocessing. Hours of crunching. If you have a big enough computer, you can download Unreal Engine, build Unreal Engine, download the Matrix Awakens demo, build the demo, and run it. This requires a computer with 64 GB RAM, about 1.5 terabytes of free disk space (preferably SSD), and a graphics card in the thousand dollar range. Building requires hours of compile time. Then you see a 4km x 4km city with fine detail, which you can explore. The basic trick is that not only are there many copies of the same thing, those copies contain sub-copies. All those copies are merged, so only one copy is in memory.  If you see a building with many windows, each window shares the same triangles with other windows. This is called Nanite. It's very clever, and it's all based on carefully hand-optimized and preprocessed scenes. We don't have that option in SL, of course.)

What we can do is get SL to look like 10 year old game technology, which is where GTA V (2013) is. LL's conversion to PBR is a good first step. Vulkan will help even more. I have both in Sharpview now. I'm experimenting here with further steps.  This is all about being able to see something in the distance that gives you a sense of place in the world. Right now, you can see the end of the rendered world in SL. Big-world games got past that over a decade ago. So SL looks broken to gamers. Read some game reviews. Reviewers are brutal on graphics errors.

Enough on rendering theory for one day. Go play around in SL and enjoy.

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

50 minutes ago, animats said:

GTA V, incorrectly using a full night impostor image behind a scene lit at dusk. Did you notice that they cheated?

Just so long as it continues to fool NPC's, we should be OK. Don't want NPC's becoming self-aware and realizing we did a shoddy job! (See: The Truman Show..)

  • Like 1
Link to comment
Share on other sites

8 hours ago, Love Zhaoying said:

Just so long as it continues to fool NPC's, we should be OK. Don't want NPC's becoming self-aware and realizing we did a shoddy job! (See: The Truman Show..)

Not always easy to know which threads to keep put of until it's too late. It's as if I'm reading a foreign language and I head to Google for help.

NPC, GTFO, GTAV, LGHDTV. Seriously.. WTF!

  • Like 2
  • Haha 1
Link to comment
Share on other sites

9 hours ago, CandyCole said:

Not always easy to know which threads to keep put of until it's too late. It's as if I'm reading a foreign language and I head to Google for help.

NPC, GTFO, GTAV, LGHDTV. Seriously.. WTF!

FYI, PC and MMORPG worlds are full of acronyms. Some persons can find it to be a PITA.

AFAIK, UK and US folks are also especially fond of them, IMHO (from a EU citizen's POV), way too much, which reflects in SL; and BTW, get used ASAP to ”PBR” AKA ”GLTF” acronyms for SL too...

ROFLOL !

Edited by Henri Beauchamp
  • Like 1
  • Haha 2
Link to comment
Share on other sites

19 hours ago, animats said:

If you see a building with many windows, each window shares the same triangles with other windows. This is called Nanite.

Have you actually used UE5 and Nanite? Because what you're describing is not what it is.

The geometry sharing you're talking about is called instantiation, so that the poly list data gets loaded only once, then tranformed to the various instanced object transform data (location, rotation and scale). It's a quite old technique which saves memory to load stuff, but not rendering, since at rendering level the light has to hit and be calculated on a per surface component basis.

Nanite, on the other hand, is a per pixel analysis, and it's not good for everything. Basically what it does is to see whether a triangle is smaller than 1 pixel on screen and, if it is, collapses it. This would sound good doesn't it? Too bad though that when it comes to geometry density like the one SL buildings would use, it is completely useless. Edge case: very thin and long triangles which areas do not equal a pixel get crushed, often ruining the surface continuity. Other edge case: the model is not geometrically dense enough to make use of Nanite, no auto-LoD ever gets to be generated, always displaying the same model at any distance, until at some point the entire object gets so far away that the single faces start being collapsed and suddenly the entire object becomes one single pixel.

Nanite is only good for environment nature objects like rocks and cliffs and anything that requires a high polygon density and a sufficiently big size  to get a realistic look and feel when the player camera gets close enough.

Also, Nanite can't be used on any deforming object, rigged content or shader animated meshes, like characters or foliage (trees, grass, bushes...)

Please read the docs and try those tools with something that you would use the tool on, before being taken by the hype of "the era of LoDs is over"... Tech demos are made to sell the concept and showcase what improvements a feature brings to the table, looking at that content only, without real critical thinking over the data, just creates confusion.

Edited by OptimoMaximo
  • Like 3
Link to comment
Share on other sites

Quote

Nanite, on the other hand, is a per pixel analysis, and it's not good for everything. Basically what it does is to see whether a triangle is smaller than 1 pixel on screen and, if it is, collapses it.

I tried using Nanite, but after installing Unreal Engine 5 on Linux, UE5 complained I needed an NVidia graphics driver version that didn't work yet to use Nanite. That was last year; I should try again, now that NVidia driver version 535 is finally working.

There's a hour long SIGGRAPH presentation on Nanite. That's useful. You're right, though. Hierarchical instancing isn't in Nanite yet. They do have "tiny instances", but, as the designer says at 40:45 into the video, instances of instances of instances are not implemented yet.

Quote

Nanite is only good for environment nature objects like rocks and cliffs

Most of the Nanite demos are like that, but it also seems to work for repetitive building faces, as seen in the "Matrix Awakens" demo. At some point I should upgrade a computer to 64GB and see how they do that.

Nanite probably wouldn't help Second Life much, except for terrain. And I've previously pointed out the stupidly clever trick that can hide repetition in terrain. So you can have high-detail grass and dirt without big areas looking tiled. That's a shader trick; the GPU does all the work. Some of the graphics Lindens like that trick. Simple, will work on ordinary textures, and more appropriate to SL.

Now that I've bored everyone who isn't a graphics programmer, I will shut up for now.

  • Like 3
Link to comment
Share on other sites

On 8/5/2023 at 7:30 PM, animats said:

I tried using Nanite, but after installing Unreal Engine 5 on Linux, UE5 complained I needed an NVidia graphics driver version that didn't work yet to use Nanite. That was last year; I should try again, now that NVidia driver version 535 is finally working.

There's a hour long SIGGRAPH presentation on Nanite. That's useful. You're right, though. Hierarchical instancing isn't in Nanite yet. They do have "tiny instances", but, as the designer says at 40:45 into the video, instances of instances of instances are not implemented yet.

Most of the Nanite demos are like that, but it also seems to work for repetitive building faces, as seen in the "Matrix Awakens" demo. At some point I should upgrade a computer to 64GB and see how they do that.

Nanite probably wouldn't help Second Life much, except for terrain. And I've previously pointed out the stupidly clever trick that can hide repetition in terrain. So you can have high-detail grass and dirt without big areas looking tiled. That's a shader trick; the GPU does all the work. Some of the graphics Lindens like that trick. Simple, will work on ordinary textures, and more appropriate to SL.

Now that I've bored everyone who isn't a graphics programmer, I will shut up for now.

Yeah I should have prefaced my comment with "at the time of this writing". They intend to extend Nanite to many levels of the DAG.

But you really need to try it out for yourself . Nanite has big practical limitations at the moment, limiting its use spectrum and reliability to hold the shapes unaltered.

  • Like 1
Link to comment
Share on other sites

35 minutes ago, OptimoMaximo said:

They intend to extend Nanite to many levels of the DAG.

And to flexible/rigged mesh, says one source.

I should try it out. I don't use UE; I just installed it once and ran some of the demos to see what it was like. I really like their vehicle system.

  • Thanks 1
Link to comment
Share on other sites

More tests of what this approach might look like. This is just manual editing of SL screenshots from Firestorm.

bigby0.thumb.jpg.6704854a87d7ccb3dd253c930aef634c.jpg

Bellesaria, a street of Traditionals. 256m draw distance.

bigby2.thumb.jpg.1fd51e6d8ac2f273173cde19ccad1a40.jpg

Same picture, but everything beyond 128m has been blurred. If you didn't have the other picture to compare with, would you notice?

This is the worst case for those region impostor images I described above. The idea is that the viewer would show the four nearest regions, then show flat images of areas further away. If you have enough GPU, you might get 9 regions, with real stuff drawn out to at least 256m.

Next, an extreme case.

babbage0.thumb.jpg.ef08e43efa0615cb0c5db1d38877c65a.jpg

New Babbage, from the clacks tower in Babbage Palisade. Draw distance 1024m, LOD factor 3, two minutes to load and 5 FPS on a powerful computer. We just can't draw that much at full speed.

Midday lighting so we can see the place. The default environment in New Babbage is smoky, and you can't see this far.

babbage2.thumb.jpg.021cbad43d611933322b75bb3e5d3019.jpg

Same image, but everything further than 128m has been blurred. This is what I'm shooting for as a goal. See entire cities, a bit blurred in the distance.

Compare with the GTA V pictures above. Same concept.

Edited by animats
  • Like 1
Link to comment
Share on other sites

I'm toying with some schemes to compensate for bad lower levels of detail. Maybe push the LOD up for a small number of large distant objects, so if there's some big hero object that you really should see in the distance, it will show up. Draw medium-sized distant objects as their bounding cube with their average color, then blur a bit. The goal is to never have the world drop off into nothingness when there's more world out there.

These are just ideas at this point, not code in Sharpview. Comments?

Link to comment
Share on other sites

I like the general concept, some ideas not mentioned might be to use a depth map and a normal map, to give the impression of depth of items in the distance.

I imagine a technical challenge is getting some service going to take these images. Since SL seems to be a bit shy about making their simulators do 3D work and getting peoples viewers to make them would become a griefing vector (ie. My modified viewer sends to the simulator the 'bake result' of the sim next door for other users to see, but it's just an image of a fallus).

Link to comment
Share on other sites

4 hours ago, animats said:

If you didn't have the other picture to compare with, would you notice?

YES !  IMMEDIATELY !

I hate blur !

In real life, when your eyes fall on any object in the distance, they automatically adjust to see with the best accuracy and you never see blur (unless you got both bad eyes and bad glasses).

The blur as rendered on a computer screen is an artificial reproduction of an optical defect that you would see through the lens of a camera, which, unlike the eye, does not (and cannot) auto-adapt instantly to what you are looking at in the picture.

For the blur to look real, it should only appear around the real-time computed spot your eyes are focusing on at the moment the frame is rendered: so far, there is no technology allowing to reproduce such an effect, and beside, you won't need that blur rendered anyway (your eyes simply see blurrier, the farther to the macula the pixels are projected on your cornea).

I hate artificial blur, flares and whatnot that some 3D game developers seem to ”enjoy” impairing us with.

The 3D render of a scene is supposed to reproduce a real scene, not its perception through an imperfect optical instrument. A real scene in real life is never blurry, does not have flares, bokhe or whatnot, only the perception of the scene via an optical instrument causes these.

Quote

This is what I'm shooting for as a goal. See entire cities, a bit blurred in the distance.

I'm sorry, but what you are shooting for looks totally ugly to me...

Edited by Henri Beauchamp
  • Like 2
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 292 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...