NeatNit wrote:So simple simply repeats the script for each voxel?
Since you're curious, simple just surrounds your script with some lines of prewritten IPY code to save you typing the usual stuff:
- Code: Select all
clr.AddReference('mscorlib')
import System
import math
random = System.Random()
empty = Color( 255.0, 255.0, 255.0, 0.0 )
def getColor(x, y, z):
******YOUR SIMPLE SCRIPT IS PASTED HERE******
for x in xrange(width):
for y in xrange(depth):
for z in xrange(height):
voxels[x,y,z] = getColor(x, y, z)"
NeatNit wrote:And I noticed this line:
- Code: Select all
empty = Color( 255.0, 255.0, 255.0, 0.0 )
Do you really need to put the ".0" for each of them? Why is it there anyway? I doubt it works, as it would require 12 extra bits for each color... (3 for each number) So why is it there? And I assume 'empty' is bound automatically in simple scripts?
That's ugly but it's necessary due to the differences between IPY's type system and C#'s.
Try doing something like
- Code: Select all
return Color( 128, 0, 0, 255 )
it will give a totally red color instead of a darker tone because it uses the wrong constructor.
The decimal will be truncated if you use anything other than .0.
Edit: I've just hidden some of the Color constructors from scripts and that seems to have fixed this.
NeatNit wrote:Really off-topic, do you have Steam or MSN Messenger (... fine, Windows Live Messenger)? I'd like to be able to chat with you instead of using relatively slow forums

Not really, I'm kind of.. antisocial

your best bet is to mail me, if I'm online at the moment we may be able to chat on GMail.