Thursday, May 10, 2007

More sculpted gemstones

...and I get back to my Linux machine to discover that they still don't have voice chat in Linux!

Oh well, at least I can play with the sculpted prims on a decent machine for now. I know gemstones are a trivial example of what's possible with sculpted prims, but I'm excited by the thought of more interesting varieties of stones to make jewelry with.

Last night I started all my computers (even the ancient ones) working on churning out textures. This is going to take a looong time - my fastest computer is managing about one texture every hour and forty minutes, and I've got a total of 765 textures to go through (85 gem shapes, and 9 colors for each). So far I've managed to do 62 of them; at this rate, I might have the complete collection finished by the time sculpted prims debut on the main grid. What I've got so far (click to enlarge):


Those are at the default prim size; obviously they can get much smaller. I'll need to redo the sculpting textures, though - if you bring it all the way to its boundaries, a sculpted prim is about twice the size of an unsculpted one. These are all spaced one meter apart; even though they're set to 0.5m in each direction, you can see that they're almost touching each other.

Sculpted prims can't be cut, twisted, dimpled, skewed or otherwise tortured - so the only way to make something smaller is to change the sculpting texture. For example, rather than making the color range 0-255 in each channel, you can cut the size in half by making the range 64-191. Of course, reducing the color range also means reducing the accuracy of your model. There's also a bug at the moment, where color values that get too close to each other turn the sculptures into plain spheres if you get the camera close to them.

It's odd, but I think the back sides are even prettier than the fronts (click to enlarge):

6 comments:

Ged Larsen said...

Nice! But, is the general lack of "sharpness" to the facets an issue with lossiness of the format, or to inexact rendering of the vertex locations?

Somehow, I expected that mathematically defined and created "sculpties" would be capable of much sharper edges, perfect for gemstones.

Johanna Hyacinth said...

It's probably a combination of factors.

Both of your guesses are correct: the texture images are converted to JPEG2000 just like all other images, resulting in the attendant loss of precision.

Also, the hacky way I had to create the textures in POV-Ray means it's just blind luck if any particular point on the image actually corresponds to a vertex. Eventually, I plan to redo the sculpting textures by reading all the vertices in with a PHP script, sorting them by height and then by their angle around the Z axis, and then using that data to generate the texture (which should be a great deal more accurate than my current method).

There's also a level-of-detail issue as well; if you get the camera up close to the gems, they're much more regular. Unfortunately, in order to get them all in frame, I had to zoom back far enough that they lost some additional detail. But I've heard that they're working on LOD issues for the next version of sculpties, so here's hoping that will improve in the future.

Caterin Semyorka said...

yes, yes, yes, but how about a godamned necklace!!!

Johanna Hyacinth said...

I've learned my lesson about the test grid - build nothing you'd be anguished about losing when they refresh the database from the main grid.

Besides, what happens on the test grid stays on the test grid; the only things you can really transfer between the two grids are scripts and text-only notecards (because you can copy and paste them into a text editor outside SL).

But once the sculpted prims go live on the main grid, I'll already have all the textures I'll need to start making necklaces. :)

Anonymous said...

The secondlife wiki hasn't mention using POV yet for sculpties. Why don't you write the article for it.

http://wiki.secondlife.com/wiki/Sculpted_Prims:_3d_Software_Guide

Ged Larsen said...

Although I don't fully understand the details of how these sculpties (and your use of POV-Ray) works, I think I get the gist of it.

If I understand you correctly, yes I think starting with all the vertices and mapping them out would be MUCH more accurate.

It almost sounds like the inverse of how I made mathematically correct geodesic spheres, where I took a divided icosahedron, and then PUSHED out the vertices to intersect a sphere.

In the case of the currently available sphere-based sculpties, you'd want to START with the sphere vertices, and then push them INWARDS, and stretch them, to where the gemstone vertices should be?

Can't wait to see what you come up with :)