Planet Renderer

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
User avatar
Trimmy
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 22
Joined: Thu Aug 05, 2010 1:16 am
Current Project: A Game
Favorite Gaming Platforms: PS3, PC ( Mac OS )
Programming Language of Choice: C++
Location: New Zealand
Contact:

Planet Renderer

Post by Trimmy »

I 'm working on a planet renderer for my current project which has been quite a challenge for me but I have managed to produce some results close to what I want to achieve. I'm just wondering if anyone has any good resources on the subject or can give some advice from their own knowledge and experience. I've found some good resources but they're pretty vague on their techniques.

The technique I'm using is mapping a cube to a sphere which makes the vertices a lot more evenly spaced, each face of the cube/sphere is it's own terrain. I've managed to produce a cube thats almost a sphere but it's slightly mis-shapen. I'm currently sort of re-writting it, working on one component at a time.

Thanks to anyone in advance who can be of any help.
Last edited by Trimmy on Fri Aug 13, 2010 5:43 am, edited 1 time in total.
My Programming Projects:http://www.youtube.com/user/TrimmyS
pritam
Chaos Rift Demigod
Chaos Rift Demigod
Posts: 991
Joined: Thu Nov 13, 2008 3:16 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Amiga, PSOne, NDS
Programming Language of Choice: C++
Location: Sweden

Re: Planet Renderer

Post by pritam »

Have a look at UVsphere and Icosphere you might get some ideas from that.

I found this in the Blitz code archives, they may be of use to you.
http://blitzbasic.com/codearcs/codearcs.php?code=2539
http://blitzbasic.com/codearcs/codearcs.php?code=2695
K-Bal
ES Beta Backer
ES Beta Backer
Posts: 701
Joined: Sun Mar 15, 2009 3:21 pm
Location: Germany, Aachen
Contact:

Re: Planet Renderer

Post by K-Bal »

Some inspiration

<object width="500" height="405"><param name="movie" value="http://www.youtube.com/v/DCzDKj3hjOE?fs ... ram><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/DCzDKj3hjOE?fs ... 0&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="500" height="405"></embed></object>[/youtube]

http://www.youtube.com/watch?v=DCzDKj3hjOE
User avatar
MrDeathNote
ES Beta Backer
ES Beta Backer
Posts: 594
Joined: Sun Oct 11, 2009 9:57 am
Current Project: cocos2d-x project
Favorite Gaming Platforms: SNES, Sega Megadrive, XBox 360
Programming Language of Choice: C/++
Location: Belfast, Ireland
Contact:

Re: Planet Renderer

Post by MrDeathNote »

K-Bal wrote:Some inspiration

<object width="500" height="405"><param name="movie" value="http://www.youtube.com/v/DCzDKj3hjOE?fs ... ram><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/DCzDKj3hjOE?fs ... 0&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="500" height="405"></embed></object>[/youtube]

http://www.youtube.com/watch?v=DCzDKj3hjOE
That's really amazing!
http://www.youtube.com/user/MrDeathNote1988

Image
Image

"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: Planet Renderer

Post by dandymcgee »

MrDeathNote wrote:
K-Bal wrote:Some inspiration

That's really amazing!
Wow..

For those interested. A game prototype based on the engine:
http://www.infinity-universe.com/Infini ... &Itemid=54
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
Ginto8
ES Beta Backer
ES Beta Backer
Posts: 1064
Joined: Tue Jan 06, 2009 4:12 pm
Programming Language of Choice: C/C++, Java

Re: Planet Renderer

Post by Ginto8 »

K-Bal wrote:Some inspiration

<object width="500" height="405"><param name="movie" value="http://www.youtube.com/v/DCzDKj3hjOE?fs ... ram><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/DCzDKj3hjOE?fs ... 0&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="500" height="405"></embed></object>[/youtube]

http://www.youtube.com/watch?v=DCzDKj3hjOE
:shock2: ... I think I just shat myself.
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
User avatar
Trimmy
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 22
Joined: Thu Aug 05, 2010 1:16 am
Current Project: A Game
Favorite Gaming Platforms: PS3, PC ( Mac OS )
Programming Language of Choice: C++
Location: New Zealand
Contact:

Re: Planet Renderer

Post by Trimmy »

K-Bal wrote:Some inspiration

<object width="500" height="405"><param name="movie" value="http://www.youtube.com/v/DCzDKj3hjOE?fs ... ram><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/DCzDKj3hjOE?fs ... 0&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="500" height="405"></embed></object>[/youtube]

http://www.youtube.com/watch?v=DCzDKj3hjOE
Yeah thats really awesome, a "little" more advanced than what I'm aiming for though.
My Programming Projects:http://www.youtube.com/user/TrimmyS
User avatar
GroundUpEngine
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 835
Joined: Sun Nov 08, 2009 2:01 pm
Current Project: mixture
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Location: UK

Re: Planet Renderer

Post by GroundUpEngine »

K-Bal wrote:Some inspiration



http://www.youtube.com/watch?v=DCzDKj3hjOE
Amazing!
Image
User avatar
Trimmy
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 22
Joined: Thu Aug 05, 2010 1:16 am
Current Project: A Game
Favorite Gaming Platforms: PS3, PC ( Mac OS )
Programming Language of Choice: C++
Location: New Zealand
Contact:

Re: Planet Renderer

Post by Trimmy »

Ok I solved the problem of the sphereified-cube being mis-shapen:
Attachments
Screen shot 2010-08-15 at 11.03.39 PM.png
Screen shot 2010-08-15 at 11.03.39 PM.png (53.7 KiB) Viewed 1491 times
My Programming Projects:http://www.youtube.com/user/TrimmyS
pritam
Chaos Rift Demigod
Chaos Rift Demigod
Posts: 991
Joined: Thu Nov 13, 2008 3:16 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Amiga, PSOne, NDS
Programming Language of Choice: C++
Location: Sweden

Re: Planet Renderer

Post by pritam »

Trimmy wrote:Ok I solved the problem of the sphereified-cube being mis-shapen:
Looks good, got a texture with that?
User avatar
Trimmy
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 22
Joined: Thu Aug 05, 2010 1:16 am
Current Project: A Game
Favorite Gaming Platforms: PS3, PC ( Mac OS )
Programming Language of Choice: C++
Location: New Zealand
Contact:

Re: Planet Renderer

Post by Trimmy »

pritam wrote:
Trimmy wrote:Ok I solved the problem of the sphereified-cube being mis-shapen:
Looks good, got a texture with that?
Yeah thats probably the next step after cleaning up the code a bit.
My Programming Projects:http://www.youtube.com/user/TrimmyS
User avatar
MrDeathNote
ES Beta Backer
ES Beta Backer
Posts: 594
Joined: Sun Oct 11, 2009 9:57 am
Current Project: cocos2d-x project
Favorite Gaming Platforms: SNES, Sega Megadrive, XBox 360
Programming Language of Choice: C/++
Location: Belfast, Ireland
Contact:

Re: Planet Renderer

Post by MrDeathNote »

Looks good man, glad you're getting somewhere with it.
http://www.youtube.com/user/MrDeathNote1988

Image
Image

"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup
Post Reply