Jump to content
Eternal Lands Official Forums
Roja

Skybox discussion

Recommended Posts

[*]When I checked the client out of CVS 3 hours ago sky.c needed to include SDL_active.h to compile.

I'll leave the other stuff for the graphics wizards, but this one's fixed now :icon13:

Share this post


Link to post
Share on other sites
[*] The FPV camera is too high now (with extended camera on. The height is correct when it's turned off.). The original height had it centered right behind the bridge of the nose: precisely where your eyes would be if you were your character. Now it looks like it's just above the top of the character's head. I know there was discussion about this... just my thoughts. One reason why the camera looks odd when its lower is that some of the objects in the game are oversized compared to the players.
That's how I had it, with ext-cam being about the head-height (but not exactly, at least not as far as I could tell with my char), which made non-ext-cam around the navel, which is not too useful. Roja wanted ext-cam to be above, so it is (seems to make sense to me, although being able to toggle ext-cam on a keypress may be useful. But I'll make that easy enough to do later when I work on the general key-press code)
[*]Turning extended camera on without using FPV should be close to but not quite the same as the early client I sent Roja. I don't quite remember what values I used for that - I tweaked them so that you could grab the mouse and click just in front of the character. Probably changing the magic number in draw_scene.c:218 from -1.6f to -2.0f will make it match her memory - a little higher than the classic EL and a little lower than what I delivered. This screenshot is with -2.0f.
Due to the lack of as-good clipping in non-FPV low-angle, I left some limits in... If someone wants to improve the clipping/FPV so that over-the-shoulder and behind-the-back works, then I'm happy to look at it.
[*] The sky in FPV in CVS right now is tilted 35 degrees... horizon fog is in the wrong place and shadows are all wrong. The offending line is draw_scene.c:270
glRotatef(rx-(first_person?35:0), 1.0f, 0.0f, 0.0f);

That line shouldn't be there at all. Removing it fixes the bug for me. Sorry. I don't generally use the trinary operator so I'm not sure how that got there.

Like, ohmigosh! Thank you! That's probably 2 of the 4 bugs I had listed that I knew were beyond my ability (the others being damage to shader reflections, and skybox reflection being pass-through instead of reflection, neither of which is quite as bad).

The other remaining bugs, apart from with shadows, on my list I can probably manage... The coding ones, anyway. Things like map-bugs (eg creases between ground parts being more obvious at a lower angle/height) and 3d-object bugs (like when you look from below a house, the eaves are invisible, since they aren't designed to be seen from below. Until now, you couldn't).

Share this post


Link to post
Share on other sites

I just re-read my code fix. What I said is wrong. What I meant is right. Get rid of the -(first_person?35:0) bit and leave the rest of the line in place.

 

I imagine that the 35 degree correction was intended to allow the camera to look up when not using extended camera while in first person mode. I was going to force extended camera mode eventually.

Edited by emajekral

Share this post


Link to post
Share on other sites
I just re-read my code fix. What I said is wrong. What I meant is right. Get rid of the -(first_person?35:0) bit and leave the rest of the line in place.
Yay, it works! :D

That takes 2 of the big ones off my list.

The shaders not working I'll have to talk to Xaphier about; I think he said he knew what the problem was and would fix it before, but doesn't seem to have done it yet.

I think I'm going to roll horizon_fog, stars, moon, and sun into show_sky; I don't think it's worth showing the sky if any of those are disabled.

And mouse-grab (alt+g) is going to have to be disabled properly when SDL cursors are used (currently it doesn't warp the mouse, but does pan/pitch according to mouse movement).

 

Well, looks like it's only artist work, shadows issues, and the rest I can do (until more bugs/requests come up) :D

Share this post


Link to post
Share on other sites

I just checked this out..

 

-The extended cam is much better now! Except can you make it so you can look further up at the sky? It should be just like in FPV..because in FPV you can look further up.

 

-Also I don't know if it's possible to light up the clouds around the moon like this, but it'd be cool:

http://www3.hants.gov.uk/night.jpg

 

-Again I don't know if this is possible, but i think it'd be nice if the sky wasn't totally black, but instead a nice soft gradient of colors(I can help pick out the colors), something like this:

http://flickr.com/photos/kingary/306726732/

and this with the navy blues: http://flickr.com/photos/diegoidi/412488387/

Share this post


Link to post
Share on other sites

I think I've only made one commit in the last few weeks, between university assignments, lack of motivation, and playing other games... If anyone else wants to pick up the things I've been working on, they're welcome to, but I have my doubts.

That said... I've added the camera range to my TODO list.

The rest, no, I'm not going to work on, although I can test and check in patches from other people who want to work on things like that.

Even if I did have the motivation and time to work on EL many hours a day, I have plenty of pure-code work on my TODO list, in areas that I have an understanding; whereas things like that would be graphics/OpenGL related, which I'm not that good at, and working with the skybox and all, which I don't have a solid understanding of (most of my work has been cleaning up what Emajekral sent me, and fixing bugs. Not much on the feature side).

Share this post


Link to post
Share on other sites

Ok, thanks for the work you have done ttlanhil, we appreciate it :D

 

-There needs to be some sort of color blend from the map edges into the sky.

 

-Also another big bug, if you're standing at the edge of a map(just go on IP for examples), the sky will go below the horizon line, so you get the ugly map water edge, then sky. It looks like you're standing on an island that's floating in the sky :hug:

To make this better, perhaps extend the reach of the horizon fog to go as far down as needed?

 

-A bug with the alt+g cursor/cam... IT should stay in the middle of your screen, not move to the sides. Right now with it moving to the sides of the screen it becomes unplayable that way. If it does stick in the middle of the screen then perhaps it would be a good idea to put a command reminder somewhere on the screen(press alt+g again to exit this mode)..something like that.

 

 

(edited out the new_weather bugs and put them in the new_weather thread)

Share this post


Link to post
Share on other sites

ttlanhil:

 

It's really hard to find the right balance between family, learning, work, play, and charity. For me EL is learning and charity all in one. It used to be play too, but things change. I still think the game is great, it just doesn't fit my lifestyle now.

 

Know that I appreciate what you've done. Good luck and maybe we'll be logged in at the same time some time... not that I'll ever have anything sensible to say. :icon13:

 

Roja:

 

On sky gradients

  • There's a sky gradient on at all times. At night it becomes indistinguishable from the fog. At the moment the sky gradient is uniform in all directions, but there's no reason why it has to be, it was just easier that way at the time.

Regarding moonlit clouds

  • Yes it's possible to light up the fringes of clouds around the moon, it was on my TODO list right after "Make two moons that have a regular cycle that is syncronised to in game date and time" but that's about where I started making random changes and ran out of energy and time.

Let the artists be free

  • One of the things I was planning to do was put the variables that control the sky's appearance in a file and load it up whenever the map changes. This would eventually allow the client to check to see if there's a special sky configured for a particular map and do things like:
    • change the angle of the sky to simulate latitude
    • load special cloud textures
    • change the moons' sizes, colors, textures
    • switch to a more appropriate sky engine like is done for the underworld and interiors.

Give me a couple of weeks and I'll see if I can come up with a config file format for skies so you can play around with them Roja.

 

I may also put in some hooks that can enable server initiated moon color changes for special events if someone on the server side wants to do that (I seem to recall that being a request).

I won't write the message parsing code, just provide functions for other programmers like:

 

  //change moon 0 or 1 to color over transition_time seconds
  void	specialMoon(int moon_num, int transition_time, float color[4]); 

  //change moon 0 or 1 back to its normal color over transition_time seconds
  void	resetMoon(int moon_num, int transition_time);

 

I haven't compiled the client or played since I last posted here so I'll comment more when I have had a chance to do so.

Share this post


Link to post
Share on other sites

Thanks emajekral :)

I think that the sky, as it is now with new_weather NOT compiled in, is quite acceptable for an update. Everything else would be improvements and tweaks to making it look better.

 

I would like to just get those 2 camera things fixed before the update, if someone can do it:

-The extended cam is much better now! Except can you make it so you can look further up at the sky? It should be just like in FPV..because in FPV you can look further up.

 

-A bug with the alt+g cursor/cam... IT should stay in the middle of your screen, not move to the sides. Right now with it moving to the sides of the screen it becomes unplayable that way. If it does stick in the middle of the screen then perhaps it would be a good idea to put a command reminder somewhere on the screen(press alt+g again to exit this mode)..something like that.

 

oh and this one with the horizon line:

 

-Also another big bug, if you're standing at the edge of a map(just go on IP for examples), the sky will go below the horizon line, so you get the ugly map water edge, then sky. It looks like you're standing on an island that's floating in the sky smile.gif

To make this better, perhaps extend the reach of the horizon fog to go as far down as needed?

 

 

 

 

 

 

On sky gradients

  • There's a sky gradient on at all times. At night it becomes indistinguishable from the fog. At the moment the sky gradient is uniform in all directions, but there's no reason why it has to be, it was just easier that way at the time.

 

I think it's fine for the gradient to be the same in all directions..no need to get too fancy. But is it possible to have a few different gradients that the client alters between? Even that's not that important, but is there a way for me to be able to tweak the gradients in the code? I'd just like to play with it a little and refine it here and there if it'll make it look better.

 

 

Let the artists be free

  • One of the things I was planning to do was put the variables that control the sky's appearance in a file and load it up whenever the map changes. This would eventually allow the client to check to see if there's a special sky configured for a particular map and do things like:
    • change the angle of the sky to simulate latitude
    • load special cloud textures
    • change the moons' sizes, colors, textures
    • switch to a more appropriate sky engine like is done for the underworld and interiors.

 

These things would all be great, especially the ability to have different cloud textures. I was wondering if it is possible to have the client simply cycle through a couple different ones?(they'd all be tilable with each other).

 

Second question, would what I bolded in your quote above include all maps? For example it might be neat to have some island map that's always stormy, so the sun wouldn't shine, it'd always be a gray-bluish-greenish sky during the day.

Share this post


Link to post
Share on other sites

 

-A bug with the alt+g cursor/cam... IT should stay in the middle of your screen, not move to the sides. Right now with it moving to the sides of the screen it becomes unplayable that way. If it does stick in the middle of the screen then perhaps it would be a good idea to put a command reminder somewhere on the screen(press alt+g again to exit this mode)..something like that.

 

 

As I was playing with the client I noticed a new option for use BIG POINTERS. I enabled it, and upon alt+g'ing this worked as it should! It does not work with the "old style cursors" on however.

Also, a bug with these big cursors is that whenever you middle click(rotate the camera), it's the same as alt+g'ing...so you can't move the camera around normally with the middle clicking/wheel button.

Share this post


Link to post
Share on other sites

-The extended cam is much better now! Except can you make it so you can look further up at the sky? It should be just like in FPV..because in FPV you can look further up.

 

-A bug with the alt+g cursor/cam... IT should stay in the middle of your screen, not move to the sides. Right now with it moving to the sides of the screen it becomes unplayable that way. If it does stick in the middle of the screen then perhaps it would be a good idea to put a command reminder somewhere on the screen(press alt+g again to exit this mode)..something like that.

 

oh and this one with the horizon line:

 

-Also another big bug, if you're standing at the edge of a map(just go on IP for examples), the sky will go below the horizon line, so you get the ugly map water edge, then sky. It looks like you're standing on an island that's floating in the sky smile.gif

To make this better, perhaps extend the reach of the horizon fog to go as far down as needed?

 

I use SKY_FPV_CURSOR, it is great (expecially now with arrows) and I would like to see it in the next update.

 

Since the update is in a month or so I think I can correct the above issues in time...is there still interest in this feature or should i stop looking into the code? Or is someone else working on it?

Share this post


Link to post
Share on other sites

I think i have corrected some bugs:

 

- now it compiles

- follow mode was broken (a function has been removed...check here), and now corrected

- now it is possible to enter grab mode only with alt+g, not with middle click. Works for SDL cursors too and displays a message on entering and leaving the grab mode

- first person view now works. When entering it, I move the camera to face where the actor is looking at.

 

Since i work on code where Schmurk is working too, i sent him the patch.

 

Remaining old issues:

 

- are we sure we want complete camera freedom in ext_mode? i found it more natural as it is now...(maybe enable it only on request like first person view?)

- how to prevent ugly map edges? any ideas? I tried to draw a black plane from map margins to the horizon, but doesnt look so nice.

 

New issues:

- my sky is flashing badly :(, i'm lucky not to suffer of epilepsy...

- please try grab mode while in follow mode...it's a bit weird imo.

Share this post


Link to post
Share on other sites

I got these errors when I tried to compile with the sky on:

draw_scene.c: In function `move_camera':

draw_scene.c:275: error: `camera_x_frames' undeclared (first use in this function)

draw_scene.c:275: error: (Each undeclared identifier is reported only once

draw_scene.c:275: error: for each function it appears in.)

draw_scene.c:277: error: `camera_y_frames' undeclared (first use in this function)

draw_scene.c:279: error: `camera_z_frames' undeclared (first use in this function)

 

draw_scene.c: In function `clamp_camera':

draw_scene.c:307: error: `camera_tilt_frames' undeclared (first use in this function)

 

make.exe: *** [draw_scene.o] Error 1

Share this post


Link to post
Share on other sites
I got these errors when I tried to compile with the sky on:

draw_scene.c: In function `move_camera':

draw_scene.c:275: error: `camera_x_frames' undeclared (first use in this function)

draw_scene.c:275: error: (Each undeclared identifier is reported only once

draw_scene.c:275: error: for each function it appears in.)

draw_scene.c:277: error: `camera_y_frames' undeclared (first use in this function)

draw_scene.c:279: error: `camera_z_frames' undeclared (first use in this function)

 

draw_scene.c: In function `clamp_camera':

draw_scene.c:307: error: `camera_tilt_frames' undeclared (first use in this function)

 

make.exe: *** [draw_scene.o] Error 1

 

yes, Schmurk has not submitted my patch yet, and without it his NEW_CAMERA breaks SKY_FPV_CURSOR.

Edited by Fedora

Share this post


Link to post
Share on other sites
- my sky is flashing badly :D, i'm lucky not to suffer of epilepsy...

I found turning of fog and restarting the client fixed the flashing sky.

edit: I had the same problem before I compile in FPV but used shaders.

Edited by bluap

Share this post


Link to post
Share on other sites
I found turning of fog and restarting the client fixed the flashing sky.

edit: I had the same problem before I compile in FPV but used shaders.

 

I tried this quick fix and it only reduced the amount of flashing.

 

But it compiles \o/ Thanks Fedora :D

Share this post


Link to post
Share on other sites
I found turning of fog and restarting the client fixed the flashing sky.

edit: I had the same problem before I compile in FPV but used shaders.

I tried this quick fix and it only reduced the amount of flashing.

But it compiles \o/ Thanks Fedora :D

Well it stopped the sky flashing for me but I just noticed that the stars/moon still flash. Also, inside building, the ground space outside the building flashes. I also noticed that you can't see your reflection with SKY_FPV_CURSOR defined. But agreed, good work Fedora :D

Share this post


Link to post
Share on other sites

Hi. I'd really love to see this work make it into the client. Thanks for taking over. I think I see a few odd changes. It's reading week at Uni so I might have an opportunity to post some fixes. If I post anything it'll be the odd line here and there posted in this thread. You can ignore me if you like.

 

I'm currently mucking around with a character named Mort_Emer if you want to contact me.

Share this post


Link to post
Share on other sites

Another issue which has come to my attention is the missing water reflection if the water shaders are being used.

 

Turning the shader quality to 0 shows clear reflections with and without SKY_FPV_CURSOR but as soon as shader quality is raised the reflections dissapear in FPV compiled versions while the versions without FPV still have the reflections with the water effect

Share this post


Link to post
Share on other sites

OK. I've compiled the client

 

First thing I've noticed is that when you middle click the cursor it stays visible and moves all over the screen when you look around. I just finished a week of playing World of Warcraft and I believe that's the direction I would like to camera manipulation go:

 

Middle click: no effect

Middle click and dragr: cursor goes into temporary mouse grab mode: cursor is centered or hidden, range of motion is unlimited.

 

As a bonus the same behaviour could be implemented for right click and drag. I find it MUCH easier to drag with my right mouse button cause my mouse wheel is so tiny. Is this a desired change? The change is simple.

 

Second, floating banners for XP and levels are all messed up. That should be an easy fix - however I lost all my old code in September when I had to do a system restore... I wasn't backing up my EL stuff.

 

Third, I would like to help troubleshoot the flickering stars, moon and indoor skies issue too BUT I can't see the problem. What compile/in-client options and hardware/OS are you using when the glitch appears?

 

Grab mode and follow mode are supposed to be mutually exclusive. Turning one on should turn the other off. I just never got around to fixing it.

 

Fedora: I'm not trying to edge you out. I really don't have a lot of time for this. The fact that I came back right when you started working is coincidence: my WoW trial expired, I got all nostalgic for EL and I got inspired by some of what I saw over there.

Share this post


Link to post
Share on other sites
OK. I've compiled the client

 

First thing I've noticed is that when you middle click the cursor it stays visible and moves all over the screen when you look around. I just finished a week of playing World of Warcraft and I believe that's the direction I would like to camera manipulation go:

 

Middle click: no effect

Middle click and dragr: cursor goes into temporary mouse grab mode: cursor is centered or hidden, range of motion is unlimited.

 

As a bonus the same behaviour could be implemented for right click and drag. I find it MUCH easier to drag with my right mouse button cause my mouse wheel is so tiny. Is this a desired change? The change is simple.

 

Second, floating banners for XP and levels are all messed up. That should be an easy fix - however I lost all my old code in September when I had to do a system restore... I wasn't backing up my EL stuff.

 

Third, I would like to help troubleshoot the flickering stars, moon and indoor skies issue too BUT I can't see the problem. What compile/in-client options and hardware/OS are you using when the glitch appears?

 

Grab mode and follow mode are supposed to be mutually exclusive. Turning one on should turn the other off. I just never got around to fixing it.

 

Fedora: I'm not trying to edge you out. I really don't have a lot of time for this. The fact that I came back right when you started working is coincidence: my WoW trial expired, I got all nostalgic for EL and I got inspired by some of what I saw over there.

 

Welcome back! I dont feel edged out at all, i'm glad i can contact you to discuss your code.

 

Flashing sky: i use NEW_SELECTION and NEW_CAMERA togheter with other flags in make.confs; I'm on a G4 Mac, so probably it is my hardware fighting againts new shader. However other users told me of flashing sky.

 

Banners & Xp: advices are welcome, i dont know where to start yet

 

Middle click: easy to do, just need Roja feedback for it

 

Grab mode: easy to disable in follow mode

 

I'm adding a free camera, a third person view with the angles of the fpv. I added a check to see if the camera is going under map tiles, to avoid weird angles. Submitting a patch soon.

 

My biggest concern is how to prevent the reflection ugliness at borders. I talked with Roja about it and she suggested to extend the map with tiles...and i dont know how to start here too.

 

About water shader: i dont have hardware for it, so i cant help.

Share this post


Link to post
Share on other sites

I think that the flashing background is due to the NEW_SELECTION feature. The new selection uses the back buffer to draw objects with different colors and maybe the back buffer is not completely cleared before drawing a new frame so this is why we have flickering.

 

EDIT: bug fixed!

However, the color of the water is really weird with the SKY_FPV_CURSOR feature. I don't know where it comes from...

Edited by Schmurk

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

×