Perl 6 - the future is here, just unevenly distributed

IRC log for #openframeworks, 2014-03-16

| Channels | #openframeworks index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:10 ofzach left #openframeworks
00:23 workergnome joined #openframeworks
01:07 lukaszw joined #openframeworks
01:32 bakercp joined #openframeworks
01:35 dantheman joined #openframeworks
02:10 dantheman_ joined #openframeworks
03:16 mikelikespie joined #openframeworks
03:55 danomatika joined #openframeworks
04:03 boltR joined #openframeworks
04:21 boltR_ joined #openframeworks
04:34 boltR joined #openframeworks
04:54 danomatika left #openframeworks
04:55 admsyn joined #openframeworks
06:21 pizthewiz joined #openframeworks
06:51 dantheman joined #openframeworks
08:17 Joel_re joined #openframeworks
08:41 gabrielstuff joined #openframeworks
09:23 LCID_Fire_ joined #openframeworks
10:29 boltR joined #openframeworks
10:33 kflux joined #openframeworks
12:04 kiritan joined #openframeworks
12:11 ofarturo joined #openframeworks
12:42 bakercp joined #openframeworks
12:53 robot joined #openframeworks
13:00 sadmb joined #openframeworks
13:01 sadmb hello. :)
13:02 zanilo joined #openframeworks
13:03 sadmb I have a trouble with login to new OF forum and I haven't receive any e-mail to renew my account. Does anyone know who should I ask? maybe arturo?
13:42 zanilo joined #openframeworks
14:12 bakercp joined #openframeworks
15:30 admsyn joined #openframeworks
15:31 golan_ joined #openframeworks
16:08 Joel_re joined #openframeworks
16:11 OliverUv hello! When I changed my code to render to an ofFbo instead of drawing directly, it is suddenly drawing really strangely
16:12 OliverUv output is a bit warped, and it seems like it's really zoomed in on like a corderner of the original output
16:13 admsyn OliverUv: can you show your drawing code on pastebin?
16:13 OliverUv auew
16:13 OliverUv *sure
16:13 OliverUv https://gist.github.com/4b7cc7e31a4630d88b6f
16:15 admsyn that's kind of a lot of code to sort through, but do you mean render_buffer.draw(0, 0); in your draw() is the problem bit?
16:27 admsyn well in any case, you might just need to set the width / height when you're drawing, or adjust the viewport ( ofViewport() )
16:29 dantheman joined #openframeworks
16:30 pizthewiz joined #openframeworks
16:32 OliverUv hm
16:33 OliverUv admsyn: the only draw call i had before was plane.drawWireframe()
16:33 OliverUv now i have just wrapped it in an fbo's begin/end, and then call the fbo's draw afterwards
16:33 OliverUv i'll take a look at viewports, see what they are
16:39 OliverUv ugh, I dislike that there is like no documentation for a ton of the of functions
16:39 OliverUv http://www.openframeworks.cc/documentation​/graphics/ofGraphics.html#show_ofViewport
16:45 kflux joined #openframeworks
16:45 kiritan joined #openframeworks
17:02 kiritan joined #openframeworks
17:33 OliverUv hm, tried setting viewports but it didn't change anything
17:35 LCID_Fire_ joined #openframeworks
17:36 admsyn can you post a screenshot maybe? It's a little hard to figure out what's up just from the description
17:36 admsyn something like an A / B before and after fbo drawing
17:36 admsyn it might also be worth giving it a shot with the 0.8.1 RC candidate if you're working off 0.8.0
17:37 admsyn what happens if you set the width/height when drawing the FBO, though?
17:39 OliverUv exactly the same thing as before
17:39 admsyn and yeah just scanning your code again, the "a bit warped" part of your description kind of makes me think it might be a shader thing
17:39 OliverUv i'll make pre-post screenshots, though they'll be kinda silly
17:40 OliverUv sorry, I should have said massively warmed
17:40 OliverUv *warped
17:41 admsyn well yeah :) viewport mismatch would look like a zooming, but warping would imply some odd shader behaviour
17:41 ptoinson joined #openframeworks
17:41 admsyn which is not to say that there's something wrong with your shader, might just be a setup thing or possibly an OF bug
17:42 admsyn what happens if you don't use the shader and just draw straight into the fbo?
17:42 admsyn like if you block out your drawing and just throw an ofCircle in the FBO
17:43 OliverUv this is what i'm drawing
17:43 OliverUv http://imgur.com/dYfb9jZ
17:45 OliverUv when using the fbo, it is mostly just black. I can adjust lots of parameters for the visualization by waving my hands over a leap motion device. Sometimes, I can see some lines (wide, with interference patterns on them, but larger than hte patterns on the original output) sweeping across the screen
17:45 OliverUv like a warped rectangle sweeping across the screen, with different kinds of interference on it
17:46 OliverUv disabling the shader, I get all-black output
17:48 admsyn so if you disable the shader, and do an ofCircle() you just get black?
17:50 OliverUv yes
17:51 OliverUv (i do ofColor(255,255,255,255); ofCircle(0,0,400); )
17:52 OliverUv figured my call to ofTranslate might be messing up when used within fbo, but commenting it out makes no difference
17:52 admsyn if the FBO's 1920 / 1200 though that could just end up off screen
17:54 OliverUv ? why
17:54 OliverUv i thought 0,0 was top-left?
17:54 admsyn if there's some issue with viewports or something similar, that could just end up off screen
17:54 OliverUv i'll make an enormous 3000x3000 circle
17:54 admsyn yeah
17:54 OliverUv and binary search my way downwards if it covers the entire screen
17:55 admsyn yeah all I'm saying is it might help narrow it down if you draw a known thing (like a circle) on the screen and see /how/ it warps
17:55 OliverUv btw does it matter if I give the fbo.allocate() call floats or ints?
17:56 admsyn because if it's all batshit-crazy it'll imply a different problem than if it's just skewed
17:56 admsyn you should go with ints but it will cast them
17:56 OliverUv i've seen people using ints, and I've seen examples/gl/viewportExample explicitly cast to float
17:56 OliverUv k
17:56 admsyn as in C++ will cast it (don't know if you're familiar with C++)
17:56 OliverUv i am familiar enough, not pro by any means
17:56 OliverUv the whole autocast thing bothers me though :p
17:56 admsyn explicitly casting /to/ float in the allocate call?
17:56 admsyn waaat
17:57 * admsyn looks
17:57 OliverUv oh wait no
17:57 admsyn oh ok
17:57 OliverUv hm no some other code i looked at used it
17:58 admsyn alright
17:58 OliverUv sorry, i'm consulting many sources to figure this out and mixed them up
17:58 admsyn np
17:58 admsyn yeah if a function just takes ints and you give it floats, it'll cast them to ints on the way in without any intervention
17:58 admsyn this can make Bad Things happen
17:59 admsyn btw is your window 1920 / 1200? that'd help narrow it down
18:00 OliverUv yes, it is, and I'm using ofAppGlutWindow + ofSetupOpenGL
18:00 OliverUv with OF_FULLSCREEN
18:00 OliverUv trying to render a 5000px radius circle gives me nothing
18:00 OliverUv (shader disabled)
18:00 admsyn interesting
18:01 admsyn so to clarify, that screenshot you posted before
18:01 OliverUv with shader enabled, it is still all black
18:01 admsyn it's nothing like what you're actually drawing?
18:01 OliverUv that screenshot is what it looks like without using the fbo
18:01 admsyn oh ok
18:01 admsyn and with?
18:01 OliverUv it's a constantly rotating wireframe of a normal of plane
18:02 OliverUv *ofPlanePrimitive
18:02 OliverUv i use the shader to apply colors, warp the vertexes to move closer to a focal point (like gravity)
18:02 OliverUv and the frag shader to adjust colors
18:03 admsyn cool, but what I'm after is an A/B
18:03 admsyn because being able to just see the difference between the two is going to be way easier than explaining it in text
18:04 OliverUv well, I can't really get to a B since I can't properly hold my hands in the air while pressing print screen :p
18:04 admsyn ah, well
18:04 OliverUv i'll see if I can get a video of it
18:04 admsyn cool
18:05 admsyn yeah, sorry, it may very well be something simple but there's so many little things that could go wrong with slightly different visual effects..just saying warp/ interference etc doesn't really narrow it down :)
18:05 admsyn what happens if you just make your vert shader a passthrough, though?
18:05 admsyn sounds like it's the place where the magic's happening, and the only place that's jumping out as something that'd actually "warp" the image
18:06 OliverUv i'll check!
18:06 Topic for #openframeworks is now Welcome to http://openframeworks.cc/ | logs at http://irclog.perlgeek.de/openframeworks/ 
18:08 OliverUv oh cool
18:09 OliverUv when turning the shader on, just drawing the plane wires, I get the weird looking thing over the entire screen
18:09 OliverUv so now i can show you: http://i.imgur.com/uK80Y6f.png
18:09 OliverUv oops, forgot to crop
18:09 OliverUv oh well
18:09 admsyn ok, so on the left that's what?
18:10 OliverUv that's the stuff
18:10 admsyn because if it's not intentional it looks like a texture format mis-match
18:10 admsyn >the stuf
18:10 admsyn :|
18:10 admsyn it's what you're trying to draw?
18:10 OliverUv it's pretty similar to what the thin lines of the wireframe look like
18:10 OliverUv only applied to a full field of colors, instead of a thin line
18:11 OliverUv i'll make the frag shader pass-through too
18:12 admsyn are you rocking emacs?
18:12 OliverUv making the frag shader pass through, (such that all the pixels of the wires would have the same color) i just get a solid field of a single color over the entire screen
18:12 OliverUv vim
18:12 admsyn nice
18:12 OliverUv with an infinitude of plugins
18:13 admsyn ok so if everything's a passthru, you just got solid blue?
18:13 OliverUv yeah
18:13 OliverUv well, a single color depending on where i'm holding my hand over my input device
18:13 OliverUv but yes
18:14 admsyn ok, and the color is the "right" color based on what else your app is doing?
18:15 OliverUv hm, no! it should shift between all colors, but it is only shifting through teal hues~!
18:15 OliverUv oh actually it is not shifting at all
18:15 OliverUv it is the same teal hue no matter what i do
18:16 admsyn sounds kinda like it might be a format mismatch maybe
18:16 admsyn though it is a little odd
18:16 OliverUv wait no sorry, I'm an ass! It is showing correct colors
18:16 admsyn haha
18:16 OliverUv (i forgot that i have to put my second hand over hte device to change color, not just one hand)
18:16 admsyn is that vignette coming from ofxPostProcessing?
18:16 admsyn in your screenshot at the top left
18:16 OliverUv no, it is all manual
18:17 OliverUv https://gist.github.com/9587476
18:17 OliverUv that's the frag shader
18:17 admsyn oh ok
18:17 OliverUv (when pass-through, I just set outputColor = line_color;
18:19 bakercp joined #openframeworks
18:19 admsyn oh what if you just change GL_RGBA to GL_RGB in your render_buffer.allocate ?
18:19 OliverUv just tried it :p no difference
18:20 admsyn ah
18:21 admsyn I haven't been keeping up but I think the programmable renderer is kinda buggy
18:21 admsyn are you using the 0.8.0 download off the site?
18:22 OliverUv right now using 0.8.1 (git id d2a245, from 11 days ago)
18:22 OliverUv i've had the same problem with 0.8.0
18:23 admsyn :/
18:23 nicedice_ joined #openframeworks
18:24 OliverUv now, of course, examples that use FBOs work fine
18:24 OliverUv it's just my code that is bugged
18:24 OliverUv but it's really starting to rustle my jimbos!
18:25 admsyn ha
18:26 admsyn now I think there's an FBO + programmable renderer bug that's still open that might be relevant
18:26 * admsyn looks
18:27 ofarturo joined #openframeworks
18:28 admsyn https://github.com/openframewo​rks/openFrameworks/issues/2593
18:28 admsyn OliverUv: fixed "5 days ago", so maybe it literally got fixed 6 days after you last updated :)
18:29 admsyn but yeah there's nothing terribly obvious jumping out at me from code
18:29 admsyn *from your code
18:29 mikelikespie joined #openframeworks
18:30 OliverUv RPi = the programmable renderer?
18:30 OliverUv oh, raspberrypi
18:34 lukaszw joined #openframeworks
18:35 OliverUv not sure if this is related to my bug though
18:37 OliverUv well, I pulled the latest version and am recompiling now
18:38 admsyn yeah I don't know either, I think just A/B-ing it down to a line of code is going to be the way to go
18:39 OliverUv same error as before :<
18:39 ncls joined #openframeworks
18:41 OliverUv well, I can break/unbreak by just commenting out the fbo.begin/end/draw calls
18:41 OliverUv I'm not sure how to narrow it down more
18:43 admsyn narrowing it down to whether it's a shader or fbo issue would be crucial, then after that finding out what about the shader or fbo is causing the glitchyness
18:43 admsyn you could start just with something simple, like ofCircle and no fbo
18:43 admsyn then ofCircle in the fbo
18:43 admsyn then ofCircle in the fbo with a passthru shader
18:43 OliverUv mm
18:43 admsyn etc
18:44 OliverUv i'll get started on it from a clean slate tomorrow
18:44 OliverUv it is late now, so I'll head home and eat
18:44 OliverUv thanks for the help! I really appreciate it
18:44 admsyn alright, well good look
18:44 admsyn no problem
19:03 ptoinson joined #openframeworks
19:06 nicedice joined #openframeworks
19:13 boltR joined #openframeworks
19:15 ptoinson joined #openframeworks
19:26 w4ffles joined #openframeworks
19:32 pizthewiz joined #openframeworks
19:33 w4ffles joined #openframeworks
19:38 admsyn joined #openframeworks
19:43 kflux joined #openframeworks
19:49 golan_ joined #openframeworks
19:58 w4ffles quit
20:36 jacres joined #openframeworks
20:43 nicedice joined #openframeworks
21:18 admsyn joined #openframeworks
21:23 nicedice joined #openframeworks
21:24 nicedice joined #openframeworks
21:31 Joel_re joined #openframeworks
21:36 pizthewiz joined #openframeworks
21:49 bakercp joined #openframeworks
22:34 kiritan joined #openframeworks
22:44 Joel_re_ joined #openframeworks
22:44 bakercp joined #openframeworks
22:44 lukaszw joined #openframeworks
22:44 jvcleave joined #openframeworks
22:46 ofarturo joined #openframeworks
22:52 admsyn check this thing out https://github.com/Ahbee/ofxUbo
22:53 golan_ joined #openframeworks
22:55 OliverUv looks useful
22:57 OliverUv admsyn: you seem to have some experience with oF and shaders. How do you think ofxFX and ofxPostProcessing compare_
22:57 OliverUv ?
22:58 admsyn IIRC ofxFx is more general whereas ofxPostProcessing is more about post-render frag shaders
22:58 admsyn as in ofxFx has fluid dynamics and particle systems and stuff like that
22:58 OliverUv yeah, though ofxFX seems to be all about frag shaders too
22:59 OliverUv the code for ofxFX is really really simple, and does roughly what I want, so I think I'll be using it
22:59 admsyn yeah whatever does the job, right?
23:00 OliverUv pretty much, though I hope to make some long-lived software so it is best to be able to understand the foundation
23:00 OliverUv so i can change it when I need to
23:01 admsyn yeah ofxPostProcessing has some template trickery happening it that might be a little hard to grasp at first
23:01 OliverUv i see
23:01 OliverUv templates is the part of C++ i glossed over the most when learning it
23:01 admsyn yeah I think that's par for the course :)
23:01 OliverUv I studied for and completed my uni's advanced cpp exam in like 3 days
23:01 OliverUv so there was a lot of .. glossing
23:19 jacres joined #openframeworks
23:43 gabrielstuff joined #openframeworks
23:50 golan_ joined #openframeworks

| Channels | #openframeworks index | Today | | Search | Google Search | Plain-Text | summary