Wednesday, 15 November 2023

Thoughts on PBR

One of the big issues that had been holding me back from seriously updating my store both in SL and Kitely is the looming PBR update.

PBR itself is an exciting update that I am looking forward to playing with one it hits Opensim. However, I do also foresee some issues. 

As Adobe defines it - "Physically based rendering (PBR), sometimes known as physically based shading (PBS), is a method of shading and rendering that provides a more accurate representation of how light interacts with material properties. Depending on which aspect of the modelling workflow is being discussed, PBS is usually specific to shading concepts while PBR refers to rendering and lighting. Both terms describe the process of representing assets from a physically accurate standpoint."

You can read more here - Adobe Official Site

Image from Adobe













Currently in SL/OS, we tend to "bake" lighting detail into our colour maps, and then shade and highlight them further with Normal and Specular maps if desired. We also fairly recently (a few years ago I think) got the ability to use Emissive (glow) maps.

However with PBR, correct practice is to make your colour/diffuse maps with only colour and noise information. All lighting and shading should be handled by the new PBR material types. 

To illustrate what I mean in a more visual way, here is a quick example taken from my new Sim Surround kits.

Explaining the new complexity rating system for my products.

To better help my customers make informed choices and find it easier to identify the products that they need, I am introducing a new rating system to my listings on Kitely when I roll out my revamped store in the next week(s). 

While I will also endeavour to list the total polycount of each model in a set, some of my sets have several dozen models. In these cases, a range will be given showing the highest and lowest polycounts. 

But also alongside this each product will have a simple rating - Light, Medium and Heavy.

Light - These are the tier of products I offer with the lowest polycounts and using mostly seamless textures. They are great for any purpose, but really shine when you are wanting to build or fill out a large area at the lowest performance cost possible.

Medium - This tier will feature products with slightly higher polygon counts and feature more baked textures. These items can be used fairly extensively in small areas (up to a 3x3 region), but it is not recommended you try to fill several regions exclusively with this level of content. Very often, they will also be designed to refer back to and work alongside Light products as an optional extra level of detail or as a standalone set. 

Heavy - 99% of my content will fall into the previous two categories. However from time to time I reserve the possibility of releasing something crazy. These objects will be fine and fun as a novelty but intended for very limited use and on their own unless clearly stated otherwise. 

.......Hopefully this will all make more sense when my store is back open =D

Obviously, if you are building in a 64x64 region or something nuts, your going to get lag no matter what you do unless you understand what you are doing and take steps to break up your content into manageable "chunks". 

The bottlenecks are the same as ever - 

*Your graphics card

*Your internet connection

*The clunky way SL/OS handles several things relating to LOD, lighting/shadows, textures and off screen geometry culling. 

*The quality of the content you use and your understanding of how to use it. 



Sunday, 5 November 2023

Land Ho! - A guide to off-sim building

With the impending release of my new Sim Surround kits, I wanted to write some pointers to both help customers with using the products and also to explain the limitations and design choices. As well as giving you the tools to work with off-sim building in general. 

Sim surrounds and off sim geometry are one of the most effective ways of making your sim feel like it is part of a larger world.


GENERAL PRINCIPLES

First thing to understand is that usable space exists around any sim that is not normally accessible, but can be built on if you know a few tricks. 

As you can see here, this is a 1 sim region but we have 8 regions of space around its perimeter. This is the space we will be using to build our off sim landscapes. 

There is more space, but placing things outside of this 1 sim perimeter can lead to textures and LOD not loading in correctly as well as other lighting based graphical glitches. So I don't recommend it. 


DESIGN PHILOSOPHY

My kits follow in my tradition of modular building, allowing you to move and change them as you wish, creating your own variations and landscapes. 

Building in this way has advantages and limitations. The obvious advantage is the ability to make endless variations. The drawback is you limit how much detail you can put into each piece, as they all need to work together. 

As we are also limited to 1024 textures in SL and OS, these pieces are designed to be viewed at a distance over the default water, as shown at the show rooms. They are not designed to be placed on or close to land, and are not intended to be walked upon. They are a visual illusion designed to give the impression of distant land in the background. 

They have been built in this way because designing parts that either come closer to the sim, or partly attach to it requires significantly more geometry and unique textures. It also limits the possibility for modularity and therefore limits customers in what they can build with them.

But if you want to try doing something like that, you can attach and landscape your own off-sim items easily by following the guide below!


BUILDING GUIDE - BASICS

Ok, this all sounds cool, but if you try to drag a simple prim off the boundary of the sim, you wont be able to do it. You will hit an invisible wall. So how do we get stuff out there?

When you rez one of my pre-made sim surrounds that I include with every package, you will notice a few things. 

Firstly, you may not be able to select or move it. This is because you will need to turn off "limit select distance" in your viewer options (turn on advanced menu in Firestorm to find that). Turning off camera constraints can also be very useful when working with off sim geometry (also found in the advanced menu). 



You will also notice an octahedron in the centre of your sim. This is the "anchor prim" and it serves two functions:

1. As the name implies it ANCHORS the rest of the sim surround to your sim. The trick here is that the ROOT PRIM of the linkset must be on you sim somewhere. You can then push other items linked to it off sim wherever you like. You can literally put anything out there. 

2. It holds the sim surrounds textures. This is because when you place geometry off sim, sometimes the textures will not load correctly and get stuck at a blurry stage. I therefore advise selecting the root prim via "edit linkset", place it as close to your landing zone or "central" area of the sim as possible. It is already phantom, make it invisible too and your done. 

This way, when visitors arrive, the textures will be in close enough proximity to load correctly without you needing to manually refresh them. 

It is an octahedron because 8 is the maximum number of textures 1 prim can support. I try not to use more than 8 textures per sim surround to keep performance good, but there is nothing stopping you mixing and matching parts from different sets. Just add another prim to hold the textures. 

To edit your sim surround, simply select it in edit mode, select "edit linked" and click the parts you wish to move (you may need to move your camera closer if you still cant select some things). This is also what you do when you wish to move the root prim. 

DO NOT unlink items and then try to move them while they are off sim as they will be returned to your inventory. 

If you choose to move a part with trees on it, make sure you select the land AND the trees together. 


BUILDING GUIDE - ADVANCED

When building your own off sim land with the parts provided in the kit. There is a best methodology to follow. 

1. I have packaged the parts at a smaller scale to make it easier for you to rez them, but you will want to scale them up to maximum size. For parts with trees, you will want to do this BEFORE linking the part to the full linkset. 

The included half mountains are intended for the very last row of mountains at the back to save some geometry. 

2. When adding new items to the linkset, first select the new item and THEN the root prim of the main linkset before linking them. If you do it the other way around, the new object will become the root prim. 

3. With trees - If you want to make your own custom tree arrangements, it is best if you place them in-world with the smaller meshes provided in the set and then export them as a DAE file. 

Open the DAE in Blender, save them as an OBJ, delete the current objects and open the OBJ. DAE files do NOT like it when you merge multiple objects, so we do this to avoid any material problems when merging parts. Merge them with Ctrl+J and export the resulting mesh as a DAE and re-upload it.

You CAN use them as provided without exporting and joining them, but it will bump up your prim usage significantly. 

Advanced users could also download both parts (land + trees) and bring them into Blender and use a scatter node to procedurally place the tree billboards. 

4. If you build too far out, you will notice that either some objects will look like they are cast in permanent shadow (even with shadows off) or get culled completely at certain points when walking around your sim. This is a limitation of SL/OS simulators and can only be avoided by judicious building.

5. Once you finish up, double check that the linksets are set to phantom. 


Wednesday, 23 August 2023

Examples of the broken viewer land impact calculations of OS 0.9

 With Opensim 0.9, we got a change in physics engine to ubODE. This has made a number of noticeable improvements (linksets not moving around slightly when you link them anymore is so nice!), but it also broke a lot of mesh content that was made prior to the change.

Most noticeably, mesh with a hole through it (such as doorways and arches) got broken, making them impossible to move past unless you unlink them and make the offending pieces phantom, or re-upload them. 

But arguably the worst change was the total breaking of land impact values shown in the build menu. It seems that now the land impact value shown is inflated by around 3-5 times. The physically larger the mesh becomes, the wider the discrepancy. 

For example, this piece of terrain mesh in Second life is 7 PE/LI. As you can see from me standing on it, it is rather large, so 7PE with full physics is reasonable. 


But in Opensim, it now shows as an eye-watering value of 31. An over-estimate of nearly 4.5 times (7x4.5=31.5)!


As you can see, the LOD settings are exactly the same. The scale is the same. You'll have to take my word that the physics model is too as that info is not shown in the build menu.

But that is not all. Although the number shown is wildly inflated, it does not actually impact on the number of prims used on your sim. Your real land impact will still only count each physical part in a linkset or group of objects. Just as previously.

So......understandably, people are confused. This is also not great for attracting merchants to the space for obvious reasons.

I hope this can be addressed in future OS releases but from what I hear, it wont be. So.....

I think the following example best sums up how well you can trust the land impact calculations as shown in the build menu.....

Here we have a humble mesh plane, subdivided once. 1 LI. And next to it its twin brother, also 1 LI....



So....together, that would be two LI, right?



Dont be foolish! That would make too much sense. Its three, you idiot. (Bear in mind that in SL, each plane would be 0.5 PE = 1 PE total when linked)

Except when it IS two, like those other physically larger, more complex planes that you subdivided THREE times right behind the smaller ones.....


And the problem seems to get more acute the bigger the mesh is. This example shows a dune from my new "world in a box" kit. According to Opensim, its a whopping 239 LI! 


And here it is in SL, where we can see the ACTUAL impact is 20. Which I think is fine for such  huge mesh object with physics. Look how tiny I am on top! :)


So yeah. My new way of explaining Land Impact to people is to look at the data under the "Mesh information" in the "object" tab. 

1 sculpted prim = 256 tris. I think that gives most people at least a vague calculus to judge if a mesh is "worth it" or not. 


Monday, 21 August 2023

Gosh.....

 Has it really been 6 years since I wrote anything here? Wow, time flies. 

Anyone on Kitely grid will already know I have been away for quite a while. My life was upended around about 2018, I returned around 2020 to find Opensim 0.9 had broken a lot of content thanks to the borked implementation of the new physics engine, and I did not have the mental bandwidth at the time to deal with the fallout of all that. 

Thankfully I am in a slightly more stable position now and decided it was high time to do a full reset of my store. Many products will be updated and given as free updates, but a lot of stuff will be retired or replaced entirely. 

I will get to everything in time, but right now my focus is on landscaping, as I also have to rebuild my inworld store. More updates will follow shortly, my emphasis has been on making my landscaping products a lot easier to work with while also being more efficient than previous iterations. 

I will be posting full guides on how to use each set via this blog, as well as other tips and tricks

Saturday, 6 August 2016

Exploring the new Kitely Welcome Center

As some of you may already know, I have recently been involved in redesigning the official Kitely Welcome Center! It has been a terrific project to work on and I am proud to have contributed to such a key part of the Kitely experience.

So to celebrate its launch, I thought I would give you a little tour!

The new Landing Zone now has a Welcome Pack containing key information for new users, interesting landmarks and other assistance. There is also a greeter board which new arrivals can click to send an instant message to one of the greeter team if they need more personal help.

From here, users can choose to go in four directions. Each clearly labeled. The Information bridge takes you to a large kiosk where further information about Kitelys community and services can be found. Touching the boards takes you to the relevant webpage.


The Avatars bridge takes you to another kiosk where Kitely's free, hypergrid enabled avatars are found. 


The Shopping bridge takes you to a revamped Merchant Hall, where users can find a wide selection of Kitely's top merchants.


The Destinations bridge takes you to the Garden of Worlds. Here can be found a small selection of Kitely's myriad of worlds!




It is also home to one of the nicest panorama views in the whole KWC.


This direction also leads you to our new meeting areas.

The Community Meeting area has been revamped to be more cosy and colourful. This is where Kitely holds its weekly community get together.


We also now have the Amphitheater. A terrific place for more presentation or entertainment style gatherings. 


There are also plenty of places to just walk around, explore or enjoy the scenery.



 And being a Worlds End build, it just would not have been right without squeezing in some caves somewhere!


The primary objective of this project was to make things easier to find for new users. The second was to bring the Welcome Center up to modern visual standards and show the possibilities available to new users. I tried to design a landscape that was attractive and lush, without obscuring the key elements of the build that users need to find easily.

I kept as much of the Greek/Roman feel and vibe of the original KWC but elected for a cleaner look and more emphasis on contrast between the buildings and landscape.

The reaction form the community so far has been overwhelmingly positive and I thank all for your kind worlds and valuable feedback. There are still improvements we can and will make in the not too distant future rest assured.

I would also like to thank Dot Matrix, who was instrumental in helping me manage the project, the expectations of the commity and my own thoughts. She also created all of the textures for the signs, world and merchant boards.  

Enjoy the new Kitely Welcome Center everyone!





Friday, 4 March 2016

Better Sim design in Opensim - some tips and tricks

Opensim has some particular quirks that sometimes make it hard to build responsive environments. More controlled environments such as games or pre-designed experiences have ways of mitigating these issues that are not available to us. That said, there are ways of building and ways of thinking about sim design that will help you deliver a more responsive experience.

This is aimed at people who want their regions to be visited and care about the user experience. This is for people who want a world they can confidently use VR goggles and not throw up. They are good tips for anyone to follow but if your a hobbyist/casual users its probably of less interest.

1. Build small
I know in Opensim its really really tempting to go for the biggest amount of land you can get, then proceed to cram it with as much stuff as you can find. if this is your private space and you have a great computer and/or you dont care about framerates and load times then fine. But if you are expecting visitors, this is a BAD move.

The larger the space you have, the more sparse it needs to be. This is because issues like LOD, LOS and Overdraw (which you will read more about below) conspire against you in larger environments. In a game situation for example, objects that are on your screen are pre-loaded and rendered and anything not on your screen (Line Of Sight/Field Of View) is "culled" essentially meaning it does not exist and will not place burden on your CPU. Not so in Opensim.

You can easily test this in any moderately full sim with Firestorms Phototools. Bring up the FPS monitor and cam to the corner of the sim. You will notice your frame rate jump and your camera and avatar movements will become more responsive.

Now, slowly cam or turn from the outer corner into the center of the sim. See the drop in the numbers? If you do this in a 1x1 sim, the effect is barely noticeable, but try it in a dense 2x2 or 3x3 and I am SURE you will see what I am talking about. Its common to loose 25+% of your FPS when staring inland as opposed to looking out to sea. Even system terrain with no objects rezzed will effect this.

I want to stress that this is normal behavior. Something is not "wrong". Its just something to consider. Every object that you rez has a rendering cost. Rez a lot of objects and your CPU struggles. Designers (like myself) can only help customers so far by designing low poly and trying to make effective LOD models (but this can be a crapshoot as LOD models can be very context specific, more below). The rest is down to the sim designer and how they choose to use objects within the chosen space.

Therefore if you want to build a "dense" environment such as a city or large, thick forest I strongly recommend using nothing bigger than 2x2 (4 Regions). If your going for high detail/density, its much better to build a series of smaller worlds rather than try to cram it all into one big worldspace.


2. Dense on the outside, sparse on the inside
If you MUST build in a larger area than 2x2, consider building the densest parts of the build on the outer sims and trying to leave the center relatively sparse. This way, when users are looking towards the center of the world, the CPU will not suddenly get hit by looking at 3-4 regions of dense geometry all at once. if you want two densely built up areas, separate them by as much distance as possible and make the other areas/sims less dense.


3. Think LOD, think LOS
LOS - Line Of Sight (also called FOV or Field of View). Related to point two. Say you are building a roleplay sim and somewhere you want a large settlement. its more beneficial to build this settlement to the corner or side of the sim rather than the center.

As I mentioned before, in games anything not in your direct FOV/LOS is culled and effectively ceases to exist. In Opensim if you are in a house with your draw distance at full and there is a huge forest behind you outside, that forest is still there, being calculated and sucking up your computational power even though you cant actually see it.

Say you have a 3x3 region and build in the center sim. Now, no matter which direction the user looks there is an extra sim full of geometry to render in every direction on top of whatever is actually in the sim your standing in. Those sims are not very far away, and so probably 90% of objects will be at the Med/Low LOD stages (depending on scale as mentioned above). Also conversely, if your user is in ANY other sim, they have to render the entire settlement too!

Build in the corner then you have empty ocean to one side, 3 sims at Med/Low LOD on the other side and the rest of the sims so far away most objects should be culled completely or at the lowest LOD stage. This will result in improved framerates both inside and outside your "built up" area.
LOD - Level Of Detail. If you are a designer and in control of this aspect, you can greatly reduce the burden on users computers by designing effective LOD. The problem with LOD as I eluded to above is that it is often very context specific. Items need a different LOD if they will be placed inside or outside for example. If placed outside the object will need multiple, fairly accurate models, as they will possibly be viewed from far away. An object inside probably only needs 1 LOD stage and can then be culled completely after that, as they will never be seen by anyone not directly in the house/castle/whatever. But that depends how big the building is, of course.

LOD is also effected by scale. So somewhere between distance and scale is the "sweet spot". Getting it right is a matter of practice, observation and adjustment. It can be like pulling teeth at times. Not exactly my favorite part of the process, in case you cant tell.



4. Be aware of Overdraw
Overdraw is a thing which happens when too many alpha textures are present on screen and your computer cant decide which is the correct order to display them. So it displays all of them at once. You may have looked at a tree or plant and noticed a strange effect where you can see the leaves both in front and behind at the same time and the object seems in a weird semi-solid semi-transparent state. Happens with grass most commonly. That is overdraw. It hurts your brain to look at it and it hurts your computers brain too! If you build big areas full of plants, I can almost promise you this is why you are experiencing lag.

Alpha textures are most often found on plants and trees. Most plants and trees use "alpha blending" which causes overdraw. But we now have the option of changing that. Select the face of the plant in the build menu, go to the textures tab and select "Alpha Masking". Then type a number between 10 and 100 into the box below.

Alpha Blending allows pixels to have both transparency and colour. Alpha masking does not allow this. Pixes must be transparent OR coloured. The number you just entered above is the threshold ratio. The higher the number, the more pixels are moved from "colour" over to "transparent". This saves your computer from having to calculate this aspect and eliminates overdraw. Leading to significant performance benefits for most users. The downside is it makes lighting look harsher and as Opensim has pretty crappy shaders it can make some things look ugly. If only we had shadow maps.

More on overdraw here: SL forums: Grass Lag


5. Stay away from sculpties
I know, I know. I sell mesh so I would say that right? But its pretty hard to defend sculpties these days. You can nearly always do it better with mesh both in terms of beauty and efficiency. Consider that EVERY sculpty has 1024 Tris no matter what it is, large or small. Most sculpted items can be made with significantly less than this. Rez 10 sculpties and thats 10,000+ tris! You can build a small mansion with that.

If your still working with sculptie tools do yourself and your users a favor and stop it right now and learn Blender. It isnt that hard, if you can "get" sculpties, you can "get" mesh. and there are plenty of resources for education out there these days.

Start with:
*Camera control and interface
*Mesh editing and manipulation
*UV mapping

Then spice it up with rigging and baking once you get the hang of those 3 key areas.

Sculpties are fine for hobbyists but if your making a world designed to be visited then leave the sculpties at home!


6. Recyle
ALWAYS reuse objects and textures wherever you can. The Kitely Evergreen Island is a good example of this. Break that whole island down and I would guestimate (I didnt keep  exact count) no more than a few dozen meshes and textures were used to create it. Whatever the number it is LOW. Thats why it loads fast and responds well.


7. Tiny Textures
Just as the best meshes use the fewest number of polygons possible, the best builds and objects also use the smallest texture size to get the job done. Its easy when designing to "not see the forest for the trees" and make every texture surface super crisp and high definition. When your working on a single object its easy to get lost in the detail. But texture size has a bigger effect on load times and lag than mesh complexity.

It is also a bad trend set in Second Life (both users and designers are equally to blame here). People should understand that higher texture quality comes at a significant cost. People have developed bad habits of expecting textures to be super crisp at every zoom level. Which is ridiculous.

If you spend all day with your cam zoomed into tiny details and grumbling that the textures dont stay sharp, sorry to tell you but you should probably get outside more. Just dont put your face too close to anything or you might get cranky at the poor resolution of RL ;).

Ideally, only textures that cover large areas (such as terrain or main areas of brick/and stonework on buildings) should have 1024x1024 textures. Everything smaller can usually be done with 512x512 or smaller. In the process of designing anything, you should always ask yourself if the textures could be smaller.

Another great thread from the SL Forum archives on this issue right here. Note in particular the very useful chart on page 1, second post.

8. Know your Viewer
While all of the above is well and good, it can all get thrown out of the window when it comes to viewers. Settings in your users viewers such as LOD Level, Draw Distance and Shadows/Materials can have a drastic impact on how your users see your worlds and the performance they experience.

The only way to ensure your users see your world as intended is to recommend the viewer settings you used while building. Try not to stray too far from the default settings of whichever viewer you use to make life easier for your end users.

Many users do not realize how much control they can have via the viewers settings and it is best to recommend what you feel is essential via your website, world page and/or in-world.


I hope that was a helpful rant and I have given you some ideas for better world building!