Would you like to react to this message? Create an account in a few clicks or log in to continue.

Official Community Forums
 
HomeHome  SearchSearch  Latest imagesLatest images  RegisterRegister  Log in  The Wiki  Website  github Project  

 

 client screen focus

Go down 
3 posters
Go to page : 1, 2  Next
AuthorMessage
tichfuie
Super Contributor
Super Contributor
tichfuie


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

client screen focus Empty
PostSubject: client screen focus   client screen focus EmptyWed 27 Mar - 14:57

not sure what this is called, but ive seen it in other engines,
the ingame half screen up blur or out of focus filter.

question is:

any way to remove it completely?


any1 knows what am talking about?
Back to top Go down
rotello
Super Contributor
Super Contributor
rotello


Posts : 215
Join date : 2012-12-06

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyWed 27 Mar - 15:04

I'm sure it is Depth of Field filter. I did not know that this effect is currently implemented in game confused (It would be a great thing for us if it is Very Happy )

Can you provide a screenshot where the blurring occurs?
Back to top Go down
tichfuie
Super Contributor
Super Contributor
tichfuie


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

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyWed 27 Mar - 18:49

no, it is not Depth of field, i dont think back in 2005 the rendering engines had that, i think that came later on.


here is a pic , is kinda tricky catching this blurring since it is from mid screen up so you need to pay attention closely.

in the pic you will see 2 compass decals. one behind the player character and one in front.

you will notice the decal from behind the player looks full resolution quality ie: crispy.
but the one in front of player character you will notice blurring or out focus

this is the best i could do with the decals so you will notice the blurring from half screen up = blurring,
half screen down = full original resolution.

the blurring is more noticeable with brighter textures specially decals, but you can tell the blurring also from the terrain textures, but you need to pay closely attention since your eyes can get used to it and wont notice, but once you notice it, then you will see it all the time, lol

client screen focus 2cqzj9l
Back to top Go down
rotello
Super Contributor
Super Contributor
rotello


Posts : 215
Join date : 2012-12-06

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyWed 27 Mar - 19:36

Oh ok.. that one, I did notice it while testing. It's blurring only the ground part 1 - 3 units from the player if you'll face your camera to the horizon.

Maybe Delurin knows how to adjust this issue..
Back to top Go down
tichfuie
Super Contributor
Super Contributor
tichfuie


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

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyWed 27 Mar - 19:58

exactly,

it only blurs when facing camera in an angle or looking into horizon.

the only time that there is no blurring is when camera facing straight down to player like a top camera mode
Back to top Go down
rotello
Super Contributor
Super Contributor
rotello


Posts : 215
Join date : 2012-12-06

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyWed 27 Mar - 20:16

I agree. It's ruining our custom textures (we tried 1024 squared seamless tile) and it still looks low quality.

I didn't realize that this unknown effect is causing the problem.
Back to top Go down
Delurin
Head of Platform Development
avatar


Posts : 424
Join date : 2011-08-03

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyThu 28 Mar - 1:39

I have a feeling that is linked to the terrain patches LOD which I think also effects decals You can change it by adding your own custom terrain lod levels in the startup.py it has to do with the pages from camera

Here is an example of what it would look like but I am not sure what values would be best for what you are looking for. The values should be multiples of 2 and will make rendering longer the higher the number I believe.


Code:
pageDisplayRadius = 2
def calcTilesPerPage(lodSpec, pagesFromCamera):
    #ClientAPI.Log("calcTilesPerPage Pages from Camera = " + str(pagesFromCamera))
    if pagesFromCamera < 2:
        return 4
    elif pagesFromCamera == 2:
        return 2
    elif pagesFromCamera < 5:
        return 1
    return 0 
def calcMetersPerSample(lodSpec, tileLoc, pagesFromCamera, subPagesFromCamera):
    #ClientAPI.Log("calcMetersPerSample Pages from Camera = " +str(pagesFromCamera) + " subpages= " + str(subPagesFromCamera) + " lodSpec " + str(lodSpec))
    if pagesFromCamera < 1:
   return 2
    elif pagesFromCamera < 2:
        if subPagesFromCamera < 1:
            return 1
        elif subPagesFromCamera < 2:
            return 2
        elif subPagesFromCamera < 5:
            return 4
        elif subPagesFromCamera < 8:
            return 8
   elif subPagesFromCamera < 10:
            return 8
        else:
            return 0
    elif pagesFromCamera < 3:
        return 16
    elif pagesFromCamera < 5:
        return 32
    return 0


ClientAPI.SetTerrainLODSpec(calcTilesPerPage, calcMetersPerSample, 256, pageDisplayRadius)


Last edited by Delurin on Thu 28 Mar - 3:28; edited 1 time in total (Reason for editing : Forgot pageDisplayRadius)
Back to top Go down
tichfuie
Super Contributor
Super Contributor
tichfuie


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

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyThu 28 Mar - 2:57

@Delurin


I seem to be missing this code you posted,
my sampleworld assets scripts folder startup.py is pretty much empty but a few imports.


perhaps Iam running an older version of the assets?

would it be possible if you can share your sampleworld assets scripts folder please?

or point me to the right direction on the svn repo?

thanks in advanced
Back to top Go down
rotello
Super Contributor
Super Contributor
rotello


Posts : 215
Join date : 2012-12-06

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyThu 28 Mar - 3:07

Me too. I'm getting a pageDisplayRadius is undefined..
Back to top Go down
tichfuie
Super Contributor
Super Contributor
tichfuie


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

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyThu 28 Mar - 3:10

same here,
seems we missing a chunk of code
maybe we have outdated version of client assets

hopefully delurin will share his scrips folder from his sampleworld setup
Back to top Go down
Delurin
Head of Platform Development
avatar


Posts : 424
Join date : 2011-08-03

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyThu 28 Mar - 3:27

It was never in the main code base. It was custom written by myself and I believe Hamilton a long time ago you can just add pageDisplayRadius = 2 (possible values I believe are 1,2,4)
Back to top Go down
Delurin
Head of Platform Development
avatar


Posts : 424
Join date : 2011-08-03

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyThu 28 Mar - 3:31

My script folder would not work with the sampleworld I have rewritten a lot of the files and added over a hundred addition scripts
Back to top Go down
tichfuie
Super Contributor
Super Contributor
tichfuie


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

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyThu 28 Mar - 3:36

than you
Back to top Go down
tichfuie
Super Contributor
Super Contributor
tichfuie


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

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyThu 28 Mar - 3:44

ClientAPI.SetTerrainLODSpec(calcTilesPerPage, calcMetersPerSample, 256, pageDisplayRadius = 2)

did not work for me

Multiverse World Browser\Worlds\sampleworld\Scripts\Startup.py##115
TypeError: SetTerrainLODSpec() got an unexpected keyword argument 'pageDisplayRadius'

Back to top Go down
Delurin
Head of Platform Development
avatar


Posts : 424
Join date : 2011-08-03

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyThu 28 Mar - 3:58


do either
ClientAPI.SetTerrainLODSpec(calcTilesPerPage, calcMetersPerSample, 256, 2)

or
pageDisplayRadius = 2
ClientAPI.SetTerrainLODSpec(calcTilesPerPage, calcMetersPerSample, 256, pageDisplayRadius)

Back to top Go down
tichfuie
Super Contributor
Super Contributor
tichfuie


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

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyThu 28 Mar - 5:05

thanks delurin,

cant seem to notice visible changes while messing with params

would you care to elaborate on the params ie:
the lesser or the greater the pagesFromCamera is the better lod?

or the grater the return or lesser the more lods?


cant notice anything on screen.

looks like there still are like 4 lods in camera

Back to top Go down
Delurin
Head of Platform Development
avatar


Posts : 424
Join date : 2011-08-03

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyThu 28 Mar - 6:16

I played around with it some more an it looks more like it is for how detailed the height map is rendered and not some much with the material LOD. It looks like the decal uses the material of whatever is underneath it and I tried to find anything that was specifiying an LOD in the C# but couldnt so most likely it is being handled by the material. Did you try changing the TextureTileSize in the world editor terrain display? I think that is what you really want to do.
Back to top Go down
tichfuie
Super Contributor
Super Contributor
tichfuie


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

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyThu 28 Mar - 7:01

@delurin
no luck,

looks like lod deal, i noticed 4 lods on the screen,
you can better tell with decals mostly.
from the moment you see decal on the upper screen, the blurrier it is and as you
approach to the decal offcourse will be at bottom of screen will be crispier or full clear resolution

anyways must be in the camera deal..

got some other questions:

talking about terrain,,
1-do you know if terrain textures can be handled with the materials like the models?
reason is i would like to know if terrain can support texture bump maps/normal maps

2- is there any way to increase/decrease terrain mesh resolution?
Back to top Go down
Delurin
Head of Platform Development
avatar


Posts : 424
Join date : 2011-08-03

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyThu 28 Mar - 7:15

Yea I realized that it might make the image crisper but wouldnt change the lod distance. I cant really find where it is handled


I think if you want to add bump maps/normal maps you will need to create a new material type in the client/world editor as well as a new cg program. The way it stands it just iterates over the texture's color and multiplies them by the alphamap and then adds it all together.

As far as I know the only way change mesh resolution is the LOD stuff I mentioned earlier along with changing the setting in the terrains mmf file(the horizScale I believe) and of course making the file bigger in pixels
Back to top Go down
rotello
Super Contributor
Super Contributor
rotello


Posts : 215
Join date : 2012-12-06

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyThu 28 Mar - 7:43

@Delurin

I'm getting an indentation error before and I fixed it below. I have set pageDisplayRadius to 1 (Standalone mode) and it works. When I set it to higher it is either throwing an error or showing just a black screen then a communication error (both Modes)..

Code:
import ClientAPI

# Most worlds will want this for the client side animations,
# though it should probably be customized
import ClientAnimations

# This sets up the character creation and selection
import SampleCharacterCreation

##
## Import any world specific files here
##
import AttackEffect
import PlayerCompass
import SpellCastingEffect
import SpellTargetEffect
import TargetDecal
import ToggleShadows
import WorldInit
import QuestMarkers
import AnimationEffects

# this contains the quest api
import MarsQuest
# this contains the container api
import MarsContainer
# this contains the cursor api
import MarsCursor
# this contains the action api
import MarsAction
# this contains the unit api
import MarsUnit
# this contains the ability api
import MarsAbility
# this contains the (limited) target api
import MarsTarget
# this contains the (limited) trade api
import MarsTrade

# this contains the (limited) training api
import MarsTraining
# this contains the (limited) class ability api
import MarsClassAbility
# this contains the skill api
import MarsSkill
# this contains a system to handle commands on the client
import MarsCommand
# this contains code to create ui events for some network messages
import MarsEvent
# this contains typical game world commands and their handlers
import MarsStandardCommands
# this contains the voice api
import MarsVoice
# this contains the group api
import MarsGroup
# this contains a system to support world objects as clickable instance portals
import InstancePortal

##
## These imports are for sample coordinated effects
##

# this is an example coordinated effect that implements a fireball like projectile
import TestProjectile

# this is a very simple example effect that just writes a message to the client log file (trace.txt)
import TestLogEffect

# this effect cycles through the various sample compositors
import TestCompositor

# Write to the log file (trace.txt) that the Startup script has finished
ClientAPI.Log("Startup.py loaded")

pageDisplayRadius = 2
def calcTilesPerPage(lodSpec, pagesFromCamera):
    #ClientAPI.Log("calcTilesPerPage Pages from Camera = " + str(pagesFromCamera))
    if pagesFromCamera < 2:
        return 4
    elif pagesFromCamera == 2:
        return 2
    elif pagesFromCamera < 5:
        return 1
    return 0
     
def calcMetersPerSample(lodSpec, tileLoc, pagesFromCamera, subPagesFromCamera):
    #ClientAPI.Log("calcMetersPerSample Pages from Camera = " +str(pagesFromCamera) + " subpages= " + str(subPagesFromCamera) + " lodSpec " + str(lodSpec))
    if pagesFromCamera < 1:
        return 2
    elif pagesFromCamera < 2:
        if subPagesFromCamera < 1:
            return 1
        elif subPagesFromCamera < 2:
            return 2
        elif subPagesFromCamera < 5:
            return 4
        elif subPagesFromCamera < 8:
            return 8
        elif subPagesFromCamera < 10:
            return 8
        else:
            return 0
    elif pagesFromCamera < 3:
        return 16
    elif pagesFromCamera < 5:
        return 32
    return 0


ClientAPI.SetTerrainLODSpec(calcTilesPerPage, calcMetersPerSample, 256, pageDisplayRadius)

What am I missing?

Back to top Go down
Delurin
Head of Platform Development
avatar


Posts : 424
Join date : 2011-08-03

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyThu 28 Mar - 7:45

Maybe it doesnt work with standalone mode? I am not sure.
Back to top Go down
rotello
Super Contributor
Super Contributor
rotello


Posts : 215
Join date : 2012-12-06

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyThu 28 Mar - 7:51

Hey Delurin, I have tried it with the live version.. same result.
Back to top Go down
Delurin
Head of Platform Development
avatar


Posts : 424
Join date : 2011-08-03

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyThu 28 Mar - 8:06

Is the terrain you are using an alpha splat or auto splat? maybe it has to do with that?
Back to top Go down
rotello
Super Contributor
Super Contributor
rotello


Posts : 215
Join date : 2012-12-06

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyThu 28 Mar - 8:10

Oh ok. I didn't notice that..

I'm still using the default terrain configuration of sampleworld, but I have changed the default splatting_grass.dds texture with a higher resolution (1024x1024) png version. In short, I have not loaded the 4 or 8 texture configuration on the terrain. Does that make any difference?

Thanks.
Back to top Go down
Delurin
Head of Platform Development
avatar


Posts : 424
Join date : 2011-08-03

client screen focus Empty
PostSubject: Re: client screen focus   client screen focus EmptyThu 28 Mar - 8:12

It looks like it might sorry I will see if I can figure anything out about it. As a side note you might want to read through what we were discussing (if you havent yet) this is probably not what you are looking for and you might want to change the textureSize if anything.
Back to top Go down
Sponsored content





client screen focus Empty
PostSubject: Re: client screen focus   client screen focus Empty

Back to top Go down
 
client screen focus
Back to top 
Page 1 of 2Go to page : 1, 2  Next
 Similar topics
-
» Some Questions about the Platform, Client and Development Focus
» Client Login Screen
» Character selection screen world?
» No Default Instance at Character Creation Screen
» Client Not doing anything....

Permissions in this forum:You cannot reply to topics in this forum
 :: Development :: Server Scripting and Development-
Jump to: