Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to texturemap a ball?
#1
I want to simulate a billiard ball rolling and spinning, by texturemapping a circle. How can i do that?

An idea is divide the sphere by a mesh of triangles and map each triangle individually. But it seems too much work for a ball that will never be greater than 50 pixels.

The idea i used in my Earth spinning demo, a cylindrical texture maped into the sphere was good in that case, were the poles were never shown an the mapping formula was constant. In the case of the billiard ball the poles can move around and i should recalculate it continuously, so the amount of work would be bigger than with a mesh.

Any suggestion?

Has this been done in qb?
Antoni
Reply
#2
Well.... Qasir did something called "rollball" with a gouraud lit sphere, but I don't have the source, nor do I know if it can be changed into texture mapping...
am an asshole. Get used to it.
Reply
#3
I know that demo, it's Rollball.bas, I have the source Qasir once released.
Breaking the sphere in triangles and texturemapping them one by one seems to me too much work for a SMALL sphere. I was wondering if a more straightforward way existed...
Antoni
Reply
#4
What, like polarizing the texture to make it spherized?

(I'm using big words... heh heh)
am an asshole. Get used to it.
Reply
#5
Well, considering that there aren't that many balls in a pool game i wouldn't say it's too much work. It should run fast enough even on a 486.
oship me and i will give you lots of guurrls and beeea
Reply
#6
Well, as I plan to leave my Pure QB policy and do it in UGL, it will probably be fast. Big Grin
Antoni
Reply
#7
I'd you use your earth demo thingy algo and recalc it realtime using tables. ;*)
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#8
wait, what's wrong with a spheremap table? just scroll the texture left, right, up and down to rotate. If i'm not mistaken, that's how it works in interplay's virtual pool series, right?

a texturemapped polygon would be too much, though. it'd look better and work faster with the above solution.
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#9
That's what I was telling him ;*)
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#10
*nods in approval*
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)