jit.gl.skybox to matrix / xfade

sister evertone's icon

Hi Jitter forum
This is my first post, but thank you so much for all the questions and answers in these forums, it has helped me many times!

I am working on a project that uses skybox as the main environment in a opengl jitter "world"
I had this idea that i want to manipulate the skybox as an object, where it goes from being the usual "infinite" skybox,
to breaking down through an xfade with noise on the second inlet and a jit.gl.mesh on the receiving end.

I know that skybox cannot do matrixoutput, so i have tried to send the skybox to a jit.gl.node with @capture 1, and then to a jit.gl.videoplane, this works fine when the videoplane is in @matrixoutput 0, the skybox is still intact. Then i send the videoplane to the xfade with @matrixoutput 1 and the videoplane turns white and will not work in the context of the xfade and the jit.mesh.

I'm not sure if this is possible, because the jit.gl.skybox seems to be limited in some ways.
I tried instead of the skybox, using a cube shaped gridshape, with the a cubemap texture on, and then travelling to the inside of the gridshape to make it look like a skybox, but it only works in the same way as when reflecting a cubemap as material on a gridshape (it makes the kind on mirror look, and the "stitching" of the cubemap is not right)

is there a way to get the skybox to behave more like a gridshape object, while still looking like a skybox, where it is possible to morph the skybox into something else?

here is my patch:

Max Patch
Copy patch and select New From Clipboard in Max.

sister evertone's icon

I found a way to get inside a regular shape like gridshape or plato. plato works best for the cubemap texture, but as a jit.gl.texture rather than a jit.gl.cubemap, because the jitcubemap gave me the mirror shiny texture. the plato says that it wraps around a hexahedron as a cubemap would, and it almost looks perfect, but the top and bottom of the cube are darker and don't quite match up as they do in jit.gl.skybox. I use the attribute @cull_face 2 , to view from the inside of the shape, so almost there!

now the problem came, the jit.gl.plato almost wraps the cubemap .jpg picture perfectly on the hexahedron, but it wont show its self with the cubemap image as a texture when it goes to a jit.gl.mesh with @matrix_output 1 . The jit.gl.gridshape does it fine, but doesnt wrap the texture the same way as the plato. The jit.gl.plato goes black when trying to enable @matrix_output 1 and sending it to jit.gl.mesh.

heres my patch
Thanks,

Max Patch
Copy patch and select New From Clipboard in Max.

sister evertone's icon

hmm, okay, I think I got some way out.
the plato was very weird with mesh, but I found a way to map the picture onto a gridshape so it looked right, and I could skip the whole plato / mesh deal. So I'm sticking to that!

Rob Ramirez's icon

it looks like if you only need to send the position and texcoord matrixouput planes (first 5) from gl.plato to gl.mesh to get it working as expected. other planes seem to muck it up. jit.pack is your friend.

Max Patch
Copy patch and select New From Clipboard in Max.

sister evertone's icon

aah, thats why it was acting really funny, and i managed to get the texture on using some of the other shapes, but it makes sense to jump the planes that are not needed in the jit.gl.mesh. thanks alot!