Tron style meshes example

Josh Nimoy mentioned openFrameworks in his Tron Legacy post http://jtnimoy.net/workviewer.php?q=178
So why not try it myself.
After some pointers from Arturo I managed to get these smooth gradient arcs.

Using the FBO and ofMesh from the upcoming openFrameworks 0.7 release.
Running super smooth on macbook.

Source code → https://github.com/lab101/tronCircles
OSX binary → http://www.lab101.be/media/583/trondemo.zip

Could be useful if you wan’t to see the upcoming ofMesh in action.

Sometimes the screen goes blank when toggling fullscreen.
Not sure why…




looks beautiful, i like it!
also, josh nimoy’s blog post was a great read!

Wow! Excellent job! It could be a really nice screenSaver!
Playing with the code I added some glow effect using a blur shader.
I hope you don´t boder: http://dl.dropbox.com/u/335522/web/code/TronDemo.zip

1 Like

Hey Patriciogonzalezvivo,

Glow looks great although it runs extremely slow on my machine (Macbook pro with Geforce GT 330)

Kris

I can’t get the glow to compile on my MacBook (an oldy with a GMA x3100). Also, the anti-aliasing doesn’t work. I think it’s time for a new computer… :frowning:

Apart from that, it’s very nicely done. I think a story like the one Josh posted on the internet is a motivation for all of us openFrameworkers to continue doing whatever it is we’re doing, one day you might get to be in a blockbuster movie after all :wink:

EDIT: it does compile, but it’s giving me a bad acces on original.setup(), specifically on

  
  
glGenFramebuffers(1, &fbo);  
  

in ofFbo::setup(). This is the latest git checkout. Any ideas?

Hey Daan,

I you do a git clone from the upcoming 0.07 release
git clone https://github.com/openframeworks/openFrameworks.git

Then download my zip file in to the examples folder.
http://www.lab101.be/media/651/trondemo-src.zip

comment the following line in main.ccp if you experience problems with the FBO or performance
// window.setGlutDisplayString(“rgba double samples>=4 depth”);

Hi,

nice job!
i tried to have it in my macbook pro 1,1, ATY,RadeonX1600.
I had to change 2 lines in arc.cpp:

from:

  
  
mesh.setMode(OF_TRIANGLE_STRIP_MODE);  
meshOutline.setMode(OF_LINE_LOOP_MODE);  
  

to:

  
  
mesh.setMode(OF_PRIMITIVE_TRIANGLE_STRIP);  
meshOutline.setMode(OF_PRIMITIVE_LINE_LOOP);  
  

because i had errors compiling.
And i get the app to work but only see the outlines of the circles.
Any advice about it?

Hey Miguel,

There where indeed some changes between the dev version of 007 and the final release.
Ik fixed the sample and put the code on github

https://github.com/lab101/tronCircles–

Kris

Hi ,

uauauauauaau, that is great !!!
thank you !
it is the first time i can make something with

window.setGlutDisplayString(“rgba double samples>=4 depth”);

and looks really good.

This looks very promissing, but I haven’t been able to compile it since 007 has been updated a few times since posted.
Any help? :smiley:

2> Generating Code…
2> Creating library bin\emptyExample_vs2010_debug.lib and object bin\emptyExample_vs2010_debug.exp
2>LINK : warning LNK4098: defaultlib ‘MSVCRT’ conflicts with use of other libs; use /NODEFAULTLIB:library
2>testApp.obj : error LNK2019: unresolved external symbol “public: void __thiscall arc::draw(float)” (?draw@arc@@QAEXM@Z) referenced in function “public: virtual void __thiscall testApp::draw(void)” (?draw@testApp@@UAEXXZ)
2>testApp.obj : error LNK2019: unresolved external symbol “public: void __thiscall arc::createMesh(void)” (?createMesh@arc@@QAEXXZ) referenced in function “public: void __thiscall testApp::createNewArcs(void)” (?createNewArcs@testApp@@QAEXXZ)
2>bin\emptyExample_vs2010_debug.exe : fatal error LNK1120: 2 unresolved externals

Ah that’s “normal” because the windows project wasn’t setup.
I updated the windows solution file and added a switch to turn off AA on windows because it doesn’t work.

Go check github for the updates

Nicely done. I wanted to do something like that once with Processing after seeing Ghost in the Shell the first time. They use similar graphics in a scene. Maybe it was the second part … Maybe Antialiasing isn’t working fine. But I only got a Intel GMA 3150 on here.

Anyway. I run Ubuntu 11.04 and compiled it via make after just copying the code into a new project. Just some unused variables popped up, otherwise compiling smoothly.

And it runs super smoothly here as well. I run a HP Mini 5103 - that’s a Atom N455 1.66 GHz and 2 GB ram for you.

Thank you!

![](http://forum.openframeworks.cc/uploads/default/1782/snapshot_ 0.png)

![](http://forum.openframeworks.cc/uploads/default/1784/snapshot_ 1.png)

![](http://forum.openframeworks.cc/uploads/default/1786/snapshot_ 2.png)

yes that seems like an antialiasing problem, the glut string for antialiasing in linux is the same as osx so probably your card doesn’t support it. Intel cards usually are pretty limited

Very limited :wink: It’s just a netbook.

But I’m amazed how fast openFrameworks is. I have problems when I open two Youtube pages in Chrome. But C++ is just blasting away, amazing for me as a webdev :smiley:

I love it - thank you!

@arturuo I’ve tested it on my macbook which also runs windows through bootcamp and the glut string isn’t working although it’s the same graphics card.

have you tested in windows? take a look at the floatingPointImageExample. in main.cpp there’s examples for the strings in both windows and osx/linux

Get a crash on the floatingpointexample as well.
GLUT: Fatal Error in openframeworks: pixel format with necessary capabilities not found.

It does look good when changing the settings trough the Nvidia panel as stated in this post
http://forum.openframeworks.cc/t/anti-aliasing-not-working-on-windows/5968/0

Changing to GLFW would probaply also do the trick.
http://www.giawa.com/?p=45

It’s definitely possible because I know Cinder has AA by default

zuppaman!
I will try it! thanks for the update! :o

Edit->
Worked great! xD

Hi, everyone wants to draw arc he :slight_smile:

https://gist.github.com/3727599