Jump to content
Eternal Lands Official Forums
Sign in to follow this  
Xaphier

eye candy improvments

Recommended Posts

I played a bit with the eye candy code to make it a bit faster. Results are in the branch feature/eye_candy_2. NEW_TEXTURES is needed (and enabled by default in that branch) to see the difference. Two new files are needed http://www.eternal-l...m/eye_candy.zip (eye_candy.dds & eye_candy_burn.dds), both must be placed in the textures folder in the data directory. The "creation" times of effects is not reduced, so there is still a performance hit when a spell is cast etc.

 

The changes are:

  • use of a texture atlas to avoid texture change per particle. The texture was made with gimp and this plugin http://registry.gimp.org/node/20672
  • use of vertex buffer object to stream particle changes to the GPU and render them with only one draw call per effect
  • using a fifth "color" parameter (red, green, blue, alpha and burn). Burn controls how additive a particle is. Burn 1.0 mean 100% additive, burn 0% means total non-additive. This paper explains it for quite good: http://wscg.zcu.cz/W...rt/A73-full.pdf
  • use of vertex buffer objects for shapes for faster rendering.
  • use of a new shape for effects that is an instanced version.

If I made no mistakes, effects should look similar to what they looked before. Small changes are of course possible. Because of the use of vertex buffer objects, OpenGL 1.5 is needed. The code checks this and don't let you enable eye candy if your graphic card don't support it.

Any feedback is welcome

 

PS: when you see quads instead of particles, check your error_logs.txt and make sure the eye_candy.dds & eye_candy_burn.dds files are at the right location

Edited by Xaphier

Share this post


Link to post
Share on other sites

Hi, i'm running this feature client now.

Harvesting effect is working ok, but when i used restoration spell, no eye candy was played.

(Yes i compiled with NEW_TEXTURES and yes i have the .dds files in textures dir)/

Will test more when i get to storage ;)

 

Edit: aaha, so you have to have "Adv. Video" -> "Vertex Buffer Objects" turned on to see the casting effect...

 

Edit2: tested on ubuntu 10.10 64b

Video card: GeForce GTS 360M/PCI/SSE2

Vendor ID: NVIDIA Corporation

OpenGL Version: 3.3.0 NVIDIA 270.29

 

Works ok so far.

Edited by groomsh

Share this post


Link to post
Share on other sites

compile errors on win:

eye_candy/eye_candy.cpp: In member function 'void ec::Shape::draw()':
eye_candy/eye_candy.cpp:337:62: error: 'glMultiTexCoord1f' was not declared in this scope
eye_candy/eye_candy.cpp: In member function 'void ec::CaplessCylinders::draw(float)':
eye_candy/eye_candy.cpp:944:62: error: 'glMultiTexCoord1f' was not declared in this scope

Share this post


Link to post
Share on other sites

compile errors on win:

eye_candy/eye_candy.cpp: In member function 'void ec::Shape::draw()':
eye_candy/eye_candy.cpp:337:62: error: 'glMultiTexCoord1f' was not declared in this scope
eye_candy/eye_candy.cpp: In member function 'void ec::CaplessCylinders::draw(float)':
eye_candy/eye_candy.cpp:944:62: error: 'glMultiTexCoord1f' was not declared in this scope

Should be fixed now, thanks

Edited by Xaphier

Share this post


Link to post
Share on other sites

Tried all effects with ECDEBUGWIN enabled and they worked so far.

 

But hit an error while clicking random effects fast.

Screen went almost black and had to restart client.

take_snapshot: 153 glReadBuffer(GL_BACK) problem.

But think I've seen this occasionally before (one or two times), so could be a local issue.

Share this post


Link to post
Share on other sites

I compiled new client and now all text is surrounded by black, and all effects (harvesting, smoke) are very blocky. Also, many objects - like bushes or mud patches are surrounded by black squares, so it looks kind of ugly.

Am I missing anything?

 

Ok, I forgot to download files. Now smoke and harvesting effects are ok, but text and black squares are still there. Also, all characters are now blond :)

 

screenshot: http://img689.imageshack.us/i/screenshotpuushonmainet.png/

Edited by puush

Share this post


Link to post
Share on other sites

The new 2D objects aren't available yet, so the black squares will remain until all data-files are updated and ready for download (maybe in the next release of the test-client).

Edited by Sir_Odie

Share this post


Link to post
Share on other sites

As noted above I'm getting gl errors since these eye candy changes.

 

[23:58:17] Error: take_snapshot: 163 glReadBuffer(GL_BACK) problem.

It seems they are related to map changes.

 

A build with OPENGL_TRACE shows this instead of the above message.

 

[00:29:31, gamewin.c:1162] Error: OpenGL Der Vorgang ist ungültig.

(translation: "Error: OpenGL The operation is invalid.")

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×