Official Community Forums
 
HomeHome  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log in  The Wiki  Website  github Project  

Share | 
 

 MV terrain removal?

View previous topic View next topic Go down 
AuthorMessage
tichfuie
Super Contributor
Super Contributor
avatar

Posts : 257
Join date : 2013-02-07
Location : NA

PostSubject: MV terrain removal?   Tue 19 Feb - 13:32

been noticing some client performance loss due of the default terrain.

also the terrain engine seems to be dated and you can see the stitches between terrain chunks.

now, my question is:
since my project will not be open world but small instances with my own small terrain/floor/ground imported meshes,

will it be possible to remove the existing terrain since it is pretty large and i dont want it visible to the end user , also to remove the sky? or make them both invisible or disabled?

is there such an option , all i need a a blank dark space with no terrain nor sky for my project, so i can add my own ground meshes to it.

is this possible, is there already feature to disable them?

if not possible, is there a way to cut or trim the terrain to only what chunks to be used?

thanks in advanced
Back to top Go down
Delurin
Head of Platform Development


Posts : 424
Join date : 2011-08-03

PostSubject: Re: MV terrain removal?   Wed 20 Feb - 3:34

Yes you can deactivate the ocean and terrain...I am not sure about the sky but it would not be that hard to work with. For the terrain I believe you still need one for the world editor but you can use the default and then remove the display of it in the client.

ClientAPI.World.DisplayTerrain = False
ClientAPI.OceanConfig.ShowOcean = False

is what you are looking for, see if you get a performance increase from deactivating them.
Back to top Go down
tichfuie
Super Contributor
Super Contributor
avatar

Posts : 257
Join date : 2013-02-07
Location : NA

PostSubject: Re: MV terrain removal?   Wed 20 Feb - 6:07

thank you, that did the trick,
by removing terrain and ocean pretty much boosted performance to 35 fps above the existing one.
ie: if had 40 fps no i got 75 fps.

but here are drawbacks of removing terrain:

1- the yellow ring decal around the target you select wont work on 3d meshes platforms used as ground, only on terrain, unless there is a workaround you may know and would like to share?

2- markers ie: npc, mobs etc.. wont stand on 3d meshes platforms or grounds, ie:
if you want to put a npc marker on the 3d mesh shack from sample world,
wont stand on it , only on terrain, so npc's will only spawn at terrain level and not intop of 3d mesh platform.
unless there is a workaround you may know and would like to share?



Now this is not related to terrain.
but noticed in the sampleworld, the npcs marker , it spawns 3 npcs together,
i noticed when you approach to them npcs, the fps drops badly ie: from 80 fps to 35 fps
maybe because they are very close to eachother or they are bugged that causes this bad client performance.
Back to top Go down
Delurin
Head of Platform Development


Posts : 424
Join date : 2011-08-03

PostSubject: Re: MV terrain removal?   Wed 20 Feb - 6:38

The npcs should be able to stand on 3d meshes but they both need to have physics.

You are correct the decals only work on terrain.. you might be able to make something similar with a particle effect but it would only be flat and if something is in the way would pass through it/be cut off. You might be able to write something that adds a decal to the object rendering but I never tried to figure out how to do it. You would probably have to copy how they made the decal render on the terrain and apply that to the model.

for the final thing try adding the npc model to the world not as an npc but with a property StaticAnim walk or idle ( you can look at the list of animation in the model viewer) also does it stay at 35fps or only for a short period of time? It might be that it is not the client that is slowing down but the server since the npcs have a bunch of proximity handling messages and as I recall you are running the server on the same machine as the client.

And in case you are wondering the npcs are spawned from sampleworld_load.py or something similarly ending in load.py based on the marker.
Back to top Go down
tichfuie
Super Contributor
Super Contributor
avatar

Posts : 257
Join date : 2013-02-07
Location : NA

PostSubject: Re: MV terrain removal?   Wed 20 Feb - 8:24

Delurin wrote:


for the final thing try adding the npc model to the world not as an npc but with a property StaticAnim walk or idle ( you can look at the list of animation in the model viewer) also does it stay at 35fps or only for a short period of time?

the fps stays low as longest i am near the npcs, if i walk away from them the fps starts to go up to 80. and as longest they are not in front of my view port also fps goes up.

so seems to be the npc render issue that affects performance.



as per the ring around the target decal drawnin the terrain, do you have any idea where this code is at in the client? is it python or the c# , so i can see if i can duplicate and make it work on a 3d mesh model using it as ground

If you dont know it is ok, i just thought it will speedup my search if you knew it.

thanks again
Back to top Go down
Delurin
Head of Platform Development


Posts : 424
Join date : 2011-08-03

PostSubject: Re: MV terrain removal?   Wed 20 Feb - 8:49

It looks like it is handled by DecalElement.cs amd TerrainDecalManager.cs in Axiom.SceneManagers.Multiverse it looks like the main thing you would need to do is modify FindPageTechnique so that instead of looking up the terrain page it looks up the model the object is standing on and then gets that material. Since it looks like the decal is just blended with that material. But I am not sure how you would get the model and in particular that material under the npc feet. The only thing I can think of off the top of my head is to figure out what the npc's collision volume intersects with and then standardize that the base material will always have a formulaic name. I don't recall ever coming across a function that subdivides the model to determine exactly where the intersecting object is. (One possibility is to keep the grounds as a separate object but that might become a nightmare to handle in the world editor.)

You could try a demo and hard code the material to be whatever the ground material is in one place and see if that does in deed make the circle appear that will at least let you know if you are on the right track.

Decals are also referenced in the Decal.py in the Program Files scripts directory

I think the particle effect ringOfFire is a floor based circle but I am not sure.
another option like the particle effect would be to create a plane with the ring texture on it and attach it to the npc base (which I believe is the default attachment point if none is given) but it would have the same limitation about going through an object etc.

Back to top Go down
tichfuie
Super Contributor
Super Contributor
avatar

Posts : 257
Join date : 2013-02-07
Location : NA

PostSubject: Re: MV terrain removal?   Wed 20 Feb - 8:55

thanks, ill look into it.
Back to top Go down
Sponsored content




PostSubject: Re: MV terrain removal?   

Back to top Go down
 
MV terrain removal?
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Completed GW Terrain.... War of the Ring Scenario...
» Building my first terrain table, need advice
» orikl's Ork Checkpoint (terrain Wip) (12/8/2011) *updates*
» forgeworld terrain
» Terrain Texture Links & Interesting Effects

Permissions in this forum:You cannot reply to topics in this forum
 :: Development :: Getting Started-
Jump to: