kmcurry / 3Scape

Create fun 3D contraptions in your browser that react to space, time, and physics
http://3Scape.me
GNU General Public License v3.0
3 stars 8 forks source link

Nurbs Generator #246

Closed kmcurry closed 10 years ago

kmcurry commented 10 years ago

When I'm 3Scaping I want to run "generators" that produce NURBS.

There is a button called the Nurb Button. When I click the Nurb Button I see a Nurb forming in my 3Scape.

The Nurb keeps forming until I stop it.

The Nurb uses collision detection to avoid things.

I might want to "steer" the Nurb in a direction by pointing/clicking

When I stop the Nurb I might want the option to connect the start and end.

We might want to adjust the rate at which the Nurb produces new triangles to make it more interesting.

There might be other Nurb Buttons that produces expected results, ex., a hull, a dome, a wing, a gear.

UI Considerations: 3Scape.me has beautiful iconic buttons for Nurbs. Never directly expose Nurb variables through GUI controls because then 3Scape would be come a wonky 3D editor. Instead we may one day leave an "Easter Egg" that links to a text editor where clever coders can play with inputs. It is also important that coders can build in the 3Scape by changing the code.

See also: https://en.wikipedia.org/wiki/Non-uniform_rational_B-spline

cc @mbrazell

mbrazell commented 10 years ago

I like these ideas, and agree that Nurb variables wouldn't make sense to the average user.

So the Nurb button initially creates a random Nurb object (randomly sets the control points)?

kmcurry commented 10 years ago

Basically, yes.

kmcurry commented 10 years ago

I'm also digging a little into these Conway's Game of Life scripts: https://www.google.com/search?q=conways+game+of+life+javascript+github Could be cool to implement in 3D with cubes.

mbrazell commented 10 years ago

That could be cool, but how will it drive revenue?

mbrazell commented 10 years ago

i.e., is it interactive enough to warrant implementation?

kmcurry commented 10 years ago

It is exactly the right question. I've been feeling that there still isn't much to do on 3Scape.me. With Nurbs and Conway 3Scapers could generate their own spaces and objects.

mbrazell commented 10 years ago

I think being able to create something that you are interested in re-visiting and expanding upon, or having fun creating whatever you can create... that will keep users coming back.

mbrazell commented 10 years ago

Ease of use and intuitiveness should be considered carefully as well.

kmcurry commented 10 years ago

Truth be told the file save is buggy and saving to profiles wasn't finished before the interns all left. I should focus on that. Perhaps not items to which you can easily contribute, though. I might be wrong. :smile:

kmcurry commented 10 years ago

re: buggy file save - resaving the same file name concatenates multiple XML docs together and therefore invalid

mbrazell commented 10 years ago

Nurbs might end up being a substantial undertaking, they require triangulation before the webgl pipeline can render them. That would require research and implementation. A cursory search provides several research docs on how to accomplish this.

I'd be happy to take a look at the buggy file save.

kmcurry commented 10 years ago

I think I found the issue already with save. Using a global string that isn't reset. Checking...

mbrazell commented 10 years ago

You pressed the easy button?

kmcurry commented 10 years ago

Apparently not. And now I'm confused. I don't have two Session tags anymore. The XML is well formed. But when I reload it the canvas is totally blank. Something related to this that I think we could change is not serializing all the DefaultPreferences stuff. Instead we could just link to DefaultPreferences.xml

mbrazell commented 10 years ago

Is serialization broken then?

mbrazell commented 10 years ago

Linking to a default prefs would require knowing what elements shouldn't be serialized based upon whether or not they are typically in the DefaultPrefs. Not a simple thing as far as I know. Could cause issues in my opinion.

kmcurry commented 10 years ago

I don't think we need to serialize Commands by default since most (except Default Prefs) don't stick around. Could add serializable="true" to those Commands we want to keep.

kmcurry commented 10 years ago

I suppose you are right though. And it shouldn't matter.

mbrazell commented 10 years ago

There is already a settable attribute "transient". If true, attribute doesn't get serialized.