Sunday, February 05, 2012

Loki's Blog has moved

Due to Googles incessant need to merge all my services into one account, i have had to move my blog to a self published host.

From now on my blog will be at THIS LOCATION. Please update your bookmarks etc.

Friday, January 27, 2012

Display Cost of a Prim #SL

While working on my mesh cabin and rats i was wondering about 'Display Cost' . Display cost is the number calculated by the viewer to represent how much computing power is needed to view an object, The lower the number the more efficient your object is to be displayed.

I did a test on a normal default plywood Prim cube. I originally entertained the idea that by setting the sides to invisible, perhaps the display cost of the prim would shrink. Actually i found the opposite.

Default Prim has a display cost of 389
Setting the faces transparency to 100 added 15 making display cost 404

making just one face 100 transparency ads the same amount of cost
removing the textures deducted 120 from the display cost showing how much a texture can change
the cost your object has.
Changing the size of a prim seems not to change the display cost unlike a mesh object. 
Not sure what significance this is or wether it helps anyone, but i found it interesting none the less :-p

Wednesday, January 18, 2012

Making a Mesh: Recreating a Cabin #SL #SLmesh


Those following me on Twitter will have seen tweets as i set out to recreate my little Cabin on Escapades Island.

So far with Mesh i have grappled with creating clothing, zombie worms and an AirShip, but i had yet to try making a building out of Mesh. Compared to rigging clothes making a mesh building should be a lot easier :-p



Start with cube
Using the free Blender 2.6 i started creating the initial walls and built up the shape. I created several parts to the new cabin keeping things such as, the cooker, roof, windows and floor planks as separate 'Objects' within the blender file. Each part had it's own UV Texture map.



UV Mapping
UV mapping is a very important part between modelling and texturing. It's an art form in itself and can take up a lot of time to perfect. When you create UV maps for buildings, you want to try and keep UV shapes close to the shape of the walls. It's very easy to 'Un-wrap' a UV and end up with stretched or squished shapes. If this happens you can edit the UV map and reshape UV's to the shape of the surfaces to be textured.
In Blender you can export the UV map as a PNG file. This can be useful
for reference when texturing you model.
When it came to texturing the Walls i discovered i had made them badly making it rather impossible to UV-unwrap nicely so i had to pretty much delete the walls i first made and start again. 

This image shows how bad UV-Unwrapping was causing bad texturing.
This was due to bad modelling from the start.


Texturing
I have recently been playing Star Wars: The Old Republic and had be interested in the texturing used in the game. They used quite low detailed soft illustrated textures and so i decided to try a similar style texturing for my cabin. I used reference textures of wood from google search and added bur while modifying with paint strokes to give a more illustrated feel to the textures. 

Another benefit of texturing mesh is you have more control over stuff like shadows and lighting. I was able to add a glow from the cooker onto the canon floor and shadows under the table and shelves.




Comparing Old to New
Part of this project was also to see the differences between my old cabin and a new mesh cabin, not just by its visual and prim counts, but also by how much it weighs on the server and your computer.

You have to realise that Mesh is not simply about creating awesome looking detailed objects. It is about creating stuff that is more efficient for you computer to download and display in the Viewer. 

In my previous blog post about uploading mesh i explained how i use normal old Prims to create
the Physics shapes. This is because it seems more efficient way to ad Physics to mesh, especially buildings.

It's the Count that Counts!

Linden Lab have added a new tool you may not be aware of. When you open the build/edit window, next to the Objects Land Impact is 'more info'. This opens up another window that calculates numbers to represent aspects of an object you never really think about.

Objects = how many grouped/linked items are selected.
Prims = how many Prims make up the selected item, that includes  mesh, sculpts and basic old prims.

Download = represents an estimation oh how much it costs to download i.e. how quick it is to load
Physics = represents how much physical energy it costs. i.e. how much energy used to roll a ball over.
Server = represents how much server attention costs. i.e. how much attention the sever has to spend watching your object.
Display = represents the cost to display your item in the Viewer. i.e. how much processing power your computer uses to display your item.

Land impacts = the new form of counting object costs, replacing Prim counts with Land Impacts.


So comparing the two cabins is quite eye opening. In every category the Mesh Cabin is less than half of the costs of the old cabin. If these numbers are anything to go by, once i convert most of my builds to Mesh, the SL viewer should display them with complete ease while the server runs as smooth as...  oh but to dream :-P.





Making a Mesh: Uploading to #SL

It's great to hear so many of my friends dabbling in Mesh creation now. 
They are all levelling up into a world thats going to offer more creative choice in the near future with 3D printing starting to hype it up.

Some of my friends have expressed frustration with the SL mesh uploader, so i have decided to blog how i do it and what i know in order to perhaps make my friends lives easier. There is nothing worst than slaving over a model in Blender only for SL to spit some error message at you on the final hurdle.

Beta Grid
To start with get on the Beta-Grid 'Aditi'. When starting in mesh, it's not kool if your first 100 practices are gonna cost you your Linden Credits. Until you have got a feel for how to optimise the mesh to cost as little as possible with low Land impact.




Mesh Uploader Window
There are a few things the SL viewer needs to generate when uploading you .dae Collada file to the grid.

Click to embiggen


1. Generate Levels Of Detail.
Each level should
be less detail than the
one above
As you move away from an object in SL, the further away you go the less detail you need to see because you are to far away. So 3D worlds and games use a system called 'Levels of Detail'. If you yourself are so far away that you can't see the object in detail then your computer need not waist valuable computing power to render all that detail so far away.

The first in the options tab is the Level of detail Generator. This is very important to how much Land Impact (prims) your mesh will cost/weigh. Proper Pro model creators will create and upload Levels of detail separately, but if you are like me an amateur self taught monkey then you will probably use the built in Levels of Detail Generator.

the LOD (levels of detail) options show four levels Lowest, Low, Medium & High. Each level has tabs of options, but the only options i change are the numbers on the end with the up and down tabs. The higher the number the more detail that level has. The lower the number the less detail and less computing power is needed to render it.

To better see changing a levels detail, click and change the 'Level of Detail Selection' button to the appropriate Level.

TIP FOR LOW LAND IMPACT: Select the Lowest Level of Detail in the LOD preview selection. now go to the Lowest level options and set the numbers to 0 (ZERO). The preview should show a small triangle. I always set the Lowest level of detail to 0. The reason for this i will explain in the next section XD.

Click to embiggen
Go through the other levels options and adjust the numbers as you feel best. What will happen is in SL as people walk away from your uploaded object the Viewer will drop down through the layers. As you walk towards the object the SL Viewer will raise up through the layers until you are stood in front of the object seeing the highest level of detail.... hope this makes sense :-)


2. Physics.
Adding a Physical shape to your object is like adding another invisible level of detail and as with the Levels of detail, the more detailed your physics shape is the more it will ad to the final land Impact (prim count). Using the Physics Options Tab you can select one of the Levels of Detail to use as the basis for your objects Physical shape. Pro Model creators will probably make their own specialised Physics shape to upload.

I have not had much success with Mesh Physics. I'm still finding them a bit crazy in their outcomes so what i tend to do is set the Physics shape to use the lowest level of detail. This basically makes the object an almost NON Physical shape (phantom).

Click to embiggen
TIP FOR LOW LAND IMPACT: Instead of making your mesh object an accurate Physics shape during uploading, use the lowest LOD as set in the previous TIP. "But I want my object to be physical!??", I use the old fashion PRIM. After uploading your low impact mesh you can link it to a normal SL PRIM with usually no additional Land Impact costs. Set the PRIM to 100% transparency and away yu go :)


IMPORTANT: Before moving on to the next section it is important that you remember after selecting your Physics shape to click 'ANALYSE'!


3. Upload Options.
In the Upload Options Tab there are some useful told for extra mesh fun such as Rigging and joints and... well stuff i don't totally understand yet. But the important thing for you is SCALE.

What ever the 3D modelling program you use, getting an idea of the scale of your object is tricky. When first trying mesh i would upload a t-shirt that was  big enough for King Kong or Godzilla.

Click to embiggen
The Scale section shows what the in world dimensions will be in metres once uploaded to the grid. Very handy for keeping costs down as you do not want to upload an object unnecessarily huge at a high Linden Credit Cost only to then shrink it down.


4. Calculating and Uploading.
Finally you are ready to click that Calculate Weights & Fees button. It will take a few seconds to calculate before giving you a price and land impact as well as some very handy costs Download/Physics/Server.

Click to embiggen
If you are happy with the calculation you can click upload and after a few seconds it should appear in your inventory.

Click to embiggen
TIP FOR UPLOADING AGAIN: Not everyone knows this but every time you upload a new Mesh Object your SL viewer will automatically save a file on your desktop. This file called a .slm file stores all the configurations for the mesh file associated with it. 


This is handy if you uploaded a mesh perfectly on the beta Grid and want to upload the same object with the same settings onto the Main Grid.

WARNING: Although handy for re-uploading previous Mesh Objects, the .slm file can totally screw things up if you modified your object and saved under the same name. In cases like these all you need to do is simply click 'Clear settings & reset form'. 


So thats the basics. 
It is the way i have learnt to use the Mesh Uploader and there is a lot of stuff i still don't understand yet. I hope this helps my creative friends and anyone else who wants to get into mesh as it really is a levelUP in the creative game. Most of all i hope this allows you to have more fun experimenting XD.

Some other tips about Mesh once uploaded that i have learnt...

1. Changing the Size of the object changes the cost in Land impact (prim cost) dramatically.

2. You can change a mesh objects physics shape to be PRIM, Convex Hull or to NONE.  This changes how the physical shape interacts with the world and also dramatically changes the objects land Impact.

3. When making vehicles it's land impact will change dramatically as the object changes from a static object to a physical object. A way around this is to set your mesh objects Physics to NONE in the features tab of the Objects edit options.