Sculpty exporter for Wings 3D
|
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
|
05-29-2007 19:03
From: LIttleJim Tank I have have a problem importing a sculpty bmp with this script. When I try the first time it flashes Wings then nothing, try it again it crashes and writes to the wings crash dump file. Attached is a zip with the Wings dump file and bmp I was trying to open. Thanks Jim Your bmp file is a 32-bit image, which the importer isn't expecting. In the next version of the import/exporter, I'll try to at least add more meaningful error mesages. In the case of 32-bit images, I could add that capability if there is a significant need for it. Will you have trouble generating a 24-bit bmp file? (There is nothing to be gained by using a 32-bit image, since SL ignores the alpha channel for sculpties.)
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
05-30-2007 02:32
That image imports fine for me. If Wings 3D doesn't like 32-bit bitmaps then it's an issue with it's bmp importer. Sorry :-/
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
Abba Thiebaud
PerPetUal NoOb
Join date: 20 Aug 2006
Posts: 563
|
05-30-2007 08:41
Omei Turnbull, can I be the mother of your sculptie prim babies?
This makes it SoOOooOOoo easy.
/me makes note to send Omei some L$.
A
_____________________
http://www.ponystars.com/abbathiebaud Pony Up.
|
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
|
05-30-2007 09:21
From: LIttleJim Tank I have have a problem importing a sculpty bmp with this script. When I try the first time it flashes Wings then nothing, try it again it crashes and writes to the wings crash dump file. Attached is a zip with the Wings dump file and bmp I was trying to open. Thanks Jim LittleJim, in case it wasn't clear from the context of Strife's post, his importer ( /8/20/183764/4.html#post1516220) does import your bitmap. So there is a bug in mine that I will track down. (I don't know what made me conclude you had a 32-bit bitmap. Brain must have shut down for the night.)
|
Gryff Richard
Registered User
Join date: 10 Nov 2005
Posts: 51
|
05-30-2007 09:59
From: Cypher Black What the hack is wrong with it ? Any ideas ? This is just a mild guess at *some* of the problem. You say sculptie was made with 64x63 ... yet when I count the slices in the w3d image ... looks like 32+. I don't know how you made the bowl shape, but looking at the sculptie it looks like you may have two layers of slices overlapping ... which add in the jpg compression variations ... you get that mess. you have to keep the inside and outside surfaces at least some distance apart. gryff 
|
Gryff Richard
Registered User
Join date: 10 Nov 2005
Posts: 51
|
05-30-2007 10:06
From: Omei Turnbull So there is a bug in mine that I will track down I was beginning to think that. I tried 4 different graphics packages all said was a 24bit file and all crashed on attempting to import it. By the way, it seems easy to install a plugin in Wings3d, anyone know how to remove one ? (I wanted to try Strife's importer too.) gryff 
|
Gryff Richard
Registered User
Join date: 10 Nov 2005
Posts: 51
|
05-30-2007 10:21
From: Omei Turnbull When using Photopaint, did you simply start off with a pretty good understanding of how the texture was going to get mapped to the sculpty, and then use UVMapper as a previewer to double-check it? Or is there a more sophisticated way to use UVMapper? More or less yes Omei. Except I use an .obj file's ability to give different regions different colours. Then when I use UVMapper I can select by materials(colours) then create a map for the regions. That way I can identify which parts are where. It can get quite tedious if the final sculptie shape is severly different from a sphere. People should perhaps know that if you buy the UVMapper Pro ($60US) it can be used as a realtime 3d viewer while you paint in Photoshop, Paintshop Pro or Corel Painter. (See tutorials at the website). It is a little cheaper than buying one of the 3d painting programs. gryff 
|
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
|
05-30-2007 10:23
From: Gryff Richard By the way, it seems easy to install a plugin in Wings3d, anyone know how to remove one ? Just copy the new one over the old and restart Wings. There's no hidden registration process.
|
Gryff Richard
Registered User
Join date: 10 Nov 2005
Posts: 51
|
05-30-2007 10:48
TY Omei  For cypher have attached my effort at creating a bowl (with texture) gryff 
|
Hypatia Callisto
metadea
Join date: 8 Feb 2006
Posts: 793
|
05-30-2007 11:44
From: Gryff Richard TY Omei For cypher have attached my effort at creating a bowl (with texture) gryff  ooo nice! That's something about the exporter for Wings - it always gets the poles right. The cylinder method I tried in other programs failed miserably.
_____________________
... perhaps simplicity is complicated to grasp.
|
Cypher Black
Registered User
Join date: 14 Apr 2005
Posts: 15
|
Hey wow
05-30-2007 12:41
Hi Gryff and Hi Omei Gryff I wished i where there where you are with the suclpty's  There was something wrong with the forum-email-feature. I did not realized this thread has been updated for me, THX A LOT FOLKS  I attached the 2 files in the Zip-archive: SL_Sculpty_64x63_01.wings The native sphere fresh baken from Wings3d SL_Sculpty_64x63_01.bmp The exported BMP of the 64x63 sphere Hope this helps in researching my prob.. Thx again, take care and HAVE FUN Cypher Black
|
Cypher Black
Registered User
Join date: 14 Apr 2005
Posts: 15
|
Removing PlugIn's
05-30-2007 12:53
Gryff Richard wrote : By the way, it seems easy to install a plugin in Wings3d, anyone know how to remove one ? Go to : C:\Program Files\wings3d_0.98.36\lib\wings-0.98.36\plugins delete the right plugin and (re-)start Wings3D Worked this way for me  take care and HAVE FUN Cypher Black
|
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
|
05-30-2007 15:02
From: Hypatia Callisto ooo nice! That's something about the exporter for Wings - it always gets the poles right. The cylinder method I tried in other programs failed miserably. Hypatia, I duplicate the values for the poles across the whole top and bottom rows. Did you do something else?
|
Hypatia Callisto
metadea
Join date: 8 Feb 2006
Posts: 793
|
05-30-2007 15:52
From: Omei Turnbull Hypatia, I duplicate the values for the poles across the whole top and bottom rows. Did you do something else? I tried the UV method in Blender first - using a cylinder and baking the texture. That's when I realised its got to be a sphere, and the uvmapping has to match how I did it for the Wings sphere that I posted here. I've now had my models made with the Wings sphere exported in several programs, and I found the vertex exporter in Wings to gain a more accurate approximation of the model (comparing them to the textured preview in Zbrush and UVMapper). Something else I realised - the UVmapping does not come in via the UV method - SL applies its own funky spherical mapping anyway, so the UV as I did it for the sphere posted here will yield a texture that exactly fits the model in a 3d texturing app or by baking textures to the uvmaps.
_____________________
... perhaps simplicity is complicated to grasp.
|
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
|
05-30-2007 17:11
From: Cypher Black I attached the 2 files in the Zip-archive: Cypher Black Cypher, the sphere files you just posted illustrate the effects of SL only supporting 8 bits per coordinate. I don't think there is anything the exporter can do it improve on that. On the other hand, I think the in-world picture of your bowl you posted in /8/20/183764/10.html#post1527490 illustrates a different phenomenon, probably the effect of JPEG compression. If you post the .wings file for the bowl, I can test my theories.
|
Seifert Surface
Mathematician
Join date: 14 Jun 2005
Posts: 912
|
05-31-2007 11:19
From: Omei Turnbull Seifert, having Qarl say this is right adds a lot of credibility And I think it'll be right for cylindrical type, but I think it was incorrect for the sphere stitching, and that the current version on the wiki is correct. From: Omei Turnbull And my experiments confirm that it is a good approximation. But if it were a completely accurate description, any pixel in the bitmap with an odd x or odd y coordinate (other than row 63) wouldn't affect the sculpty. But take a look at the attached .bmp file. This started out as a sphere, but then I manually tweaked some of the pixels that supposedly shouldn't have been sampled. The .jpg file shows what I get in SL. Those spikes are clearly not just JPEG compression artifacts. So it seems that there is something odd going on. I was going to say that it is just jpg compression artefacts... I sent you in world a huge blown up version of the texture, shifted over so that the sample points are in the center of blocks of colour, and you can upload it to SL and see that it's really just a sphere. The way to check should be to use the preview as sculpty tool, which I believe is before compression. However, with your 64x64 I again get weird spikes on preview. So I dunno.
_____________________
-Seifert Surface 2G!tGLf 2nLt9cG
|
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
|
05-31-2007 11:43
From: Seifert Surface And I think it'll be right for cylindrical type, but I think it was incorrect for the sphere stitching, and that the current version on the wiki is correct. I don't think the current Wiki is any more correct with respect to whether odd numbered pixels contribute to the shape. My experiments suggest that there is interpolation going on between odd and even pixel rows and columns, but that this interpolation isn't the same for all parts of the sphere. Every time I come up with a theory to explain it, I easily find a counter-example. Sigh.
|
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
|
Updated Import/Export Plugin
05-31-2007 14:49
I've update the plugin to address the following issues: * Thanks to Cypher Black's prodding, I improved the exporter's choice of pixel values. The difference isn't huge, but some curves, especially near the poles, should look a little smoother in SL. * Made the importer tolerant of extra bytes at the end of the file, so it could import LittleJim's bitmap. * Removed the sculpties option from the "Export Selected" menu, since it was just causing confusion and wasn't really useful. * Changed the "Unsupported mesh" notification so that it appears in a neat little dialog box instead of as part of an "exporter crashed" backtrace. See the first post in this topic for the new file.
|
Blakar Ogre
Registered User
Join date: 18 Mar 2006
Posts: 209
|
05-31-2007 16:49
From: Omei Turnbull I don't think the current Wiki is any more correct with respect to whether odd numbered pixels contribute to the shape. My experiments suggest that there is interpolation going on between odd and even pixel rows and columns, but that this interpolation isn't the same for all parts of the sphere. Every time I come up with a theory to explain it, I easily find a counter-example. Sigh. Interpolation is indeed used but only for lower LOD. Wiki now has all the dirt on that too  If you manage to create textures that give results which are inconsistent compared to what the Wiki states just yell somewhere and it'll get picked up. The closer to my ear you yell the more chance I'll dig up the related code to see if we're still missing things in the Wiki.
|
Blakar Ogre
Registered User
Join date: 18 Mar 2006
Posts: 209
|
05-31-2007 16:57
From: Omei Turnbull And my experiments confirm that it is a good approximation. But if it were a completely accurate description, any pixel in the bitmap with an odd x or odd y coordinate (other than row 63) wouldn't affect the sculpty. But take a look at the attached .bmp file. This started out as a sphere, but then I manually tweaked some of the pixels that supposedly shouldn't have been sampled. The .jpg file shows what I get in SL. Those spikes are clearly not just JPEG compression artifacts.
At the time of your tests the Wiki didn't mention that line 0 was the bottom row of your texture hence instead of changing the pixels that are not used you changed the pixels that are used. It was an unfortunate side effect of me writing the Wiki based on the source code. When you're reading source it's crystal clear whether he reads odd or even rows but I never exhaustively checked if the code agreed on where to start counting 
|
2k Suisei
Registered User
Join date: 9 Nov 2006
Posts: 2,150
|
05-31-2007 16:59
From: Blakar Ogre Interpolation is indeed used but only for lower LOD. Wiki now has all the dirt on that too  If you manage to create textures that give results which are inconsistent compared to what the Wiki states just yell somewhere and it'll get picked up. The closer to my ear you yell the more chance I'll dig up the related code to see if we're still missing things in the Wiki. At the highest detail level, sculpt texture rows 0,1,3,5,7,9.. etc seem to be used to map the vertices, and not rows 0,2,4,6,8 etc, as stated in the wiki.
|
Elle Pollack
Takes internets seriously
Join date: 12 Oct 2004
Posts: 796
|
05-31-2007 18:31
Hypatia, I've been trying out Wings and using your UV map/UV Mapper Pro/Photoshop to do the textures; everything looks fine on the OBJ but when I upload to SL I have to apply a vertical flip to the texture to get it to line up properly. Not sure if this is a quirk of SL or the mapping.
_____________________
*********************************************** "Ya'll are so cute with your pitchforks and torches ..." ~Brent Linden SL streams a world, can you also stream a mind?
|
Hypatia Callisto
metadea
Join date: 8 Feb 2006
Posts: 793
|
05-31-2007 19:57
From: Elle Pollack Hypatia, I've been trying out Wings and using your UV map/UV Mapper Pro/Photoshop to do the textures; everything looks fine on the OBJ but when I upload to SL I have to apply a vertical flip to the texture to get it to line up properly. Not sure if this is a quirk of SL or the mapping. It's an SL quirk unfortunately. But not a serious issue.
_____________________
... perhaps simplicity is complicated to grasp.
|
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
|
05-31-2007 21:32
From: Blakar Ogre Interpolation is indeed used but only for lower LOD. Wiki now has all the dirt on that too If you manage to create textures that give results which are inconsistent compared to what the Wiki states just yell somewhere and it'll get picked up. The closer to my ear you yell the more chance I'll dig up the related code to see if we're still missing things in the Wiki. I was aware that rows in a .bmp files are normally numbered from bottom to top, but I thought my tests had shown that there were still examples where interpolation was occurring with the 64x64 bitmap. I can't reproduce that result now though, so I'm willing to believe I was just getting mixed up. Thanks for helping me get this straight.
|
Blakar Ogre
Registered User
Join date: 18 Mar 2006
Posts: 209
|
06-01-2007 01:40
From: 2k Suisei At the highest detail level, sculpt texture rows 0,1,3,5,7,9.. etc seem to be used to map the vertices, and not rows 0,2,4,6,8 etc, as stated in the wiki. Reread the Wiki. Line 0 is the bottom row. So if you start from the top the first one is 63, then 62, 60,58 ...
|