Shape-from-Shadow accessory
-
@maggy said:
It depends on what you call a "standard photographic image"?
I should have been clearer...my apologies. My "standard photographic image" is usually an architectural photograph taken with a documented tilt-shift lens. Making such things used to be one of my side professions.
However, SFS is typically used for aerial or satellite photography, as I understand it.
--Lewis
[Lewis Wadsworth]
-
Although there've been publications about SFS in the eighties, the practical use is still rare.
[Maggy]
-
Hi Maggy,
I'm listening... and noticed than you probably never read the small tuto about heightfield_gen. It's strange to see that users who complain about uselessness of scripts or say they don't work never read the dox.
OF COURSE it has NOT been developed for SFS, it's a basic file processor for terrain generation based on greyscale images, just that and nothing else.
Just for fun I've d/led your avatar, saved it as a PPM ASCII (RTFM) with XnView, ran the plugin. A "terrain" of around 26000 faces has been drawn in a matter of a minute. I must say that you are much prettier in real life than in SU
Regards, -
@didier bur said:
...It's strange to see that users who complain about uselessness of scripts or say they don't work never read the dox...
Didier, you are right - as I said above, I tried it only once but than gave up. and true that did not pay too much attention to the dox - but did not even complain!
-
Didier, I did not complain, I did not call it useless and indeed I did not read any docs. I did try to find docs on the above mentioned link. I do know that lots of height maps are either in gray scale or showing heights as colors that can easily be converted to grayscale. For such height maps a script like yours is VERY useful, as long as the dummie first time user can find the docs. I found out today that I should have clicked the asterix. That's what the Dutch call "looking no further than a nose length".
Maybe it would be a good idea to use more standard icons, like the Acrobat icon, to show dummies that we should download a document.
OTOH even after reading the beautiful pdf, I still don't know what went wrong with my first test of heightfield_gen.rb. I used the face of my first message in this thread, scaled down a lot and saved as PPM in Paintshop Pro. The ruby gave no error message. I did allow it to finish for about 30 minutes.
I'm currently on another computer, I'll give it another honest try when I'm back home.But you have to admit that my avatar would look prettier in well performed SFS than what you've done to my face.
[Maggy]
-
@unknownuser said:
Lewis....dumb question but, does it follow that if I took a snapshot on Google Earth I could use GIMP and it's sfs plug-in to creat contours in my model?
I don't think that would work...GE imagery is "orthorectified" (see this Wikipedia description http://en.wikipedia.org/wiki/Orthophoto )so that the tiles tessellate across the terrain without obnoxious joints. To use SFS, you need to start with a photograph where you know everything about the camera and where it was versus the target, and everything about the altitude and azimuth of the source of the light that illuminated the target when the photograph was taken. The orthorectifying process presumably makes a mess of those constants.
But if you had a non-rectified satellite or aerial photo and you had the required sun and camera information, you could convert the photo to a grayscale heightmap and use Didier's Ruby to make a mesh of it. It's my understanding that sfs is always more of an art than a science, so you generally have to make assumptions and tweak the settings once you have a result that seems "in the ballpark."
I'll try to find the time tonight or tomorrow to get this running and see if I can make it work on some test subject.
--Lewis
[Lewis Wadsworth]
-
Just to amend a previous comment, it seems that this SFS plugin will not install on GIMP on anything but Windows, despite a source code package being available. (GIMP is interesting in that on UNIX-type systems it has its own built-in compiler for plug-ins.) I'll give it a shot on my Windows computer tomorrow night...I've already used up my spare time for the evening trying to interpret the errors flagged when trying to install it on my Linux machine (where I had hoped to use the resultant heightmaps with Blender).
Incidentally, while doing a web-search on this SFS plugin I found a company that claims to make something similar for Photoshop.
http://www.cgsd.com/bumptexture/SFS.html
They want nearly $500 for a package of filters (for Windows only) that includes this. There's a 10-day trial period, though. The website looks a bit amateurish, and their movie of the filter in action seems to show an archaic version of Photoshop... PS 5 or 6, so who knows if this is still a viable plugin.
--Lewis
[Lewis Wadsworth]
-
They call it SFS but it's actually bumpmapping.
See http://docs.gimp.org/en/plug-in-bump-map.html
As you can see, the middle part of the example picture strip is the actual bump map, white is high, black is low. Just like what Didiers ruby expects.Both SFS and bumpmapping are science at its peek. Bumpmaps from actual 3d information are a very reliable way of representing this 3d info textured in a 2.5D way in very small file format. Going from a single 2D picture to 3D can not be reliably done with bumpmapping, while SFS can, but not with any image.
There are high end video camera's with very advanced bumpmapping capabilities, but they use time of flight (TOF) technology to create the bumpmap. TOF means it uses the time that light needs to reach the sensor to calculate the distance. You can see the result of such cameras being used very creatively for example in movies and commercials where they're able to freeze frame while you see smoke and flowing water "freeze" in mid air, then zoom, pan, orbit the view. What you do not see is that the camera actually doesn't move or zoom.
Another effect is titles floating in mid air between a show host and the background in a live broadcast.[Maggy]
-
@maggy said:
They call it SFS but it's actually bumpmapping.
See http://docs.gimp.org/en/plug-in-bump-map.htmlDifferent plugin, Maggy. That is a GIMP mimic of a Photoshop plugin, Lighting Effects, that I have been using since 1993 or so.
A bump map is one use of the grayscale images you produce with the results of sfs, otherwise known as photoclinometry ( http://en.wikipedia.org/wiki/Photoclinometry ). In most 3D modelers, a bump map is procedural distortion of texture based on a grayscale image, but a heightmap is used to create or displace mesh polygons. The images below are of a SketchUp model I made of the Noctis Labyrinthus feature on Mars, constructed with a heightmap produced using MOLA data, courtesy of NASA/JPL. It is not a product of SFS, but if you download and decompress the SFS plugin for GIMP it does include a Viking satellite image of another feature on Mars that you can convert to a heightmap. I'll be trying it tonight, assuming I have access to a PC running Windows.
There is seriously complex application package available from NASA, called ISIS 2, that incudes pc2d, a shape-from-shadow interpreter used by exo-geographers for analyzing planetary images. It actually includes procedures for compensating for albedo, so that you don't have to cover whole planets in talcum powder.
--Lewis
[Lewis Wadsworth]
-
Your link to the Paintshop pluging contained no explanation whatsoever of the word bump map. That is why I placed another url, to a Gimp plugin that does explain that term.
But the Paintshop plugin is a smart bumpmapper and not a real SFS.
@unknownuser said:
Animation of space ship going through a tunnel (seen at right) lined with rocks. Bump maps of the rock material were created by the Shape from Shading plug-in.
@unknownuser said:
Image can be rendered as a bump map in your 3d application
First quote can be read under Tunnel.avi, second is the end of the plug-in demo SFS.avi.
edit: added model to demonstrate difference between BM and SFS. This guy is nice and grey. I have neither BM nor SFS software installed. But I believe BM will probably push this man into the background while SFS at least theoretically should be able to see that he is floating in mid air. We can see that at first glance. It was the intention of mister (professor? doctor?) Horn, on of the founding fathers of SFS to give computer vision that very same level of intelligence.
The S from Shape stands for 3D, bump maps can give a very nice 3D impression, but are actually no more 3D than stereoscopy.http://www.sketchucation.com/forums/scf/sas/Ruby/BMP%20vs%20SFS.skp
Advertisement