Giter Site home page Giter Site logo

wwwtyro / space-3d Goto Github PK

View Code? Open in Web Editor NEW
499.0 499.0 52.0 524 KB

Quickly generate procedural 3D space scenes in your browser with WebGL

Home Page: http://wwwtyro.github.io/space-3d

License: The Unlicense

JavaScript 97.65% HTML 0.20% GLSL 0.47% CSS 0.13% Vim Snippet 1.54%

space-3d's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

space-3d's Issues

`5h3rx6cb2gzk` and `13k300btolds` are equivalent seeds

There’s a reasonably common “bright green clouds” pattern I see the skybox generator make over and over; 5h3rx6cb2gzk and 13k300btolds and just two of the many seeds which generate the same skybox. It’s a pretty one, but the design comes up a lot.

OSX Glitch

There is a glitch on one of the cube faces sometimes. It looks like it could be garbage pixels (maybe a FBO is not cleared before rendering) or some bug in the shader (maybe pow or something is being fed negative values, or maybe something needs to be clamped).

screen shot 2015-11-17 at 10 44 59 am

[Suggestion] Include seed in downloaded skybox

Currently clicking "Download skybox" gives you a skybox.zip file with the images, but there's no mention of the seed used.
My suggestion would be to include the seed in the zip file name, e.g. skybox_692p1751bq40.zip, or alternatively as a text file within the zip file, thanks!

Would it be possible to use this with three.js?

I love your planet and skybox generators and would love to use them in a game built with three.js. I started working on a conversion on my own and managed to import your shaders but got stuck on matrices. Just curious if anyone would be willing to help with this?

Slight blurry-ness on the stars, no higher resolution than 4096

Hey there!

Discovered your excellent work in creating starry sky boxes. I'll be using some of the output in Vega Strike, if you don't mind. The singular stars do look a little blurry, and what with there being no atmosphere in space one would expect the stars to be hard points.
This may be alleviated a little by enabling a higher resolution map to be downloaded. How difficult would it be to enable 8192x8192?

Unable to save file

I am unable to find the download/save button for the texture.
I think it was removed from the html.
for the time being I am using
var canvas = document.getElementById("texture-canvas"); var img = canvas.toDataURL("image/png"); document.write('<img src="'+img+'"/>');
in console and saving it manually. Please do this problem

FR: Linear versus sRGB

This is an awesome tool.
Thank you for sharing!

Would it be hard to add a feature that lets you download the images in linear colour space, instead of sRGB?

My game engine uses linear colours, so the skybox is far too bright. When I convert to linear from sRGB before use, I get banding because the limited number of bits (8.)

I'm happy to tackle it myself, if you point me in the right direction, btw.

Various ideas / suggestions

Great stuff.

Just gonna drop some ideas and suggestions here. Take them as you will. 😄

  • You can use glslify for modularizing shaders, so you can npm install glsl-noise and eventually publish the space-specific GLSL components back to npm
  • Optionally, you can use stackgl for some low-level aspects like shader compilation. However, you don't need to use stackgl to get glslify working.
  • A "daytime" mode might be awesome
  • The process is really slow for large textures, totally hanging my system. I wonder if it's because it's trying to save each cube face to individual canvas elements? Maybe there is a solution that doesn't involve rendering to canvas textures.

A nice "end goal" for a project like this (and similar procedural texture tools) might be to have an Electron installation. The end-user experience would be a lot nicer, it would be something like:

npm install space-3d -g

## run in GUI mode
space-3d --gui

## run in CLI mode
space-3d --seed=5c9ss9vdfq0w --resolution=1024 --output space_cubes/

The main benefit is that you get Node's fs so you can stream FrameBuffer pixels directly to the file system (see gl-pixel-stream). This means you could render huge outputs without crashing/hanging the user's system, and without the user having to "Save As" each cube face. It could also be used as a CLI tool.

For reference, see shadertoy-export, which is built on Electron, stackgl and gl-pixel-stream. It's a bit clunky to develop, since you have to figure out a nice dev/prod setup with browserify (or another bundler of your choice), but the end result is pretty awesome.

Cheers!

🍻

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.