PDA

View Full Version : Viewpoint position problem !



dirhem
02-15-2011, 02:48 PM
I just want to see my all my drawings from above them with an angle like the image i have attached. Unfortunately after a few hours i still couldn't manage to do it. So would anyone help ?
http://www.chessboss.com/uploads/cms/20110105/4d24347757646.jpg

_arts_
02-15-2011, 03:01 PM
:D

nickels
02-15-2011, 03:18 PM
1) draw a quad with your image textured on it.
2) use gluLookAt to setup the View matrix. Set a position about 10 degrees above the ground and 10 degrees yawed. Might as well draw the quad centered at 0,0,0 and use that for the lookat position.
3) If that doesn't work maybe give some more details.

Might have to write a pretty good shader if you want the chess pieces to exhibit the parallax you're seeing there, though....

dirhem
02-15-2011, 04:57 PM
@_arts_ yes i am that beginner.

@nickels sorry i forgat to mention i am using opengl es so gluLookAt is not an option :( and chess image is an example because i just want to get same viewpoint angle but my drawings are much more simpler than chess pieces.

marshats
02-15-2011, 10:46 PM
If its just a matter of getting gluLookAt functionality -- it is a defined matrix construction and matrix multiplication see gluLookAt details. (http://www.opengl.org/sdk/docs/man/xhtml/gluLookAt.xml)

_arts_
02-17-2011, 10:36 AM
Sorry, it was just your question was absolutely not precise to expect good answers.

Rosario Leonardi
02-17-2011, 03:19 PM
I still don't know why people want to make everything procedurally or hand coded.
a - Open Maya (or Xsi, 3dstudio, blender or whatever) model your scene, export the model and the camera in any format you like.
b - Read the model, read the camera position.
c - Setup the camera from the data you read from the file
d - Render the model
e - have an ice cream

Doing otherwise is a huge wasting of time on try with the camera at 10 .. no.. awful .. change parameter, recompile, try again.. terrible.. change parameter, recompile... maybe slightly on the right.. AARRGH!! change parameter, recompile.. waiting... recompile.. of now it's fine.... but I changed my mind.
In the meanwhile any decent programmer have made a full compliant collada importer.

Alfonse Reinheart
02-17-2011, 04:34 PM
In the meanwhile any decent programmer have made a full compliant collada importer.

And of course, learn how to use Maya/XSI/3DS Max/Blender. Not exactly the easiest things in the world.

It's pretty clear that the purpose of his program is not just to produce a rendered image. If that's all you needed, you could simply skip the export and just render from Maya/XSI/3DS Max/Blender.

As far as your change/recompile schtick, he could just make a simple interface to change the value with keyboard commands in the application itself. That'd be a lot less complicated than writing "a full compliant collada importer." And as someone who just finished debugging a bug in his Collada mesh converter, it'd also be a lot more interesting...

Rosario Leonardi
02-18-2011, 03:02 PM
Alfonse.. the error here is to reply to a nonsense question, don't try to start a more useless conversation about data driven development if Friday evening and I'm tired.