Sign in to follow this  
Followers 0
emSynth

sculpt2mesh Applescript source code

25 posts in this topic

Greetings My fellow Second Life Metaverse residents!  I have a special gift for you, my source code for a program that converts sculpt map files to obj files suitable for use as Mesh source material.  I will first simply state that the code is protected by the GNU GPL, and that my intention is to protect it under the GNU GPL whether I have properly labeled the source code or not.  I think I have, but such things confuse me.  In this post I will simply do first things first and post the code only, explaining all the details in following posts.  The code is Applescript, by the way.  

-- This Software is Protected by the GNU General Public License
-- See http://www.gnu.org/licenses/gpl.html for details
--
-- by Les Hall (emSynth)
--

on run argv
	
	-- set input file alias from argv parameters
	set inputFile to path to desktop
	set inputFile to ((inputFile as text) & (item 1 of argv)) as alias
	
	-- set output file as random name and then open it for write access
	set outputFile to ((inputFile as text) & (".obj"))
	set outputFileDesignator to open for access file outputFile with write permission
	
	-- get size and color info from iMagine Pohto application
	tell application "iMagine Photo"
		set thisImporter to import graphic inputFile
		if the component error of thisImporter is not equal to 0 then
			close thisImporter
			display dialog "Not an image file that quicktime recognizes."
			return
		end if
		set {x, y, xDim, yDim} to the natural bounds of thisImporter
		
		-- figure out decimation stuff
		set dims to (xDim as string) & "x" & (yDim as string)
		set promptText to "Sculpt map dimentions:  " & dims & ", decimate to:"
		set decimations to {2, 4, 8, 16, 32, 64, 128, 256}
		set xDecimation to (item 2 of argv) as integer
		set yDecimation to (item 3 of argv) as integer
		if xDecimation is not in decimations then set xDecimation to 64 as integer
		if yDecimation is not in decimations then set yDecimation to 64 as integer
		set scale of thisImporter to {xDecimation / xDim, yDecimation / yDim}
		set xSize to xDecimation as integer
		set ySize to yDecimation as integer
		set theLeft to xDim / 2 - xSize / 2 as integer
		set theRight to xDim / 2 + xSize / 2 as integer
		set theTop to yDim / 2 - ySize / 2 as integer
		set theBottom to yDim / 2 + ySize / 2 as integer
		
		-- draw the sculpt map image file
		set thisDocument to make new window document with properties {dimensions:{xDim, yDim}}
		set the drawing destination of thisImporter to thisDocument
		draw thisImporter
		close thisImporter
		
		-- get pixels and write them out as vertexes	
		set imageColorsByLine to {}
		set maxValue to 256.0 * 256.0
		repeat with yValue from theTop to theBottom
			set startPoint to {theLeft, yValue}
			set endPoint to {theRight, yValue}
			set pixelValues to get pixel values of thisDocument with properties {pixel value class:pixels on line, start point:startPoint, end point:endPoint}
			set pixelInfo to get pixelValues's items
			set pixelColors to item 2 of pixelInfo
			
			-- save vertexes of obj file
			set vertexString to ""
			repeat with vertex in pixelColors
				set x to ((item 1 of vertex) / maxValue) as string
				set y to ((item 2 of vertex) / maxValue) as string
				set z to ((item 3 of vertex) / maxValue) as string
				set vertexString to vertexString & "v " & x & " " & y & " " & z & linefeed as string
			end repeat
			write vertexString to outputFileDesignator as string
		end repeat
		
		-- close the input file
		close thisDocument
		quit
	end tell
	
	-- get stitching type
	set stitchingTypes to {"Spherical", "Cylindrical", "Planar", "Toroidal"}
	set stitchingType to item 4 of argv
	
	-- set up triangle generation according to stitching type
	set xWrapValue to 1
	set yWrapValue to 2
	set endcaps to true
	if stitchingType is ("Spherical") then
		set xWrapValue to 1
		set yWrapValue to 2
		set endcaps to true
	else if stitchingType is {"Cylindrical"} then
		set xWrapValue to 1
		set yWrapValue to 2
		set endcaps to false
	else if stitchingType is {"Planar"} then
		set xWrapValue to 2
		set yWrapValue to 2
		set endcaps to false
	else if stitchingType is {"Toroidal"} then
		set xWrapValue to 1
		set yWrapValue to 1
		set endcaps to false
	end if
	
	-- save triangles of obj file
	set yDim to ySize as integer
	set xDim to xSize as integer
	repeat with yVal from 0 to (yDim - yWrapValue)
		repeat with xVal from 0 to (xDim - xWrapValue)
			set upperLeftCorner to yVal * xDim + xVal
			set upperRightCorner to yVal * xDim + (upperLeftCorner + 1) mod xDim
			set lowerLeftCorner to (upperLeftCorner + xDim) mod (yDim * xDim)
			set lowerRightcorner to (upperRightCorner + xDim) mod (yDim * xDim)
			set ulc to upperLeftCorner + 1
			set urc to upperRightCorner + 1
			set llc to lowerLeftCorner + 1
			set lrc to lowerRightcorner + 1
			set face1String to (("f ") & (ulc as string) & " " & (llc as string) & " " & (lrc as string)) as string
			set face2String to (("f ") & (lrc as string) & " " & (urc as string) & " " & (ulc as string)) as string
			set outputString to face1String & linefeed & face2String & linefeed as string
			write outputString to outputFileDesignator as string
		end repeat
	end repeat
	if (endcaps is true) then
		repeat with xVal from 1 to (xDim - yWrapValue)
			set outputString to ""
			set faceString to (("f 1 ") & ((xVal + 1) as string) & " " & ((xVal + 2) as string)) as string
			set outputString to outputString & faceString & linefeed as string
			write outputString to outputFileDesignator as string
		end repeat
		set xOffset to yDim * (xDim - 1)
		repeat with xVal from (1 + xOffset) to (xDim - yWrapValue + (xOffset))
			set outputString to ""
			set faceString to (("f ") & ((1 + xOffset) as string) & " " & ((xVal + 2) as string) & " " & ((xVal + 1) as string)) as string
			set outputString to outputString & faceString & linefeed as string
			write outputString to outputFileDesignator as string
		end repeat
	end if
	-- close obj file
	close access outputFileDesignator
end run

 Enjoy!

 

emSynth (AKA Inventor Alchemi)

3 people like this

Share this post


Link to post
Share on other sites

Alright, where to begin?  I suppose a brief mention of how to use the code would be best, because you're probably eager to give it a try.  later I will discuss history and credits or whatever.  To begin with,the code is set up to be run from the command line so you open it in your Applescript editor and export it as an app.  Then you run it with the command as follows.  

sculpt2mesh inputFileName xDecimation yDecimation stitchingType

where inputFileName is any common type of graphics format in quotes, xDecimation and yDecimation are the output resolution you want as integers, and stistchingType is one of {"Spherical", "Cylindrical", "Planar", "Toroidal"}.  Oh, and also important is you need to search Google for the Imagine Photo app, which is free, and download / install it because the script uses Imagine photo extensively.  The result should be an obj file on your desktop.  it is as simple as that.  

emSynth

 

Share this post


Link to post
Share on other sites

I'm still waiting for you to explain how you envision this to be useful for legitimate content creators.  You promised you would explain five weeks ago, but you never did. 

Many of us asked questions in that other thread.  You at first appeared to be receptive and open to discussion, but after a short while, you said you felt threatened (for reasons I don't think any of us understood), and then you simply stopped responding.  Now that you're back, I hope you'll be willing to pick up the discussion where it left off.

Once again, I have to ask, what is the (legitimate) use case for which you feel your process will be helpful?  As I mentioned throughout the other thread, I can only think of two use cases, myself, and neither of them are positive.  One would be if the user does not own the sculpt map, in which case the use of your converter (or any converter) would be illegal.  The other would be if the user does not know how to use 3D modeling software, in which case he or she almost certainly would not be able to make use of the resultant OBJ model that your program spits out.  So, as I asked several times in the other thread, what is the third use case you envision, which I have not thought of, which is both legal and practical?

As a reminder, I'm not asking you to cite the many advantages of mesh vs. sculpties in general.  That's a given, and we all already know all about it.  What I'm asking for is an explanation of how your tool could benefit actual human users.

You promised you would explain.  Please keep that promise.

Share this post


Link to post
Share on other sites

I do not recall making any "promise" at all, however I am happy to list some legitimate uses of the sculpt2mesh tool.  

One is the situation where a resident has created a sculpt using a tool that does not have mesh output.  Another is when the source materials, tools, or computer, or operating system used to create the sculpt are no longer available.  Yet a third reason is when a resident has permission from the sculpt creator to perform the conversion.  A fourth reason is when it is desired to enhance the sculpt with one of the advntages of mesh (which at your request I will not list here).  A fifth reason would be to add detail or sharpness to a sculpt beyond the capability of sculpts.  Sixth, one might wish to combine two or more sculpts together or combine with a prim2mesh tool (which I have also created), thus turning any SL object into a mesh only object.  

There are six reasons, all legitimate, and I am sure there are more.  Please do not be afraid of a simple data converter.  When Linden Labs introduces a new technology there are always implications, not all of which are viewed as favorable by all people.  Rest assured that sculpt2mesh will not replace sculpts, as sculpts are the clear choice for many applications, especially in terms of land impact, but also for other reasons.  Fear not The turning wheels of progress!  

EmSynth

Share this post


Link to post
Share on other sites

i suppose a few additional details refarding the sculpt2mesh tool are in order here.  

First let me correct myself in that the output file will go to the same folder as the input file, not to the desktop (that was an earlier version).  Also it is important to note that the decimation values must be powers of two sech as {4, 8, 16, 32, 64, 128, 256} and they must not exceed the original dimensions ofvthevsculpt.  I,e, decimation is forvequivalence or reduction, not expansion.  

Another key note i that there appears to be a slight error in the numeric conversions that causes somr smooth sculpts to have a slightly choppy or faceted appearance.  In fact, if you want a smooth rounded shape such as a car fender or similar object, you might want to consider using a sculpt anyway As sculpts are inherently good at approcimating rounded forms.  Mesh is best at faceted or angled forms, especially considering the land impact factor.  However, mesh can be smoothed such as by using the smooth button on the leftbhand toolbar of Blender forvexample, but this has the additional effect of negativels affecting texturing andcas such is best for solid or non-detailed textures.  So you see, the trade-offs are complex.  

I have coded the sculpt2mesh script asca command line only script with the specific intention of embedding it in a server web page as a paid service.  If anyone wishes to set up such a service, i have secured the URL "sculpt2mesh.com" which I would be happy to transfer either for free (in the case of a nonprofit effort) or for a reasonably small fee (in the case of commercial use).  

I would like to thank one person who shall remain anonymous for now (you know who you are) for promting and proddingbme repeatedly to code sculpt2mesh, and another anonymous person for help implementing thevserver scriptbthat was never used.  Please note that even when your efforts do not result in actual implemented end product, you are still part of the creation process and therefore deserve credit.  If either of the folks mentioned would like credit associated with their name or nickname, please contact me and I will do so.  

I guess thatbis all for now, please feel free to adk any questions you likecand I will attempt tonanswer them, thanks.  

emSynth

 

Share this post


Link to post
Share on other sites


emSynth wrote:

I do not recall making any "promise" at all, however I am happy to list some legitimate uses of the sculpt2mesh tool. 

Thank you for responding.  Allow me to refresh your memory.  The promise I spoke of was in the link I posted.  In case you don't feel like clicking the link, here's the relevant excerpt.  Your exact words were:

 

 

"Chosen Few, I have read your post and I will be happy to explain the advantages of using sculpt2mesh, however at the moment I am going to hang out with some friends... Have a grat evening and I will get back to you as soon as I can!"

That's where we were five weeks ago.  Let's not dwell on it, though.  I'd rather focus on where we are now.  Again, thank you for responding to my question here.

While I do appreciate the response, I also have to say that I find your answers a bit bewildering.  Allow me to address them, one by one.  I have comments and questions about each.

 


emSynth wrote:

One is the situation where a resident has created a sculpt using a tool that does not have mesh output.

OK, but how is your program, which requires command line input, and which can only run on a Mac, more beneficial than simply importing the sculpty into a 3D modeling program, and then exporting it to .dae (or whatever other format one may choose)?  Seems to me, the two clicks needed for import and export are a heck of a lot simpler than the command line.  What am I missing?

 


emSynth wrote:

Another is when the source materials, tools, or computer, or operating system used to create the sculpt are no longer available.

I'm not following you on this one at all. 

As you must know, all that is needed to recreate a sculpty is the sculpt map itself.  This is just as true with your program as with any other.  In this context, whatever source materials, tools, etc., may have been used in originally creating the sculpty are completely irrelevant.  How exactly do you feel your program makes any difference, in this regard?

 

 


emSynth wrote:

Yet a third reason is when a resident has permission from the sculpt creator to perform the conversion.

You seem to be trying to express circular logic on this one.  How does simply obtaining the creator's permission to use your program constitute a practical need for using it?  Permission simply makes the use legal; it doesn't create need.  The same exact permission would be legally required, no matter what program or technique is being employed.

So, the question again becomes what does your program bring to the table that a simple import/export operation in any capable 3D modeling program does not? 

 


emSynth wrote:

A fourth reason is when it is desired to enhance the sculpt with one of the advntages of mesh (which at your request I will not list here).

In order to enhance it, one would need to edit the model a 3D modeling program.  In such a case, the modeling program itself would handle the conversion, so how would your program be of aid?

 


emSynth wrote:

A fifth reason would be to add detail or sharpness to a sculpt beyond the capability of sculpts.

Same question as above.  In order to add details to the model, one must edit it in a modeling program.  Once again, how would your program possibly play a role in that process?

 

 


emSynth wrote:

Sixth, one might wish to combine two or more sculpts together or combine with a prim2mesh tool (which I have also created), thus turning any SL object into a mesh only object. 

Are you saying that your program can take two or more sculpt maps at once, and automatically combine them for output as a single mesh object?  That wasn't mentioned in your usage instructions.

If that's indeed the case, then I'm having a really hard time imagining how a command-line-only program can do the task more easily than a modeling program with an actual GUI.  The size, rotational, and distance relationships between the various objects would need to be defined, as would the UV mapping and material assignments.  Why would anyone want to do all that via text command, rather than visually?

 


emSynth wrote:

There are six reasons, all legitimate, and I am sure there are more.

Unfortunately, by my count, we're still at zero, not six.  My definition of "legitimate" required both legality and practicality.  You've posed some scenarios under which us of your tool could be legal, but I have yet to see you state any under which it would also be practical at the same time.  I don't see anything in your list that couldn't be done far more easily via a few clicks in any modeling program than via text in your command line.

Got any uses in mind that do fit both requirements?

 

 


emSynth wrote:

Please do not be afraid of a simple data converter.

 

What on Earth makes you think I'm afraid of it?  That didn't even cross my mind.  I cannot imagine why it ever would. 

I simply asked you to explain why your program is worthwhile.  I'm sure you'd agree, that's hardly an outlandish request.  I'd ask the same question if you were showing me a new car, or a new TV, or a new anything else that I might use.  Explain why it's a good idea that will save me (or the general public) time, money, effort, etc., or at least increase my enjoyment, all without breaking any laws or infringing on anyone else's rights, and I'll happily be onboard with it.

Anyone presenting any new product that he or she truly believes in should jump at the opportunity to make such a case.   When you instead turn defensive about it, you imply that you don't really believe your product does any of those things I just mentioned.  Your statement (plus your earlier words in the other thread, about imagined threats and whatnot) suggests that it is you who are afraid of the question.

 

 


emSynth wrote:

When Linden Labs introduces a new technology there are always implications, not all of which are viewed as favorable by all people.

I'm not sure why you mentioned this.  First, your program wasn't introduced by LL.  It was introduced by YOU.  Second, mesh isn't exactly "new" technology.  It's the oldest form of 3D content there is.  SL's support of it happens to be relatively new (although it's already a few years old now), but mesh itself has been around for almost as long as graphics-capable computers have been around.

I think you may be missing the point of the questions that I, and others, have asked about your program.  This isn't about anyone's opinion of mesh, or of sculpties, or of mesh vs. sculpties, or anything of the sort.  It's only about asking you to explain how your program could be beneficial to users, in a manner that is both legal and practical.  Once again, if you believe in the product, you should welcome the opportunity to explain exactly that, without assuming people are fear-mongering.  Keep in mind, if people weren't interested, they wouldn't ask.  Questions like this are postive, always.

 


emSynth wrote:

Rest assured that sculpt2mesh will not replace sculpts, as sculpts are the clear choice for many applications, especially in terms of land impact, but also for other reasons.

Again, I'm having trouble following your apparent line of thinking.  Why would you assume I thought your program would replace sculpts?  That doesn't even make any sense.  In order for your program to exist, sculpts have to exist.  That's just elementary, isn't it?

That said, if sculpties were to disappear from the grid tomorrow, you certainly wouldn't see me shedding any tears over it.  Sculpties resource-inefficient, overly complicated to produce, and just plain wacky.  At the time they were introduced, they were a clever solution, implemented by an exceedingly clever man, to make the most of SL's then limitations, but the truth is those limitations never should have been there in the first place.  If it were possible to redo the last ten years all over again, I'm sure no one would disagree that SL should have had mesh support at the very core of its architecture, since day one.  Sculpties never should have needed to exist.

The entire rest of the 3D modeling world is all about mesh, has been for decades, and will continue to be for decades to come.  The fact that some SL users seem to think it's this newfangled thing that LL came up with is beyond laughable.

In any case, SL is what it is, and yes, sculpties do still have their place.  Circumstances under which they are still advantageous to use are quite narrow, but not entirely non-existent.

I'm not sure what any of this has to do with the subject at hand, though, which is your particular conversion program.  If there are uses for it that are both legal and practical at the same time, great.  I'm still having trouble thinking of any, though.

 


emSynth wrote:

Fear not The turning wheels of progress!  

Of course. Progress is to be embraced.  I'm not sure why you keep circling back to fear as the emotion to associate with any of this.  I guess your mind works differently than mine, in that regard.

I just have to question whether the development of a product for which no legitimate use can be posited can be defined as "progress".   As I've said many times now, show me how it's both legal and practical, and you'll have my full support.

Share this post


Link to post
Share on other sites


emSynth wrote:

 

Another key note i that there appears to be a slight error in the numeric conversions that causes somr smooth sculpts to have a slightly choppy or faceted appearance.  In fact, if you want a smooth rounded shape such as a car fender or similar object, you might want to consider using a sculpt anyway As sculpts are inherently good at approcimating rounded forms.  Mesh is best at faceted or angled forms, especially considering the land impact factor.  However, mesh can be smoothed such as by using the smooth button on the leftbhand toolbar of Blender forvexample, but this has the additional effect of negativels affecting texturing andcas such is best for solid or non-detailed textures.  So you see, the trade-offs are complex.  


A car fender or any smooth surface is better done with a sculpt? No offence, but that is the most rediculous thing I've heard in a long time. Smoothness is (next to the fixed UV map) the biggest limitation of using sculpts.

The "0-255 grid snap" won't let you make any slight curves on a big object without using very few vertices (which will result in smooth lighting but choppy geometry) I've tried it myself and I've seen many car fenders inworld. Not a single one made out of sculpts was very smooth. The mesh equivalent of a sculpt will be just as bad, since if you turn a sculpt into a mesh, the vertices will still sit on the sculpt grid. Modifiers like "relax" in 3ds max might help out a bit here, but it would simply be easier to make the object as mesh in the first place. There is no reason why a mesh wouldn't be smooth, other than the inability of the creator.

A smooth version of a faceted mesh object will have a lower landimpact, since all vertices are shared by several triangles. On a smooth object the vert/tri ratio is about 1:2, on a facted one it is 3:1. This results in much much more data with a resulting much much higher landimpact.

Changing an object from faceted to smooth has no effects at all on the UV map, all it does is changing the normals.

Share this post


Link to post
Share on other sites

How about this use? My hard drive died and I lost all my sculpt models that I was hoping to develop more as mesh items. Since I can still grab the sculpt maps from SL, it seems like this program would be able to help me.

1 person likes this

Share this post


Link to post
Share on other sites


Avant Scofield wrote:

How about this use? My hard drive died and I lost all my sculpt models that I was hoping to develop more as mesh items. Since I can still grab the sculpt maps from SL, it seems like this program would be able to help me.

Since you were able to produce sculpt maps before your crash, you should be able to import them just as easily. Like Chosen said, why use an external tool if you have the internal one available? You can import sculptmaps into Blender, into Maya and into 3ds Max. It might require a plugin, but that's probably more user friendly than an external tool.

1 person likes this

Share this post


Link to post
Share on other sites
prim2sculptprim2meshsculpt2primsculpt2meshmesh2primmesh2sculpt

 

Alright, I'll tell you what.  I am sick and tired of dealing with people who blindly insist on arguing the lost position that a data converter has moral implications.  What's done is done, the cat is out of the bag, the source code has been released.  Now you have to deal with the reality of the situation.  I suggest you do so rather than attempt to put words in my mouth, paint me in a bad light by taking my words out of context, or craft imaginary scenarios implicating the criminalization of this inevitable step forward.  

And if that isn't enough to fry your noodle, try this one on for size.  There exist three types of objects in Second Life and the rest of the Metaverse:  prims, sculpts, and mesh.  That means that there exists the possibility to create a total of six categories of object data converters.  These are listed above.  Eventually all of them will exist, to one degree of automation or another.  I suggest you prepare for the inevitable.  

emSynth

 

1 person likes this

Share this post


Link to post
Share on other sites

For those who will be using sculpt2mesh, i would also like to mention the existence of the utility programs provided by atangeo.  The balancer free demo program is suitable for optimization of many sculpt2mesh objucts.  Far better than simple decimation, the optimization process, which requires user interaction for best results, produces a mesh with larger triangles in smoother places, good ddge detection, and generally more efficient use of triangles.  You may wish to convert a sculpt to mesh at higher resolution than the final desired result and use atangeo's tools to optimize your mesh.  

emSynth

1 person likes this

Share this post


Link to post
Share on other sites


emSynth wrote:

Alright, I'll tell you what.  I am sick and tired of dealing with people who blindly insist on arguing the lost position that a data converter has moral implications. 

Who said anything about moral implications?  I certainly did not, and neither has anyone else here.  I do have to say I find it very interesting that that's where your mind went.  Do you think there's a moral argument that should be had?

 

Once again, I simply asked you to cite a use for your program that is both legal and practical at the same time.  That's really not a lot to ask, and it's absolutely nothing for you to get bent out of shape about.  As I said several times already, if you believe in your product's usefulness, you should welcome the opportunity to talk about it.

 


emSynth wrote:

What's done is done, the cat is out of the bag, the source code has been released.  Now you have to deal with the reality of the situation. 


The only one who seems to be ignoring the "reality of the situation" in this discussion is you.  I'm asking you to explain the usefulness of your program, nothing more and nothing less, but for reasons that escape me, you seem to keep wanting to turn that discussion into something it's not.  Last time it was imaginary threats that no one made.  This time it's questions of morality that nobody's raised, or even implied.  Care to explain your thinking on that?

 


emSynth wrote:

I suggest you do so rather than attempt to put words in my mouth, paint me in a bad light by taking my words out of context, or craft imaginary scenarios implicating the criminalization of this inevitable step forward. 

Words in your mouth?  Really?  I've been working from exact quotes, the entire time (as always), precisely to avoid doing that.

If you feel that I have misinterpreted your meaning on anything you've said, please explain, and I'll be happy to reassess.  I'm sure the same is true of everyone else here. 

Bottom line: if your tool is indeed useful, we'd all love to use it.  If it's not, we won't.  It's that simple.

 


emSynth wrote:

And if that isn't enough to fry your noodle, try this one on for size.  There exist three types of objects in Second Life and the rest of the Metaverse:  prims, sculpts, and mesh.  That means that there exists the possibility to create a total of six categories of object data converters.  These are listed above.  Eventually all of them will exist, to one degree of automation or another.  I suggest you prepare for the inevitable.  

emSynth

I hate to burst your bubble, but just about all of these already do exist, and have for many years.   Perhaps you were unaware of that.  Allow me to explain.

 

  • Prim to sculpt - There have been in-world solutions for this since just a few months after sculpties first hit the grid. I myself have never had cause to use one, but from what I understand, they are useful (with varying degrees of success) for people who don't care to learn 3D modeling software, and would rather work entirely in-world.
  • Prim to mesh - There are in-world solutions for this as well.  Again, I've never used one, but I can see the utility in them, for those who don't want to use real modeling software.  I think it's a shame that there are people who insist on keeping themselves in such a handicapped position, but that's another subject.
  • Sculpt to prim - I've never heard of an automated solution for this, so yeah, it would be a new one.  I can't imagine how it would be in any way useful, though.  What possible advantage could there be in replacing a sculpty with a bunch of prims?  If you think it would be useful, I invite you to explain how.
  • Mesh to prim - There have been countless solutions for this, over the years, almost all of which have been highly useful.  Before sculpties, and way before mesh support, this was the only way to build for SL in external 3D modeling programs, after all.  I could go on all day listing the various plugins and data converters that people came up with for all the major 3D modeling programs. There were lots and lots of builds in SL that were created this way.  (Along similar lines, I'll mention I used to use an OBJ replication system a lot, which was developed by SL resident Jeffrey Gomez, back in 2006.  It would reconstruct the triangles in an OBJ file with prim triangles in-world.  As long as the source model was built intelligently, the system worked brilliantly.  I routinely used to use it to create complex curved surfaces in SL that could not have been done practically in any other way at the time.)
  • Mesh to sculpt - Well, this one's just a given.  Every sculpt map exporter in every program converts mesh data to sculpt map data.

So, "the inevitable," as you put it, has long since arrived.  I'm not sure why you think "preparation" would have been needed beforehand, by anyone.  The tools were developed, and those who found them to be useful used them, while those who didn't find them to be useful did not use them, just like with any other tool that's ever been created in the history of the universe.

Once again, all I'm asking you to do is explain how this tool that you've created is indeed useful.  For that, I've requested that you to cite at least one example of a case in which the program would be both legal and practical to use.  Thus far, you've been unable to do so.  Can you?  Will you?

Share this post


Link to post
Share on other sites

Thanks for sharing. :matte-motes-wink:

 

 

                                                                                                                                                                                                                              

 

Valid questions have been asked, and the OP answered.

If you don't like the code, don't use it.

The thread reads like it is harassment.

 

Share this post


Link to post
Share on other sites


Knowl Paine wrote:

Valid questions have been asked, and the OP answered.

If you don't like the code, don't use it.

The thread reads like it is harassment.

The questions have been asked, yes, but not answered satisfactrily.  There's nothing wrong with asking for better answers.

It's not about liking or disliking the code.  It's about how the tool could possibly be useful for legitimate purposes.  If so much as a single use that is both legal and practical can be cited, we'll no longer have a need to keep asking.  But this has been going on for almost a month and half now, and no one, least of all the OP, has been able to come up with one.  Perhaps you can?

As for harrassment, had anybody made the threats that the OP imagined out of thin air in the previous thread, then yes, that would have been harrassment.  But nobody did.  In fact, no one has said anything even remotely rude or unpleasant to the OP in any way.  All any of us have done is request information, in good faith.  I'm sorry if you don't see it that way, but that doesn't change what it is.

Share this post


Link to post
Share on other sites

Sorry, Chosen, but in this case I'll have to side with the developer of the converter.

 

He did give answers.  You don't like or agree with those answers.  That's fine, but don't say he didn't give them.

 

I have a lot of scuplt maps I've created over the years.  I'm lucky if I can find the hard-drive they are on (if it even still functions!)  Having the ability to deconstruct them to OBJ format isn't a bad thing.  And sure, I could install Blender (if I didn't already have it) and take up 20-30 Mb of space and plenty of time downloading and installing.  Or I could use a command line tool.  And what about if I have a whole directory of sculptmaps I want to convert?  I haven't discected the applescript to see if it handles wildcards, but a quick shell script could do that and call the script for each.  Doing that through most plugin GUIs in a 3D modeller isn't possible.

 

And it should be mentioned that just because something CAN be used in an illicit manner does not preclude its usefulness outside illicit activities.  VCRs and now DVRs both have illicit uses.  But they also have perfectly acceptable uses.  And while there are other ways of accomplishing the same activities without using them, that doesn't always mean it is the most efficient, or the most convenient.

 

And even if there were no particular use for it, it can serve as a basic algorithm for those wanting to understand how to write their own utilities for dealing with sculpt maps.  *shrug*

 

1 person likes this

Share this post


Link to post
Share on other sites


Helium Loon wrote:

Sorry, Chosen, but in this case I'll have to side with the developer of the converter.

He did give answers.  You don't like or agree with those answers.  That's fine, but don't say he didn't give them.

I have to "side" with Chosen.

None of Chosen's questions were answered as far as I can see, in this thread or the previous one. I'm (still) having the same reservations. Maybe an example would clarify things? An example where the external tool is preferred over using a 3D program.


I have a lot of scuplt maps I've created over the years.  I'm lucky if I can find the hard-drive they are on (if it even still functions!)  Having the ability to deconstruct them to OBJ format isn't a bad thing.  And sure, I could install Blender (if I didn't already have it) and take up 20-30 Mb of space and plenty of time downloading and installing.  Or I could use a command line tool.  And what about if I have a whole directory of sculptmaps I want to convert?  I haven't discected the applescript to see if it handles wildcards, but a quick shell script could do that and call the script for each.  Doing that through most plugin GUIs in a 3D modeller isn't possible.

You'd still need Blender or any other 3D program. First of all, you can't upload an .obj file, so it needs to be converted to .dae.

Even if you didn't have to convert, what would be the purpose of uploading a sculpt as dae file/mesh? The triangle count and UV layout would still be just as (un)usable as a sculpt, most likely with a higher landimpact. Converting would only make sense if you optimise the .obj file in a 3D program before export. Now Chosen's (and my own) point is you could import the sculptmap directly into Blender, or any other program of choice, without the extra step of converting to .obj.


And it should be mentioned that just because something CAN be used in an illicit manner does not preclude its usefulness outside illicit activities.  VCRs and now DVRs both have illicit uses.  But they also have perfectly acceptable uses.  And while there are other ways of accomplishing the same activities without using them, that doesn't always mean it is the most efficient, or the most convenient.

I still don't see how using a seperate tool would be more efficient OR convenient.


And even if there were no particular use for it, it can serve as a basic algorithm for those wanting to understand how to write their own utilities for dealing with sculpt maps.  *shrug*

No argument there, but that doesn't change the fact it's pretty pointless to convert a sculpt to mesh just for the sake of converting a sculpt to mesh.

Share this post


Link to post
Share on other sites

Well, in regard to the issue of answering anyone's questions regarding the uses of sculpt2mesh, I do not see how I am responsible for that.  It is a data converter.  It converts one form of data to snother.  It was a programming exercise to implement it.  I gave the source code to the community.  

Those are the relevant facts and my responsibility ends there.  Any arguments regarding usefulness or suitability for purpose may be carried out by others as far as I am concerned.  I am not championing this tool or suggesting that you use it, I am just offering it to whoever wants it.  End of story.  

emSynth

 

1 person likes this

Share this post


Link to post
Share on other sites


Helium Loon wrote:

Sorry, Chosen, but in this case I'll have to side with the developer of the converter.

No need for apology, Helium.  I'm glad someone is willing to engage in meaningful discussion about the potential value of the program.  That's all I wanted.

 


Helium Loon wrote:

 

He did give answers.  You don't like or agree with those answers.  That's fine, but don't say he didn't give them.

Let's be clear.  I never said he did not answer.  I said he did not answer satisfactorily.  That modifier at the end of the sentence makes a world of difference.

Here's my issue with the answers he gave.  They did not meet the criteria of the questions that were asked.  It would be like if I asked you what color the sky is, and you answered to tell me why color is better than black and white.  Just because the question and the response were both about color wouldn't mean they fit each other. 

In that example, I would then have to ask you again, in order to try to get an answer that did actually fit the question.  That's all I've been trying to do here.

 


Helium Loon wrote:

 

I have a lot of scuplt maps I've created over the years.  I'm lucky if I can find the hard-drive they are on (if it even still functions!)  Having the ability to deconstruct them to OBJ format isn't a bad thing.  And sure, I could install Blender (if I didn't already have it) and take up 20-30 Mb of space and plenty of time downloading and installing.  Or I could use a command line tool.  And what about if I have a whole directory of sculptmaps I want to convert?  I haven't discected the applescript to see if it handles wildcards, but a quick shell script could do that and call the script for each.  Doing that through most plugin GUIs in a 3D modeller isn't possible.

You're making some of the points I'd expected the OP would have made.  I'm glad someone finally is.

I'm still not impressed that the use you describe is entirely practical, though.  It seems you've got three main points, which I'd love to discuss.  These are that conversion of sculpt maps to OBJ isn't a bad thing to do, that the application is small and light weight, and that it possibly could be set up to handle batch operations, correct?  Let take them one at a time.

 

First, OBJ.  This is one of my primary issues with the program.  As we all know, since SL cannot import the OBJ directly, the file needs to be converted to COLLADA first.  To do that, the user user would have to employ a 3D modeling program.  With that being the case, use of the command line converter becomes a completely unnecessary extra step.  The modeling program itself could do the conversion straight from sculpt map to COLLADA, all by itself.  So why bother with the other program at all?  Where's the benefit in using it?

If the OP's program were to output to COLLADA, I'd have far less reason to question its usefulness.  I'd still wonder why anyone might rather use it than a 3D modeling program, of course, but that would just be a head-shaker, not a showstopper.

In summary on this point, it's all about the fact that one step is better than two.

 

Second, hard drive space.  Before we dive into it, let me make state a minor point of accuracy.  My Blender installation is actually around 100 MB.  Is yours really only 20-30?  If so, I wonder what the difference might be. 

In any case, I'm sure you'd agree that if 20, 30, or 100 MB is a lot of space for somebody, they really have no business creating 3D content at all.  This is 2013.  You can get a full TB hard drive for all of $85.  Heck, even the 5-year old Palm cell phone that I still have sitting on my nightstand as a clock wouldn't blink at the prospect of storing 100 MB worth of whatever.

While in principle, I can't disagree that there's no sense wasting even a single byte, if you can avoid it.  let's be real.  In practice, 100 MB will never make the slightest dent in anyone's hard drive capacity.  And practice is my main focus here, as I keep saying.

 

Third, batch conversion.  Great point.  The ability to convert a folder full of sculpt maps into mesh models could certainly be useful.  But I fail to see how this command line tool makes the process easier than just running a batch in any capable 3D modeling program.

This is especially true when you consider that you expect you'll need to employ additional scripting in order to get the command line program to run the batch in the first place.  You could utilize similar scripting in any full featured modeling program.

 

While your answer here is leaps and bounds better than the OP's answer, and I'm now considerably closer to seeing a potential purpose for this app, I'm afraid I'm still not quite there.

 


Helium Loon wrote:

 

And it should be mentioned that just because something CAN be used in an illicit manner does not preclude its usefulness outside illicit activities.  VCRs and now DVRs both have illicit uses.  But they also have perfectly acceptable uses.  And while there are other ways of accomplishing the same activities without using them, that doesn't always mean it is the most efficient, or the most convenient.

That's all well and good, but nobody said anything about using this tool for nefarious purposes.  A few people in the other thread did raise questions about copyright concerns, but they were only questions, and they haven't resurfaced at all in this thread.  The OP seems to want to react at times as if he expects people to go there, but really, no one has, and I don't expect anyone will.  That's just not what this discussion is about, at least not from my end.

 

That said, since you brought it up, I do have to say there are unfortunate legal realities these days that sometimes creep up, in defiance of common sense examples like the VCR and DVR.  Under the DMCA, it is now a federal crime to distribute a product that can be used to circumvent digital rights management.  I'm sure you and I both agree that that particular point of law is absolutely ludicrous, but our opinions aren't what matter.  The law has teeth, and it's been used to shut down plenty of products and services that also had legitimate uses.

In the other thread, I mentioned to the OP that if someone were to argue that DRM circumvention (such as ignoring the SL permissions system) is what this tool is for, the he might find himself in trouble.  At that point, he was talking about making a business out of it, and it was implied that the tool would be capable of ripping sculpt maps directly out of SL, without regard for in-world permissions.  Now that it's clear that the tool only works on sculpt maps the user already has on the local hard drive, that particular potential danger for the OP is almost certainly a non-issue.

 


Helium Loon wrote:

 

And even if there were no particular use for it, it can serve as a basic algorithm for those wanting to understand how to write their own utilities for dealing with sculpt maps.  *shrug*

If that's the case, great.  The OP certainly could have said so.

If he'd even said something to the effect of, "I don't much care whether it's useful.  I just wanted to do it just because I wanted to do it," that would have been a perfectly acceptable answer.

He's been presenting it as something that does have practical use, though.  So naturally, I asked about that.  He promised to get back to me, but never did, so when I saw him pop up again with a new thread on the same topic, I asked again.  I don't understand why anyone might think there's anything wrong with that.

Share this post


Link to post
Share on other sites


emSynth wrote:

Well, in regard to the issue of answering anyone's questions regarding the uses of sculpt2mesh, I do not see how I am responsible for that.  It is a data converter.  It converts one form of data to snother.  It was a programming exercise to implement it.  I gave the source code to the community.  

Those are the relevant facts and my responsibility ends there.  Any arguments regarding usefulness or suitability for purpose may be carried out by others as far as I am concerned.  I am not championing this tool or suggesting that you use it, I am just offering it to whoever wants it.  End of story.  

emSynth

 

Great.  That's a perfect answer.  If for you it was just a programming exercise, which you acknowledge may or may not be useful to others, that's wonderful.  I congratulate you on the successful completion of the exercise, sincerely.

That explanation does appear to run contrary to what you said in the other thread, and in this one, but I guess there's nothing to be gained in questioning that now.

Share this post


Link to post
Share on other sites

Also, a few words are appropriate in response to Chosen Few's accusations.  The threats were twofold.  One person said that if I carried out my plans to offer a sculpt2mesh service, I should expect to hear from a lawyer, the obvious implication being that there could follow a lawsuit.  The other was that someone might get angry at me and have a friend who was a hacker, and the implication was that I could expect to be hacked.  

Rather than act fearfully as Chosen Few has suggested, I replied that I did not fear lawyers or hackers, and that their thinly veiled threats were ineffective.  What Chosen Few has chosen to do is twist the situation around, implying that I am behaving in an unreasonable way.  This is just one example of many such manipulations of the facts that clearly indicate deception and manipulation on the part of Chosen Few.  

Yes, it does read like abuse because it is abuse.  This is Second Life, Chosen Few, many of the participants of this forum are thoughtful and intelligent people who will read through your smokescreen of distorted facts and argumentative techniques.  You are not helping your argument by behaving in this way.  Please stop.  

emSynth

1 person likes this

Share this post


Link to post
Share on other sites


emSynth wrote:

Also, a few words are appropriate in response to Chosen Few's accusations.

What accusations?  I never accused you of anything at all, not once, ever.  I don't know where you're getting this stuff.

 


emSynth wrote:

The threats were twofold.  One person said that if I carried out my plans to offer a sculpt2mesh service, I should expect to hear from a lawyer, the obvious implication being that there could follow a lawsuit.

You're kidding me.  That's what you saw as a threat?  Really?  Wow.

OK, let's recap what actually happened.  You yourself mentioned part way through the discussion that many of the legal issues that had been raised were more complicated than you'd anticipated, and that some of what you had thought to be true of the law was incorrect.  In response, I tried to help you by explaining some relevant need-to-know information, and I went on to suggest that you also keep keep an attorney on retainer, to help you deal with any and all legal issues that might arise.  That's the exact same advice I'd give to anyone starting any new business at all. 

Now, is it true that you could potentially have been sued had you distributed a tool that would rip content from SL?  Absolutely.  Did I ever once imply that I would sue you?  Absolutely NOT.  And did anyone else in the thread imply that they would sue you?  Not that I could see.  For my part, it was quite the opposite.  I was trying to advise you on how to minimize your risk.

The whole thing was an attempt to help you, not threaten you.  I really have no idea why you might have thought otherwise.

 


emSynth wrote:

The other was that someone might get angry at me and have a friend who was a hacker, and the implication was that I could expect to be hacked. 

That also was not a threat.  Someone (not me) merely asked what safety measures your tool might have built into it, to protect her content from hackers, as at the time you were talking about running your service on a web server.  That's a legitimate concern for anyone doing business online.

How you went from receiving that innocent question to feeling that someone threatened to hack you, I simply cannot imagine.

 


emSynth wrote:

Rather than act fearfully as Chosen Few has suggested, I replied that I did not fear lawyers or hackers, and that their thinly veiled threats were ineffective.

I did not suggest you act fearfully.  I suggested you engage in the very same reasonable practices that anyone starting any new business should utilize.  Having a lawyer on retainer is not fearful; it's the only smart thing to do.  Taking measures to protect your clients' data from hackers is not fearful; it's your responsibility as a service provider.  I would have thought all this was common sense.

 

 

 


emSynth wrote:

What Chosen Few has chosen to do is twist the situation around, implying that I am behaving in an unreasonable way.  This is just one example of many such manipulations of the facts that clearly indicate deception and manipulation on the part of Chosen Few. 

Again, where are you getting this stuff?  In the other thread, I was trying hard to help you, and in both threads, I simply asked you to explain the usefulness of the tool.  Why you see fit to read more into it than that is beyond me.

 

As for these "many such manipulations of the facts" you you feel so "clearly indicate deception" on my part, would you care to explain what any of them were?  What is it you feel I've been deceitful about, exactly?  What facts did I allegedly manipulate?  And for what purpose?

 


emSynth wrote:

Yes, it does read like abuse because it is abuse.  This is Second Life, Chosen Few, many of the participants of this forum are thoughtful and intelligent people who will read through your smokescreen of distorted facts and argumentative techniques.  You are not helping your argument by behaving in this way.  Please stop. 

Nobody abused you in any way, least of all me. If you feel otherwise, please tell me exactly what I said that you found offensive, and I'll be more than happy to try to examine it, to try to find where the misinterpretation may have occurred, and clear it up.  I certainly did not try to say anything unkind.

Same goes for the "smokescreen of distorted facts", as you put it.  What facts did I distort?  As I mentioned earlier, I've quoted you, word for word, each and every time I've responded to you, precisely to avoid the possibility of distortion.  Do you really feel your own words misrepresented you?

As I said earlier, if you feel I've misinterpreted any of your statements, go ahead and point them out.  Tell me what I got wrong in my interpretation, and I'll be more than happy to take another look.

 

As for the subject of  whether I'm "helping my argument" or not, the fact is I was never trying to have an argument with you.  I can't help an argument I was never engaged in.  I tried to help you at first, and then I asked you a few questions about your product.  Anything beyond that was introduced by you, not me.

Share this post


Link to post
Share on other sites

I believe that you have the best interest of Second Life, in mind.


Some of your questions, are philosophical in nature, and may be best answered, in a newly created thread.

 

Where in the Terms of Service, does it state that a person must protect other Users products?

A person who illegally uses a Converter, is the Criminal; Not the person who made it. You're barking up the wrong tree.

 

You've asked a lot of good questions, and those questions should be answered, but not by emSynth. These are Community questions, moral and ethical questions.

Let's not kill the messenger.

 

I don't believe that you have attacked or threatened any person.

I admire your tenacity. :smileyhappy:

 

 

 

Share this post


Link to post
Share on other sites

Thanks, Knowl. 

Regarding your point, about how some of the questions raised have been philosophical, ethical, moral, better aimed at the community than the developer, etc., please understand, it was not my intent to introduce any of those into this thread.  There was plenty of discussion on all of that in the other thread, and  I really wanted to keep the focus squarely on questions of the utility of the program this time.  It just happened that some stuff from the other thread ended up bleeding into this one, for better or worse.

Now let me respond to your questions. :)

 


Knowl Paine wrote:

Where in the Terms of Service, does it state that a person must protect other Users products?

Oh, it doesn't, of course.  Sorry for any confusion, as the conversation between the OP and me has unfortunately been spread across two different threads.   I wish that had not happened.  It's not surprising that it's a bit hard to follow.  Let me try to clear it up.

In the first thread, the OP was talking about offering his program as an online paid service (an idea he now seems to have abandoned).  My comment about protecting customers' data was in regard to discussion we had had of that (hypothetical) service.  I simply meant that if one endeavors to run an online service of any kind, and one does not take steps to protect users' data, one likely won't be in business very long. 

In other words, service providers have an inherent responsibility, both to their clients and to themselves, to take security very seriously.  That's an entirely different subject than anything that is or is not in SL's TOS.

 


Knowl Paine wrote:

A person who illegally uses a Converter, is the Criminal; Not the person who made it. You're barking up the wrong tree.

I fully agree with you that that's how it SHOULD be, but the US Congress does not.  Under the Circumvention Clause of the DMCA, it is a federal offense to "manufacture, import, offer to the public, provide, or otherwise traffic in any technology, product, service, device, component, or part thereof that... for use in circumventing a technological measure that effectively controls access to a work protected under this title."  In other words, if your product or service circumvents DRM or other access controls, you are a criminal.  Absurd as that may seem to you and me, it is the reality on the ground.

Of course, the person using the product or service is also a criminal, as the law also sates, "No person shall circumvent a technological measure that effectively controls access to a work protected under this title."  There are some exceptions built in for fair use, but they're not easy to use as a defense, far more difficult than other types of fair use claims that do not involve circumvention.

You can read the full title at http://www.gpo.gov/fdsys/pkg/USCODE-2011-title17/html/USCODE-2011-title17-chap12-sec1201.htm .

In the other thread, I cited the example of DVD decrypters.  They have plenty of legitimate uses, but nonetheless, they are now illegal to create and distribute.  You can find my full comments on that in the fourteenth post, in the other thread.  It's the fifth comment section in the post.

Had the OP gone ahead with what seemed to be his original plan, to run an online service capable of pulling sculpt maps directly from SL, I suspect the service could easily have been deemed illegal, under the Circumvention Clause, and he could well have suffered the same fate as companies such as 321 Studios.  But now that the program has been changed to work just on locally stored sculpt maps, that's most certainly not the case, and he's got nothing to worry about.

Since it is now a non-issue in this context, I wasn't planning to bring it up in this thread at all.  I only mentioned it response to Helium's comment on the subject, since his (common sense) assumption about it was incorrect, just as yours was.

Once again, I agree with you, and Helium, and pretty much everybody else I've ever discussed it with, that how it should be is exactly how you described.  Only the person who misuses the tool should be at fault, not the maker of the tool.  But whether we like it or not, how it should be is not how it is. 

If you want to see that changed, write your congressman.  In the mean time, we all do have to abide by the existing law, whether we like it or not.

 

 

Anyway, thanks again for your friendly, fair-minded comments, and for your engagement in meaningful discussion. :)

Share this post


Link to post
Share on other sites

Thank you, for taking the time to share your viewpoint.

I believe that the Creators of Objects, bear a degree of responsibility, related to the products they create.

The Law also recognizes Limited Liability Corporations, in part, for some of the reasons being discussed here. Creation, and innovation, requires freedom in thought, and flexibility in action.

I've had a few grande ideas which were not possible, simply because corrupted people, may take my idea, and do bad things. It is a monumental shame, and is in part, the reason why I was motivated to comment.

I believe that those with the best interest of SL in mind, will act in that capacity, as you have done.

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
Followers 0