Jump to content
Eternal Lands Official Forums
Roja

Skybox discussion

Recommended Posts

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...

 

Great! i was worry for my health ;)

 

My water looks nice, i think it's the water shader.

 

 

Here is the patch for Free Camera (option under Sky&Cam panel).

 

I'm doing code changes in the NEW_CAMERA path only...i guess it will substitute the old camera handling, right?

Share this post


Link to post
Share on other sites
I'm doing code changes in the NEW_CAMERA path only...i guess it will substitute the old camera handling, right?
Have to check with Radu but I guess too.

 

I've tested your free camera patch and it's cool. ;)

I don't know what others think about it but I think it should be better to integrate it into the extended camera code rather than having a new option...

Share this post


Link to post
Share on other sites

Middle click & drag: I don't see how this can work because currently, when you middle click & drag you rotate the camera.

Share this post


Link to post
Share on other sites
I've tested your free camera patch and it's cool. ;)

I don't know what others think about it but I think it should be better to integrate it into the extended camera code rather than having a new option...

 

 

Yes. Personally i'd like a key shortcut (mmm...alt+y?) to enter and exit free cam mode to use it when needed. Most of the time i find ext cam angles more natural to play.

Share this post


Link to post
Share on other sites
Yes. Personally i'd like a key shortcut (mmm...alt+y?) to enter and exit free cam mode to use it when needed. Most of the time i find ext cam angles more natural to play.

Y is right next to X on QWERTZ keyboards (and S for sitting right above it too), there are so many other keys on the mostly neglected right hand side of the keyboard... ;)

Share this post


Link to post
Share on other sites
Middle click & drag: I don't see how this can work because currently, when you middle click & drag you rotate the camera.

 

The camera wouldl still rotate, but the range of the rotation would be greater with no or minimal drift after. Currently rotation stops when the mouse cursor hits the edge of the screen. With the proposed change the mouse would switch off or fo to the middle and the rotation would be free. The mouse would be restored to its former location when the drag is done and the mouse button is released.

Share this post


Link to post
Share on other sites
Still no reflections with frame buffer on

 

I've never had luck with reflections with the frame buffer on (in Linux). It was one of the in game issues that made me start working on the client.

Share this post


Link to post
Share on other sites
Middle click & drag: I don't see how this can work because currently, when you middle click & drag you rotate the camera.

 

The camera wouldl still rotate, but the range of the rotation would be greater with no or minimal drift after. Currently rotation stops when the mouse cursor hits the edge of the screen. With the proposed change the mouse would switch off or fo to the middle and the rotation would be free. The mouse would be restored to its former location when the drag is done and the mouse button is released.

 

 

I don't get it at all, sorry :)

Currently you click with the middle mouse, hold it down, drag a little(doesn't have to be to the edge of the screen), move your mouse to the side and when you let go you can have it spin around a lot or a little, depending on how much you move your mouse cursor. Anyway-this is click and drag, i wouldn't know how else to explain the current camera rotation.

Share this post


Link to post
Share on other sites
Middle click & drag: I don't see how this can work because currently, when you middle click & drag you rotate the camera.

 

The camera wouldl still rotate, but the range of the rotation would be greater with no or minimal drift after. Currently rotation stops when the mouse cursor hits the edge of the screen. With the proposed change the mouse would switch off or fo to the middle and the rotation would be free. The mouse would be restored to its former location when the drag is done and the mouse button is released.

 

 

I don't get it at all, sorry :)

Currently you click with the middle mouse, hold it down, drag a little(doesn't have to be to the edge of the screen), move your mouse to the side and when you let go you can have it spin around a lot or a little, depending on how much you move your mouse cursor. Anyway-this is click and drag, i wouldn't know how else to explain the current camera rotation.

 

Sorry. I'll try to be clearer.

 

The proposed change is this:

- allow full and unlimited control of the camera for as long as the middle mouse button is held.

- other than the fact that the cursor would no longer move when dragging you would not notice the difference.

 

Extra changes:

- allow the user to configure how long the spinning persists after letting go.

- apply the desired behaviour to the right mouse button instead of the middle because it is usually larger and easier to hold down.

- to allow right click action switching and right drag camera motion to coexist you only switch current action if a total motion of less than x pixels occurred. (Where x is ~ 5)

 

If this isn't clear enough I can try to make a demo video. But that means compiling the client in Windows. *shudder*

Edited by emajekral

Share this post


Link to post
Share on other sites
Welcome back! I dont feel edged out at all, i'm glad i can contact you to discuss your code.

 

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

 

Two small fixes here:

 

In actors.c remove these lines from draw_actor_banner:

#ifdef SKY_FPV_CURSOR
//if first person, dont draw banner
actor *me = get_our_actor();
if (me&&me->actor_id==actor_id->actor_id&&first_person) return;
#endif //SKY_FPV_CURSOR

In the same function find this line:

	//draw the health bar

immediately after it insert

#ifdef SKY_FPV_CURSOR
if (!((first_person)&&(actor_id->actor_id==yourself))){
#endif /* not SKY_FPV_CURSOR */

Near the end of the same function find these lines:

	glEnable(GL_TEXTURE_2D);

glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();

change them to this

	glEnable(GL_TEXTURE_2D);
#ifdef SKY_FPV_CURSOR
}
#endif /* not SKY_FPV_CURSOR */

glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();

In stats.c find this line in draw_floatingmessage:

	draw_ortho_ingame_string(x, y, 0, (unsigned char*)message->message, 1, ....);

I can't remember the last half but it should read this instead:

	draw_ortho_ingame_string(x, y, 0, (unsigned char*)message->message, 1, font_scale*INGAME_FONT_X_LEN, font_scale*INGAME_FONT_Y_LEN);

 

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.

 

Awesome.

 

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.

 

No solution would be simpler than extending the visible edges of the maps in the map editor. Approximately 20 extra tiles in visible directions should suffice. The fake horizon fog in sky.c draws solid fog color (sort of) for 5 degrees above and below the horizon. That would make the sky's fake fog touch real fog at around 20 tiles past where the character is standing. I think. I'll play with the map editor to see if that works then make a firmer recommendation.

 

It might be possible to eventually extend the map editor so that you can specify an "infinite" edge that could be handled in the client: ie. it could automatically fill past the edges of the map in accordance with a vector plot of what lies past the edge of the map.

 

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

 

The only shaders that complain at me are some of the texture compression ones (GeForce 6800). With NEW_SHADER enabled I see a spin box for reflection detail, but it doesn't work. Perhaps I should see the thread where it is introduced before proceeding.

Share this post


Link to post
Share on other sites
I'm doing code changes in the NEW_CAMERA path only...i guess it will substitute the old camera handling, right?
Have to check with Radu but I guess too.

 

I've tested your free camera patch and it's cool. :D

I don't know what others think about it but I think it should be better to integrate it into the extended camera code rather than having a new option...

 

Yes, it will, but first we have to make sure the new camera doesn't cause problems (we did some tests, but we need more testing). The old camera probably should be removed a week or so after the update, if no problems are detected.

Share this post


Link to post
Share on other sites

Ok I think I understand it a bit more now..but still not sure how it'll "feel" to use. Anyway if it's not much work to do then go and do it, and if people don't like it we can always revert back.

Share this post


Link to post
Share on other sites

on the map edges again:

 

i coded a few solutions and they all look bad:

- black plane around map (ugly)

- water tiles all around (ugly on maps with terrain borders...)

- plane coloured like the sky (mmm...)

 

before trying something more complex, cant we simply remove the lower sky? Afaik it is there to have water reflections (actually i can try it only with trasparent water tiles since i dont have water shader support), but since non frame buffer reflections will be removed...can we avoid to draw it?

Share this post


Link to post
Share on other sites

Forget about my last post...

 

Here is a very experimental and orrible code to solve the map edge issues (if clicking the link doesnt work, copy&paste it in the navbar).

 

It draws a "circle" around the map with the colors of the sky blending to the fog color...horizon_fog (sky&cam tab) should be always enabled or it looks very ugly. With render_fog on (details tab) it looks better even if on my machine fog is a bit buggy. I sent the code to Roja too, and if she says the result is acceptable i'll continue with some minor related issues.

 

couple of screenshots with fog and without. As you can see there are transparent non-water tiles to deal with (minor issues i was talking about).

 

Let me know what you think.

Share this post


Link to post
Share on other sites

I've corrected the reflection bug in the SKY_FPV_CURSOR code. I had to modify some parts of the code to move the reflection part at the good place. So the code is not working the same as before now and it will maybe need to be modified to have something cleaner later.

Anyway, I've tried all the stuff I was able to test and it seems to work nice for me. If someone else can test it too and report problems, it would be nice... :o

Share this post


Link to post
Share on other sites

:o

 

Great job!! my horrible skydisk can be removed now and hopefully SKY_FPV_CURSOR can go in the update (hint, hint :) ).

 

 

Maybe we need to clean the Sky&Cam a bit, removing options like horizon_fog, show sun & moon, and enabling them by default.

Share this post


Link to post
Share on other sites

There should always be an option to disable the sky because the drivers for my i915GM Laptop will crash if the sky is drawn

 

EDIT: The reflective water and Sky_fpv looks great. Although switching to shader quality 0 will switch to different reflections

Edited by ago

Share this post


Link to post
Share on other sites
Although switching to shader quality 0 will switch to different reflections

Yes, there's still a problem with that and I don't understand why yet. I'll continue the tests...

Share this post


Link to post
Share on other sites

I just tried it out now, looking better!

Still something needs to be done with the water edges, and the cloud color for the time of day..I haven't seen it at other times yet, but for this sky color the clouds are way too dark.--actually this might be that the environment(actors/grass/objects are too light which i'm told will be fixed when we have the new light system)

http://img.photobucket.com/albums/v59/fflewddar/skyshot1.jpg

 

Also, for inside maps, the sky needs to turn off by default. There's blue on the ground right now on insides.

 

Edit again: During the day the clouds have a LOT of black in them..and the sky is too saturated blue. A lighter blue would probably work better. Here's a good example of how the clouds/sky should look durign the day: http://mst.nerc.ac.uk/IMAGES/sky-camera_ca...070426_1100.jpg

 

And when it rains during the day, the clouds shouldn't get so black, something more like this is better:

http://www.trishtown.com/images/rainstorm.jpg

Share this post


Link to post
Share on other sites

Done several improvements:

1 - extended the tiles to the horizon! :D

2 - removed the sky for the inside maps

3 - the cloud color was a bug and to correct it the solution was to enable the fog. Anyway, it's fixed now and the color is always good

 

Here's a little example of what it looks like now :D

gallery_15074_13_64860.jpg

 

BTW, to test all the different times and weather, there are some short keys to change them when you compile with the DEBUG flag:

ctrl+alt+shit+q/w to increase/decrease the game time

ctrl+shift+home to start/stop rain instantaneously

ctrl+shift+end to start/stop rain progressively

 

 

Note 1: I've extended all the tiles by default but I can only extend water tiles. Anyway, some maps will have to be modified in order this to work properly...

Note 2: the sun seems to have a wrong position, on the screenshot, it should not be in this position if we are looking at the north

Share this post


Link to post
Share on other sites

The sky reflections with the water shaders look great. And the sea up to the horizion is awsome. Now you really have the impression IP is an island in the sea. Thanks for the fix.

Share this post


Link to post
Share on other sites

:D awesome!

 

 

only thing is i get this weird textured sky when it rains...am i missing a texture? (no msgs in error log tough).

 

 

about tiles extension: some maps look ugly (check naralik), probably all border tiles need to be extended even if not water.

Share this post


Link to post
Share on other sites

LOL, there are letters in the sky :D

I'll have a look...

 

About the borders that look ugly in some maps, it's what I said, some maps need to be modified. I'm just modifying the coordinates of tiles of the border so if there are no tiles, I'm not extending anything...

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.

×