Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Tim Lewis, posted on February 12, 2001




Image Description, by Tim Lewis



Whilst there isn't much here that's particularly spectacular code wise, I just thought this looked rather nice. This shot shows off the new shader code in my 3d modelling program, Clayworks (www.clayworks3d.com). It's a bit tricky to see in this shot but the sea and rivers of the earth exhibit specular reflection whilst the ground does not; it looks rather neat from glancing angles. The cloud layer is just another sphere sitting around the earth (I know it's a bit too high up). The diffuse lighting model is slightly modified from the standard function to give a sharper difference between the light and shadow of the earth. I used an exponential function to give the impression of a long camera exposure to achieve this effect. The standard diffuse model just doesn't look right for planets hanging in space.

Later, I hope to be able to generate the terrain data procedurally (and hopefully add greater detail levels when zooming down on the planet using a pseudo random number generator) and blending the ground terrain from a set of textures tuned for terrain type, altitude, weather and latitude so that equatorial regions have nice turquoise water and more temperate climes have the familiar grey-blue stuff that I'm used to.

Tim


[prev]
Image of the Day Gallery
www.flipcode.com

[next]

 
Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
thec

February 12, 2001, 12:14 PM

Looks like a clear day... :)

Albert

 
Michael Kurth

February 12, 2001, 12:21 PM

I think the texturing looks impressive. However, the clouds are suffering from a backface culling problem. That black band around the earths edges is the largest visual detractor. If you allow people to zoom in on the earth you are going to want to do something about that.

 
Khrob

February 12, 2001, 01:44 PM

"The standard diffuse model just doesn't look right for planets hanging in space."

I know what you mean - every time I'm jetting between Alpha Centauri and St Barnard's Star I say to myself how inappropriate those diffuse shading techniques are for planet representation!


But in seriousness - You say you are not generating the data procedurally yet - what is the polygonal resolution of your spheres?

Good work!

 
The Wolf

February 12, 2001, 02:14 PM

Very nice work, especially the stuff about the shaders, looks a lot like the stuff I'm working on, very nice indeed.

 
diabolus

February 12, 2001, 02:43 PM

Looks great!

Actually, my question is in regards to the UI system that your model is using. It looks pretty extensive.

How many controls do you have built into it right now? I've seen scroll bars, buttons, menus, and toolbars in the screenshots on your webpage.

How customizable is it? Your website mentions that you have the ability to skin it? How about font/font size, etc?

How modular is the code for your UI, it looks like it would be great integrates into other projects.

 
MgFun

February 12, 2001, 07:24 PM

I can see my house :-)

Great work

 
Vorteks

February 12, 2001, 10:42 PM

Pretty! A view of Earth from space has always been a great theme. I also wondered about your GUI, that's definately not Windows 98 standard! What are you using?

 
shrike

February 12, 2001, 11:49 PM

Those screen shots look really impressive. I didn't know that it was possible to make windows look like that. At first, I thought it was a linux app.

 
Lucid

February 13, 2001, 12:02 AM

He's posted IOTD's before, here is one where he elaborates a little more on the GUI.
http://www.flipcode.com/cgi-bin/msg.cgi?showThread=09-18-2000&forum=iotd&id=-1

 
Johan Jönsson

February 13, 2001, 03:16 AM

Well... unless he has written his own UI... it could just be windowblinds...

Other than that... it looks pretty good... You can still see the polygons though... and having the clouds so far up looks weird at the top left of the Earth...

Other than that... keep up the good work!

 
luther2k

February 13, 2001, 03:52 AM

Hi Folks,
Thanks for the comments, I know the cloud layer is a bit screwed up but I've fixed that now (http://www.clayworks3d.com/clay/earth2.jpg).
The polygonal resolution is quite small; all the spheres have 20 radial and lateral layers. I'll start using geospheres soon as I think I can adapt some of the standard terrain rendering algorithms to a sphere using that kind of sphere instead.
Most questions seem to be about the gui I'm using. Well, it's not window blinds or anything like that (that program is a bit too slugish for my taste), it's a custom GUI that uses a thin layer to translate windows messages into my own message format and direct draw in order to write directly to the screen (tricky in dx8, damn). It also features transluceny, non rectangular windows and other nice effects. It isn't currently very happy when a non rectangular microsoft window is sitting on top of it (nothing fatal, just some ugly artifacts) but apart from that, it behaves well alongside othre, more conventional windows applications.
I'm not sure what it is with modelling programs and non standard GUI's. I'm guilty of this myself and I'm not sure why I wanted to do it this way.. I suppose I just wanted my apps to look a little funkier than the grey, square standard.
Diabolus:
So far I have the following controls: Slider bars, tab controls, buttons (lots of different behaviours), check boxes, spliters, named list controls, tree view controls, spinner boxes, text editing boxes (single line only at the mo), tool palettes, file dialogs, a colour picker (like photoshop, only with realtime updates), drop lists, a 'rich text' viewer, image viewer and lots of controls that are specific to this application (such as the 3d viewing/editing windows, tools for changing the properties of lights and so on). Unlike most coders who seem to get bored with writing GUI stuff, I actually enjoy it. Takes all sorts, I suppose :)



 
Johan Jönsson

February 13, 2001, 06:44 AM

Well then... atleast we share something... =)

I've been working on GUI's for DOS (it might seem silly for most people, but I kinda like it...) just for the shear fun of it...
(By GUI for DOS, I mean Graphical Overlays... it's like windows junior... =)

If you work on something you like, you will have every chance in the world to succeed...

if you work on something you have to do, 'cause the public is craving for it... your chances are slim...

The meaning of this statement, is that if you do not enjoy what you are doing, don't!

I enjoy making 2d-games, because I think their charm is way more powerful than most choppy 3d-games out there today...




To sum things up... if you don't put your soul into your work, it will die eventually...

=)

 
mbk3de

February 13, 2001, 08:50 AM

nearly perfect space scene except:)...
-hope the stars are a 'skybox' and not drawn individually... that way you can have millions of billions of them, looking kindof like clouds in places (like the milky way)

-earth (and moon) is missing 'atmospheric glow' which could be emulated by finding edges of the earth (cartoon rendering) and using that to make a 2d-halo-ring... u know what i mean no?

other than that, nice earth texture...
and keep up the good work...
;)

 
luther2k

February 14, 2001, 12:52 AM

Johan, thanks for the comments, I couldn't agree more. This windowing system started of as a svga dos application too. Although I haven't tried to compile it in Watcom for ages, it should still work. However, I can't get any svga dos things to work in windows 2k anyway so I'm not likely to be able to test this out in the near future.
As for the space glow, I've written a toon shader before so that shouldn't be difficult. I was thinking of using a billboard rendered behind the planet or a fixed, circular gradient using gouraud shading. It would be rather cool if I could work out how much atmosphere the sun's rays have to go through in order to reach the viewer's eyes and colour it accordingly. I could do nice sunsets then. That's the nice thing about spheres, you don't have to spend any time finding the silhouette :) I'm not sure if the moon should have an atmospheric glow however, seeing as it lacks an atmosphere.
The new earth pic should be up now, click

 
This thread contains 14 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.