Log In  

Cart #44999 | 2017-10-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
82

EDIT: Updated version 1.01 for better precision in matrix calculations, so that shapes don't degenerate too quickly. Thanks @adge_francis for pointing this out on Twitter!

Controls: left, right, (O) - change pictures (X) - restart current picture, down - hide/show info bar

This is the first public release of the Noodle Engine, a PICO-8 thingamajig for making generative 3D art!

This example cart includes a few pictures I made, but the true purpose of releasing the engine is to enable everybody who is not me to make even cooler pictures with it!

It's easy to define new shapes with one or two screenfuls of code. Just load the cart up inside PICO-8 and scroll below the "pictures go here" line. You can play with the examples in there, or add completely new pictures. There is documentation available that walks you through the concepts and explains everything needed to make it all work.

If you're interested in how the engine itself and its renderer works, I have a Patreon where the full, unobfuscated source code is available to all $5+ patrons!

Feel free to share anything you make with the engine in any form, as carts, GIFs or otherwise. Hope it's as fun to play with as it was to make! :)

P#44320 2017-09-18 11:38 ( Edited 2017-10-30 18:15)

This is amazing! You as always made a really cool thingy :D I'm amazed how simple the API is! This could be a cool subject for the next stream ;)

P#44325 2017-09-18 14:11 ( Edited 2017-09-18 18:11)

Tried to make the API as easy to use as possible, thanks!

A stream on this is not out of the question! I'm wondering what would be more interesting: making cool pictures with it live, or diving down into the engine to explain its inner workings.

P#44385 2017-09-20 06:35 ( Edited 2017-09-20 10:35)

A friend of mine once made a similar engine for visualizing mathematical chaos. Something to do with strange attactors, as I recall. Sorry, I was never a chaos buff. :) Anyway, I will say that looking at how he did the visualization, which appears to be the same as yours, was very enlightening for me back in the day. It was a good introduction to how, exactly, depth buffering works, and how you can build up a scene progressively over time.

So, in short, I'd say there's a lot to be said for talking about the engine. Maybe with a test build set up that shows things at a slower pace or with certain elements of the process highlighted.

PS: Yes, I know I'm already breaking my little vow. :P Shh. I'm a chatterbox. Can't help myself.

P#44386 2017-09-20 07:04 ( Edited 2017-09-20 11:06)

Diving down into engine for sure ;D

P#44414 2017-09-21 05:25 ( Edited 2017-09-21 09:25)

I'll keep it in mind for the next stream - it will be pretty fun to explain all the ins and outs of how it works :)

P#44597 2017-09-25 13:54 ( Edited 2017-09-25 17:54)

Here is a little Noodle Engine thing for Halloween :)

function halloween()
 move({rx=0.25})
 shape(pumpkin,
  {clr={0.07,1,0.5}},
  {scl=1.6}
 )
 for x=-50,50,50 do
  shape(leaves,
   {clr={0.3,1,0.3}},
   {rgt=x},
   {scl=1.3}
  )
 end
end

function pumpkin()
 local rot=rndf(-0.04,0.04)
 move({rx=-0.1},{rgt=rot*20},{rz=rot})
 lock()
 local var=0.25/pmpkn_segs
 for i=1,pmpkn_segs do
  shape(segment,
   {ry=i/pmpkn_segs+rndf(-var,var)}
  )
 end
end

function leaves()
 for i=1,16 do
  shape(leaf,
   {dng=rndf(15,20)},
   {ry=i/16},
   {fwd=rndf(30,50)},
   {rx=rndf(-0.2,0)}
  )
 end
end

function leaf()
 for r=-0.1,0.1,0.1 do
  shape(leaflobe,{ry=r},{t=0})
 end
end

function leaflobe(t)
 local l=-sin(t/20)*8
 tube(4,1.5,{lgt=0.4})
 shape(leafbody,l,{ry=0.25},{t=0})
 shape(leafbody,l,{ry=-0.25},{t=0})
 move({fwd=4},{rx=0.006})
 if (t<10) shape(leaflobe)
end

function leafbody(t,l)
 strip(2)
 move({fwd=l})
 if (t<2) shape(leafbody)
end

function segment(t)
 sphere(pmpkn_w)
 move(
  {fwd=2},
  {rx=-0.01},
  {dng=0.3}
 )
 if t<45 then
  shape(segment)
 else
  shape(stalk,
   {fwd=12},
   {rx=0.16},
   {bck=6},
   {clr={0.33,0.8,0.45}},
   {t=0}
  )
 end
end

function stalk(t)
 tube(4,2-t*0.1)
 move({rz=0.03},{fwd=2})
 if t<10 then 
  shape(stalk)
 else
  cap()
 end
end

picture("pumpkin",{
 shape=halloween,
 bg=13,fogc=13,
 origin={0,40,120},
 backface_cull=false
})
P#45632 2017-10-30 14:15 ( Edited 2017-10-30 18:23)

I love it! My favorite picture was probably weave. I'd love to look deeper, if I had the $15 program.

P#111352 2022-05-05 20:34

Super cool

P#111359 2022-05-05 21:58

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 12:47:29 | 0.040s | Q:28