Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Converting a plain or plane into a sphere

Author
Message
Daryn Alsup
18
Years of Service
User Offline
Joined: 5th Jul 2008
Location: In your head... dun dun DUN!!!!!!!!
Posted: 16th Apr 2014 08:18
Now before you go off and tell me to search the forums - I will tell you that I did, and that I have also wiki'd as well. No threads related to my search of planar sphere, sphere, sphere mapping and so on - came up or were of any information valuable to what I am doing... so here is what I have.

coincidentally, if you use this to attain the uv coordinates, you can use this to sphere map...



I am trying to convert a plane/plain into a sphere... then enter planes/plains in each segment to create various levels of detail. I seem to recall a newsletter way back that did this using matrices. I would like to do this with planes/plains for use with shaders that I wrote myself.

What am I doing wrong?

I see a lil' byte, its 1/4th a dword, Double float, Double float - but it doesnt beat a Global. Very very frightning, integers dividing me! Look a constant oh a constant. Oh-oh I just want the byte!
Barry Pythagoras
12
Years of Service
User Offline
Joined: 14th Mar 2014
Location:
Posted: 16th Apr 2014 10:31 Edited at: 16th Apr 2014 11:13
I don't know why your object is still flat, but I changed the program to make it easier to see, because I couldn't even find it at first.

chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 16th Apr 2014 12:16
This example is made with six plains (something like a box). You could add four or nine plains per face to make a big map.



I'm not a grumpy grandpa
Daryn Alsup
18
Years of Service
User Offline
Joined: 5th Jul 2008
Location: In your head... dun dun DUN!!!!!!!!
Posted: 16th Apr 2014 20:56
Okay, this is very neat and a help. But to clarify, of the code I posted, I want the vertex scaling that occurs at the edges to be 'less' prominent and occur in the center of 1 plane. Then wrap the plane into a sphere. From there, I will make planes and do (kind of what you did) the proper rotations based on their angle and distance from the top, bottom and depth.

I see a lil' byte, its 1/4th a dword, Double float, Double float - but it doesnt beat a Global. Very very frightning, integers dividing me! Look a constant oh a constant. Oh-oh I just want the byte!
Daryn Alsup
18
Years of Service
User Offline
Joined: 5th Jul 2008
Location: In your head... dun dun DUN!!!!!!!!
Posted: 18th Apr 2014 11:41
Sorry for the double post - the error is surrounding the A=... for loop. Here's an "EASTER EGG" Design, just in time!


I see a lil' byte, its 1/4th a dword, Double float, Double float - but it doesnt beat a Global. Very very frightning, integers dividing me! Look a constant oh a constant. Oh-oh I just want the byte!
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 18th Apr 2014 19:46
Quote: " Here's an "EASTER EGG""
it is just flat...what are you trying to achieve ?

I'm not a grumpy grandpa
Barry Pythagoras
12
Years of Service
User Offline
Joined: 14th Mar 2014
Location:
Posted: 18th Apr 2014 21:17
It melted!

Login to post a reply

Server time is: 2026-07-06 04:28:18
Your offset time is: 2026-07-06 04:28:18