PGGC #3: Planet page 3

85 posts

Flag Post

Yeah I’m probably going to try to cache the noise. Vesperbot, that sounds interesting though it’s very distant for me.

And the swf was just one of the performance tests :P

Edit: Btw, here’s a lot of cool probably procedurally generated planets.

 
Flag Post
Originally posted by ErlendHL:

Yeah I’m probably going to try to cache the noise. Vesperbot, that sounds interesting though it’s very distant for me.

And the swf was just one of the performance tests :P

Edit: Btw, here’s a lot of cool probably procedurally generated planets.

Nice planets :) they all lack one thing – their texture is not truly spheric, fish-eye at most (displacement map over a texture, like in an adjacent topic). A7 at least has unblurred perlin noise underlaying everything, so I guess they are procedural indeed, however might not be as “totally procedural” as required here. There are similar lightmasks across many of these, which might probably be prerendered elsewhere. But, some of them have an atmosphere drawn – should make something about it!

 
Flag Post

Yeah I’m currently wondering how to draw atmosphere. Maybe simply draw a circle lineout and apply a glow filter on it.

 
Flag Post

Tried to optimize lighting shader – failed, as it can’t be split as easy as sphere shader. I have managed to make a split in the end, given Y coordinate of light source is currently unchanging, but the results baffled me, as the produced map had uneven alpha. My texture ended up overlaid by the produced anglemap – ridiculous, even if shader does not use the alpha of the map’s pixels as alpha. Had to disable that experiment. Pitiful.

Edit: decided to include as a performance test. Click to regenerate planets. Check if planet’s midshadow is blurred, if yes, check FPS, if no, check FPS :) these are two different methods of applying light to texture. My browser tests show 7fps for old method and 9fps for new, more imprecise method.

Edit2: yep, the test is here http://www.fastswf.com/_Ho5I5c

 
Flag Post

How are you applying the shader? GPU based or pixel bender based? Whatever you are calling with BitmapData.applyFilter is eating up a good 99% of your script runtime. (sorry for checking if you are mad at me)

EDIT By 99%, I mean there were only 9 milliseconds of 26,000 milliseconds that weren’t used for this function.

 
Flag Post

Hi guys! As it is my first post here, I’m greeting all of you. I would like to compete here, but I have one question: does the solution have to be in SWF? I would rather like to use WebGL ;)

 
Flag Post

Pixel Bender based. How do you ever apply a shader that’s made in Pixel Bender via GPU? Perhaps I don’t just know that. Yep, applyFilter() is called with numerous PB shaders, some at generation phase, some at runtime. Actually, there’s literally nothing more than one x-y shift of a Bitmap that’s not applyFilter(). :)

Tried to make me a perlin noise filter, ended up with failure. I have managed to try it in PB itself, rendeing as CPU – all OK, a valid perlin noise is being produced. When I ported it into Flash, I receive a chaotic noise that doesn’t have a thing in common with perlin noise. (While it isn’t bad I think, with good blur/stuff applied I could get me a nice outcome texture-wise.)

 
Flag Post
Originally posted by TheAer:

Hi guys! As it is my first post here, I’m greeting all of you. I would like to compete here, but I have one question: does the solution have to be in SWF? I would rather like to use WebGL ;)

Great question. You should send a PM to Senekis93 asking.


@versperbot Well if you can replicate the filter using AGAL, why not use stage3D and offload any filters to the GPU. For perlin noise, maybe generate a whole bunch in the beginning instead of at runtime.

 
Flag Post

Well, learning another language will likely be a pain for me, reworking whatever is already done will be more of a pain :D and I don’t have enough time within this challenge to do all that, while not forgetting I have work to do, and a job to come. :D Also, I don’t yet have any experience with either Stage3D or FP11 at all, even my FD is pretty much outdated (3.3.4) and has no support for FP11. And my primary project is FP10-oriented, an alpha version can be seen here .

About perlin noise – I don’t need it be generated at runtime, but if someone does, he’d better try other tricks first.

 
Flag Post
Originally posted by TheAer:

Hi guys! As it is my first post here, I’m greeting all of you. I would like to compete here, but I have one question: does the solution have to be in SWF? I would rather like to use WebGL ;)

Sure, go ahead, it doesn’t need to be Flash.
Welcome. (:


I think I won’t join this one; instead of generating planets, I’ve been visiting a lot of them in Mass Effect. >_>

 
Flag Post

Here’s my entry to the PGCC #3 — Hello Worlds. All feedback is welcome, including constructive criticism.

All planets are procedurally and randomly generated. Depending on the speed of your computer, planets can take between 5 seconds to over half a minute to generate. Those are the speeds I observed on my core i7 computer and my Pentium 5 computer.

Some planets don’t look particularly exciting, but some are beautiful, others look scary, and some are simply absurd. That’s my admittedly biased opinion of course. If you click long enough, you might actually come across a planet you like.

(Edited my link to point to my latest revised entry.)

 
Flag Post

Had the busiest and most stressful week of my career this week, so I haven’t got anything. As it stands I don’t think I have the energy in me to make an entry but I suppose we’ll see how next week goes.

Looking good though vesperbot (edit – and Elyzius too! you ninja’d that in while I was posting)

 
Flag Post

Oh nice Elyzius. One tip: add hot keys for zooming in and out instead of or in addition to the mouse wheel. My page keeps scrolling when I try to zoom in and out :D

 
Flag Post
Originally posted by Elyzius:

Here’s my entry to the PGCC #3 — Hello Worlds. All feedback is welcome, including constructive criticism.

Could use a little more work ensuring the texture doesn’t look pinched at the poles, otherwise well done.

 
Flag Post

When you target the sun behind the planet (I should make me a sun as well!) the sun enlarges, and the atmosphere glow that exists in there should either always be, or just not correlate to lens flare effect (a nice one I must say). Sometimes planets are too dam dark, so that even under direct light no texture is seen. Anyway, nice one :) while this is clearly Stage3D job.

 
Flag Post

Thanks for all the feedback, guys. Some of the suggestions are easy to implement. I’ll be sure to include them in my next version. Others, such as the pinched textures at the poles, have bugged me since the very start of this project, so I’m not sure at this time how to solve them. That includes the atmosphere when not facing the sun. It’s actually easier to keep it on at all times than to make it appear only with the lens flare, but it looks really ugly when not facing the sun. If I can’t solve these problems before the deadline, I’m afraid they are going to have to be a “feature” of the program.

In the spirit of fairness, I’m going to have to say that I used Away3D to implement my entry as a 3D application. I closely followed the globe materials tutorial at the Away3D site to do the 3D geometry, lighting, 2D billboard, and special effects; namely, lens flare and bloom. The planetary texture generation, however, is my code. I wrote all the routines for procedurally generating the height maps, diffuse maps, specular and ambient maps, and normal maps. The code for randomly choosing harmonious color combinations is also mine, although it still needs some fine-tuning, as has already been mentioned.

 
Flag Post

Oh, I don’t doubt that it’s hard. I’d just like to see if it could be solved.

 
Flag Post

Sure enough it can. Make a normal map out of a heightmap, give it a light source vector (vectorset) at each pixel, compute dot product, this will be the luminosity of that pixel. Alter the color of the pixel, there’s your bumpmapped texture. One of the easier approaches to a heightmap is your familiar Perlin noise. To make a normal map, compute a gradient at a given point, and put its X&Y into red and green channels (you’ll have to normalize the resultant vector, tho, if you don’t also write Z value). To make a vectormap for lighting, make it known where is the light (I use directional light, it’s easier for a sphere) and there’s your vector. Normalize, dot product, apply.

Elyzius, what is “diffuse map”? I am aware of normal maps, specular maps (that are actually altered normal maps) and of course height maps, but this is yet unknown to me.

 
Flag Post

A diffuse map basically tells an application how each polygon in a mesh will be “painted,” kind of like wallpapering a room.

Btw, vesperbot, the process that you outlined is pretty much what my entry does too. It creates a normal map from a height map that is generated by perturbing Perlin Noise a certain way. It won’t solve the problem of the pinching at the poles though. The reason for the pinching is that a lot of texture information is being squeezed into the tiny area of the pole. The equator, on the other hand, is where the texture information is distributed at the widest range, and it is for areas like it that applying a planar normal map would work best.

It might seem that the solution would therefore be to stretch the textures over a wider horizontal area the farther from the center the x-value goes, but that gives rise to another problem — the loss of seamlessness. With the perlinnoise method of Bitmapdata, there is a parameter called “stitch” that allows you to make the resulting image seamless. This is great for texturing cylindrical objects, but with spherical objects, there will be noticeable pinching at the poles. Trying to solve the problem by stretching the textures as you go farther from the x-center means losing seamlessness. There will be a noticeable seam running down half the sphere, and that seam will be made even more jarring with a normal map.

 
Flag Post

I’m now working on a pinching solution of my own, as my textures too get pinched at poles. They are so far less primitive underlayed than just a perlin noise, but behave badly :D I think what you need is equirectangular projection which I am about to implement in a yet another shader of mine.

 
Flag Post

I am now officially tired with imlementing a DSA filter. While it did work twice already, first when I was using an external source of random, second when I was using the source’s channel as random noise, when I have tried to change calculations a little (not anything starting with sampleNearest() ) it broke apart. How come one-channeled shader works, while two-channeled doesn’t? And it seems that DSA on a shader is slow, perhaps even slower than native Flash.

 
Flag Post

I’ve made progress with regards to the observed pinched textures at the poles of my planets. One way to solve a problem is to cover it up. In the case of my entry, I added polar ice caps to terrestrial planets.

Edit: Click here to view my revised entry.

 
Flag Post

Am I the only one here who is making the planet in 2D?

 
Flag Post

No, I don’t use Stage3D either. I only use shaders that make it look 3D.

 
Flag Post

Hmm, what went wrong with FastSWF? It just says “Something went wrong” period. :(
(offtopic: it seems that “undefined” is using FastSWF too. Behold http://www.fastswf.com/vCL8sZE )