Beginner to Max but want to create a 3D environment:

Phos's icon

Hi, I'm a beginner to Max and I was playing around with the skybox, I was wondering if there were any tips anyone could give me regarding making a 3D Environment, also if there was a way to make it so that if I click on an object within the skybox it makes a sound?

Thank you!!

Matteo Marson's icon

Hey Phos,

Since the skybox uses images, the picking logic suitable for 3D meshes doesn't work, but you could do something like this:


1) take the environment map you're interested in. Open it in an image editor and color only the shapes you want to interact with using a flat and recognizable color.

2) render, as usual, the environment map in the rendering window while binding the "mask" skybox you just created to a jit.gl.node.

3) retrieve the coordinates of the mouse on the screen and use them to sample from the mask.

4) with some logic, you can identify the colors you put in the mask and trigger any audio event you need.

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

Enable the rendering, move the camera with the WASDQZ keys and click on the shapes.

TFL's icon

Another approach would be to use the skybox with @infinite 0 and use simple [jit.gl.gridshape @shape plane] placed strategically at the surface of the skybox where the objects are. Objects could either be displayed on the skybox directly or as textures for the gridshape. Then use jit.phys.picker to know which object is being clicked.
A bit more convoluted than Matteos approach, but allows for any color.