Monday, May 7, 2012

First Ship in Welder

Finally, a reasonably-complex scene that makes some amount of sense.  I've made my first ship in Welder!  It only took about 5 minutes.  Obviously it's nothing great, but I really am loving how expressive the language is even without advanced intrinsics and operations.  It really helps that everything compiles and updates in real-time (without restarting the application), so that I can see my changes as soon as I make them.  That's really nice for iteration - I can literally have feedback on a tweak in under a second.  Great stuff!


Here's the code:


You can see my very liberal use of the language's ability to embed arbitrary expressions in any parameter that expects a numeric value.  This makes writing complicated, inline formulas a breeze!  I also make heavy use of the power operator (^), which is much faster than writing powf(...), as one would do in c++.  Finally, just for demonstration purposes, you can see a function call in the nested extrusion code.

Oh, and I changed extrusion so that the radius is returned via an actual return statement, rather than "set r ...". This makes it dead-simple to create an extruded primitive (it literally takes 5 seconds to make a cylinder).

I'm really glad I chose to explore the programming language route!  I have a feeling that this rapid iteration is going to lead me to a good place in terms of the scene geometry :)

No comments:

Post a Comment