spherical terrain

Blitz3D Forums/Blitz3D Beginners Area/spherical terrain

ingenium(Posted 2006) [#1]
Hello,
I want to make a spherical terrain. I've seen the demo on birdie\etc... but I want to deform a "landscape" made by a mesh editor like FLE (.3ds). How can I do?

-Artemis


boomboom(Posted 2006) [#2]
you could make a sphere with say 50x50 segments.

Then get the height value of your flat terrain object per vetex (the the brightness of a pixel in a heightmap), and then move a vertex on the sphere along its normal the same amount (or with a multiple).


Stevie G(Posted 2006) [#3]
It gonna be tough to deform a flat landscape into a spherical one. Boom boom's suggestion may work to a degree but you're likely to get issues at edges unless it's a tilable heightmap.

If you need it to be spherical I'd recommend using a geosphere where the vertices are uniformly spread over the surface of the sphere then use a similar method to birdie's ( define and arbitrary plane and extrude points in front of the plane ) to get a landscape effect.

What is it you're making? There will likely be better methods.

Stevie


ingenium(Posted 2006) [#4]
Naturally I'm creating a planet... It MUST be a sphere "bumpmapped". Could you post an example code of what you are talking about? Are there other ways?

If I wasn't clear about what I want:




Stevie G(Posted 2006) [#5]
http://freespace.virgin.net/hugo.elias/models/m_landsp.htm

Here's an example ... creating the mesh is probably the easy part .. the texturing will probably have to be procedural as in the example above. Also, I'd imagine you could save a model as a b3d and import into a texturing program.

If you're looking for a program that does ALL this for you then I reckon you'll be on to plumbs ;)

Stevie


Sir Gak(Posted 2006) [#6]
Stevie:
umm, what are "plumbs"?


Stevie G(Posted 2006) [#7]
A term we use up here for feck all!!


ingenium(Posted 2006) [#8]
Stevie:
It's a little bit difficult and I don't think it is exactly what I want... As you can see from the picture that I've posted I want to have a full control on the sphere. The link that you have posted explain how to do a planet that looks like to an asteroid 'cause you can't control where the mountains will be...
Am I right? If no explain why no, if yes what can I do?


Stevie G(Posted 2006) [#9]

Am I right? If no explain why no, if yes what can I do?



Yes, you wouldn't have very much control over what is produced.

If you unwrap a geosphere in a modeling program, paint a greyscale heightmap to this. From the uv coords you could then determine which colour and therefore height the vertex should be extruded from center. The only way I can think of I'm afraid.

I don't think it's clear from your picture that you didn't want a randomly created planet ... after all that's exatcly how that game does it ... purely procedural.

Stevie


Ross C(Posted 2006) [#10]
I think Stevies suggestion is probably best. Applying a heightmap image to the geo-sphere, then extruding from the centre of the sphere.


ingenium(Posted 2006) [#11]
Ross C:
I'm a totally newbie about that... could you post some code?


Pongo(Posted 2006) [#12]
Check out this from the code archives.

http://www.blitzbasic.com/codearcs/codearcs.php?code=465


ingenium(Posted 2006) [#13]
very interesting... thnx