Friday, February 28, 2014

Keep your inventory under control (Introduction)

This article was published in Fusion Magazine, February 2014. Click for the magazine!

Greetings everybody! If there's something unpleasant, yet necessary to do in SL, that is sorting inventory. On one hand, it's frustrating to search for an item we want to use, and not being able to find it. On the other hand, an excessively large inventory may carry with it some bad side effects.

The first important thing to realize is that this is a task that has to be performed periodically. If we sort our inventory today, depending on our shopping habits, perhaps we need to sort it again every other week, every month... The frequency is not the same for everybody, but it is something you'll have to do from time to time.

If this is the first time you're going to seriously sort your inventory, or if it's been a long time since you last did... Keep in mind, this is no five minute task. It may take you from several hours to several days. It depends on how many items are left to sort, and how thorough you want to be.

As a matter of fact, even setting our mindset to inventory sorting, and establishing a routine that works for us, takes some preparation. For this reason, we'll be outlining here the stages that will be developed in future articles.

We will first talk about choosing a folder structure for our inventory that reflects the way in which we naturally look for information. This is a personal decision, and so several alternatives will be presented. We have to think which structure works better for us, and so decide.

After this, we will see how to create this folder structure in our inventory, and which tools SL has that allow us to move items, create copies or even special copies called "links."

Once our inventory is organized, we aren't done. We have to get used to packing, otherwise, our total number of items will grow out of control. It's a good idea to do our sorting and packing at the same time, but while we learn, we will do this in separate stages.

When packing, we will realize that there's a lot more than clothes in our inventory. Textures, poses, notecards, furniture, landmarks, calling cards... What do we do with all this? We will study some tools created by SL residents, learn about embedding in notecards, and more.

Join me, starting in the next issue.

Enjoy your SL.

Saturday, February 15, 2014

Philosophy and knowledge

"Philosophy" is a word that everybody knows, and it is a word that likely has as many definitions as people using it. My first official encounter with this subject was when I was 15, starting third course in high school. The first thing the teacher did was indeed opening the field asking us "what does philosophy mean to you?"

I had heard horror stories about this specific subject, which was even more feared than maths, but the truth is that I had a blast with the topic that year. We studied some bits of the thoughts of famous philosophers, put in context with the moment they lived in history. We studied some bits of anthropology. We then studied more bits of psychology and of formal logic. Debates were a constant, they never finished as soon as the class bell rang, and there was a lot of homework. How could I not love it?

My school was public in a moment when education was good in Spain, so I was also fortunate enough of having the choice of deciding if I would study religion, or ethics. Since I prefer reading fantasy in my own time, I chose ethics from my very beginning in school (when I was five years old), and so I had the privilege of talking about relevant matters in life since I was that little. By the time the philosophy classes started, I was ten years talking in school about morality, the concept of reality, lies, being selfish, drugs, sexual transmission diseases, sexual harassment, friendship, love, politics, war, torture, relationships, parenting, abortion, responsibility, freedom... we even talked about religion! But we did from the perspective "why do people need to believe?"

Nowadays I think that it would have also been relevant talking about "what's the harm in believing?", but I can't complain much: we covered a lot of ground. Sure, when I was 15 I wasn't ready for life, but I also hadn't a sugar coated vision of it.

I can hear some parents screaming right now. My parents didn't. Our teachers didn't force any view of life into us. They merely drove the debates and pointed out when our reasoning was blatantly fallacious. At the end of each course, there were as many views of each topic as students had participated in class. And of course, each one of us thought that we were the one being right about everything, just to change our minds the next year, in light of more mature material that our teachers presented at class :-)

Well, okay, my parents didn't scream because we talked about those matters in school and then high school. My parents DID scream once they realized that arguing my points was a little more complicated than just saying "you do this because I'm your father/mother!" and even more difficult than "this is for your own good." (And how this is good for me? Could you explain?)

One of the moments I clearly remember, is when it was pointed out that earliest philosophers were quite sexist. The teacher (a woman) said that they were indeed sexist, and then made two questions to the class. The first question was "were they less right about what they said?" The second question was "do you think you can expect people that lived centuries ago, having a view of moral as we have it nowadays?" She then added "like our bodies themselves, the way people think has also evolved in time, and we will be studying that in this course."

Those two questions are still very relevant in my life, especially when I feel inclined to reject an opinion because I don't like the person saying it. I add: There's no consensus nowadays in when many aspects are "morally right/wrong", how could we expect that this consensus existed before?

Once I was 17, I had to choose what I would study in University. I had many temptations and I could choose only one. I wanted to study philosophy. I wanted to study psychology. Arts. Mathematics. Computer Science. Physics. Chemistry. Philology. Psychiatry. I wanted it all!

But we can't have it all, particularly all the time in the world with no income needs, and so I made my decision. I went for Mathematics, and I knew the true reason of my choice just a few years ago. It was the only choice that would assure me, my father would leave me in peace in what respects the class material.

Just like everybody else, my father thought he was right about everything. The problem is that, once I reached a certain age (over 13), he developed the annoying habit of telling me that every single topic I studied at class was false just because he felt it that way. We were studying the decomposition of light? Lies, my teachers are hiding relevant information to me. We were studying Kant? Bullshit, the guy was nuts and anyway my teachers only tell to me what they want to tell to me about him, how could I know those interpretations were indeed from Kant's thoughts and not totally made up?

There was only one exception to this: The only topic he never had an opinion about, was Mathematics. And that, in an instinctive level, led my decision.

I don't regret having studied Mathematics. I think it's one of the best things that ever happened to me. Everything I studied was fascinating. It gave me a mindset that has proven to be useful in my life, and it opened the door to meeting important people in my life... people with very interesting minds, not afraid of talking about anything. At all.

I have to confess, though, that I still feel attracted to studying Philosophy, as a degree. I've read a bit of some philosophers about topics such as education, ethics, "the meaning of life" and religion, but I feel I'm missing out on a lot. Even if just for the sake of it, I would like to be back to University. But then reality kicks in, reminding you that you cannot live from the air.

So even though I know that it's very unlikely I could do this degree, I would like to study it.

It is claiming absolutes like "people are [this or that]" what starts my curiosity. We are part of "people". When we say "people lie", we're saying that we lie too. When we say that "people are idiots", we're saying that we're idiots too.

We define the world basing our claims in our perception ("Men are..." and you likely know less than 0.001% of men in the world). We define morals as our moral ("Abortion is wrong." or "Abortion is a right."). Honesty is always our personal interpretation of honesty, open to the hypocrisy of looking aside when we (and nobody else) has a tough situation that can't be saved without stepping on our principles.

I would like to develop my own thoughts in those matters, but I feel, like for example I felt yesterday, that I'm lacking on essential definitions. (What does "respecting a feeling" mean? Why are we assigning human entity to a feeling and at times we put them even above the respect to a person, giving more value to the feelings than to the person themselves? Respecting a feeling means that we empathize? That we will not tell the person they're wrong? Then why we do respect feelings but not decisions? Why do we "respect feelings" but feel entitled to tell people they should decide something else, if we don't agree with a decision?)

The interesting of this is that by exploring all those concepts, humankind developed knowledge. Yes, I know that there are people saying that "science is an invention of interested politicians, the real power is in our minds". But if you really stop and think about the implications, you realize that despite of the uncertainty, there are things that can be known. Like, you know that you cannot stop a train with your mind before the train rolls over you. You better get out of the train's way.

And that's the beauty: there are things that can be known!

I feel that if you like knowledge, you like philosophy. Like with any other feeling, I could be wrong about that. That's in part why my interest in such a journey: I need to know when I'm right or wrong. To me, it is not enough with just feeling that I could be right.

Monday, February 10, 2014

Creator Resource - Writing colors for scripts and/or configuration notecards

This tutorial is available at: Creator Resource - Writing colors for scripts and/or configuration notecards.



At times, we want to modify a simple script, to change a color that's written in it. At times, we have to do some changes in a configuration notecard, and said notecard expects that we write the colors down in a certain format.

But likely, we're not scripters. Likely, we don't know how to obtain that color "code". The case, more often than not, is that we have the color we want on a prim's face, and want the "code" for it. The Firestorm viewer has a tab in the color picker indicating the values a script would want, but not all of us use it, or know what to do with those numbers.

Fortunately, there are simple ways of obtaining said "color code". I will give here a script that will help, explaining how to use it. After it, I will give a long explanation, in case that you want to know more about how colors are written in scripts :-)


The quick way


To create this script, right click in your inventory, in a folder of your choice, and select the "New Script" option. If you don't see this option show: you have to right click over a folder.

Rename this script to something that makes sense to you. For example, rename the script to Tell me the color of a face.

Now double click on it and open it. Select all the text that you will see (the default script) and delete it. Yes, delete it! Fear not :-)

Is your script empty? Completely empty?

Perfect. Now select the code below, which I've colored dark green, so you see clearly where it begins and ends. Copy it into your clipboard (CTRL C), then paste it into the completely empty script's window (CTRL V).


default
{
    touch_start(integer total_number)
    {
        llRegionSayTo(llDetectedKey(0), 0
            , "Color in the touched face is:"
                + "\n" + (string)llGetColor(llDetectedTouchFace(0))
                + "\nDon't forget to delete me when you're done!"
            );
    }
}

Now save this script. If you've performed the previous steps correctly, you should see a Save complete. message showing at the bottom of the script window. Otherwise, you'll see a dreaded script error. We're not bothering in trying to fix it this time. Delete the script and start again, making sure you select all the text :-)

With the script saved, that means that we can now use it.


How to use the script


Rez a box. Change the texture to Blank, so you will see the colors easily. Change any of its sides to the color whose code you want to obtain. Then drop the script inside the box.

Click the face with the color you want to know. You should get a message in chat like:

[09:02] Object: Color in the touched face is:
<0.50196, 0.50196, 1.00000>
Don't forget to delete me when you're done!

That means:

<0.50196, 0.50196, 1.00000>

is the code you were looking for :-)

(As the script instructs you, once you're done, delete the script from the prim. Otherwise, it will always send those messages to whoever clicks the prim.)


The long explanation


Any color is always a combination of Red, Green and Blue values. Usually, these values go from 0 to 255. The higher the value, the more you have of that component. They're usually written it this order: R, G, B.

To mention a few examples:

<255, 0, 0>         RED
   <255, 255, 0>       YELLOW (= RED + GREEN)
   <128, 128, 128>     GRAY 50%
   <0, 128, 0>         GREEN 50%
   <0, 0, 0>           BLACK
   <255, 255, 255>     WHITE

But scripts in SL need this written in a very specific way. We need to convert this. Scripts expect the numbers in a different range, so instead of writing, for example, the color red like this:

<255, 0, 0>

the three numbers have to be within the range from 0 to 1, so the color red would be written as follows:

<1.0, 0.0, 0.0>

What do we do, then, when we have a RGB code for a color we like, to "translate it" to LSL (the scripting language)?

We have to take the RGB, like here: 255, 255, 0
Put the three numbers between < and > and separate by commas, adding a decimal point:

<255.0, 255.0, 0.0>

and then we have to divide the three numbers by 255.0, so we get:

<255.0/255.0, 255.0/255.0, 0.0/255.0>

which gives as result:

<1.0, 1.0, 0.0>

So, in general, once we have the values for R, G and B, we need to "translate" them to LSL, which expects the color as a vector, <R, G, B>, but values for R, G and B have to be from 0 to 1. So, if we have values from 0 to 255, to convert them into 0 to 1, we need to divide them by 255.

This is, we have <R, G, B>, being R, G and B from 0 to 255, as usual, so LSL needs that we perform the following operation:

<R/255.0, G/255.0, B/255.0>

for the definitive values for the color.

NOTE:
<R/255.0, G/255.0, B/255.0>

is basically the same as:
<R, G, B>/255.0

being the last one, preferred if you typed like that in a script.

There are a lot of resources in the web to find the RGB components of a color. The two following links are good resources for this:

http://www.allprofitallfree.com/color-wheel2.html
http://www.ficml.org/jemimap/style/color/wheel.html

EXAMPLE: Suppose we have the blue tone <6, 172, 255>, as it will be written with the standard 0-255 range for RGB. To convert this <6, 172, 255> to a valid color for LSL, we have to perform the following calculation:

<6.0, 172.0, 255.0>/255.0

which means that the value we'll use for the color will be:

<0.023529, 0.67451, 1.0>

(Yes, we could leave it as <6.0, 172.0, 255.0>/255.0, but it's better if we save the script to do unnecessary calculations.)

The colors mentioned above will also be written this way:

<1.0, 0.0, 0.0>         RED
   <1.0, 1.0, 0.0>         YELLOW (= RED + GREEN)
   <0.5, 0.5, 0.5>         GRAY 50%
   <0.0, 0.5, 0.0>         GREEN 50%
   <0.0, 0.0, 0.0>         BLACK
   <1.0, 1.0, 1.0>         WHITE

Sunday, February 9, 2014

Creator Resource - Moving our Blender settings to a newer version

Blender is a program with frequent updates, and every two months (approximately) there's a new version out. If there's something that any Blender user has clear, is that having to set again all the preferences is an unpleasant job. Fortunately, we don't have to set them again each time we update.

Suppose for example that we're working with Blender 2.67 and we want to update to Blender 2.69. First we have to do is downloading the latest version from here: http://www.blender.org/download/ and install it. We can install this in a different folder than the 2.67 version, and have both versions in our computer, if we so wish.

Next to do is looking where our configuration Blender folder exists in our computer, and copy the following files within the 2.67 folder into the corresponding 2.69 folder:

    bookmarks.txt
    recent-files.txt
    startup.blend
    userpref.blend

The configuration folder location depends on the operating system we are using. In Linux, this is:

~/user/.config/blender/versionNumber/config/

We need to show hidden files for this. versionNumber obviously refers to the current version we have been using (for example, 2.67).

How about the location of this folder in other operating systems?

According to the following link in the Blender wiki http://wiki.blender.org/index.php/Doc:2.6/Manual/Preferences, we can find it here:

MacOS (you'll need to show hidden files for this):
/Users/$user/Library/Application Support/Blender/'Version Number'/config/

Windows 7 and Windows Vista:
C:\Users\$user\AppData\Roaming\Blender Foundation\Blender\'Version Number'\config\

And that's it. You should be able of painlessly moving your existent preferences, and continue working with the most current Blender version as you were used to :-)

Wednesday, February 5, 2014

I have eyes only for you

They say, better late than never. Well, it has taken me basically one year to publish the short tale that accompanied the Tainted Love hunt 2013 gift. Instead of publishing it as text only, I prefer to show the pages as they did show in the included HUD.

Enjoy :-) (And be careful of what you promise!)

Click here for the story, published in The Night Corner

Saturday, February 1, 2014

Who is my future Love?

The Tainted Love Hunt is here again, and RL gave me time enough to participate (sort of). Like I said a year ago, because of the 2013 edition of the hunt, I should understand a hunt not as a marketing tool, but as a "literary workshop" of sorts. This year I haven't had the time to develop a deeper story like I did the previous year. Still, I've been able of putting together two things my mind likes to work with, within the realms of imagination.

One is my taste for doll houses and antique furniture. I am even building my own (RL) doll house, and have some furniture. For this hunt, I made my own version of the vanity of the house, coming up with this:


Who was going to tell me a year ago that I would be able of modelling this? People label you as a scripter, and it seems you'll never be able of doing something else. But I did. And I don't care if it doesn't sound modest, but I love how that vanity came out.

Then, an unscripted piece of furniture is... well, a bit boring. So I made an animation for sitting, and then a script for the vanity itself. There's where the other thing my mind likes to play with, came into play.

This hunt is not about the "I love you", "No I love you more" that could provoke you severe diabetes as Valentines is close. It's about tainted love. Darkness. And if you've been following my SL feed, by now you sure know that my imagination is attracted toward this. (I made an archive in this blog that you can check.)

So yes, you have to expect some darkness. When you click the vanity and ask it who is your future love, it will tell you a story that will show you who is that love. I didn't have much time for a long story, as I did last year, but still, I hope you'll like the result.

Enjoy :-)