PDA

View Full Version : How to make 3ds max looking-like grid?



iceworld
09-08-2009, 09:01 AM
In 3ds max, you get top,front,left orthogonal view, and the last is perspective view.
I know how to make a 2D orthogonal grid and a 3D perspective view grid. But how can i make them exist at the same time while in
top,front,left view only see the 2D grid, and on perspective view
only see the 3d grid?
Does that mean I have to need two Scene Manager or HGLRC to do it? http://media.photobucket.com/image/3ds%20max/Stevez455/warez/Max1.png

todayman
09-08-2009, 11:09 AM
In a single OpenGL context, you can use glViewport and glScissor to restrict the portion of the viewport you draw to. Essentially, you draw the geometry four times, each time with a different modelview and/or projection matrix and different viewport/scissor parameters. Check out the man pages for these functions.

LangFox
09-08-2009, 08:13 PM
Or, you can use geometry shader, render scene to a fbo bound with four layer textures. Each layer presents one of four views.

iceworld
09-09-2009, 01:35 AM
In a single OpenGL context, you can use glViewport and glScissor to restrict the portion of the viewport you draw to. Essentially, you draw the geometry four times, each time with a different modelview and/or projection matrix and different viewport/scissor parameters. Check out the man pages for these functions.

Thank you for this reply, good idea, i will try to draw the 3d grid for four times.

iceworld
09-09-2009, 01:38 AM
Or, you can use geometry shader, render scene to a fbo bound with four layer textures. Each layer presents one of four views.

Thank you for the reply, but first i am not sure what level graphics card is needed to support geometry shader and fbo, should be ok. Second, i don't know if i can do picking on geometry when they are just be rendered to a texture.
I don't think so.

LangFox
09-09-2009, 03:01 AM
Picking with render-to-texture is easy and precise, if you support FBO and MRT. For example, write the objec id to an integer texture of FBO, then read back the pixel at mouse position, and you know which object is under mouse.

iceworld
09-09-2009, 03:24 AM
Picking with render-to-texture is easy and precise, if you support FBO and MRT. For example, write the objec id to an integer texture of FBO, then read back the pixel at mouse position, and you know which object is under mouse.

I can understand your meaning,but how can i make the integer picking texture? especially when there are multiple objects overlapped in front of the view?