OK, in my Windows7 taskbar, right click on Moi lightbulb icon,
then again right click on the next icon and Moi 3.0, (lightbulb Moi 3.0), and select "run as administrator," works.
Hi Max - so the reason it doesn't work right on Mac is that on Mac moi.filesystem.getOpenFileName() is not returning a Mac native path, it's returning the "virtualized" windows path which uses the z:\ drive (with Windows path delimiters). So for instance when the user selects a file really named /Users/michael/desktop/file.png , the path returned from moi.filesystem.getOpenFileName() will actually be z:\Users\michael\desktop\file.png
So for this particular case just treat it always the same as the windows version and it will then work.
I guess it's probably a bug though that moi.filesystem.getOpenFileName() does not return a Mac native path when some other functions do - right now it's kind of a mix with mainly things that are meant to be displayed in the UI end up with the Mac native path in them and others that don't map directly to some display in the UI use the virtualized Windows path instead which is basically the default in the current version. This will probably be different in v4 with more things returning Mac native paths because v4 won't have the whole virtualized Wineskin system in it anymore for the Mac version.
Anyway to get this working on mac right now edit _Heightmap.js and change line 7 to:
Make my first 3D prints using Max's great script.
The image is of a child's hand. Cropped from a much larger photo. And then edited to remove any light coloured elements near the hand.
The blue image is a lithopane with light coming through the differing thickness of a translucent material.
The white one is more opaque to light and looks more like a carving.
Increased points density
Increased scale speed
Added support of bmp-files
Changed path delimiter to "//" (seems it works good with windows version also)
Added image size info
bemfarmer
>> Does this perform similarly to zsurf4?
I don't know. I never used it. :)
Mindset
>>.. might it possible to analyze a surface and produce a height map
Yes, it's possible. We can use PGM as output format. You can open it with photoshop.
Maybe later I'll write such a script.
Michael
Thanks for advice with delimiter
Frenchy Pilou
>>Does it possible to have density of curves
Right now it's not possible. But you can resize an image. If you want to get 60 curves, resize image to 60x60 pixels.
ed
Interesting work. Try to use the new version. It can produce much more detailed surface.
Mas, I've tried twice to process an image that I successfully processed with the previous version of your excellent script. Moi crashed both time. The original image was 2761x2761 pixels.
It imports OK - I used a scale factor of 7.
I then scaled down to about 1/25 of size to give a 395 curves of xyz of 100 100 5.62.
Then loft OK but MOI locks up when I tried to extrude by -5mm.
I guess that it's run out of memory.
Had another go but reduced the original image to 1381x1381 before importing it.
Much the same, still couldn't extrude.
Any chance of making the point density adjustable?
>>Any chance of making the point density adjustable?
Maybe later. Right now you can adjust it by resizing a source image.
>>Any idea what number of curves the original script gave?
If you will load an image 60x60 pixels, you will get 60 curves with 60 points per curve. 500x500 -> 500 curves, 500 points per curve.
If image larger than 600px it will be downscaled automatically.