Jump to content

Prim to Dae


Paul Hexem
 Share

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

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

Recommended Posts

So, I know it's possible to take prims, export them as .dae, and upload them again as mesh. It's a quick, easy way to take advantage of extra features that mesh offers while still using basic shapes.

I'm curious though. The textures (UV wrap?) seem to get fouled up in the process. Is there an easy way to overcome this, or is the only option to unwrap by hand in external 3D software?

Link to comment
Share on other sites

I would say (being a total Noob on this subject)… Unwrapping in Blender and 'fixing' would be the answer.

Altho… I did notice with recent FS 6.0 update that it's recommended to use SL ONLY version of FS 6... IF you are going to upload mesh. Dunno if that's an issue affecting UV mapping or not. I don't have any 'test' experience to tell about.. just noticed that and I need to downgrade FS because I usually install full versions)

Link to comment
Share on other sites

1 hour ago, TechDave said:

I would say (being a total Noob on this subject)… Unwrapping in Blender and 'fixing' would be the answer.

Altho… I did notice with recent FS 6.0 update that it's recommended to use SL ONLY version of FS 6... IF you are going to upload mesh. Dunno if that's an issue affecting UV mapping or not. I don't have any 'test' experience to tell about.. just noticed that and I need to downgrade FS because I usually install full versions)

I always find that importing a dae that has been exported needs a new UV made in blender (or something expensive).  Just importing to blender, and making a smart UV unwrap is occasionally enough for something simple.

The warning in FS 6 Beta is because the opensim version doesn't use Havok, for IPR reasons, and so the uploader is not necessarily as good.  I use Linux, so this is important, because Linux versions of FS don't use Havok either.   I found, for instance, that a linkset of meshes imported via the Linux FS 6Beta came in at 1.7 download-dominated&analyzed LI, whereas the Havok-based Windows FS6Beta run under Wine (allows running native Windows apps in Linux) came in at 1.5.  But there was nothing else wrong with the non-Havok upload.

I now use Wine/Windows FS6 for all uploads, despite it being a PITB.  The native Linux FS6 is fine for actually experiencing SL although it always reports lower FPS than the Windows one.

YMMV.  Only Beq can explain it properly.....

 

Edited by anna2358
typos
Link to comment
Share on other sites

I'm not sure why you're getting textures messed up, I've used this method a few times and had no problems, both with one-texture per face and with one texture mapped across several faces, but I think I've always used default mapping, not planar. Is this possibly the source of your problems?

Link to comment
Share on other sites

Default only ever work on one face, planar almost works but it's a mess.

3 steps

1. Make an object out of more than one prim. A TV screen with a stand, for example. That's say, 4 prims. Alpha the hidden faces to save rendering, and export.

2. In Blender, join into one object, save it as a single mesh object. 

3. Import into SL and try to texture it. 

Without manually unwrapping, only one or two faces will be able to have decent textures at all, default or planar. 

Unless you know a trick I don't for fixing the textures. 

Link to comment
Share on other sites

I am not sure what extra features you are after exporting and then importing but it really isn't a good idea WITHOUT CLEANING UP the files m-- and for tons of reasons that have been mentioned here before.  If it is just lower land impact you can often just change the prims (simple prims not tortured) to "convex hull" and get the land impact change.  

 

Link to comment
Share on other sites

Most of what I do has to do with scripting, faces per link and whatnot. That's not the point. Although if you have links I'd love to read them. There's no stickies, makes it hard to find relevant info.

But what I'm talking about is essentially cleaning up the mesh. I was wondering if there's an easier way to do it than by hand. Profaitchikenz apparently has a way but failed to share it.

Link to comment
Share on other sites

14 minutes ago, Gadget Portal said:

I would have thought the wrapping would have been exported with the rest of the data.

It is, I believe. But the fact that you have 9 property wrapped materials won't prevent one of them from dying on upload.

And if you manually UV unwrap with default settings, you're almost guaranteed to not keep the UVs as you'd expect. There's no easy fix because you HAVE to merge materials together. If you want them to look identical, it's gonna take some work. 

Edited by Wulfie Reanimator
  • Thanks 1
Link to comment
Share on other sites

If you look in the materials tab in Blender at a cube you have saved via a 3rd party viewer, you will see that  it divides the exported cube into six materials, not one.  So not only do you need to get rid of the doubles and the extra vertices of each prim, you need to remap and reassign materials.  Basically the prim export is most useful for SIZING when you are making mesh, not for actual USE as a mesh object.  

I don't know of any easy way to remap correctly other than by hand.

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

2 hours ago, Gadget Portal said:

And in my case, more control over materials/faces per link for scripting. 

I have scripted texture change faces and the like in both prims and in mesh and I honestly don't see a big advantage in mesh UNLESS you want to take small sections of a single mesh and make that a material (hence a "face"). So if you had a face say and had circles for "rosy cheeks" you could use the material for that area and script the -- let's say doll -- blushing.   

BUT I don't see how something like that relates to exporting prims and turning into mesh.  So I guess I am confused. Hope it works out for you.

Link to comment
Share on other sites

On 12/21/2018 at 6:23 PM, Gadget Portal said:

Profaitchikenz apparently has a way but failed to share it.

I'm ever so sorry, I thought you were already doing it? 

In SL, build and texture, link.

Export to DAE (you might need to use a TPV for this step)

Import again as a mesh model and re-apply the textures.

You now have a cluster of meshed prims, textured, with the added privilege of having paid for them :)

As you have said, hiding some faces in the export stage reduces the number of textures required, which theoretically reduces the load on the graphics card. but apart from that I've not found many instances where this method was better than using in in-world prim-to-mesh maker.

Edited by Profaitchikenz Haiku
Link to comment
Share on other sites

  • 4 weeks later...

Coming to this rather late in the day.

On 12/21/2018 at 2:13 PM, TechDave said:

Altho… I did notice with recent FS 6.0 update that it's recommended to use SL ONLY version of FS 6... IF you are going to upload mesh. Dunno if that's an issue affecting UV mapping or not. I don't have any 'test' experience to tell about.. just noticed that and I need to downgrade FS because I usually install full versions)

 

as @anna2358 stated this is a licensing issue. I would like to correct a misunderstanding here though " I need to downgrade FS because I usually install full versions". The OpenSim edition is the downgraded version in technical terms and it frustrates me that many people use that version even if they never use OpenSim. You should use the dedicated SL version unless you have a good reason not to, the only good reason is that you are using OpenSim. The OpenSim version cannot use the Havok license and thus is less functionally complete. It is harder and harder to keep OpenSim and SecondLife together with the lab actively creating new projects such as Animesh, BOM and EEP that are not available on OpenSim (though I have heard a rumour that Animesh is coming to OpenSim). 

In the case of Linux, it is more nuanced, as even on an SL specific version there is no Linux version of Havok available to us, this may change if we can get enough contributed effort for the Lab to reincarnate their Linux viewer. Linux is sadly hanging on the thread of support at the moment, Vivox dropped voice support for Linux a few years ago and luckily most of the updates since have remained API compatible but should there be a significant change in the future Linux will lose native voice (wine to run SLVoice,exe is probably the workaround but cross that bridge when we come to it)

As for exporting of prims to mesh, the UVs should be fine but it will depend on the operations that you perform and (as noted elsewhere) ensuring that the linksets are constructed to keep within the limits (8 textures etc) in such a way as to allow them to be imported without the uploader taking it's rather brutish actions. When exporting, it is important to make sure that you tick the box marked "consolidate texures", this will ensure that the same material used in different prims will be tagged with the same material ID in the exported DAE. You can test this easily.

  1. create two cubes
  2. set the top face of each to RED
  3. set the front face to BLUE on one and Green on the other.
  4. "save as collada" leave "consolidate textures" unchecked.

Load in Blender (file->import collada) and click on the objects, (they are separate objects initially) You will find that the first has Material-0 Material-1 Material-2 and the second has Material-3 Material-4 Material-5. Ctrl-J to join them and you resulting object has 6 materials.

Repeat step 4 but this time tick the "consolidate textures" box. 

768d6cc0c0cedc8a2c25432073f259d1.png

Load into Blender again and you will note that the individual prims not share Materials and when you join (Ctrl-J) the resultant Mesh has just 3 materials.

If you work a lot with Prims (I use them frequently for prototyping and establishing scale or for matching a new build to something inworld, then one of the inworld prim2 mesh tools (Mesh Studio and MeshGenerator are the best known there are others as well) can be a worthwhile investment. These tools use an external server (and as such are dependent on 3rd party services which may one day vanish) and produce a far cleaner mesh than a simple "save as" does. for example in MeshStudio you can set the resolution to 2 for straight edges which removes all the unnecessary vertices that you get with a normal prim , it also allows you to set the "resolution" of curved edges, which is useful for making a nice LOD or physics model. By default a curve replicates the SL standard of 24 sides to a circle. if you make this 8 then it will generate octagons.

As stated, these tools are dependent upon an externally provided service, both of them have been very stable lately (though we did just have an outage on MeshStudio but it was the first for over a year as far as I know and it is back now). A couple of years ago, an earlier version of MeshStudio was giving more frequent problems and I wrote a short tutorial for people who felt paralysed at not having the tool they use available and lived in fear of Blender. It explains how to clean up a simple prim export without destroying the UVs, while also explaining why the tools still have value.

The blog is here http://beqsother.blogspot.com/2016/07/what-did-mesh-studio-ever-do-for-me.html

The "Save as"  cleanup in Blender is mostly covered in the embedded video 

 

 

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

On 1/15/2019 at 6:58 PM, Christhiana said:

If you have to start redoing the unwrapping, I wonder if it isn't better to learn to model in blender in the first place.

That's true, but as Beq says, sometimes an exported mesh is a good quick way of getting scale and fit.  The other reason is to collaborate with someone else on a build, where one of you roughs out the ideas in SL, and the other refines them in Blender.  Given the massive skill (and nomenclature) investment required to use Blender effectively, this works very well.

Having made the investment in Blender skills, I'm not sure if I will continue with it now the new version changes everything in the interface.  Looks terribly like change for change sake to me.

  • Like 2
Link to comment
Share on other sites

1 hour ago, anna2358 said:

That's true, but as Beq says, sometimes an exported mesh is a good quick way of getting scale and fit.  The other reason is to collaborate with someone else on a build, where one of you roughs out the ideas in SL, and the other refines them in Blender.  Given the massive skill (and nomenclature) investment required to use Blender effectively, this works very well.

Having made the investment in Blender skills, I'm not sure if I will continue with it now the new version changes everything in the interface.  Looks terribly like change for change sake to me.

You have a good point there. I like to design with prims as well so I can get a feeling of scale and proportion inworld first. But I seldom export. I just take the measurements and rebuild in blender. What I really meant is that the unwrapping part is more difficult to learn (well) then the modelling itself. I think that with the current blender interface the learning curve isn't as steep anymore as it was with blender 2.49. There are so many tutorials to help you get started nowadays. I think a lot of people shy away from learning blender because of it's bad reputation.

 

I'm not so thrilled about the UI changes in the new blender as well, but as with previous version I'm sure it's for the better. I do look forward to some of the new features though. One I actually really look forward to is the ability to edit multiple objects at once. Of course you don't have to start using the new blender right away. You can keep using the current version as long as you like and experiment with the newer version in the meanwhile (or not).

  • Like 1
Link to comment
Share on other sites

8 hours ago, Christhiana said:

I'm not so thrilled about the UI changes in the new blender as well, but as with previous version I'm sure it's for the better.

I am really enjoying using Blender 2.8. From a UI and interaction perspective the biggest change for those of us who've been at it for years is the switch to left mouse select. I actually turned that off on 2.79 about 12 months ago because it just makes shifting between programs less traumatic (and using a tablet easier), so my muscle memory has been retrained now so that hurdle has been crossed. There are some other organisational changes as well, the biggest one for me is the addons no longer appearing on the left in the tool box but on tabs on the right, but once you get your head around that it is fine. I'm teaching myself sculpting at the moment and I can say that 2.8 is way better performing than 2.79. It's still very much beta though with a few werid things happening but the new collections seem a much neater way to organise things than the old layers too. It is occasional;ly frustrating, I struggled for ages to find where auto smoothing had moved to for example.

 

  • Thanks 2
Link to comment
Share on other sites

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