A Casual Meditation on Life from the Creation of Virtual Bunnies

Written by ina on Wednesday, 13 of January , 2010 at 1:04 am
Tags: , , ,


I. Exordium

What is a living creature? It responds to things, and it multiplies. From the perspective of computing, it’s an entity that is capable of input and output, with a manner of self-propagation.

Ah, propagation… Therein lies the interesting element–the growth of a population. Consider a hypothetical case, where you start out on a desert island with a pair of male and female creatures; each female produces just one female offspring per generation, and stops reproducing after two generation. Assume the male is immortal, and massive incest occurs to create all subsequent generations, all females. The heritage diagram of sorts would look something like this:

fibonaccincest

Or, referencing the same diagram, but slightly more organized, and not-too-snobby-against-the-color-blind (thanks to @WildstarB):

fibonaccincestorganized

To make it more interesting, Fibonacci, from back in the day, thought of the same problem. Apparently, bunnies were the most nearly-instantly promiscuous creatures back then, so his gedanken involved bunnies, and he devised the eponymous Fibonacci Sequence using the generation scheme described above (though, he didn’t use an immortal male, but rather, the assumption that each female produces a male and female pair per generation, with guaranteed brother-sister incest).

This is just an interesting thought experiment of an extremely basic model for describing population growth that, other than using bunnies as our key sex players, has absolutely nothing related to the virtual bunnies to be discussed in the rest of this article.

The point is that living creatures, in addition to responding to stimuli, have internal mechanisms of sorts that enable its reproduction. At least, that’s the perspective of a living creature that we have from observing its behavior from our limited microcosm. Microcosm? Habitat?

We’re actually right on topic, heading onto the most basic features of creating a virtual critter with AI-esque–certainly necessary for the creation of the virtual bunnies that piqued up your interest.

II. The Pseudo-Physics of Our Subset of the Virtual Microcosm

In “RL”, when you drop a ball, it falls, and when it hits a flat surface, it stops falling (though it might bounce or roll or crack or explode, or do a number of things in reaction to this action of collision). In “SL” or any virtual reality, when you drop a ball, it might not do any of those things, or it might do all of those things, depending on what you program the “physics” of your virtual microcosm to be. The essential affect is the reaction to an action–what happens when the collision (or, in general, the interaction among separate entities) occurs. In a virtual reality, this reaction is defined by a pseudo-physics that governs what happens when this interaction occurs.

When you’re working with phantom objects on SL, or regular objects that are not explicitly physical, you can’t rely on the built-in physics system, and thus you must design your own–from the perspective of parsimonious code being the most efficient (read: best), this is basically a “good-enough” physics system that will emulate just the wanted or needed reaction.

If you’re trying to program virtual critters (VC) or moving objects that are phantom, you’d need to worry about what happens visually when they collide. They ought to be “smart enough” to bounce away, or try avoiding merging into each other. A simple solution would be to have a llSensorRepeat() detect and react to objects that enter a certain small “bounding sphere,” whenever the virtual critter (VC) is moving. Upon entering the radius of this bounding sphere, the original VC will try “hopping” a random-small-distance away from the impending VC. Similarly, since the impending VC has the same bounding sphere “pseudo-physics”, it will try doing the same thing. Both VC’s will continue hopping randomly away until their “bounding spheres” do not intersect. This is the HB Bunny 1.x solution to avoiding the classic “merging phenomenon” demonstrated in the beta.

Characteristic behavior is really an orchestra of interaction, a sequence of action-reaction occurrences–a sunflower blooming towards the sunlight, a mouse attracted to cheese. But yet, when you look in nature, on the subject of group animal movement, you wonder what keeps them together in the way they move. For example, migrating birds often fly in a V-shaped “formation”. Obviously, the solidness of their physical bodies keeps their bodies from merging, unlike the phantom VC’s described earlier, but how do they know to fly in this V-shape, and why do they do this? While science has speculated on several reasons why, deferring to economy of such motion, how they do it requires both wirings in the bird brain that respond to such a situation, as well as features in reality that allow this. When cast in such an abstractified perspective, it becomes clear that what’s happening is that there is simply a different, but “equivalent” mechanism at work to keep things in formation–in reality, and in its emulation, virtual reality.

A series of such mechanisms might be considered to be governing characteristics of a paradigm. In the case of the phantom VC’s, their movement might be set such that they will move only when they detect a mat, and such that they will stay level only to the mat. Because the VC will detect the mat, it is almost like a magnet, or from a more macroscopic perspective, the mat is like a flat earth — although, contrary to what the Flat Earth Society believes, the mat doesn’t accelerate(!), and yet things simply stick to it.

A pseudo-physics that deals with only the known elements in a microcosm works because the VC only has to react to certain things, rather than to all elements in the physics of its containing world; moreover, having the VC respond only to such known elements in a microcosm is more resource efficient. Using this idea, in a pseudo-physics named “FIZ”, the HB Bunny implementation of my VC design averages to only 0.1 ms at peak, which is a fraction of what most AO’s take. The HB Bunny will “hop” away when they hit each other, or small objects named HB Rock. They detect only objects known to them, such as HB Food (which they eat), HB Toy (which keeps them happy), and HB Mat (which, they stick to). Moreover, in SL, when one uses VC’s whose prims are sculpted prims, it is actually necessary to use an alternative physics system, as sculpted prim bounding-boxes are not always as expected and precise as those of regular-prim VC’s. The phenomenon that may bring wonder is that with such simple behavior constraints, a VC that appears “alive”. And, with further internal constraints that will change their behavior, such as growth functions and mating functions, VC’s appear “living”–more on that in a later section, though!

The idea of having a creature react only to things that are immediately relevant to it, or that it is capable of detecting, is actually a common phenomenon in nature, RL. Humans and other animals live in the real physical world, but are capable of perceiving only a limited subset of reality. For example, we humble humans are not capable of seeing UV or infrared light, though other animals can; we are consciously susceptible only to a limited subset of the electromagnetic spectrum, though our bodies may react incrementally to gamma-ray bombardment, for example, its effects are 99.9% too small for any macroscopically-observable difference to occur. Many examples also exist on the size spectrum; we can’t see things that are too small (a virus, for example), or too big (the universe! - we live in it, but we can’t detect its entirety). But yet, we function in our own paradigm, and equivalently, so do these VC’s.


III. The Protocols of Life… Er… aLife!

Artificial life or, to coin a term, “aLife” might be considered a fine-tuned simplified set of protocols that emulate life, with complexity depending on the realism of the particular aLife entity. There are three general categories of aLife protocols–external interaction, internal determination, and non-interactive autonomous behavior. I will briefly discuss elements of each category for VC’s, particularly in relation to their implementation in HB Bunny.

External interactions occur when either collision occurs, or when an interaction is proximate, within detection vicinity.

Collisions occur with either the environment or its objects. In a pseudo-physics as described above, i.e., a physics that deals with only a limited microcosm, collisions that generate recognizable reactions would occur only with known objects, such as objects named a particular name, or flagged otherwise for detection. In the HB Mat example above, the HB Bunny’s environment is simply its mat, and this is its entire world, on which it can move. (However, if the mat is moved slowly, the HB Bunny will be able to go beyond its old bounding box environment, to “move with the world;” but, it is really the world that moves the VC…)

Some examples of possible proximity behavior phenomena are sickness (too many VC’s nearby), friendly interaction (gathering to sleep at night), or mating (for sexual creatures, at least two’s required). For HB Bunny, sickness occurs when the VC detects more than 6 scripted objects named HB Bunny nearby; sickness is manifest as an incremental counter, from 1 to 100 units, which can be decremented when the VC is hungry, and eats twice as much to decrement both hunger and sickness. HB Bunny will first find each other, in friendly “compassionate” behavior, and gather close-ly at night time to sleep, before deactivating all detection until daytime. Mating is possible when a HB Bunny is more than 14 days old, and is fully-grown and considered an “adult bunny”; presence of an eligible non-pregnant mate of the opposite gender is required.

Mating is perhaps one of the most important components, when you’re creating aLife for the purposes of viral breeding. And, since we’re 21st-century non-gender-discriminating folks, a significant mating system for VC’s must account for the case of gayness or genetically-disposed celibacy (with respect to impregnating). From the perspective of statistics, gayness might be considered a non-systematic deviation from the mean. Thus, consider a system where gender is assigned on birth of a VC as a global variable, and where this global variable might–in an extremely rare case–be reset. Assign the null value of gender to default to female VC, and the non-null value to be the male VC; when reset, or when communication error occurs (which has a higher chance on noisy-platforms such as LSL/SL), gender becomes “miscarried,” and you wind up with an effectively gay VC (i.e., outwardsly-male, inwardsly-female).

But, in general, the proposed VC mating system does contain the regular features of mating, such as VC-preferred-selectivism in mate selection, as well as birthing processes. This is best summarized in the diagram here (please click to see the larger version):

virtual critters mating protocol

Mating selection occurs on closest-match of a random number generated by the female and male bunny; call this the mating random number (”MRN”). To add “personality-in-female-choice,” in the HB project, I chose to have the male bunny generate his MRN at birth. A female bunny generates her MRN each time she goes into heat. The male is the one who chooses which female number is closest to his, and thus will favor a certain female if she generates the right MRN each time they meet while she is not pregnant (they’re bunnies, and not monoagamous).

To conserve resources, heat only occurs when there are eligible opposite-gender adult bunnies nearby. For HB Bunny, mating only occurs when bunnies are near non-pregnant entities of the opposite sex, and if bunny characteristic conditions fit (bunny has to be both happy and energetic enough).

Internal Determination is necessary to show changes in a VC’s characteristics (such as its core stats - happiness, energy, hunger, sickness, etc.) and changes in states. A VC contains a –literally — biological clock that governs its self-behaviors, such as growth and perkiness. A VC has three general states: awake/living, dead, and sleeping (semi-conscious). In the case of HB Bunny, when it is sleeping (and has found the other bunnies, if any), the entire script “goes to sleep”, suspending detection of other objects, effectively giving the simulator hosting the VC, some time to cool off. When the VC is living, it goes through its full range of behaviors. When the VC is dead, it simply ceases to exist in the virtual reality, other than as data stored in a database somewhere.

Non-Interactive Involuntary-Autonomous Behavior is generally an aesthetic feature of VC’s, as they do not have any “internal organs,” other than scripts. HB Bunny VC’s blink and twitch, and sometimes, they “bristle” on SL texture change lag.


IV. Concluding Remarks - Some Thoughts on Copy Protection and “Playing God”

The rage about SL virtual animals is likely due to the spirit of creation, albeit in a VC-promiscuous way, but then again, it’s also due to the value that they (and their offspring) develop, in part due to their rarity. Copy-protection is essential to the survival of a VC line whose lifespan depends on costly server-resources to run, which is, paradoxically, funded through steady sales of VC’s. But, next-generation propagation is also important, so I will discuss the general idea behind the propagation of turtles and Sion chickens (call this the “traditional method”), as well as alternatives.

validating virtual critters for transfer or spawn

The “traditional method” for a VC to give “birth” to offsprings essentially has the female VC rez an egg, and then have her drop a VC in the egg. The mother has a copy of this offspring VC in her inventory; her offspring in the egg, does not (but will, once they are born, as the egg script, will, in turn, give a copy of the VC to the newborn - though, for HB, this happens only for the female newborns).

This idea of a script creating a copy of itself sounds like a worm or a virus, and in fact, the adjective “viral” totally works. This concept is best illustrated through an interactive example. Drop by the park-like area next to the Skin City Library (NorthEast side of Skin City sim) to grab a copy of an “Infinitely Viral Urn.”

The “Infinitely Viral Urn” is the most basic implementation, with delayed inventory-drop check, of a script-based object self-reproduction. You only need to get a single urn, touch it, and it will give you another urn, that will, in turn, be able to “give birth” to yet another urn, and so on. What’s interesting to note is that if you attempt a “Cesarian,” by just taking the baby urn from the mother urn’s inventory without having it being “born” through a regular touch-rez, the baby urn will poof in a quick burst of stillborn particles. This is basic copy protection, where rezzing of a scripted object is only permitted by the script.

On SL, though, the problem of no-copy becomes complicated with a faulty permission system. The “traditional method” for copy-protection is also what’s done for the classic SL-AI-esque VC’s, the turtles and chickens. When a VC is transferred, it must be taken to inventory or sold in-place; using the SL feature of take-copy will disrupt normal script-flow and disable the VC. When taken to inventory, the traditional method requires that the VC be boxed. While the VC may be a +copy/+xfer object, the box itself is always no-copy. One the VC is boxed, it’s the box that is the inworld indicator of the uniqueness of the original VC. To prevent both the old owner and new owner from having the same copy of the VC, the box applies its no-copy permission to its inventory VC. When the VC is unboxed, what occurs is that a completely new VC is rezzed, but the data that defines the characteristics of the old VC is transferred, to give the appearance of the old VC’s continual existence, even though it technically ceased to exist the moment it was boxed.

Incidentally, a seamless updater works just like unboxing a VC, except the new updated VC is rezzed in the position of the old VC; it’s the same idea of “injecting” data from the old VC into the new, to make it appear a continuous incarnation of the original. Like boxing, the original was destroyed upon updating.

An alternative way to facilitating copy-protection would be to use a technique I’ve dubbed “pregnancy fortified food“. This would allow the best of protection in that all VC’s would have the SL no-copy permission, because the new VC is actually the no-copy inventory in the food bowl. (Kind of brings a whole new perspective to “eating something to get pregnant!”)

virtual critters reproduction and feeding tokens

In conclusion, I can’t help but recount the times when I felt like some deity when planning the general VC diagrams, and in implementing the HB Bunny, and in fact, it was more hubris than anything else that prompted me to take this project. I was even high enough to address myself as “Bunny Goddess”, at one point.

In beta phases, we tested the HB Bunnies on shortened lifespans, roughly 1 beta day = 10 regular days. (This meant the bunnies became adult and mating-age in about 1.5 days.) So, anyway, the fact that 1) these bunnies will automatically sleep at sunset, 2) have predetermined “promised lifetime of 356 days (barring starvation or sicknes)”, and 3) essentially have their body mechanisms limited by AI, and more, does not make me like the Goa’uld experimenting on the Argosians. (If you read this entry before hulu takes it off, the entire Stargate episode where that happened is embedded below.)

I confess. I’m just Ina. Ina Centaur ;-)

Category: Amusing, Daily Sumly, Projects, Reflections, Tutorials, bots

FashDoll HUD Preview

Written by ina on Wednesday, 6 of May , 2009 at 12:34 am
Tags: , ,

I’ve been working on getting fashDoll ready for a semipublic beta. On one hand it might be considered another one of my super-fancy super-extravagant pet projects (of startlingly limited scope. read: lots of work; little point. :-( ), but, considering that my fave programming projects are typically “weekend projects“, this was good experience having to plan it out, and work on it across several weeks to create a large-scale program with serverside PHP/MySQL and multi-link LSL/http-re to render the (esoteric) clientside interface. Anyway, here’s a brief preview and draft of a manual-esque for fashDoll:

{fD} fashDoll is a fashion “paperdoll” social networking platform. It lets you dress “fashDolls” by creating “dollfits” from both existing outfits and outfit pieces that either you create (upload the imagery) or find on the fashDoll network. (Here’s a screenshot from Second Life.)


FashDoll HUD Preview with Base (Cropped)
Each fashDoll dollfit consists of at most 4 layers, with the lowest layer consisting of a “base layer” (or semi/nude “paperdoll”) and the other three clothing layers being any combination of transparent or paperdoll outfit design. Essentially, a fashDoll dollfit is a paperdoll that lets you easily put on up to three possible layers of “paper outfit”.The fashDoll HUD has three core modes: Create, Browse, or Shop. Both Shop and Browse display a collection of possible outfits for you to choose from, and Create lets you create your own outfit component.

Shop: This is where you shop for clothing and base layers and dollfits! Clothing and base layers are just individual layers, but dollfits compose of up to 4 layers. You can find out more about each item by clicking on it to find out who created it in SL, and more!

Create: You can create outfit components or base layers by submitting the UUID of each layer texture. Each layer consists of a SL photo (1680×1030) you take of an avatar, whose background has been made transparent. These photos are easy to make: The fashDoll Photobooth is a “pinkscreen” booth, which you can use with either the default fD magenta skin and avatar, or recolor to use with a different set, depending on your colorset. Once you take a photo of your outfit or base, you take it into photoshop, Select > Color > and put the eyedropper on magenta, expand by 1 radius, cut and delete, then crop to fit 512×512 — or you can use either the “de-pink” or “de-pink and size” Photoshop actions.

Browse: Unlike both RL and SL, you never start with an empty wardrobe! By default, the fashDoll library consists of several dozen outfits and base choices either created by its maker (Ina Centaur) or used with permission by its respective creator(s). As you add in outfits, your inventory will grow in size, and newer outfits will be displayed first. Similar to the Shop mode, you can also search tags to find outfits.

Once you select or upload an item, it is shown in the fD Preview Pane. Any item in your wardrobe that you set for a non-0 price will be publicly available in the Shop mode for other users to share and create from; you can change the price of an item by clicking on the Price Pane.

Each outfit component is classified by a base type–by default, the fashDoll Photobooth has the classic paperdoll pose, but you can create fashDolls based on other poses (or other shapes). Each outfit component (and dollfit) can be named, and anyone can add tags to it to help others find it on the fashDoll network.

The Search button lets you search for things based on tags, separated by comma’s. There’s also a neat “BUY LOTD” button that lets you buy the “Look of the Day” featured in the panel above that button.

Finally, when you’re done with your dollfit, you can click the “WEAR on VIZ” button to have your SL-sized non-HUD vizDoll wear it! VIZ sort of hovers around you like your own personal daimon from the Golden Compass — so, anyway, via VIZ, fashDoll is your fashion pet and new best friend ;-)

And… Should you (or anyone) wish to by the 3D SL version of each fashDoll component from its original SL creator (before being turned into a fashdoll paperdoll piece), you’d just click VIZ for more info about the outfit and its components.

So, if you’ve read through this far, I should mention that you’re welcome to join in on the upcoming semipublic beta! Please post your SL name to the comments!

Category: Amusing, Projects, Tutorials

Blender is AWESOME for SL Sculpties

Written by ina on Sunday, 19 of April , 2009 at 3:04 am
Tags: , ,

I used to use modo and zbrush to create sculpties (sculpted prims) for Second Life. Yesterday, I stumbled on Blender and spent a huge part of the day throwing things on various objects in draping experiments (it’s kind of mesmerizing in a similar fashion to action painting). It generally takes me a few days to get used to a new 3d modeling program, but I found myself getting into Blender in just a few hours, and even had time to record a tutorial on draping cloth in Blender that first day. Now, more and more, I think Blender is AWESOME for making sculpted prims because:

  1. You can reorient the bounding box of the sculpty simply by re-setting the Axes (Press F9, Center New).
  2. Realtime-esque Cloth-draping, and select whichever frame of the simulation you want to use, then 1-click export using the (also) open-source Blender sculpty conversion scripts by Domino! (See the 5-minute tutorial here.)
  3. Blender’s OOP-ness makes it easy to automagically turn things into other things (literally!), as well as to rewire things from a “holistic Matrix-sort of backend view”, and its non-linear layers make it fun to have a variety of sculpts (especially simulation-based cloth-sculpts) in the same file, without the scene getting grotesquely messy. It’s also an interesting way to get organized.
  4. Using a lattice modifier to sculpt is awesome!
  5. Blender is not only free, but also open source!
    1. If you’ve got that crazy idea weighing you down, you can go right into it and mod it from code!
    2. Also, I’m of the belief that traditional modes of software licenses will soon become extinct… While it used to be that o/s software often died out after their lead gets corp-cannibalized, it seems the exact opposite nowadays. Migrating to open source now is, interestingly, an investment for the future — both in funds saved and time saved.

Category: Designs, Reflections, Tutorials

Quick Sculpted Cloth Prim via Cloth Simulation in Blender

Written by ina on Tuesday, 14 of April , 2009 at 11:37 pm
Tags: , ,

After a hiatus of about 4 years, I stumbled back to Blender (which I used to write tutorials for on Wikibooks) today to do some CG fur and cloth tricks. I’ve been using Modo for the past two years or so, and have long since forgotten how to use Blender. Blender seems much more intuitive and loads more developed, and I found myself getting in sync with it pretty quickly. It seems like a nice (not to mention free!) tool to create sculpted prims for Second Life — and I thought I might contribute a tutorial on how to make cloth in Blender for use as sculpted prims (”sculpted cloth?”) in Second Life.

Now, there are several ways to do this, but I’m using the Cloth simulation tool (which also lets you select which keyframe to choose to freeze it at — you can even make a sculpted cloth animation in SL using this, by exporting the sculpt texture from each frame). Details are summarized in this quick and dirty screencast tutorial I’ve put together. (I also discovered a new free online service and free screencast software called Jing. Here’s my first tutorial video using Jing & Screencast!)

Category: Tutorials

Selecting in Blender

Written by ina on Tuesday, 14 of April , 2009 at 11:57 am
Tags:

Selecting in Blender Edit Mode

Blender offers several convenient means of selecting things, when you want to grab multiple vertices, edges, or faces.

  • Border Select: Press B, then LMB and draw a box around what you want to select. | MMB deselcts
  • Brush Select: Press BB, then “brush” over the vertices you want to select. RMB or ESC to exit. | MMB deselects
  • Lasso Select: Ctrl + LMB selects | Shift + Ctrl + LMB deslects

Selecting in Blender Object Mode

Home, fits all on screen; Right click, press . to zoom into that object

Local View, shows only currently selected object: /

References. These Glen Moyes video tutorials go over the basics in a decently organized way.

Category: Tutorials

[IC-Skins] .:RIO:. New Skin Line - Maiden New Releases!

Written by ina on Monday, 6 of October , 2008 at 12:11 pm
Tags: , , ,

A couple of months ago, I came up with a skin called Rio. Its has a fair Caucasian tone, described by some as distinctly “Northern/Eastern European”, “exquisite”, and my favorite comment, “a supermodel skin on SL that’s memorable.”

_AR Rio "Another Realism"  by [IC-Skins]

Thus, arises the .:RIO:. line - “Memorable SKINS to become YOU.”

I decided to play with some sketch layers used as eyes and lips in some of my earlier releases. (The devout should be able to see them ;-)) To my surprise, each skin looked distinctly different, and the tone works well, as seen in:

Gia, with warm expression-ful eyebrows, available in:

makeup variations:
IC-Skins Rio Gia Neutral

and “Avant Garde” showgirl mode:
IC-Skins Rio Gia Avant Garde

Gae, whose features give her a formidable and venerable composure:
IC-Skins Rio Gae Neutral Pink

Gina, who fits as supermodel or an unforgettable pretty girl:
IC-Skins Rio Gina Neutral Red
IC-Skins Rio Gina Neutral pink

The .:RIO:. line also comes with a selection of eyeshadow colors to bring out your eyes, a selection of lipstick choices (and also directions for custom makeup requests), - each available as individual packs, and also (with discount) row, column, and “all” packs. Two
body choices are available with each, and these body skins will actually be released as psd and textures soon - along with tutorials on customizing your avatar body skin. Stay tuned to the IC-Skins group for details!

All photos shown are unedited SL shots - color, shadow, and everything, looks exactly like they would look on SL using Second Life 1.19.0 (5) Feb 28 2008 17:18:12 with the default [IC-skins] face light included. You can also get a similar look using the regular/
current SL viewer with atmospheric shaders turned off in edit > preferences > graphics

Enough 2d-ness, drop by the main store to see these skins in 3d… on you!

Category: Designs, Projects, RP, Tutorials, Uncategorized

SQLzoo Fun

Written by ina on Monday, 12 of May , 2008 at 1:40 pm
Tags: , , , ,

Really bored. Asset servers failed. Crashed SL is not accepting logins. I feel like doing a problem set! (Seriously!)

SQLzoo answers to…


SELECT within SELECT

1b. List the name and region of countries in the regions containing ‘India’, ‘Iran’.

SELECT name,region FROM bbc WHERE region in (SELECT region FROM bbc WHERE name IN (’India’,'Iran’))

1c. Show the countries in Europe with a per capita GDP greater than ‘United Kingdom’. (Denmark Iceland Ireland Luxembourg Norway Sweden Switzerland)

SELECT name FROM bbc WHERE region=’Europe’ AND gdp/population>(SELECT gdp/population FROM bbc WHERE name=’United Kingdom’)

1d. Which country has a population that is more than Canada but less than Algeria? (Kenya)

SELECT name FROM bbc WHERE population>(SELECT population FROM bbc WHERE name=’Canada’) AND population<(SELECT population from bbc WHERE name='Algeria')

2a. Which countries have a GDP greater than any country in Europe? [Give the name only.]

SELECT name FROM bbc WHERE gdp > ALL (SELECT gdp FROM bbc WHERE region=’Europe’)

SUM and COUNT

1b. List all the regions - just once each.

SELECT DISTINCT region FROM bbc

1c. Give the total GDP of Africa (410196200000)

SELECT sum(gdp) from bbc WHERE region=’Africa’

1d. How many countries have an area of at least 1000000 (29)

SELECT COUNT(name) FROM bbc WHERE area>=1000000

1e. What is the total population of (’France’,'Germany’,'Spain’) (187300000)

SELECT SUM(population) FROM bbc WHERE name IN(’France’,'Germany’,'Spain’)

2a. For each region show the region and number of countries.

SELECT region, COUNT(name) FROM bbc GROUP BY region

2b. For each region show the region and number of countries with populations of at least 10 million.

SELECT region, COUNT(name) FROM bbc WHERE population>=10000000 GROUP BY region

2c. List the regions with total populations of at least 100 million.

SELECT region FROM bbc GROUP BY region HAVING SUM(population)>=100000000

Category: Amusing, Daily Sumly, Tutorials

A Roundabout way to “Group” large objects for big sim builds

Written by ina on Sunday, 17 of February , 2008 at 4:43 pm
Tags: , , , , ,

So, in traditional 3d programs, you have the ability to group entire objects no matter how big or how many “prims.” You don’t have that freedom on SL, due to limitation in link distances and also max prims per linked object.

But, it’s relatively easy to “select only my objects” and drag a bounding box around the building you want to move. But, in a citysim setting with buildings sardine-squeezed next to each other, precision selection might be a pain.

Enter one other use of my SLregapi. Use it to register an Ina alt per building/sector, so that if I ever have to move it, all I’d have to do is log into that alt and drag a bounding box to “select only my objects.”

The other day I contacted Concierge about whether the TOS max avatar count applied to RegAPI accounts. The reply I got stated that TOS doesn’t cover RegAPI yet.

So, here are the accounts used to rez the parts of my upcoming city sim build:

  • Ina Gears (roads)
  • Ina Looming (basement stuff)
  • Ina Caudron (Blue District, except for SLface)
  • Ina Hotshot (Red District, main entrance)
  • Ina Westland (Red District Round Building)
  • Ina Siemans (Red District hotels & resorts)
  • Ina Hereter (Red District Skin City Art Museum)
  • Ina Nestler (Red District WTC tall)
  • Ina Clawtooth (Red District mass generica)
  • Ina Major (the heavens)
  • Ina Cliffhanger (The Sky Globe globe thingies and also empire state bottom foundations)
  • Ina Ireland (Sky Globe Main)

Category: API, Amusing, Builds, Projects, Tutorials

Theory of Light in CG, Part I

Written by ina on Monday, 21 of January , 2008 at 4:29 am
Tags: , , , , ,

A while ago, I promised someone to write a brief intro to some technical CG terms used in materials such as specular and diffuse amount. I guess that’s what I’m doing now!

Light rays do not exist, per se, in pixels — and, incidentally, hence the bane of digital cameras vs. traditional cameras, btw — but, it’s interesting to note that 3d software are often developed based on the physical theory of light. Raytracing is basically about light bouncing off things and onto other things so that the colors appear the right shade.

When light hits a surface, it is either reflected or transmitted (or absorbed - but, in general, we needn’t worry about that in CG).

So, I really like how modo breaks up its material panels into ref and tran:

Reflective

  • Diffuse Color: The object’s basic color. If pure white light hits the object, this would be the color you see. Diffuse Amount would modulate the intensity. A Diffuse Amount of 0 yields the best version of a black body your screen can represent.
  • Specular Color: The object’s highlights. A Specular Amount of 0 would yield a dull un-shiny object. Specular should be equal to Reflection for realistic effects.
    • Specular Fresnel: Fresnel, in this case, basically refers to specular light hitting an object perpendicularly. A 100% specular fresnel would mean an object’s reflection perpendicular to you becomes unrealistically white. It’s named after this guy named Fresnel who proposed that waves basically sprout out perpendicularly from points.
  • Reflection: 100% turns your object into a mirror. This actually doesn’t have a real world analogy.

Transmissive

Category: Tutorials

Who is Ina Centaur?

A 25-year old American polymath of Taiwanese ancestry pretending to be old and Caucasian in Second Life. Semi-retired independent scholar also dabbling as an independent artist in new media, particularly theatre and the humanities—notably Shakespeare. Programmer, playwright and novelist. Formal academic background in http://portfolio.inacentaur.com/ina/scientist, philosophy, and bioengineering.

This is largely a personal blog which isn't always up-to-date. There's no one definitive way to stalk me ;-).