Forums > Jitter

Multiple openGL objects scene in Jitter, need help please (!)


Apr 11 2011 | 11:15 am

Hi,
After going over the Jitter tutorials I decided to make a scene of openGL objects which would each have it's own texture and position and use those to create a musical piece.
I am running into trouble loading multiple opengl objects into one pwindow.

When I do that they are all place on top of each other and they all get the same texture when reading an image into one of them. If you move them around with the mouse click+command you can reveal all three objects but that is quite fiddly.
(I am attaching an image of what it looks like when I manage to separate the objects)

Questions –
1. How do I apply a different texture image to each object.

2. How do I load the objects in different locations in the scene? (when I try sending position attributes into .render they start flashing)

3. What is the best way to create an effective opengl scene?

Here is the patch – (you can open in presentation mode and load the attached OBAMA.jpg image)

-- Pasted Max Patch, click to expand. --

I did go over all the tutorials but I am quite new to Jitter so I'm probably missing some obvious issues on this matter.
Any help would be appreciated so very much.
Thank you!!

[attachment=159075,2044] [attachment=159075,2045]

Attachments:
  1. Snapshot20110411113437.tiff

    Snapshot20110411113437.tiff

Apr 11 2011 | 11:34 am

1. How do I apply a different texture image to each object.

2. How do I load the objects in different locations in the scene? (when I try sending position attributes into .render they start flashing)

3. What is the best way to create an effective opengl scene?

——

best to start with #3 – it’s best practice to use one jit.gl.render context and to have all of your gl instances named individually so that your variables are controlling objects individually. as it is your patch sends all msg to all objects as they all have the same render context (in this case "yuvi")

the answer to #2 is above :)

the answer #1 is again to use different named textures (ie. picture1, picture2, picture3). you may also want to look at jit.gl.texture object documentation.

as a starting point to get your head around this i would recommend looking at the sudden rabbit guest patch by randy jones. It’s a good starting point to try and understand how the open GL naming procedure and message ordering works.

hope that’s useful!

Apr 11 2011 | 11:36 am

http://2uptech.com/patches.html

URL to patch i mentioned above…

Apr 11 2011 | 11:41 am

Thank Justin!
Seems extremely useful. I will look into what you are saying. I believe that was exactly my problem- same names to all objects.
Thank a lot!
Will post more questions probably.

Apr 11 2011 | 6:25 pm

"best to start with #3 – it’s best practice to use one jit.gl.render context and to have all of your gl instances named individually so that your variables are controlling objects individually."

I’m looking at the different patches but they seem to have a bit ‘too much information’ for what I need.
How do I use just one jit.gl.render context and name the gl instances individually like you mentioned?
I assume you mean using just one render object, but then how would I send the instances individually to the pwindow? If you could clarify this paragraph it may solve my issue.
Thanks!
UV

Apr 13 2011 | 10:39 am

ok here’s a very basic example. I’m not using jit.gl.handle as that makes things a bit more complex if u want to control each 3D object individually. If you want to use jit.gl.handle then i suggest u look at the patch i mentioned earlier as i’m pretty sure it has individual control windows for each object…

But if you want the quick and simple way, here it is:


-- Pasted Max Patch, click to expand. --

Jun 20 2012 | 9:16 pm

hello justin
the sudden rabbit guest patch seems to be down.
is there another place to find it?

Jun 21 2012 | 4:37 am

you can download the srg1.5.zip here:
http://sendshack.com/download/johzhxx
ciao
g

Jun 21 2012 | 9:23 am

many thanks!!!

Mar 11 2015 | 10:50 am

Hey guys. Any chance anyone has the patch that Justin uploaded ?
Cheers

Mar 12 2015 | 8:57 am

what are you having trouble with? this thread is quite old, so probably a bit out of date.

Mar 12 2015 | 10:31 am

Hey thanks for replying .
I’ve sorted out most of the issues, which were loading multiple objects and change textures etc.
It might be a little out of topic but, i’m wondering if there are ways to embed/manipulate sounds on the objects.
As I am working on a installation where you would be able to navigate in the space among the objects, and im building soundscapes and sound effects for that purpose.
Any tips would be appreciated, thaanks .

Viewing 12 posts - 1 through 12 (of 12 total)

Forums > Jitter