Jump to content

terrain import/export - issues


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

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

Recommended Posts

I think I have figured out the terrain puzzle. Say you want terrain that is 60 meters above the ocean with two other levels that are at 40 meters and 20 meters. Then one solution could be R = 240, 160, 80 with a G = 32. The G channel is set to 32 where 240*(32/128) = 60. This would lead to a gain of 0.25 or 240*0.25 = 60. 

Here are some files that might help you based on the flatgreen.raw file that is talked about in the YouTube video above ...

https://www.ivytechengineering.com/SecondLife/files/60m_flatgreen.raw

https://www.ivytechengineering.com/SecondLife/files/terrainheight.xlsx

 

60m_flatgreen.png

Edited by IvyTechEngineer
  • Like 1
Link to comment
Share on other sites

On 2/23/2022 at 6:28 AM, ChinRey said:

No there isn't as far as I know. If there is, I'd love to know about it too.

I think the best solution if you want to convert a SL terrain to mesh is to use JVTEK. It can only do 32x32 m patches and makes them in 1/10 size but merging and resizing the meshes is no big deal. Just remember to do it in that order, first merge, then resize.

Alternatively, install Sim-on-a-Stick (SOAS) and L3DT. Both are freeware and may be useful for other things to. Import the RAW file into SOAS, export as a .ter or .r32 file (I recommend .ter since .32 files may end up rotated), import into L3DT and export as mesh (.dae).

I'm afraid getting the terrain back into Second Life is even more cumbersome. What you have to do is create a 32 bit 255x255 (not 256x256!!!) .r32 heightmap in Blender (how to do that is more than enough for a whole post here alone), import to L3DT, export as .ter, import to SOAS and export as .raw.

Please note that the terrain you end up with will not be exactly the same as the one you started with. Converting aan SL terrain to mesh works fine with either of the two methods I described. The JVTEK way is probably the most precise since L3DT will try to simplify the mesh. But I've yet to find a way to convert a mesh to SL .raw terrain with any kind of precision. The method I described is the most reliable one of those I've tried but you still have to expect up to half a meter margin of error.

Edit:

One solution is of course to do it the way Chic suggested, simply upload the mesh and use it as the ground. The problem is that the raw ground mesh of a sim has 131,072 tris and that means more than 5,000 LI. So you have to simplify the mesh without loosing essential details. This is not hard to do for a skilled mesh maker and usually you can reduce it down to 300-400 LI - sometimes even less than 200 - but it's a lot of tedious work since much of the simplification would have to be done manually. You'd also have to make custom textures for the mesh ground of course (oh and also custom normals to hide the edges between the elements but that's not a big job). I once had the idea to offer to do this on comission but even though I have the routines down pat now and can work very efficiently, it's still a week or so of full time work and I can't imagine there'll be many people in SL who can really pay me for all of those working hours.

I was reading an old post in on Bundysoft (L3DT) and a guy wrote a script that might help convert the terrain.raw file.

http://www.bundysoft.com/wiki/doku.php?id=scripts:import_opensim_raw_file

http://www.bundysoft.com/phpBB2/viewtopic.php?f=4&t=2718

These are pretty old posts, maybe 2013.  

 

 

terrain.png

  • Like 2
Link to comment
Share on other sites

Another riddle - I was able to create several dae models using two different terrain files. One with the original terrain and the other one with a terrain that only had the mountain island in it. Both could be uploaded to SL with any issue. Then I tried to reduce the mesh to only the mountain island and tried to upload it.  I did not do anything but delete or dissolve vertices, lines or faces and when I export as a DAE and try to upload I get this error.

https://www.ivytechengineering.com/SecondLife/files/mountain_only_terrain.dae produced by L3DT (cost L$17 for upload 5879 Tris and 2992 vertices but Major Land impact 200

https://www.ivytechengineering.com/SecondLife/files/mountain_only_terrain.blend Blenderr File

https://www.ivytechengineering.com/SecondLife/files/mountain_only_terrain_Blender.dae DAE model works fine for upload (cost L$18 for upload 5879 Tris and 3001 vertices but Major Land impact 205

SL sets the scale to 0.251 which lead to a 63.9x63.9x11.257

https://www.ivytechengineering.com/SecondLife/files/more motorA.blend Used Blender to reduce the mesh and mirror the mountain around the Y axis

https://www.ivytechengineering.com/SecondLife/files/mountain_onlyA.dae Fails to upload 5687 Tris and 2895 Vertices according to Blender

This one scaled to to 10% but still doesn't upload. Suggestions?

mountain_onlyA2.png

 

 

SL_Upload_Error.png

Link to comment
Share on other sites

46 minutes ago, IvyTechEngineer said:

https://www.ivytechengineering.com/SecondLife/files/mountain_onlyA.dae Fails to upload 5687 Tris and 2895 Vertices according to Blender

This one scaled to to 10% but still doesn't upload. Suggestions?

The reason for the parsing error is because the X Y and Z scale of the object is  -1 instead of 1 (plus the X Y and Z rotations should all be at  0° before exporting).

In Object mode select model and open the Apply menu with Ctrl A and choose the All Transforms option.

After Apply scale and rotation you will need to Flip the face normals. In Edit mode and all of model selected Alt + N > Flip.

1.thumb.png.5f4bcd2555e2464c539af86406b7a997.png

Edited by Aquila Kytori
  • Like 1
Link to comment
Share on other sites

I last worked with terrain files in OpenSim, like 2010. At the time OS and SL used the same terrain files, RAW.

At the time Photoshop did not handle RAW files without a plug-in.

Photoshop 2022 includes RAW files in its list of built-in file formats.

Link to comment
Share on other sites

Thought I would go back and try to draw this up in Blender following Aquila's suggestion. Using the info previously provided in the YouTube video I was able to draw an outline of the island mountain with very little problem. Then I added some addition ridges that were near the edge of the island. I was even able to extrude and scale the mountain and did some smoothing but I am a little stumped on adding the ridges and slopes on the lower part of the island. Maybe I can use a Bevel?

Step 1a3.png

Link to comment
Share on other sites

16 hours ago, IvyTechEngineer said:

Thought I would go back and try to draw this up in Blender following Aquila's suggestion. Using the info previously provided in the YouTube video I was able to draw an outline of the island mountain with very little problem. Then I added some addition ridges that were near the edge of the island. I was even able to extrude and scale the mountain and did some smoothing but I am a little stumped on adding the ridges and slopes on the lower part of the island. Maybe I can use a Bevel?

See my previous post:  "draw" out the outline of the island, "draw" out contour lines for ridges and base of mountain, fill in with tris and quads, then extrude up.

16 hours ago, IvyTechEngineer said:

Maybe I can use a Bevel?

To create/add more ridges etc use whatever method you like to add the extra geometry so that you can extrude the relevant vertices up a little.

Looking at your very low poly mesh as it is in the screenshot I think i would use the knife tool to add the new contour edges but if it works with bevel then go for it. :)

 

 

You went to alot of trouble to learn how to successfully import your sim terrain into Blender and now you go back to the hand drawing the island ?

What didn't you like about the imported terrain ? Was it the high LI when brought back into SL ? Around  LI = 200 for the 2,895 vertices/5,687 tris. island version.

Did you try reducing the poly count using Blender decimate modifier ?

After decimating at a ratio of 0.2292 (see screenshot below) and then some further reduction by removing the unnecessary  triangles around the base of the island followed by merging vertices from around the sides until the tri count was 990 , I exported, uploaded (using High LoD for Physics and not Analysing in Step 2) I had the LI cost down to 45.

If this is a acceptable LI cost for you then I would suggest you use the Decimate modifier instead of creating the island from scratch. Simpler and quicker to do and the result will be a more accurate representation of the original island.

 

Comparison-min.thumb.png.73dee885e270807c70e6e8ff0dc72b4f.png

 

In Object mode > Decimate modifier > watch the effect on the model as you reduce the Ratio slider :

498456371_Decimatemodifier-min.thumb.png.0c2a5c3ab94fa6a80d50d365a156577a.png

 

Clean-up-min.thumb.png.0cbd6aa59854e4d07c4b0caf230e1a56.png

Edited by Aquila Kytori
Link to comment
Share on other sites

2 hours ago, Aquila Kytori said:

Using the Knife tool in Blender to add geometry for new ridges and slopes.

Example:

1-min.thumb.png.6fdd0ef97bc77e9ed1fc7155ed1435ed.png

 

2-min.thumb.png.82e4fb20684653c73cd868bc8827ff09.png

3-min.thumb.png.f5a5033fe8c920ae2edee169b3436311.png

 

4-min.thumb.png.12ececd4cffa4ce7985c2f7b779b4e69.png

 

5-min.thumb.png.37e15651ead5a50a4515a57432150801.png

 

6-min.thumb.png.115e68f2110ff12cb1f329d8929a2c76.png

 

7-min.thumb.png.e981d343e162195ba4fd3325bc4aad37.png

Tweak vertices as needed.

I was pretty much ok with the cost L415 but the land impact was 128 and download was 128 (Tris = 3517, Quads = 2041). I thought if I drew it in Blender I could reduce the impact and maybe even use it for a physics model. Also, my original desire was to make a mesh model with the least amount of pain. Since SL has been around a while I figure that it would be easy but it was not. In Addition regarding my switching back to drawing it in Blender, I wanted to respect your initial response since you have been so extremely helpful. Both you and ChinRey as well as others have helped me and I appreciate it.

I did no decimation on the terrain based model so I could reduce the mesh complexity even more but I still need to texture the drawing. I will review your suggestion above and thanks you so much for taking the time an effort to help educate me, lol.

Link to comment
Share on other sites

6 hours ago, IvyTechEngineer said:

I was pretty much ok with the cost L415 but the land impact was 128 and download was 128 (Tris = 3517, Quads = 2041

Just to be clear whenever I have referred to the LI cost I was not talking about the L$ cost of upload but the Land Impact cost. The Land Impact cost is taken from either the Download cost or the Physics cost, which ever of the 2  is the highest.

You will almost certainly get a lower Download and Physics costs if you create the island from scratch using the "draw" (extrude) vertices method. As shown in the examples above, for the draw method LI was 19 (taken from the Download cost of 18.7) compared to decimated version LI cost of 45 (taken from the download cost of 44.5). You could reduce this a little more with more decimation and manual tweaking ......... the choices are all yours. :) 

 

Comparison-min.thumb.png.fcf633885df6d5e5685cfdc9f28c39ad.png

Edited by Aquila Kytori
Link to comment
Share on other sites

On 3/10/2022 at 6:45 PM, Aquila Kytori said:

Using the Knife tool in Blender to add geometry for new ridges and slopes.

Example:

1-min.thumb.png.6fdd0ef97bc77e9ed1fc7155ed1435ed.png

 

2-min.thumb.png.82e4fb20684653c73cd868bc8827ff09.png

3-min.thumb.png.f5a5033fe8c920ae2edee169b3436311.png

 

4-min.thumb.png.12ececd4cffa4ce7985c2f7b779b4e69.png

 

5-min.thumb.png.37e15651ead5a50a4515a57432150801.png

 

6-min.thumb.png.115e68f2110ff12cb1f329d8929a2c76.png

 

7-min.thumb.png.e981d343e162195ba4fd3325bc4aad37.png

Tweak vertices as needed.

I was pretty much ok with the cost L$15 but the land impact was 128 and download was 128 (Tris = 3517, Quads = 2041). I thought if I drew it in Blender I could reduce the impact and maybe even use it for a physics model. In Addition, I wanted to respect your initial response since you have been so extremely helpful. Also, I did no decimation on the terrain based model so I could reduce the mesh complexity

Link to comment
Share on other sites

2 hours ago, IvyTechEngineer said:

I was pretty much ok with the cost L$15 but the land impact was 128 and download was 128 (Tris = 3517, Quads = 2041). I thought if I drew it in Blender I could reduce the impact and maybe even use it for a physics model.

The only solution is to reduce the triangle count. As I said before, with objects as big as this there is almost direct connection between triangle count and downlaod weight and the oly way to reduce LI is to elminate tris and vertices. It doesn't matter how the model is made and reducing the LOD models won't help either.

However, as you see from Aquila's illustrations, with a good texture you can reducde the geometry far more than you think without ruining the end result.

There is also another trick that may work. Look at Aquila's picture of the island with textures:

On 3/11/2022 at 9:43 AM, Aquila Kytori said:

Comparison-min.thumb.png.fcf633885df6d5e5685cfdc9f28c39ad.png

Aquila is right in that there is some room for further reduction even to the version to the left. If you're willing to spend the time it should be possible to get it down close to, maybe even below, 300 tris. In either case it is perfectly good as a phyics model too, no problems there.

But then there are the small peaks on the model to the right. They do add quite a bit to the looks and it's a shame to loose them. The solution is to make them as separate meshes. They shouldn't need more than 20-50 tris each so 1-2 LI each. I know it sounds a bit counter-intuitive to split meshes like this but the way mesh works in SL has a tendency to defy logic and it's amazing how often "strange" solutions like that help.

  • Like 1
Link to comment
Share on other sites

Thanks, I have wondered about building multi-mesh models and then linking them in world. Decimation was really one of the first things I was exposed to with Blender. I was also thinking about textures for the model and how a terrain has 4 textures based on elevation. Maybe multiple models could improve the texturing of the model. 

Link to comment
Share on other sites

On 3/10/2022 at 6:45 PM, Aquila Kytori said:

Using the Knife tool in Blender to add geometry for new ridges and slopes.

Example:

1-min.thumb.png.6fdd0ef97bc77e9ed1fc7155ed1435ed.png

 

2-min.thumb.png.82e4fb20684653c73cd868bc8827ff09.png

3-min.thumb.png.f5a5033fe8c920ae2edee169b3436311.png

 

4-min.thumb.png.12ececd4cffa4ce7985c2f7b779b4e69.png

 

5-min.thumb.png.37e15651ead5a50a4515a57432150801.png

 

6-min.thumb.png.115e68f2110ff12cb1f329d8929a2c76.png

 

7-min.thumb.png.e981d343e162195ba4fd3325bc4aad37.png

Tweak vertices as needed.

There was another YouTube video that I found that described using the Knife. It really was the first approach I used. I have done some of what you have said but I am a little slow at some of the details. Blender is a great free tool that has so many possibilities. I still have not used the join option and still have not figured out how you move am edge up to create a slope. This is not an extrude along z. I figured it out you grab the lines and just move them up along the Z axis. I notice that most of the faces I see in your model are tris, are they easier to work with when building a model? 

Link to comment
Share on other sites

On 3/15/2022 at 3:25 PM, IvyTechEngineer said:

I notice that most of the faces I see in your model are tris, are they easier to work with when building a model? 

Noo no........

The reason I triangulated my island before explaining about using the Knife tool to create ridges and slopes was to closer match your model in your screenshot.

If you check again my original post you will see how the island was mostly quads. Tris used to reduce geometry when filling in  or to control some of the ridges :

7-min.thumb.png.0bb5fd205f8ec9934cd81806fb16aa48.png.6df643524f53a91d3eda6d011d978516.png

Always try to create your models using quads. Triangles in the mesh break edge flow and can cause shading problems.

This 64m island terrain mesh is a special case.  Because it is so large, as Rey mentioned above, every triangle counts. There is no opportunity to control the LI cost by messing about with the lower Lod models. Zeroing them out to minimum or using the High LoD model in all the lower LoD slots will have the same effect, none. Here we don't have to worry about edge flow just vertex and tri count.

A typical model for SL would look more like the little tugboat in the image below. All quads during construction except some triangles used in filling in circles to produce disk shapes.

The tris you see in the hull and cabin walls were introduced only at the very end of modelling and are a result of a little bit of optimization.

So much easier to work with quads. Every time you extrude an edge(s) it creates a quad(s). Working or editing a typical model that has been triangulated or is mostly tris will drive you crazy.

Tugboat_quads-min.thumb.png.bfa145806bbc44acc31d6956645b1023.png

 

On 3/15/2022 at 2:22 PM, IvyTechEngineer said:

I was also thinking about textures for the model and how a terrain has 4 textures based on elevation.

Yes texturing will be the elephant in the room ! :)

 

I remembered a thread from 2017 when Chic was making some large terrain meshes :

 

 

5a24d982c1302_cliffsbetagrid.thumb.jpg.b734c1352d65274573b70e710fc042ab.jpg.cbecd7c223ffd563c17adf8d015dd984.jpg

 

Perhaps @Chic Aeon can give some tips on how she went about UV unwrapping and texturing the models ?

Edited by Aquila Kytori
  • Like 2
Link to comment
Share on other sites

3 hours ago, Aquila Kytori said:

Perhaps @Chic Aeon can give some tips on how she went about UV unwrapping and texturing the models ?

A long time ago for sure. If I remember correctly I unwrapped them with just two materials,  BUT the texturing was not automatic by any means, while I don't normally fiddle around in my graphics program much on the textures, THIS was a big job of softening the lines.   So the parts that are mostly gray rock were one material and the parts that are moss another.  Basically like an archery board with concentric circles although very freeform. THEN I went back and "stamped" (in my graphics program) one texture onto another to mix and "blur" the lines.  It was a LOT of work.   

 

Hope that helps some.

 

And @Aquila Kytori -- super cute little boat. Made me smile.

 

 

 

And 

  • Thanks 1
Link to comment
Share on other sites

Thanks for everyone's help and feedback. The path to an understanding how to build a descent mountain based on an existing terrain has been surreptitious and nonlinear. I was a little surprised and had to learn how to use Blender (more), L3DT, Photoshop, etc to get something that was "good enough" and I am not done, lol. Doing some of this work is not for the faint of heart. You need time and a lot more than just Second Life to build something like a mountain. Even just getting the info from the existing terrain.raw file was difficult (got lead astray by a YouTube video that was not totally correct). I am working on getting Opensim setup (to view terrain.raw files) and still want to explore Meshroom (to build mesh models from photographs). 

Again, thanks for your help

Link to comment
Share on other sites

2 hours ago, IvyTechEngineer said:

Did some more work in Blender and this is what I have so far. Not exactly what I want and still need to add some texture.

Picture1.png

Before you go forward I suggest just TRYING (not uploading just looking at ) the download and physics (assuming you want to be able to bump into your mountain) in the Linden uploader.  You can easily tell if your model will have too much land impact for what you want. Make sure you have the correct SIZE designated when you test the numbers.

 

Opensim isn't going to help you much with the land impact cost as the numbers are VERY different from Second Life ones -- and the physics is different also in many cases.    OS is fine for testing textures.   You can of course (maybe) use the Aditi beta grid if it is indeed open again for "new folks" (not sure where the line is drawn there and if you are new and haven't used it before :D ).

 

 

Link to comment
Share on other sites

5 hours ago, IvyTechEngineer said:

I am not sure if this is the right place to ask a stupid question but someone told me the multibutton hot key to hide your avatar.  Any ideas what that command is, I wanted to take some more pictures of my terrain without the avatar.

Ctrl+Alt+Shift+4 (also accessible via Advanced > Rendering Types from the top menu bar.)

https://wiki.secondlife.com/wiki/All_keyboard_shortcut_keys

Edited by arton Rotaru
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 465 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...