Surround meshes
Moderator: Moderators
Surround meshes
I would like to extend the heightmap around my map so its not just a rectangle of map floating in the middle of nowhere, but that it looks like its the actual surface of a planet.
I have 3 ideas on how to do this, but I would like to ask you on which is the best way of doing this:
1. Creating a map that is actually larger than the play area of the map, but using a typemap around it so that units cant actually go to the surround areas, and also adding gadget that limits camera x and z positions to play area. I dont know how to make aircraft obey the typemap limits though.
2. Using lua to draw the surround meshes. Here I dont know if this is optimal performance wise, and I dont know how to actually have lua draw me this object (also I dont want to implement LOD calculations on the surround areas )
3. Placing a a huge feature on the map, but here I dont know if or when the feature would get culled and therefore become moot.
Thanks for your input!
I have 3 ideas on how to do this, but I would like to ask you on which is the best way of doing this:
1. Creating a map that is actually larger than the play area of the map, but using a typemap around it so that units cant actually go to the surround areas, and also adding gadget that limits camera x and z positions to play area. I dont know how to make aircraft obey the typemap limits though.
2. Using lua to draw the surround meshes. Here I dont know if this is optimal performance wise, and I dont know how to actually have lua draw me this object (also I dont want to implement LOD calculations on the surround areas )
3. Placing a a huge feature on the map, but here I dont know if or when the feature would get culled and therefore become moot.
Thanks for your input!
Re: Surround meshes
AFAIK Jk was working on something to make maps look neverending
Re: Surround meshes
This should be easy, Argh was experimenting with somethign like this. Refer to P.U.R.E
Re: Surround meshes
As far as I know he just made a box around the map, it doesn't look like never ending terrain.AF wrote:This should be easy, Argh was experimenting with somethign like this. Refer to P.U.R.E
Re: Surround meshes
The "giant object" method wouldn't work because it calculates culling based on the objects center (unless things have changed in the last year with culling). I think the best option would be a lua-gl solution... it shouldn't use too much more GPU then the huge map/type map idea but wouldn't be as glitchy.
Re: Surround meshes
Well the center would obv be in the center of the map as well. its only a 10x10 map.
I dont know enough gl and Lua to make the surround mesh rendered by it.
So I am tending towards making the map bigger and just limiting it off with lua, to see how that works.
I dont know enough gl and Lua to make the surround mesh rendered by it.
So I am tending towards making the map bigger and just limiting it off with lua, to see how that works.
-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
Re: Surround meshes
It still wouldn't work, and it's rather annoying. If the centre of the map was at any stage out of screen, you wouldn't see the 3d model. For that to work logically you'd either have to always be in fully zoomed out view using top-down cameras, and with other cameras you'd have to ensure you were always facing the middle of the map (which basically means you'd never really see the surrounding 3D object anyway.
It'd be nice to have an 'alwaysrendered' tag for features that makes it so that they are never culled even when out of view.
That being said, I'd imagine it'd be a nightmre to get a 3D face to line up with the edge of the map, unless it's pretty much perfectly flat...
It'd be nice to have an 'alwaysrendered' tag for features that makes it so that they are never culled even when out of view.
That being said, I'd imagine it'd be a nightmre to get a 3D face to line up with the edge of the map, unless it's pretty much perfectly flat...
Re: Surround meshes
IIRC I added a tag that sidesteps the whole distance absed culling thing after a thread regarding the big trees on agorms map, and a giant bridge feature
Re: Surround meshes
I could split the surround into multiple smaller objects, with their centers being at the edge of the map, that way if the edge is visible, so is the corresponding surround map area.
Aligning the surround map isnt that big of a problem, because ill make the surround+game area heightmap as one, and just chop off bits to use as surround.Getting it to scale perfectly will take a few tries, but thats not a really difficult issue.
AF, thanks ill search around for that tag.
Aligning the surround map isnt that big of a problem, because ill make the surround+game area heightmap as one, and just chop off bits to use as surround.Getting it to scale perfectly will take a few tries, but thats not a really difficult issue.
AF, thanks ill search around for that tag.
Re: Surround meshes
And theres always the option fo rendering them via lua
Re: Surround meshes
world=All Worlds;
description=Large Tree;
category=Trees;
object=tree1.s3o;
footprintx=6;
footprintz=6;
blocking=1;
hitdensity=100;
energy=2000000;
metal=0;
damage=20000000000;
flammable=0;
reclaimable=0;
indestructible=1;
autoreclaimable=0;
featurereclamate=smudge01;
seqnamereclamate=tree1reclamate;
upright=1;
noselect=1;
Those are the only tags on a big tree... I seem to recall it was actually that they fixed it so things rendered if the bounding box was in view not the center? Or maybe the trees just cull, I can't remember...
aGorm
description=Large Tree;
category=Trees;
object=tree1.s3o;
footprintx=6;
footprintz=6;
blocking=1;
hitdensity=100;
energy=2000000;
metal=0;
damage=20000000000;
flammable=0;
reclaimable=0;
indestructible=1;
autoreclaimable=0;
featurereclamate=smudge01;
seqnamereclamate=tree1reclamate;
upright=1;
noselect=1;
Those are the only tags on a big tree... I seem to recall it was actually that they fixed it so things rendered if the bounding box was in view not the center? Or maybe the trees just cull, I can't remember...
aGorm
Re: Surround meshes
It adds the radius to the camera search, yes. I was looking at adding a nocull tag, so I would like any clarification AF has.