Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Chaos's Top 5 Building tips

Chaos Bikcin
Registered User
Join date: 10 Jun 2007
Posts: 296
09-13-2007 06:20
Chaos's Top 5 Building tips

******1: Part-Invisable prims
First, you will need to make a 100% invisable texture, 1x1 pixels in size (use png, not jpeg!)
If you are making a large office block, and this office block is for display only (the avatar isnt going to go inside) then you will need to make it from a fair few prims, if the avatar goes near it, due to SL's crappy camera collision the camera may go inside, and it will look very odd.

here are a few screenshots showing what a normal office block made in SL will look like, and what happens if the camera goes inside....

http://img375.imageshack.us/img375/1026/image1hm4.jpg

http://img210.imageshack.us/img210/4204/image3jo6.jpg

As you can see if the player goes to close & turns around sometimes the camera goes inside.

In this next screenshot u will see why

http://img375.imageshack.us/img375/7321/image2ev5.jpg

As you can see the inside is textured, SL has to rez & display all those textures, even tho most of the time u don't see them, this adds to SIM lag aswell as clientside fps drop, to solve this, make a 1x1 invisable (100% transparent) PNG file, and texture EVERY none visalbe surface (also you don't have to worry about not being able to select a certian surface as SL will treat 100% transparency as not there, so u can select texture surfaces right thru an invisable surface)

now you should be able to see the office block from the outside, but not the inside.

In this screenshot it will look like 1 of the back walls is there, and one is kind of still there
http://img490.imageshack.us/img490/3559/image4iy3.jpg

You MUST texture all the tops, sides & bottoms of prims that are not visable, the left wall is not fully done, and must be completely invisable, the right one is still there, as u can see in this screenshot...
http://img490.imageshack.us/img490/7079/image5ht4.jpg

As you can see now, the camera is inside of the building, but the player is completely un-aware anything is wrong...
http://img490.imageshack.us/img490/3080/image6iu5.jpg

edit: also this solves the "dotted line" problem u get at seems

making a prim 95% transparent within SL DOES NOT WORK, it just has to render something else in and slows it down even more

******2: Prim Stairs

This is a simple trick, but is very effective at saving prims
http://img460.imageshack.us/img460/9687/image7fh3.jpg

Yes, that is only 4 prims, just make a cube, and cut it so it makes an L shape, then copy it, and DING! u have ur prim stairs

http://img460.imageshack.us/img460/9687/image7fh3.jpg


******3: The right size/texture performance

This saves SL a bit of effort, when uploading images, there size MUST be by the power of 2

So for example, 256x512 is correct, 512x512 is correct, 1024x64 is correct, 435x860 is NOT correct and 475x980 is also not correct

edit: forgot to mention 1x1 IS a valid size, as SL treats it as a color surface rather than a texture

also try to refrain from using anything bigger than 512x512, i think 1024x1024 is the max on some graphics cards and using anything bigger will make some peoples computers crash.

Also when making a small object, or a half wall, try to upload the same texuture, but resize it by half. this way it keeps SL running in ship shape. The reason people moan about SL being laggy & slow is because people are uploading photos/textures that are like 1600x1200, and using them on small objects and texturing there whole house in large textures. i cannot stress how much resizing it down speeds up SL.

Althou dont resize it to small, like 128x128 on a large wall will look blurry, u need to judge what looks good, most modern games use 512x512 on most walls/floors and other larger surfaces. where 256x256 is used on medium surfaces like beds, sofas etc. and 128x128 or 64x64 on smaller detailed objects. on avatar cloths, objects please try to stick to the smaller sizes as this will keep the sim your in's lag low


******3: Overlapping/Flickering prims

Most will allready know why this happens, and know how to fix it, but i will post it here for those who don't.

If you overlap to prims with different textures the graphics card does not know wich one to draw, so it draws both on top of each other, and you get what is called Z-Fighting in the games industry. to avoid this problem, either texture one of the prims with a transparent texture or move 1 of the prims back as little as u can


******4: The Fight of the Alpha's

This problem really is a f**ker to solve, it is NOT a SL bug, we have the same problem in the games industry, and alot of games have the same problem, but there are ways of overcoming it. and in SL it generally draws the smallest alpha first, but not allwayz

If you are making a building face with transparent windows, or a cage using alpha texures then you will know what im talking about. To fix alot of alpha problems you can just put a none alpha prim in between the two fighting objects and the problem will go away.

but in some cases this would not suffice, for example if you are making an electric guitar and have the front and back alphas, and the sides as normal prims, the back may display over the front at certian angles, the easy way to fix this is to make the back 0.01 smaller than the front, and so long as u are seeing the front of the guitar, it will all be good, the back may still have problems but you will have to just suck it up until SL decide to use DirectX only

So moaning at Linden to fix it won't help as it is not just SL that has this problem, infact if anyone here has Counterstrike and run it in OpenGL mode, look at the trees and you will see the same problem.

There are other ways to overcome this problem, but you will have to devise your own solutions. just remember sometimes placing an extra prim in between them can stop alot of the common problems


******5: Skyboxes

I'm talking about the actual sky, not the skyboxes u get in SL normally

Using a full size skybox in SL is VERY possable, the sim "Midian City" sim uses one, you will need to have your own island, or be very good at building at build very high up to use it.

*If you have your own island*
How to make a skybox (Windlight proofe) First, make your sim, or at least part of it so u know where the centre of it will be, then get the biggest megaprim sphere out and hollow it out as much as possable (95%). make sure it is phantom and not physical or it will crash the sim. texture it with a background sky texture. then to add moving clowds make another megasphere (yes the same size, the largest) and hollow it 93% and use an alpha texture as the clowds. you will have to make your sim high up to do this, otherwise when windlight finally comes out, the clowds may interfear. if you want your sim to be set to a certian time of day you can find a "force sun" script somewhere that automaticly runs when someone enters your sim. so it is allways night for example.

You can have the skybox WAY WAY bigger than your island and this is not illegal as no other island owners can see it. if you would like me to make you a skybox complete with buildings or far 3D mountines get in contact with me "Chaos Bikcin" in world. i am garantied to make a good skybox with no prims in your island, they will all be outside where no1 can reach them, althou u can select them. there will be a central invisable tiny sphere hidden just under the terrain in the middle of the sim. i charge L$2500 per build (well it does take time and effort,lol)

*If you have your own sim on the mainland*
You can still have a skybox but this will be very much more limited (within your sim boundries) and must be built high up and make sure your naighbours are ok with it!


I will add more if i think if any
Ee Maculate
Owner of Fourmile Castle
Join date: 11 Jan 2007
Posts: 919
09-13-2007 06:24
From: Chaos Bikcin


******2: Prim Stairs

This is a simple trick, but is very effective at saving prims
http://img460.imageshack.us/img460/9687/image7fh3.jpg

Yes, that is only 4 prims, just make a cube, and cut it so it makes an L shape, then copy it, and DING! u have ur prim stairs

http://img460.imageshack.us/img460/9687/image7fh3.jpg



A useful addition to this that I picked up was to overlay the stairs with an invisible ramp so that you move up them smoothly without the bump bump bump.....
Chaos Bikcin
Registered User
Join date: 10 Jun 2007
Posts: 296
09-13-2007 06:31
From: Ee Maculate
A useful addition to this that I picked up was to overlay the stairs with an invisible ramp so that you move up them smoothly without the bump bump bump.....


lol but i like the "bump bump bump"
Michael Bigwig
~VRML Aficionado~
Join date: 5 Dec 2005
Posts: 2,181
09-13-2007 07:10
Nice tips.
_____________________
~Michael Bigwig
__________________________________________________Lead Designer, Glowbox Designs
Kyrah Abattoir
cruelty delight
Join date: 4 Jun 2004
Posts: 2,786
09-14-2007 20:23
From: Chaos Bikcin

but you will have to just suck it up until SL decide to use DirectX only


I highly doubt it's just an OpenGL problem.

Both API are fairly simmilar in performances and features.
_____________________

tired of XStreetSL? try those!
apez http://tinyurl.com/yfm9d5b
metalife http://tinyurl.com/yzm3yvw
metaverse exchange http://tinyurl.com/yzh7j4a
slapt http://tinyurl.com/yfqah9u
Deej Kasshiki
Dangerously Cute
Join date: 2 Oct 2006
Posts: 90
09-18-2007 13:58
Not to mention that using a proprietary MS API will cut off access to SL for all Mac and Linux residents :(
_____________________
My tail is not wagging, I am not amused
Dan Bricklin
Registered User
Join date: 7 Aug 2006
Posts: 3
09-18-2007 14:03
sculptie stairs can be one prim :-)
Lyn Mimistrobell
(waiting)
Join date: 11 Jan 2007
Posts: 179
09-19-2007 06:59
From: Dan Bricklin
sculptie stairs can be one prim :-)


Well, 1 phantom sculpty and 1 invisible plane thru it to walk on - since the physics engine doesn't care about the sculpting. So 2 prims :)

Actually I've seen ppl use just a flat plane with a cool texture that actually made it look like it were real steps, till you change camera angle that is.


Great tips Chaos! I've used invisible faces for the walls of our underground lair. Only the inside facing sides are textured, the rest is invisible.

From: Chaos Bikcin

also you don't have to worry about not being able to select a certian surface as SL will treat 100% transparency as not there, so u can select texture surfaces right thru an invisable surface

On HUDs I always use invisible buttons, overlayed on the UI which is the texture of the root prim, and I do get touch events from those buttons. Maybe my transparent texture isn't 1x1 - could that make a difference wrt touching?


On the opengl/directx discussion... How about an option in the preferences to choose? Windows users can benefit from directx while still keeping SL available to other OSs...
Kira Cuddihy
Registered User
Join date: 29 Nov 2006
Posts: 1,375
09-19-2007 12:42
******2: Prim Stairs
This is a simple trick, but is very effective at saving prims

Would you mind walking me through on how to make an "L".. I am blonde and need to make some stairs so I don't have to fly in anymore and hit my head on the opening.
Max Duesenburg
Registered User
Join date: 13 Sep 2006
Posts: 33
09-27-2007 08:58
Hmmmm...

Making the insides of a building transparent saves on rendering does it ?

Let's see.

Second Life (last time I checked - i may be out of date) doesn't simply not render transparent surfaces - it renders them as transparent surfaces which means they will actually increase the rendering load, not decrease it. Also, having an alpha surface anywhere on a prim disables Object-Object Occlusion for that prim (according to the release notes at the time) so SL has to render all the objects in range but hidden by said prim as well. Anyhow, as far as I know SL uses 'backface culling' which means that faces which face away from the camera are not rendered at all, making the whole thing pretty much a moot point.

My suggestion would be to make your building with non alpha textures (if there's nothing inside then there's no reason to be able to see through it) and give any non-visible faces a blank texture.

Oh, and this doesn't cure the 'dotted line' problem. It will help mask the join between badly aligned prims but SL will still display the dotted line artifact from time to time. Moving your viewpoint away and back will often cure it.

As to Z-Fighting being an OpenGL problem - what patent rubbish. Under OpenGL the methodology used for successful alpha transparency involves an implementation of the 'Painters Algorithm' - This is not part of OpenGL but part of SL. Basically what it does is sort the alpha textures and draw them in order, furthest to nearest. While I haven't looked at the code in the client, from inspection it seems that SL uses a very simplistic and often inaccurate method to sort the textures and it is this that causes the problem.

AS to SL drawing the smaller texture first - What ? This simply makes no sense whatsoever. Think about it - if I put a small plant using alphas in front of a large window using alphas the plant will always seem to be behind the window if this is the case.

If the original posterr is representative of the technical available in the games industry, then the games industry is in serious trouble.

Max
Max Duesenburg
Registered User
Join date: 13 Sep 2006
Posts: 33
09-27-2007 08:59
Hmmmm...

Making the insides of a building transparent saves on rendering does it ?

Let's see.

Second Life (last time I checked - I may be out of date) doesn't simply not render transparent surfaces - it renders them as transparent surfaces which means they will actually increase the rendering load, not decrease it. Also, having an alpha surface anywhere on a prim disables Object-Object Occlusion for that prim (according to the release notes at the time) so SL has to render all the objects in range but hidden by said prim as well. Anyhow, as far as I know SL uses 'backface culling' which means that faces which face away from the camera are not rendered at all, making the whole thing pretty much a moot point.

My suggestion would be to make your building with non alpha textures (if there's nothing inside then there's no reason to be able to see through it) and give any non-visible faces a blank texture.

Oh, and this doesn't cure the 'dotted line' problem. It will help mask the join between badly aligned prims but SL will still display the dotted line artifact from time to time. Moving your viewpoint away and back will often cure it.

As to Z-Fighting being an OpenGL problem - what patent rubbish. Under OpenGL the methodology used for successful alpha transparency involves an implementation of the 'Painters Algorithm' - This is not part of OpenGL but part of SL. Basically what it does is sort the alpha textures and draw them in order, furthest to nearest. While I haven't looked at the code in the client, from inspection it seems that SL uses a very simplistic and often inaccurate method to sort the textures and it is this that causes the problem.

AS to SL drawing the smaller texture first - What ? This simply makes no sense whatsoever. Think about it - if I put a small plant using alphas in front of a large window using alphas the plant will always seem to be behind the window if this is the case.

If the original poster is representative of the technical available in the games industry, then the games industry is in serious trouble.

Max
Ann Otoole
Registered User
Join date: 22 May 2007
Posts: 867
10-05-2007 09:22
From: Chaos Bikcin
Chaos's Top 5 Building tips

******1: Part-Invisable prims
First, you will need to make a 100% invisable texture, 1x1 pixels in size (use png, not jpeg!)
(...)

Interesting. Since SL errors on any texture upload less than 8 pixels by 8 pixels I find this tip to be a bit odd. Could it be this is theoretical talk that is not based on actual experience with building in SL? Or does someone have a version of SL that allows a 1*1 pixel texture upload?
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
10-05-2007 12:16
tip 1: er no... see this discussion
/109/70/214665/1.html
(note: making hidden faces transparent in large build CAN be good if the cam gets stuck inside)

tips 2-3: spot on
with the addition that if you use a stretched sculpted stair set (the base texture must be cramped) you don't even need a second ramp prim.... CAVEAT for ramps is that steep ones will cause the av to slide/run on them

tip 4: I cant verify... see various threads on alpha sorting...

tip 5: works, and can even be used on smaller plots if you can get the sizes right (hint use cubes and hollow faces).... you can even add clouds as a separate overlay, by making just a cloud texture with alpha background, and applying it to a slightly smaller hollowed prim.... and keep your neighbors from being bothered by it by putting an "invisiprim" (search the forum for the uuid) texture on the outside of your fake sky

PS Max, could you delete your doubled post?