#### Archived

This topic is now archived and is closed to further replies.

# A sphere appearing as an ellipse!!

This topic is 5815 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

here are two pictures of a game i'm workin' on , when the Fighter is in the middle , its shield ( a blended sphere surrounding it ) appears as it should be but when i move the Fighter to the right bottom corner , it appears as an ellipse , should i use orthographic projection (as i'm not making use of the z dimension) or what ? thanks for your help the sphere appears as a cirle : The SPhere appearing as an ellipse!!! : ...Xeee note that i'm using gluPrespective not gluOrtho2d , also i'm thinking of some effect that will use the z axis ,and i may use it in the future , so please don't tell me to use the gluOrtho2D Edited by - xeee on March 23, 2002 7:43:25 PM Edited by - xeee on March 23, 2002 7:47:11 PM

##### Share on other sites
Are you using an orthographic projection matrix? I''m guessing no.

##### Share on other sites
I''m guessing that your effect using the Z-axis will be to make things appear to come towards the camera - ie. grow bigger. But there''s no way around the perspective thing (I think) - you have to use an ortho projection matrix. Just scale the vertices to make things bigger.

##### Share on other sites
yeah you''re right tron3k ,that''s what i was thinking of , thanks for your help , i''ve got ya , but i still don''t understand y does the sphere becomes oval , when i stare at it , it looks weird , does this happen in the 3d games we play and it''s me who don''t notice or what??

looking at it alone looks very strange , i''m gonna try to look at any sphere in quake3 / mdk2

...Xeee

##### Share on other sites
I''m not sure how you have generated the actual sphere, but if it''s being affected by the camera, I presume it''s an actual 3D sphere.

If so, why don''t you use a gradient circle texture blended over the top the ship, giving the same effect.

##### Share on other sites
Xeee: Sorry for asking somewhat irrelevant information here, but your 3d models, may I ask where you obtained them or dloaded them or if you made them? What type of file format are you using, for them?

##### Share on other sites
Xeee: Sorry for asking somewhat irrelevant information here, but your 3d models, may I ask where you obtained them or dloaded them or if you made them? What type of file format are you using, for them?

##### Share on other sites
quote:
Original post by masterg
Xeee: Sorry for asking somewhat irrelevant information here, but your 3d models, may I ask where you obtained them or dloaded them or if you made them? What type of file format are you using, for them?

It looks like he''s just using textured quads to me, so there wouldn''t really be any models. If you want to know where he got the textures though...

##### Share on other sites
>>looking at it alone looks very strange , i''m gonna try to look at any sphere in quake3 / mdk2 <<

set to fov to something large like 120 + then look at a sphere at the edge of the screen, itll appear oval

http://uk.geocities.com/sloppyturds/gotterdammerung.html

##### Share on other sites
masterg : actually Null and Void is right , they''re just textured quads , i designed the models using 3ds max 3 , i''m still an OpenGL Rookie , and i''m making this game to make sure i''m understanding the basics well !!

BiGCyC : your idea seems suitable to this situation , thanks , i''ll try it .

...Xeee

##### Share on other sites
I''m pretty sure I know why this is happening:

Your sphere isn''t a perfect sphere. It really is stretched in the z direction.

Imagine a box:

++++++++++++++++++++++++      =====\      ||=====\      ||||+++++       |||+++++        ||+++++         |+++++

When viewed straight on it looks like a square, but when viewed not straight on it becomes long.

Somewhere in your code, you are scaling your sphere. (Maybe you are calling glScale() somewhere?)