#loading world map in unity

1 messages · Page 1 of 1 (latest)

elder crypt
#

Right, ideally though I'd like to have the whole world loaded and take a big picture of it from above - that's where LOD would help. The game is oldschool runescape if that helps you visualize

#

here it is in opengl, this is 20mb of vertex data and maybe 1% of the world

kindred sinew
#

So what's the problem with it?

elder crypt
#

I want 100% of the world "loaded"

#

Ideally I would load all the game data which could take 5 minutes, pass all the vertex data to Unity, and unity deals with optimization

kindred sinew
#

I have no clue what you want here tbh

#

If you want the whole world loaded, load it? What's the problem?

elder crypt
#

Okay, yea I'm kind of jumping the gun here. I should probably just try it first, maybe it will work. The reason I have doubts is when I loaded the whole map in opengl I would run out of VRAM trying to push all the vertex data the GPU

kindred sinew
#

You have less than 2GB of VRAM?

elder crypt
#

6GB, I was being generous saying 1% of the world

#

1 sec, doing a quick test

stark phoenix
#

just a shot in the dark - but why not just use the opengl implementation to take the image?

#

if all you're looking for is a nice clean image for an overhead map view - should work fine

elder crypt
stark phoenix
#

to smash them walls

elder crypt
#

Exactly haha, I don't know if I'm up for the challenge of implementing a lot of this stuff in opengl

#

So was hoping unity had it out of the box

#

Even my object picking implementation in opengl causes major slowdown and spent a few weeks on it

stark phoenix
#

well, whatever your plan, there's no way you're going to reasonably hold the whole map in memory at once

#

gotta chunk it up, or store the map data in other ways

kindred sinew
#

You could take pictures in sections and stitch them in paint, I've done that before on Rust to make a map

#

So then chunking would be fine, you just take pictures in the loaded areas

elder crypt
stark phoenix
#

well, unity's terrain system has a LOD system built in, but designing one for a.. non terrain, is going to be a bit tricky

#

I'd base it off chunks

#

would likely be the simplest way

#

so each 'chunk' would be part of an LOD group Component, which would contain 3-4 different quality version of the chunk

elder crypt
#

Thanks, makes some sense. So as the camera moves closer to a chunk, the higher LOD version is pushed to the GPU

#

Oh LOD group components are part of unity, sick

stark phoenix
#

yeah, that'd be the advantage over doing it in opengl - you'd either have to design a lod system, or find one on github, and shoehorn it in somehow 😛

#

but.. opengl is more lightweight in general - you'd need.. less optimization for the same performance result

#

but its defo possible in unity

#

just.. lod's might be.. the first step 😛

elder crypt
#

Great thanks, yea just looking for 60-120 fps

#

and dev should be a lot smoother using Unity's built in features