How do you create solid spheres?

Started by
8 comments, last by skowroshima 21 years, 8 months ago
Im triing to make a transparent solid sphere...but having little luck I have been triing to use gluSphere and make a for loop with the radi slowly decreasing...this is horribly inefficent..ohh yeah and it doesnt work is there a gl solid sphere? or any simple way to create one?
Advertisement
In 3D rendering under OpenGL/DirectX/etc., there isn''t anything like a "solid sphere". There isn''t actually a "solid" anything; everything is just surfaces.

Why do you feel you need a solid sphere, rather than a hollow one?


Don''t listen to me. I''ve had too much coffee.
Are you trying to make a translucent/transparent sphere that also distorts light? Much like a crystal ball? Then that is different from a solid sphere. As mentioned above, there is no such thing as solid in the sense that the sphere has insides.
But you can make the surface appear to reflect or distort light. Bump mapping might not be the thing, but I am sure it won''t be too hard to find some algorithms on distorting light. You might need to do some kind of cube reflection or something and then mess with the images you get, but perhaps someone else can help more on the topic than I can.

-------------------------
(Gorgeous graphics)+(beautiful sound effects)+(symphonic music)+(no gameplay) != Good game
-------------------------GBGames' Blog: An Indie Game Developer's Somewhat Interesting ThoughtsStaff Reviewer for Game Tunnel
Ick thats what i was afraid of...


I wana make a partical engine that uses transparent solid spheres....

So that the middle of the sphere would be almost ''solid'', while the edges whould be nearly completely transparent...and it would become more solid as it goes towards the middle...

Got any sugestions on what to do? i really dont wana use 2d images on a quad or trianle.

thnx
Well, why don''t you just use a texture and use the alpha channel to simulate the different density. BTW. that''s how particle systems are almost always made: textured tris...


Yesterday we still stood at the verge of the abyss,
today we''re a step onward!
Yesterday we still stood at the verge of the abyss,today we're a step onward! Don't klick me!!!
Still... if you really want 3d for some reason, just put a sphere in a sphere in a sphere and blend it. You could put more spheres if needed. Though really, a particle system wouldn''t work very well even with plain spheres floating around. The polycount would get out of control. Use textured tris/quads for the same effect. For what you want, I once just took a photoshop brush, clicked once, and used that texture to be my "sphere". Check out NeHe''s tut''s on the subject.

Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
"The answer is out there."
"Please help, I''m using Windows!"
Alex BroadwinA-Tronic Software & Design-----"if you fail in life, you were destined to fail. If you suceed in life, call me.""The answer is out there.""Please help, I'm using Windows!"
quote:Original post by Vaporisator
Well, why don''t you just use a texture and use the alpha channel to simulate the different density.


Thats is a good idea..but i wana have it be uniform from all angles...I guess im triing to create something beyond what i can do...guess ill use triangles

unless someone has some amazing idea
You misunderstand. When they say "use tris" they mean to use triangles but for each frame you would rotate the trangles to face the camera/viewer. This way it *would* be uniform from all angles. This is how almost all particle engines work btw.

-Michael
nah i knew what u ment...but i was talking about viewing it from 2 locations at the same time...meh ive already given up...i think it was a bad idea to begain with
Search around for a tutorial on billboarding ... combined with alpha-textured quads (one for each particle), this will achieve the same effect as the nested translucent spheres at approximately one-poofteenth of the cost

[edit] everyone posted while i was typing

how can you possibly view it from two different angles at once?... different viewpoints require different transformations of the scene... you can't have two different transformations occurring at once ?!? ...if you are drawing the scene from a different angle (ie camera position) you simply apply a different transform before drawing the particles... trust me... go and muck around with billboarding

[edited by - Bad Monkey on July 24, 2002 8:22:58 PM]

This topic is closed to new replies.

Advertisement