can you turn a mesh into a sphere?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
rsdl
Posts: 13
Joined: Wed May 05, 2004 6:57 am
Location: Soviet Canuckistan

can you turn a mesh into a sphere?

Post by rsdl »

I was wondering if you can turn a flat rectangular mesh into a sphere? The reason i was wondering about this is that i want to create a sky where the texture is inside the sphere rather than outside. That way, i could rotate the mesh-sphere to get a day-night cycle effect.

I was looking at irrlichtNX's skydome, but from the name, it is a dome so it's not a sphere, so you can't really rotate it and get a seamless day-night cycle effect....or can you?


any ideas?
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

LoL,

You're not the only one to ever think of doing this however if you do it you'll be the first.

day night cycles are normally done with lighting effects fog effects weather effects and for lack of better term polymorphic textures.

It is possible to do what you want but not easy and queer as a 3 dollar bill.

In first person shooters the idea is to keep as much effects as possible out and especially moving meshes these things slow down engines and are the more cpu and graphics intensive things in a game that keep games like GTA from going multiplayer...not that it isn't possible it's just that you really only have so much to work with before things slow down to the point you lose what you were after to begin with.

However an rts might use tricks such as these or something that had the extra resource for alot of movement and detail.

The point is you would see the division of night and day in the texture unless you were a master of texture design and even then it wouldn't look realistic.. as for a more cartoonish look then it would be completely appropriate but still not suggested.

what you need is a texture that changes from night and day not a spinning sky mesh. I suggest you read more about game design and look at how other games are done for your ideas of design.

You'll find a lot of the struggle has been solved in much simpler ways then an average person can think of and that more effects and possibilities become open to you.

Good Luck!
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

One final note,

Game design is alot like the other "arts" in this world..no not the martial kind..but like magic it's presentation is based on illusion much like animation in the 2d form many still pictures moving create a single picture that appears to move because your eye and brain can not detect the truth.

which can be seen when an animation slows down.

there are paintings like this aswell inverted busts (like roman heads) in the right lighting can produce amazing effects with very little effort. It makes a solid object appear to move as fluid as a living head.

game and/or graphic design has these nitches aswell turning reality into illusion can sometimes be the only way to present something properly because although computers are 5 6 hell 10 times faster then in the 50's and 70's they are still very far from being capable of drawing scenes as complex as reality.

If you look I'm sure you will find something related to what I'm saying..
HELL without testing it myself I'll throw a term out there for you to search google with... the illusion of game design or illusion IN game design.

Now I'm forced by my curiously human nature to see what you'll find.

ok get this...
http://www.mobilegd.com/article444.html

second result it took me less then a minute to search, analyze and report...
this is an article on level design and talks about almost EXACTLY what I am.... screw those cheese commercials BEHOLD THE POWER OF GOOGLE 8)

btw have you ever seen "google earth" ?? team google never ceases to amaze me!
Somnio

Re: can you turn a mesh into a sphere?

Post by Somnio »

rsdl wrote:I was wondering if you can turn a flat rectangular mesh into a sphere? The reason i was wondering about this is that i want to create a sky where the texture is inside the sphere rather than outside. That way, i could rotate the mesh-sphere to get a day-night cycle effect.

I was looking at irrlichtNX's skydome, but from the name, it is a dome so it's not a sphere, so you can't really rotate it and get a seamless day-night cycle effect....or can you?


any ideas?
Make a circular mesh, invert the UV coordinates to the surfaces inside the mesh area. So long as you keep the vertice count/texture size at a sane level there should be little performance drop. That's my two cents.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Besides digging out a post which is already one year old (which is more often bad than good) you also give completely wrong hints. You don't invert UV coords, you invert the face normals. And what is a circular mesh? Not very helpful.
Somnio

Post by Somnio »

I do need to stop posting when half awake. Yes, I meant face normals, and the 'circular mesh' was supposed to be 'spherical mesh'. (ie: 'x' vertices arranged in a configuration of 'y' rings and 'z' segments in order to form an approximation of a sphere.)
Post Reply