Jump to content
Eternal Lands Official Forums
emajekral

Orthographic Projection for Actor Banners

Recommended Posts

UPDATE: get patch here

 

I often play with the Perspective set high and find the way banners are displayed to be problematic:

 

with extreme perspective

elscreen003.jpg

 

isometric

elscreen004.jpg

 

I have reworked the banner code a bit so that they are displayed orthographically:

with extreme perspective

elscreen001.jpg

isometric

elscreen002.jpg

 

While there, I hacked a couple of other things:

  • The floating damage animation is more dynamic to help distinguish it from the xp animation.
  • The health bar now scales along with the other elements of the banner, and is shorter and taller, and imho easier to see.

This is my first client modification. Could someone give me the incantation to create an appropriate diff?

 

( I know it's something like "diff -Naur elc/ ../elc/elc/ > Orthographic_banners.diff" but I get a pretty big diff file. What to do? Don't want to think.)

 

I've played the game with the modification a bit and it works OK however I know there may be problems:

  • Having a big font size and therefor big healthbar makes creatures very easy to click
  • When in crowded areas the banners are even more obvious than they were before.

Please leave me comments. I will post a diff shortly for those that want to try it out. If this patch goes smoothly I may try tackling some of the graphical enhancements on the wishlist.

Edited by emajekral

Share this post


Link to post
Share on other sites
This is my first client modification. Could someone give me the incantation to create an appropriate diff?
CVS has the ability to make a diff against the code on the server.

if you're using a comand-line cvs, then try something like (from the EL directory):

cvs diff -Nuar > ortho_banner.patch

if you're using some sort of graphical interface, then check what options it has for a diff

Having a big font size and therefor big healthbar makes creatures very easy to click
you can adjust name font size in the config window. nudging that up to 6 or so is a tip I give to people for hunting rabbits and the like. so it shouldn't be caused by your patch

in the screenies of the adjusted client, the health bars look a little tall, but I dunno if that's from changes you made or not, I only use the number version

also, you shouldn't use modified clients on the main server, use port 2001 for testing stuff

other than that, it'll be handy to have (the perspective on banners is kinda ugly), looking forward to seeing the patch ;)

Share this post


Link to post
Share on other sites

run a "make -f Makefile.WHATEVER clean" first. All the *.o files are being added to your diff file causing it to bloat up. Then you can "diff -Naur elc elcbanners > file.diff"

 

Also, you should probably have your banner codebase in a different dirctory for sanity sake (like how I put elcbanners above).

Edited by Drakos7

Share this post


Link to post
Share on other sites

If you want to do something else with the graphics, something I always wanted to see how it would work is to have the camera centered on your view in perspective mode, instead of on your player's vision, so that objects won't appear to be distorted in certain areas.

Anyway you can try that out?

Share this post


Link to post
Share on other sites

Here's the patch:

 

Click for patch

 

 

If you want to do something else with the graphics, something I always wanted to see how it would work is to have the camera centered on your view in perspective mode, instead of on your player's vision, so that objects won't appear to be distorted in certain areas.

Anyway you can try that out?

 

I'm not quite sure of what you want. Do you mean that in perspective mode you want the camera to become first person - you see what the character sees - instead of third person - you see your character and its surroundings? That's no problem. I could do that easily. I'm not sure if the rest of the engine and art are ready for that - the lack of a sky box would become very apparant, some objects may look bizarre from that viewpont as well.

 

As for peripheral object distortion: that's a feature, er bug, of perspective transformations. Since perspective became popular in modern art artists have wrestled with that problem. One solution they have tried is to draw objects that the eye expects to be a certain shape in that shape rather than as they would appear in a photograph. In the real world you never perspective distorted objects because when you turn to look at the object you change your frame and the object is suddenly centered in your eye's camera and correctly shaped.

 

I could attempt to separate objects from scenery and see what happens when I scale and orthographically project them to the screen instead of using a projection matrix. That would require a significant overhaul of the client though. I might try it anyhow... a friend of mine had something like that as part of her PhD research. (I'm an expert by proxy, having had to sit through many incomprehensible lectures on the topic replete with historical examples :o )

 

A better solution would be to lower and rotate the camera a bit while keeping a sane FOV. I could do that too, very easily. The problem with this is the player will no longer be able to see much of what is behind the character.

 

you can adjust name font size in the config window. nudging that up to 6 or so is a tip I give to people for hunting rabbits and the like. so it shouldn't be caused by your patch

 

That answers my concern in a backward way... I've heard you give that advice before BUT the increase is now so dramatic as to seem like cheating - both the name and the health bar get huge as seen here:

 

bigLabel.jpg

 

If this is undesirable I can change it.

Edited by emajekral

Share this post


Link to post
Share on other sites

What I mean was for the 3rd person in EL to basically look like the 3rd person in other games..and the difference I believe is(excluding the limited camera rotation), that the camera should not be at the character's eyes, but to be at the beginning of your view screen. I could be wrong of course..this is just my guess. I dind't mean to make a 1st person view, although if we ever do get a sky box that'd be a cool option.

 

In the real world you never perspective distorted objects because when you turn to look at the object you change your frame and the object is suddenly centered in your eye's camera and correctly shaped

 

So basically the "eye's camera" would be the viewport window, for what I wanted to try in the game.

 

I did a quick render test in Blender of this very thing. It looks much better if you have the camera down at eye level, however if you rotate the camera to be top down it doesn't. you still get the odd distortion because I believe, as people we're not used to looked down from this perspective.

 

render_cameraperspective1.jpg

 

render_cameraperspective2.jpg

 

It may look different in the game however, I don't know.

 

 

Edit:ah...nevermind, i have a feeling that this will really suck...Just ignore me and carry on with other things :hehe:

Share this post


Link to post
Share on other sites

Interesting patch.

If it works, someone please commit it.

 

The patch should work in any good GL implementation. I have given it a quick test in linux and windows. I need OSX and BSD to confirm no problems, then I will press forward with applying the change across all gamewin text. Until that change is made this patch should NOT be committed (if we want to skip thorough testing I can whip up the complete fix for Monday morning).

 

Anyone who has been trying the binary in the camera thread has been seeing the Orthographically Projected banners too. Please provide feedback on how it works for you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×