Jump to content

How to upload a tree to Second Life


NixSteven
 Share

You are about to reply to a thread that has been inactive for 566 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi There,

I am new to Blender and learning how to create simple things and upload them into SL. I want to create a simple tree (non-animated) and upload it to SL. I am using Blender 3.1 and so far I have managed to make a tree/leaves and apply texture to the tree trunk and branches. But I really do not understand how to do the UV mapping ( I have Alpha texture for leaves, wood texture for the trunk and the branches. So 3 separate parts) Also i'm not sure how to reduce the prim count, what physics model to use to upload. Can anyone help me to provide some guidance or some links to tutorials please?

Any help would be much appreciated. Thanks a lot!

1696371052_ShadingView.thumb.jpg.32b8d4a357098bedaf0d25976e880f09.jpg

 

image.thumb.png.792702ce3a8d86cad190345388c34c0c.png

Link to comment
Share on other sites

9 hours ago, NixSteven said:

Hi There,

I am new to Blender and learning how to create simple things and upload them into SL. I want to create a simple tree (non-animated) and upload it to SL.

That's great but... ummm... the words "simple" and "tree" don''t really go well together in SL Unless we're talking about basic "crossed sheets witha cylinder trunk" trees (and we're not), it's one of the most complicated, maybe even the most complicated, meshes we can make for Second Life and I would struggle to name ten content creators who know how to do it well.

If you're fairly new to mesh making you might want to start with something easier. But then again, if you really want a challenge...

Let's start at the wrong end since one of your questions is the easiest to answer and one that for some weird reason even many of the people on my hypotetical list of less than ten masters are struggling with:

10 hours ago, NixSteven said:

what physics model to use to upload.

99 times out of a hundred all you need for physics are three or four tris to keep people from walking right through the trunk at the base and one tri to define the outer boundaries of the bounding box. Physics model in red:

image.png.75f94e7a738d46a6d3da0498138f1065.png

Seen from the top:

image.png.bd6e2af0f486663ed096e3fff862aa1d.png

As you see, the physics model doesn't match the trunk exactly but that's ok. Nobody will notice.

Sometimes with very bent trees you want people to be able to walk a little bit up the trunk. In those cases you need a slightly more complex physics model, something like this:

image.png.574e6b0f0746326a697c029ca6730a35.png

Still very simple and it still doesn't have to follow the visual model very precisely.

That's all there's to it. If you want more advanced "climbability" you will have to do it with a script and an animation anyway and then the physics model doean't matter.

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

Part 2

12 hours ago, NixSteven said:

But I really do not understand how to do the UV mapping ( I have Alpha texture for leaves, wood texture for the trunk and the branches. So 3 separate parts)

I think we should look at the foliage separately so this is all about trunk and branches. There are some exceptions but usually you don't need separate textures for them.

This is a very simple example to illustrate the basics.

A tree trunk is basically a distorted cone - or a cylinder with one end collapsed into a point if you like - with a couple of edge ring added along it to adjust the diameter and add some distrotions:

image.thumb.png.d72f670645505a3d0065cd604576c321.png

A branch is just a small "trunk" attached to a bigger one so it can be treated exactly the same way.

The simple way to UV map it, is something like this:

image.png.617bd0961c691f328cb9adcb96284d7b.png

There is point in making it more complicated. It's a good idea to do the UV mapping before you start twisting and bending those edge rings; it's much harder to do it later. UV mapping at this early stage of course means that the texture will end up a bit distorted in several places but that's fine. In fact it's a good thing since it adds life and variety to the trunk texture.

I would strongly recommend that you use a seamless tiled texture for the trunk. You don't really need the bark texture to be different all the way from top to bottom and besides, even a 1024x1024 doesn't really give you enough pixels to cover the entire trunk at a high enough resolution.

Here's the trunk with some bends and adjustments of the edge rings and with a birch bark texture with six vertical repeats:

image.thumb.png.63ea44321c5e8ee08e85f4ec74c2c2e8.png

Sometimes (quite often actually) you want to add a bit of extra variety right at the root. My solution to this is to use a separate texture for the lowest segment of the trunk, one that blends with the main bark texture at the top but not at the bottom:

image.thumb.png.5df01d81a2363bd6d99d7b93115e9922.png

Here are the two textures I used for it (scaled down to keep people from ripping them off the forum):

image.png.a10b986af59df1598babbf95f70d2107.png

As for the branches, as I said, they are essentially just "small trunks". You want to adjust the vertical scale a bit ... no I mean a lot ... to reflect their smaller size but that's all. Something like this for example:

image.png.8e4d01d646da233d81b287e605aed715.png

Adding a medium sized branch textured like this to the tree:

image.thumb.png.2ba3070d3432b2e4b69cd6a8e7de5933.png

Oh, maybe that one's a bit too big but oh well, it's still only an early sketch so easy to fix.

I think that's all you need to know about textruing trunks and branches but if I overlooked soemthing or didn't make it clear enough, please ask!

  • Like 3
  • Thanks 2
Link to comment
Share on other sites

Hi ChinRey,

Thank you sooo much for taking your time to explain things nicely and detailed. Your tips are very helpful. Now I need to learn how to make that physics model you illustrated. Yeah I think I should just try to make a simple tree like you without many branches. I would appreciate if you can tell me how to do the UV map for alpha leaves. So I will have 3 different UV maps?(main tree, branches and leaves)

Thank you so much for your kind help again!

 

 

Link to comment
Share on other sites

1 hour ago, NixSteven said:

So I will have 3 different UV maps?(main tree, branches and leaves)

You need to do everything in one single UV map data object in Blender because SL is limited to one map per object, but it's okay to overlap the UV layouts of different materials if they use different textures, like the leaves and trunk in this super-simple example.


image.png.f7d8f51225835bba29c472a3edc7e092.png

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

3 hours ago, NixSteven said:

I would appreciate if you can tell me how to do the UV map for alpha leaves.

Oh yes, that was the next step and it's very simple and a bit tricky at the same time. That is, the UV mapping as such is very simple, all you need is a couple of identical flat panels covering the entire UV space:

image.png.550b8dcd081d738c50ce36140d8717b2.png

And since SL doesn't support backfaces yet, copy all the foliage panels (as the last step before you export from Blender) and flip the normals for the copies.

You may or may not want to split some or all of the panels and bend them a bit (remember to use smooth normals) in various ways, such as this for example:

image.png.cb308792cb19139be50ecb0717a17546.png

or like this:

image.png.e8443600d441d4958462e0576dd4952f.png

There are also lots of other ways to bend the panels. I usually keep them flat to save on tris and LI but sometimes you can't and sometimes bent panels are the most triangle/LI efficient solution.

Don't bother with fancy outlines of the panels, a square is what you need. Anything else is just a waste of tris or (if you go for the single triangle option) pixels.

Here's the panel with a texture applied:

image.thumb.png.21c5bff92b911adeb0ee3839c598bbc5.png

 

Alternatively, you can use a radial foliage configuration with the branches spreading from the center rather than from the bottom like this:

image.png.eafe139d3a56f947e26be49877edc211.png

(This texture is based on one by Followmeimthepied Piper who has generously given me permission to use it any way I like.)

Both alternatives have their pros and cons and I use both for different trees.

Btw, notice that the transparent parts of the textures are green. It's a very good idea to keep the transparent pictures in a colour close to what their opaque neighbours have since they will influence the colour of opaque pixels in the lower res textures generated by the viewer.

---

As I said, the UV mapping is simple but that is just one part of making a good foliage. You also have to decide how big those panels are, where to position them and of course you have to make or find a suitable texture.

Smaller panels make it easier to control the shape of the canopy and avoid noticeable edges but larger panels offer more foliage with fewer tris. I usually go for panels between 4x4 and 6x6 m, sometimes as low as 3x3 m, sometimes as big as 8x8 m. That is much bigger than what any other tree maker I know of uses and it means I have to be much more careful how I position them. But to me it's worth it. Look at this for example:

image.thumb.png.364d9f0d2fe2aaa9946ddd58734e31d6.png

(avatar underneath it for size comparasion)

It only has 52 flat foliage panels - 208 tris. The trunk has 170 tris so 378 in total. With good optimisation and proper LOD models all the way, it ends up at 7 LI which I at least think is quite acceptable for a 23.5 m tall tree as complex as this.

---

Oh, there is one cool foliage UV mapping trick that can be useful sometimes. I won't tell you though, you have to figure it out yourself. 😉

Look at this tree:

image.thumb.png.5364454f2afe9e529f1fb6f9c97b1432.png

36.5 m tall, dense and fairly detailed foliage, perfect LOD, uses the same textures as the one in the previous picture and the land impact is... 2. ^_^

Edited by ChinRey
Typos
  • Like 3
  • Thanks 2
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 566 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...