## Making sculpties with code

I finally got around to doing this!

Here I am sitting in my place in Inworldz (where the texture uploads are free, heh heh), trying out the sculpt-maps made by this Python program that I wrote that makes sculpt maps.

My favorite so far is the pointy one on the right there, which resulted from a couple of bugs in the program. :)

(And yeah, the Linden trees are being mysteriously grey again.)

Here are a couple of the sculpt textures themselves:

The fun pointy one:

Another odd bug-generated one:

And the very symmetrical one on the left, once all the bugs were out:

And finally (Secrets of the Ages Revealed!) the Python code itself:

import sys
import math
from PIL import Image

X = 64
Y = X

fname = sys.argv[1] if len(sys.argv)>1 else "sculpt.png"

def getR(x,y):
return(      math.sin( y * 2 * math.pi )  *
(( math.sin( x * math.pi ) + 1 ) / 2)         )

def getG(x,y):
return(      math.cos( y * 2 * math.pi )  *
(( math.sin( x * math.pi ) + 1 ) / 2)        )

def getB(x,y):
return( x*2 - 1  )

def gogogo():
ary = []
for x in range(X):
for y in range(Y):
ary.append( (
127+int(127.0* getR(float(x)/X,float(y)/Y)),
127+int(127.0* getG(float(x)/X,float(y)/Y)),
127+int(127.0* getB(float(x)/X,float(y)/Y))  ) )
mode = "RGB"
size = (X,Y)
im = Image.new(mode,size)
im.putdata(ary)
im.save(fname,"PNG")

gogogo()

I trust it’s obvious how to use it.

Hahaha, sorry! Couldn’t resist. :)

To use it, well, first install Python and also the Python Imaging Library, then create a “mksc.py” or whatever you want to call it from the code above. Do “python mksc.py vase.png”, and it will create a file “vase.png” which you can upload and use as a sculpt texture to make the symmetrical thing on the left.

Then edit your mksc.py to change the getR, getG, and getB functions to something else, and do “python mksc.py somethingelse.png”, and upload somethingelse.png and use it as a sculpt texture, and see what happens!

For best results, getR, getG, and getB should all expect to get two floating point numbers between zero and one as input, and should return a single floating point number between negative one and one as output.

And there ya go! :)

Oh, and: you may find that the textures work best if uploaded with lossless compression (probably a checkbox on your image-upload panel), and that it’s more obvious what’s going on it you use the “torus” stitching type (in the edit panel right under where you put the sculpt texture) rather than the default “sphere” type. P’haps…

## InWorldz again

I read someone mention InWorldz again somewhere (I forget who and where exactly) and I logged in and looked at my land and started bopping around.

I ended up building a house and going to my first Live Music event in that world, friending a few people I know from Second Life, spending my first I’z (that’s the quaint name of the local currency, assuming I spelled it right), and furnishing the place with stuff I got at the freebie shops, and stuff I made, and the stuff I bought.

It was lots of fun! I’m especially fond of the house, as it’s the first house I’ve built that I’ve actually bothered to furnish with some intention of “living in”; in Second Life I’ve never done the whole “live inside a thing with walls and a roof” thing. It’s not necessary in SL or IW of course, but that doesn’t mean it’s not fun. :)

Here’s an exterior shot of the house, which sits on the parcel that I own or am renting or something, right next to my dock:

This is a pretty lousy shot, actually, because of the other houses in the background. None of the sticking-up rooves are mine, my place has a flat roof. So far, anyway. :)

Note the nice seaside location, the dock and boats, the openness and at the same time coziness of the house. I built it myself! (I say modestly.) It’s a bit primmy, but I seem to have lots of prims available. (Unless I’m going over my limit without knowing it.) The doors slide open (on touch) and closed (five seconds later). And it’s free to copy, if you want a house!

Here’s me, inside in the reading chair:

I made some of the rugs and tables and small things, and uploaded the Renoir and Heade and Mucha and "September Morn" and Magritte.

The sofa and reading chair and flowers and other rugs and the books against the far wall were all either freebies, or (the chair and sofa) actually bought.

I found my first Inworldz Live Music event while looking for a furniture store with a sofa I liked (Victoriana has some really nice stores, which at least last night had stoves, beds, dining room sets, but no sofas). I saw a bunch of green dots on the minimap while standing in the center of a mall, and headed over. (On the way over, I in fact passed over the store that I bought that sofa and reading-chair in.)

It turned out to be a bunch of people in a big open shack in a marsh, with a guy singing and playing guitar on the music stream, and people dancing on a genuine Abramations (I think it was) danceball, and talking and laughing and exchanging stuff. It was great. :) When I got home I tested my non-physical boat, and it’s still a disaster. But one copes…

Speaking of Abramations-I-think-it-was, one thing that struck me while I was searching around for a sofa, is how many high-quality vendors there are in InWorldz now. Some (many, most, essentially all?) of them started out in Second Life (and are probably still there), and have expanded now into InWorldz.

And that’s pretty cool! It also means that, for all the obvious parallels, InWorldz isn’t all that much like the first days of Second Life; not only does it already have flexies and scuplties and Windlight, it also has some very high-quality content, and people who are both able to produce it, and who are used to seeing it. So, unlike maybe the SL of 2005, if you put together your own living-room set out of a few simple untextured prims with no sitposes, you’re not going to look leading-edge…

As is probably obvious from the title of this post :) it occurs to me to compare this rather positive thing about InWorldz with the rather negative thing about Blue Mars that I posted the other day.

I think a big part of it is that I haven’t seen people talking up InWorldz as The Next Big Thing, or as having “the best strategy for growing the next generation of 3D virtual worlds”, or as being technologically better than Second Life, or any of the other (frankly) bullshit that people are for some reason always writing about Blue Mars. InWorldz is just what it presents itself as: a small but growing OpenSim world with both quirks and fun.

Both of them have bugs; InWorldz has things like the non-physical-boat sim-crossing thing I linked above, and (one thing I didn’t mention the other day) Blue Mars has the problem that the two user-created boats I’ve tried were so awkward to use they might as well have not worked at all (I gather the platform doesn’t really have vehicle support at the moment) and that the bowling (one of the few actual things to do in Blue Mars) is apparently often broken. The big difference from the user’s point of view is that in InWorldz the developers are right there in the bug-report forum, talking about where the bugs might be coming from and when they might get fixed. In Blue Mars, on the other hand, the forums have only the two or three user-support people, and the main thing they say is “I’m pushing for that to be fixed”, which suggests that the invisible developers need pushing to do anything.

InWorldz is of course more what I’m used to. I can walk right in, touch a sign about a lot for sale and rent it, or go to a sandbox, and click around and build stuff. (My house, for instance; isn’t that a nice house? I like my house.) In Blue Mars I know that anyone can theoretically join the developer’s program and install the “local sandbox” part of the client and use an external program to develop some 3D models and install them into the local sandbox and play with them until I like them and then find a store owner or block owner or apartment complex in some city who is willing to give me a place to upload them to and then —

Ehem. Yeah, I might get around to that someday. :) Meanwhile I think I may go into InWorldz and tweak the texture on my ceilings…