Synfig Project Forum

Forums for Synfig Project
It is currently Thu Sep 02, 2010 3:32 pm

All times are UTC - 4 hours [ DST ]




Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: OpenGL playfield
PostPosted: Thu Jan 29, 2009 4:08 pm 
Offline

Joined: Tue Jan 27, 2009 11:47 pm
Posts: 28
Location: Canary Islands, Spain
Hi!

First of all, sorry, I don't have yet any screenshot :).

Summary: If you haven't followed the post about changing the GUI to QT (here), I'm trying to do an OpenGL rendered playfield, so we can boost Synfig.

I've a few (well, just one for now) questions.

Should I maintain the old playfield as an option? Or if anyone want the old (or the new) just have to compile again? I've just sneaked a bit in the code, and it's VERY GTK dependent.

I want to maintain the old playfield as an option, and make playfields as options (just in case someday we add a DirectX one, for example), but that means changing A LOT of things (well, maybe just only the renderers and the workarea, but that's a lot of files, maybe 8 without the headers). Don't know if that's intended / wanted / tolerated, etc...

P.D. I don't know if that post has to be here. If not, kindly moderator, please move :)


Top
 Profile  
 
 Post subject: Re: OpenGL playfield
PostPosted: Thu Jan 29, 2009 6:27 pm 
Offline
Site Admin
User avatar

Joined: Sat Dec 01, 2007 6:26 am
Posts: 1789
Location: Spain
Uiomae wrote:
Should I maintain the old playfield as an option? Or if anyone want the old (or the new) just have to compile again?

I think that the best option for the moment is to keep the old playfield and add the new one using environment variables like #ifdef STUDIO_USE_OPEN_GL bla bla. Probably it would make the code more unreadable but it should keep it functional. Also it would allow to use the old playfield for the output render because, as I mentioned in the other post, it might be possible that OpenGL doesn't render accurately all the effects to the final output and we have to continue using the old renderer.

Quote:
I want to maintain the old playfield as an option, and make playfields as options (just in case someday we add a DirectX one, for example), but that means changing A LOT of things (well, maybe just only the renderers and the workarea, but that's a lot of files, maybe 8 without the headers). Don't know if that's intended / wanted / tolerated, etc...
Exactly. Optional renderers would be the good choice.

Regarding to the modification of a lot of files I think that it would be good if you use the git repository that dooglus (our only and main developer) keeps for large modifications. Currently we (he mainly) are doing a bone system in synfig. You should be able to use that repository to keep track of large chunk of files and also to allow others to pull from it and test the branch in other machines. Once the modification looks fine it would be a big commit (stashing it first) to svn. Unfortunately dooglus's hardware is mostly dead so he barely can connect to internet lately and the bones development has been momentary discontinued.
I don't know if you have a good hardware but dooglus was using my pc (quadcore 2.66 GHz 8 GB RAM, that has Ubuntu amd64 installed) remotely for quick compiling and testing. We have made a binary of synfig and synfigstudio for each 3 or 5 commits so we can find quickly where the bug was introduced in the past. I'll be glad to share my resources with you too.

I believe that there is a open account for guests in the repo to allow others to commit changes. Try that first, before start doing any code.

Here is the address:
http://repo.or.cz/w/synfig.git

Quote:
P.D. I don't know if that post has to be here. If not, kindly moderator, please move :)

I'll move the thread to Coding Synfig forum, if you don't mind.

This is exiting! :)
-G

_________________
Synfig needs your help!
Developers, packagers, bug testers, translators, artists, web developers, wiki writers... you can contribute! :D


Top
 Profile  
 
 Post subject: Re: OpenGL playfield
PostPosted: Thu Jan 29, 2009 8:19 pm 
Offline
Site Admin
User avatar

Joined: Sat Dec 01, 2007 6:26 am
Posts: 1789
Location: Spain
Hey,
I've been talking to dooglus and he told me to allow you to push to git repo.
Just open an account here:
http://repo.or.cz/m/reguser.cgi
and email dooglus to let him know your username to allow it to write on synfig repository.

mailto: dooglus@gmail.com

-G

_________________
Synfig needs your help!
Developers, packagers, bug testers, translators, artists, web developers, wiki writers... you can contribute! :D


Top
 Profile  
 
 Post subject: Re: OpenGL playfield
PostPosted: Fri Jan 30, 2009 11:35 am 
Offline

Joined: Tue Jan 27, 2009 11:47 pm
Posts: 28
Location: Canary Islands, Spain
Genete wrote:
Uiomae wrote:
Should I maintain the old playfield as an option? Or if anyone want the old (or the new) just have to compile again?

I think that the best option for the moment is to keep the old playfield and add the new one using environment variables like #ifdef STUDIO_USE_OPEN_GL bla bla. Probably it would make the code more unreadable but it should keep it functional. Also it would allow to use the old playfield for the output render because, as I mentioned in the other post, it might be possible that OpenGL doesn't render accurately all the effects to the final output and we have to continue using the old renderer.

Yes, that's the way I'm doing it right now. And yes, the code IS more unreadable :P (at least the renderers, that have a few nested ifdef's), but I think I can add it as an option when I've finished with it, so no problem here :).

Genete wrote:
Hey,
I've been talking to dooglus and he told me to allow you to push to git repo.
Just open an account here:
http://repo.or.cz/m/reguser.cgi
and email dooglus to let him know your username to allow it to write on synfig repository.

Ok, thanks a lot! Also, I mostly prefer using GIT than SVN :). It's way better (in my humble opinion), and you can commit offline. Great!


Top
 Profile  
 
 Post subject: Re: OpenGL playfield
PostPosted: Fri Jan 30, 2009 3:07 pm 
Offline
Site Admin
User avatar

Joined: Sat Dec 01, 2007 6:26 am
Posts: 1789
Location: Spain
My God! this is promising!

Here is a zoomed view of a sketch done usigng opengl libraries and using gtk libraires:

GTK libraries:
Attachment:
File comment: Sketch lines zoomed. Rendered with GTK
original1.png
original1.png [ 12.44 KiB | Viewed 2360 times ]

OpenGL libraries:
Attachment:
File comment: Sketch lines zoomed. Rendered with OpenGL
gl1.png
gl1.png [ 12 KiB | Viewed 2355 times ]


The checkboard of the bottom of the canvas is not rendered already but, do you see the difference?

Thanks Uoimae!!! :)
-G

_________________
Synfig needs your help!
Developers, packagers, bug testers, translators, artists, web developers, wiki writers... you can contribute! :D


Last edited by Genete on Fri Jan 30, 2009 7:39 pm, edited 1 time in total.
Wrong labeled :)


Top
 Profile  
 
 Post subject: Re: OpenGL playfield
PostPosted: Fri Jan 30, 2009 3:30 pm 
Offline

Joined: Tue Jan 27, 2009 11:47 pm
Posts: 28
Location: Canary Islands, Spain
You're welcome, Genete ;).


Top
 Profile  
 
 Post subject: Re: OpenGL playfield
PostPosted: Sat Jan 31, 2009 4:59 am 
Offline
Site Admin

Joined: Thu Jan 10, 2008 2:16 am
Posts: 308
Location: Russia
Wait-wait-wait! Is it images produced by synfig renderers?
I guess now I know why genete was silent lately - you talking with Uiomae about code? ;)
Uiomae, that's great!!! Superb!

_________________
Morevna project:
Recently completed tasks: Ivan character layout rework, Contributor's guide, Soldiers character layouts, Battlefield (3D), ...
Top priority tasks: Complete Animatic.


Top
 Profile  
 
 Post subject: Re: OpenGL playfield
PostPosted: Tue Feb 03, 2009 9:25 pm 
Offline

Joined: Tue Jan 27, 2009 11:47 pm
Posts: 28
Location: Canary Islands, Spain
Zelgadis wrote:
Wait-wait-wait! Is it images produced by synfig renderers?
I guess now I know why genete was silent lately - you talking with Uiomae about code? ;)
Uiomae, that's great!!! Superb!

Thanks a lot, Zelgadis!

I'm doing a "development update". This is the current state of the renderer:
Attachment:
snapshot1.png
snapshot1.png [ 43.63 KiB | Viewed 2279 times ]

Don't you like the new ducks? I LOVE them :P

Anyway, I'm progressing to add OpenGL as full renderer. As dooglus told me, it's better to add some functions to the layers to render with OpenGL instead of the current renderers. Currently, there is a "Layer::accelerated_render()" function called for every layer. I'm going to add "Layer::opengl_render()" for each of them too. But previously, I'm going to rename "Context::accelerated_render()" and call it "Context::render()", because it iterates over layers and call the needed methods, but this time it's going to call "Layer::accelerated_render()" or "Layer::opengl_render()" depending on selected renderer. I've already added a variable to Target base object to store the current renderer, and an option to the CLI to select the renderer. Option in studio it's on its way!

Anyone has another different / better idea? Maybe questions? Thanks in advance!


Top
 Profile  
 
 Post subject: Re: OpenGL playfield
PostPosted: Wed Feb 04, 2009 6:59 pm 
Offline
User avatar

Joined: Mon Aug 04, 2008 6:10 pm
Posts: 265
Location: Amsterdam, the Netherlands
It all looks very cool...

G.

_________________
Abstraction: The Biggest Lie in Computer Science.


Top
 Profile  
 
 Post subject: Re: OpenGL playfield
PostPosted: Tue Feb 10, 2009 7:58 pm 
Offline
Site Admin
User avatar

Joined: Sat Dec 01, 2007 6:26 am
Posts: 1789
Location: Spain
Progresses:

Attachment:
File comment: Screen capture of Synfig Studio render in the window. gamma =1.0
regions-sr-screen.png
regions-sr-screen.png [ 77.01 KiB | Viewed 2202 times ]


Attachment:
File comment: Same file rendered with OPENGL. Anti aliasing not implemented yet.
regions2.png
regions2.png [ 14.87 KiB | Viewed 2196 times ]


Attachment:
File comment: Same file after render it to png from Synfig Studio . Notice how the gamma is set to 2.2 ignoring the gamma = 1.0 of the setup in Synfig Studio.
regions-sr.png
regions-sr.png [ 53.04 KiB | Viewed 2214 times ]


Thanks Uiomae! And good luck! :D
-G

_________________
Synfig needs your help!
Developers, packagers, bug testers, translators, artists, web developers, wiki writers... you can contribute! :D


Top
 Profile  
 
 Post subject: Re: OpenGL playfield
PostPosted: Wed Feb 11, 2009 11:38 am 
Offline
User avatar

Joined: Wed Feb 04, 2009 8:34 pm
Posts: 111
Location: France
Yes Thank you very much Uiomae!! :mrgreen:
This OpenGL renderer will be necessary to work on really big/complex project..


Top
 Profile  
 
 Post subject: Re: OpenGL playfield
PostPosted: Wed Feb 11, 2009 12:16 pm 
Offline
Site Admin

Joined: Thu Jan 10, 2008 2:16 am
Posts: 308
Location: Russia
Amazing work!
This will push Synfig towards the end users so much, because it will become WYSIWYG app! No need to wait for render to see final result in motion!

_________________
Morevna project:
Recently completed tasks: Ivan character layout rework, Contributor's guide, Soldiers character layouts, Battlefield (3D), ...
Top priority tasks: Complete Animatic.


Top
 Profile  
 
 Post subject: Re: OpenGL playfield
PostPosted: Fri Feb 13, 2009 4:15 pm 
Offline

Joined: Thu Nov 13, 2008 8:20 am
Posts: 31
I can't wait :D


Top
 Profile  
 
 Post subject: Re: OpenGL playfield
PostPosted: Sun Feb 15, 2009 1:14 pm 
Offline

Joined: Tue Jan 27, 2009 11:47 pm
Posts: 28
Location: Canary Islands, Spain
Hi again. I wanted to know what card do you have in order to focus the new features a bit. Also, I need to know the capabilities of your card. So, in order to do that, I need one of this things:

If you run Linux:
  • Run the glxinfo utility, and send here the output. To do that, you can do in the console: "glxinfo > glxinfo.txt" and attach here the glxinfo.txt file
  • Run the glewinfo utility. To do that, install the package glew-utils (in Debian based systems, at least) or glew (in Fedora systems, thanks Zelgadis) and run "glewinfo > glewinfo.txt"

If you run Windows:
  • Run the glewinfo utility. Install the glew package (search on Google for the glew webpage) and run "glewinfo > glewinfo.txt" on a console.

If you run MacOSx:
I don't really know about this one, but I think glew also works on MacOSX.

Anyway, just attach the files and say what system are you using.

Thanks a lot!


Last edited by Uiomae on Sun Feb 15, 2009 1:27 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: OpenGL playfield
PostPosted: Sun Feb 15, 2009 1:20 pm 
Offline
Site Admin

Joined: Thu Jan 10, 2008 2:16 am
Posts: 308
Location: Russia
Fedora 7 and Fedora 10.
You need to install glew package to get glewinfo command for that system.

xorg-x11-drv-nvidia-177.82-1.fc10.x86_64


Attachments:
glxinfo.txt [25.84 KiB]
Downloaded 59 times
glewinfo.txt [114.25 KiB]
Downloaded 55 times

_________________
Morevna project:
Recently completed tasks: Ivan character layout rework, Contributor's guide, Soldiers character layouts, Battlefield (3D), ...
Top priority tasks: Complete Animatic.
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 4 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group