Perl 6 - the future is here, just unevenly distributed

IRC log for #openframeworks, 2015-03-12

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

All times shown according to UTC.

Time Nick Message
00:40 GuidovanPossum_ joined #openframeworks
01:09 alski joined #openframeworks
01:16 alski I can't seem to keep the last point from a line strip mesh from connecting to the first point of another mesh. The meshes have the same name... but they should be different because I have them in a vector<ofMesh>
01:39 jedahan joined #openframeworks
01:39 jedahan joined #openframeworks
01:49 SFBurning joined #openframeworks
01:51 ar_tama joined #openframeworks
02:45 Sembei joined #openframeworks
03:40 Sembei joined #openframeworks
03:44 jedahan joined #openframeworks
03:49 gabrielstuff joined #openframeworks
04:05 ar_tama joined #openframeworks
04:51 ar_tama_ joined #openframeworks
05:08 esssing joined #openframeworks
05:09 7JTACJY48 joined #openframeworks
05:34 GuidovanPossum joined #openframeworks
07:01 gabrielstuff joined #openframeworks
07:47 Beliq joined #openframeworks
08:33 notjosh joined #openframeworks
09:39 dave joined #openframeworks
09:39 dave Hi guys
09:40 Guest73188 Does anyone here have experience building and working with RTMP protocol?
09:41 gabrielstuff joined #openframeworks
10:13 gabrielstuff_ joined #openframeworks
10:31 gabrielstuff_ joined #openframeworks
10:42 mhashmi joined #openframeworks
11:48 sebllll_ joined #openframeworks
12:14 marcocanc joined #openframeworks
13:05 jalcine_ joined #openframeworks
13:25 Beliq joined #openframeworks
14:08 notjosh joined #openframeworks
14:22 alski joined #openframeworks
14:57 armadillu joined #openframeworks
14:58 armadillu hey guys
14:58 armadillu got one question; anybody knows what's the deciding factor to change OF_VERSION_MINOR, OF_VERSION_MAJOR and so on?
14:59 armadillu the OF master branch is way past 0.8.4 but it's still set to OF_VERSION_MINOR 8  OF_VERSION_PATCH  4
14:59 armadillu its hard to ifdef things that dont work (ie ofRect vs ofDrawRectangle) in addons
15:00 armadillu anyone has a neat solution for this?
17:01 notjosh joined #openframeworks
17:24 admsyn joined #openframeworks
17:37 marcocanc joined #openframeworks
17:40 alski joined #openframeworks
17:42 alski How are projects going for everyone?
17:45 egradman joined #openframeworks
17:47 admsyn not too bad, I'm in full on white paper mode today
17:47 admsyn you?
17:51 alski Hitting some walls, but trying to make smaller studies out of everything that is confusing me. So many rabbit holes to go down at once.
17:54 admsyn yeah
17:54 admsyn did you figure out that mesh thing?
17:57 mhashmi joined #openframeworks
18:00 alski I have a vector of meshes now, (so the vector kind of represents a "braid", and the individual meshes are "threads" in a way), but for some reason, the end of the first mesh keeps drawing a line back to the beginning of the next. And I can't seem to rotate them individually.
18:01 admsyn rotating them individually should just be a case of doing an ofPushMatrix() / ofPopMatrix() around each thread, with a different rotation applied each time
18:02 admsyn for the other problem I'd *guess* it's an issue with individual meshes, instead of a bug when drawing a bunch at once
18:02 admsyn as in it may be that the first vertex is being added to the end or something
18:02 admsyn do you get the effect if you draw just one mesh out of the vector?
18:03 alski maybe it's because I wasn't using ofPushMatrix() / ofPopMatrix() that the rotation doesn't work. Do points with the same coordinates interact in a weird way? (as of right now they have the same coords, but each new one seems to get displaced by a unit).
18:04 alski One mesh is always working just fine.
18:04 admsyn yeah push / pop matrix is kind of necessary if you're applying rotations every frame
18:04 admsyn otherwise they'll just keep stacking
18:05 alski Is there some way to set a kind of terminating point in a mesh?
18:06 admsyn the last point would be your terminating point if you're drawing lines or a line strip
18:06 alski Also I'm using autoSetupIndices, so although I feel like the individual meshes wouldn't interact with each other, maybe somehow the indices are continuing to connect points?
18:06 admsyn tbh I don't know why you're dealing with indices at all
18:07 admsyn you should be able to just add vertices in order and be good to go
18:07 admsyn using manual indices starts coming into play with more complicated meshes where you want to re-use vertices
18:09 alski That's good to remember. Ugh, a major complication down the line is that I want this to be flexible enough to draw a "braid" between random points in a point cloud.
18:09 admsyn it may be that auto-indices is doing something weird though, like if you had an odd number of vertices maybe it's producing the visual bug you'r eseeing
18:09 admsyn ok, let's break this down :)
18:09 alski Yeah, best to cut that out entirely.
18:09 admsyn 1) are you drawing in lines mode or line strip mode?
18:10 alski Line strip
18:10 admsyn 2) have you tried drawing mesh 0 individually, then mesh 1 individually, then both? And if so do you see the loop around effect only when doing both?
18:11 alski Not totally individual meshes, but I have been creating one "thread", and then with another keypress, I create another.
18:12 admsyn Ok, I'm gonna *guess* it's a bug in how you're doing that
18:12 admsyn like the second thread is actually a copy of the first + new vertices or something
18:13 admsyn can you pastebin up the code that gets triggered when you do the keypress?
18:13 alski I can totally imagine it being something like that. I'm going to set up individual meshes to give that a test. For sure!
18:15 jedahan joined #openframeworks
18:15 jedahan joined #openframeworks
18:15 alski http://pastebin.com/y5rUzvWE   (the .cpp)
18:16 alski http://pastebin.com/am6X9GSg   (the .h)
18:18 admsyn at first glance it looks like you're always appending stuff to each mesh in oscMesh
18:18 admsyn which would produce that bug
18:18 admsyn since your resulting mesh would be all of the threads at once, instead of seperate meshes per thread
18:19 admsyn oscMesh.resize() doesn't clear the vector if that's what you were thinking :)
18:19 admsyn looking at sendWave()
18:21 alski OscNum is supposed to represent the number of individual meshes, so my intent was to resize the vector to allow for x number of meshes. So that might just be appending the second mesh to the end of the first?
18:24 admsyn yeah, lines 90 through 93, it looks like what you're doing is creating the thread between the two target points and appending the threads vertices to oscMesh[i]
18:24 admsyn and unless oscMesh[i] is an empty mesh, you're appending the new thread to an old thread
18:24 admsyn and since you're in line strip mode, that means the last vertex of the last thread will continue to the first vertex of the new thread
18:24 admsyn giving you that bug
18:26 alski so if I had oscMesh[1] and oscMesh[2], the second is still just a mesh appended to the end of oscMesh[2]?
18:27 admsyn what I'm talking about is a bug that'd happen if sendWave happens more than once ever
18:28 admsyn unless at some point oscMesh is getting cleared, and it looks like it isn't
18:29 admsyn so the first time through sendWave you're fine, the second time through you get a wrap-around since you just appending things
18:30 alski Would clearing oscMesh[i] before adding vertices fix that? And still allow for multiple threads?
18:30 admsyn it depends a bit on what the overall plan is for the app
18:30 admsyn you could clear oscMesh every time and that'd fix it, but only allow for a certain number of threads
18:31 admsyn or you could add a new mesh to oscMesh every time, and add the new thread to the new mesh
18:31 admsyn which I suspect is what you want
18:31 alski Exactly. So it should be like... oscMesh[i] = new OfMesh; ?
18:31 admsyn not quite
18:32 admsyn oscMesh.push_back(ofMesh()) will add a new mesh
18:32 admsyn the syntax "new ofMesh" is a bit different, it allocates an ofMesh and gives you a pointer (not what you want)
18:32 admsyn after oscMesh.push_back(ofMesh()), you can do oscMesh.back() to get the last mesh
18:33 admsyn so like oscMesh.back().getMesh().addVertex() etc
18:33 admsyn instead of oscMesh[i]
18:35 alski Ok, I think I'm starting to understand. And then say I wanted to link it to an index, corresponding to an origin point in a point cloud, could I add another dimension to the vector and then do oscMesh[originIndex].back().getMesh()?
18:35 admsyn I guess you could, but from a subjective standpoint I'd really think about making it simpler than that if you can
18:36 pizthewiz joined #openframeworks
18:37 alski Ok. Because once these braids are working, I just need a way to tie each individual braid to a point in that cloud.
18:38 admsyn one way to do it would be to create a class for a thread, which contains a mesh and the indices of the cloud vertices it's pointing to
18:38 admsyn and then have a vector of those instead of a vector<ofMesh>
18:39 admsyn it'd let you pretty easily store random other stuff to it too as your app gets more complex
18:39 admsyn like how much to rotate it, colour, etc
18:40 alski I think that would be appropriate. I was reluctant to create a class for it just because I wasn't sure if that would introduce a new level of complexity, but my app might be heading in that direction. And really they are objects with their own attributes, so it really does seem approriate.
18:43 alski This gives me a lot to move forward with, thanks for the conversation admsyn
18:43 admsyn np, good luck with it
18:44 alski I'm excited about how it will turn out, I'll be sure to post it on the forums when it's finished.
18:48 marcocanc joined #openframeworks
19:31 alski joined #openframeworks
19:36 pizthewiz joined #openframeworks
19:47 notjosh joined #openframeworks
20:25 allartburns joined #openframeworks
20:33 admsyn joined #openframeworks
21:18 armadillu joined #openframeworks
21:18 alski_ joined #openframeworks
21:57 jedahan joined #openframeworks
22:32 alski joined #openframeworks
23:23 pizthewiz joined #openframeworks
23:24 pizthewiz joined #openframeworks
23:27 alski is push_back an appropriate way to create an object inside of a vector?
23:28 alski I have a vector of a custom class, oscThread, which is being initialized with vector< oscThread > braid;, and then in the main .cpp file, I try to make an oscThread in the vector with braid.push_back(oscThread(0,mesh));
23:36 jedahan should scripts/linux/makeAllExamples.sh be removed, seeing as there are no longer project files for the examples?
23:55 pizthewiz joined #openframeworks
23:57 alski joined #openframeworks

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