Forum: Bryce


Subject: tiff2pgm help?

gammaRascal opened this issue on Jan 19, 2004 ยท 27 posts


gammaRascal posted Mon, 19 January 2004 at 11:37 AM

okay i found it (: who else uses it? im reading the readme and my eyes are getting blurry...




bikermouse posted Mon, 19 January 2004 at 12:21 PM

Twisted_Symmetry, What type of problem are you having with it other than the readme file? BTW: You can edit the text of the readme in MS Works by choosing edit:select all and in format:font reselecting the font type, color and size. Also you should get the uPDATE not the original as it's a little better. Notes: tif2pgm was developed in response to a post - series of posts from Agent Smith who was wishing that there was a converter from 16 bit grey tiffs to the pgm format for import into Bryce and who was the primary tester of the software. Therefore the 16 bit grey scale part works best with photoshop CS. The eight bit part should work with any version of Photoshop (although other than 5.0le the eight bit part hasn't really been tested) or Corel Photopaint 8. people using other apps notably psp 7-8 and recent versions of Macromedia have reported problems which I finally realized would involve spending moretime than I had to work on it. The 24 bit color part is pretty much experimental and at this point I'm thinking be dropped from any future version. There is no mac version nor will there be unless someone else does that. It seems to work ok with w2000,ME and XP with the above considerations in mind. I'm on to other things that life has put in my way, but if your difficulty with the converter is not too difficult I'll try to explain if I can. - TJ


JC_01 posted Mon, 19 January 2004 at 1:39 PM

"There is no mac version nor will there be unless someone else does that" You mean it's NOT a mac version???? BOY did i read that wrong somewhere LOL I thought, for some stupid reason, it was mac only! so never even bothered to read anything about it... runs off to do some exploring


Erlik posted Mon, 19 January 2004 at 5:08 PM

If I remember correctly, the main problem in apps other than Photoshop (6.01 CE in my case worked fine. see that red-, gold- and red-white-blue-coloured banners in the gallery) seemed to be that the tiff was saved compressed, so tiff2pgm couldn't read it. So, TS, if you're working in Photoshop, check Advanced TIF options to get uncompressed TIFs. I don't know what to do in other apps. BTW, since I'm currently trying out an app called Photogenics, which supports HDR, I'll try creating a 16-bit tif and report what happens.

-- erlik


madmax_br5 posted Mon, 19 January 2004 at 5:57 PM

hey i'd be interested in making a mac version if i can get some specifics of how it works from Bikermouse. I have CS so i have plenty of tiffs to test with. :)


gammaRascal posted Mon, 19 January 2004 at 6:19 PM

okay... i did a search on 'pgm' here and came up with some reading to do. so far i have been using flash to build vector based images instead of ps. (i just like to workflow better in mx) but mx doesnt export in tif, so ive been exporting in png and/or bmp for photoshop then exporting again into tif after some more (light) work for laticing in bryce. result are pretty lame so far. ive latticed with both bmp and tifs with no real difference. tif2pgm worked great, i guess i wasnt prepared for that kinda shift in bryce. ill work my way to it (: thanks for all your help.




JC_01 posted Mon, 19 January 2004 at 7:05 PM

Yea, i got it, and tried it out....and i get the same error, on tifs out of ulead, psp7 and photoshop.... LOL they're all compressed...i'll have to play around with it some more...lol


rickymaveety posted Mon, 19 January 2004 at 8:12 PM

With PSP you don't need the converter. PSP reads both tiff and pgm files (just make sure you have both checked as files associated with PSP).

Could be worse, could be raining.


bikermouse posted Mon, 19 January 2004 at 10:49 PM

JC, The converter doesn't handle compressed files so in photoshop, make sure you save your tiff as uncompressed. As for whether the converter handles pgms better than PSP I couldn't say - I decided not to handle PSP for the reasons that I don't have PSP so I couldn't test it out, I don't know how versitile PSPs conversion process is and a another reason that I won't mention here which nonetheless should become obvious as you read over the associated threads. Max, Right now I'm not even thinking of releasing my source code but the tiff specification should be available from Adobe and the PGM format is really simple. If you do a google search for PGM, you should find access to the spec such as it is there really isn't all that much to it. The Tiff format on the other hand, takes a little time to figure out, and it's relatively complicated compared to the BMP or TGA formats but is really versitile. It all boils down to binary to text conversion and to some degree pixel(data) manipulation. If you need a hand getting started in developing it for MAC after looking at the tiff spec, contact me by IM. - TJ


madmax_br5 posted Mon, 19 January 2004 at 11:29 PM

thanks! What I was thinking was to program a converter that will convert any tif into a pgm file, or into a 16bit tiff. So basically, you could load an 8bit tiff, the program would use a spline filter to convert it to 16bit, and then export it in native tif or convert it to a few other formats. I'll read up on the specifications. This will be my first program, woohoo!


bikermouse posted Tue, 20 January 2004 at 12:25 AM

Max, replied by IM. - TJ


AgentSmith posted Tue, 20 January 2004 at 1:17 AM

Oh...I could rant for hours about pgm's and 16-bit, both my frustration over no Windows solution for them, and my joy at bikermouse creating said (windows) solution... I've spent a couple years off and on researching all things connected with 16-bit, pgm's, dem's, etc. Pretty much everything you see on the www is 8-bit, whether it is full color or just B&W (grayscale). But, when referencing grayscale ONLY (NOT color), when you make it 16-bit it means it will have 65,535 levels of gray (vs. 8-bit which is only 256 levels of gray) Which means a FAR smoother/more detailed terrain. The ONLY way (period) to get something/anything into Bryce that has 65,535 levels of gray is to go the PGM route. (now, thanks to bikermouse) *DEM's can also be 16-bit, but there are various kinds of DEM's, making it more complicated to find a solution. Anyway...(I digress) *MACINTOSH - Oh, Mac users have had a solution to this problem for YEARS....(grrrrr). Here (http://www.reliefshading.com/software/CartaPGM/CartaPGM.html), which is part of this tutorial (http://www.nps.gov/carto/silvretta/dem/) and this one (http://www.nps.gov/carto/silvretta/bryce_dem/) *8-bit to 16-bit - Unfortunately, taking an 8-bit picture, and converting it to 16-bit doesn't really create that missing 65,279 levels of gray. ;o( But, I have noticed if I do take an 8-bit, switch to the 16-bit mode in Photoshop, blur the pic, and then save to tif, and convert, It WILL look better than a straight 8-bit, so it's not without it's benefits. :o) But, THE best example is when an original 16-bit grayscale image is created, saved as a 16-bit tif, and then ran through the converter. Since I now have Photoshop CS (version 8.0), which can create and manipulate 16-bit with all its drawing tools, all this is finally a reality for me. What was the original question? Lol... AgentSmith

Contact Me | Gallery | Freestuff | IMDB Credits | Personal Site
"I want to be what I was when I wanted to be what I am now"


Erlik posted Tue, 20 January 2004 at 1:38 AM

I tried Photogenics, but it's messed up. Saving as 16-bit image creates something strange that cannot be opened by PS or by Photogenics, and tif2pgm says it's a 24-bit image anyway. So, no luck there.

-- erlik


AgentSmith posted Tue, 20 January 2004 at 1:41 AM

I believe bikermouse had to "make" the utility based upon the 16-bit .tif he had me send from Photoshop, I don't know, but maybe other programs make a "different" 16-bit tiff? Absolutely guessing here, lol. AS

Contact Me | Gallery | Freestuff | IMDB Credits | Personal Site
"I want to be what I was when I wanted to be what I am now"


bikermouse posted Tue, 20 January 2004 at 4:38 AM

Agent Smith, Yes - first I had to read the tags* in the file you sent, write code to handle them properly then I had to test the program against your tiff. I did the same thing for the 8 and 24 bit codes using images I created in PS 5 and Corel Photopaint 8. I also ran your image through Photopaint 8 and made a 16 bit Corel version sucessfully and used that to test against for the Corel based tiff code(a seperate but parallel function from the code for Photoshop based files) and so the 16 bit part SHOULD work with 16 bit Corel generated tiffs as well if there is such a thing(Corel Photopaint 8 apparently has the same limitations as PS 5 regarding 16 bit tiffs.) It is the complexity of the tif format which potentially causes problems with other programs such as PSP. One of the warnings relating to tiffs in one of my referance books said, and I'm paraphrasing here, 'that it is difficult to get your code to handle all possible cases of tiff files.' I've found that no two paint programs seem to handle the tiff specification quite the same way although the older Macromedia was really close to Photoshop. As I wanted to get tif2pgm out before Christmas, I didn't try to fully develop the code to handle every possibility. I might rethink the code to see if I can get it to handle the various cases better later on; for right now I'm thinking that my priority should be to handle some real world problems that have cropped up since Christmas. When time allows I also wanna start reviewing what I did last year regarding automating commands from another program and get back with that and start working with textures more. So it might be some time before I get back to tif2pgm. good Brycing, - TJ *the tag info is what shows up on the "yellow lines" at the end of the program if it is sucessful.


burgi posted Tue, 20 January 2004 at 6:23 AM

what did you write the program in? c++? i wish i knew c++...


Quest posted Tue, 20 January 2004 at 8:21 AM

I don't want to burst any bubbles or rain on anyone's parade, and then again, maybe I'm not. In light of the fact that Bikermouse has gone through so much work to afford us Brycers with "PGM" conversion, and thank you so much for taking the time to do this for us Bikermouse it truly is very generous of you, was anyone aware that Photoshop already has a free "PGM" converter plugin? I just performed a Googles search, it can be found here; Richard Rosenman. This is what it offers; This filter imports and exports Portable PixMap (PPM, PGM, PBM) images. The PPM / PGM / PBM file format is a convenient image file format which allows one to save an image in ASCII or BINARY mode. Because ASCII is simple text, it allows anyone to easily import these images into one's own applications. It also allows one to open the ASCII file in any text editor and make changes if desired. ASCII images are text based and therefore large and slow loading. BINARY images are smaller and faster loading but are not text based. Portable PixMap Importer/Exporter 2.0 now supports 16 bit RGB and Grayscale images.


AgentSmith posted Tue, 20 January 2004 at 9:13 AM

Yup, came out in mid-december, about 4-5 weeks ago. I think bikermouse made the first succesful pgm about 2-3 weeks before that. Richard Rosenman was one of the MANY people I e-mailed begging to make something that would make a 16-bit ascii grayscale pgm for Windows. He was one of the many I never heard back from. But, I knew once Photoshop CS was around more, people would start coming around...lol. AS

Contact Me | Gallery | Freestuff | IMDB Credits | Personal Site
"I want to be what I was when I wanted to be what I am now"


bikermouse posted Tue, 20 January 2004 at 5:24 PM

Quest, I don't live in a bubble - nothing for you to burst. Having looked at the plugin, I guess you have to have photoshop CS to get the plugin to work right. All I can get with it is a nieve 256 shade pgm file in my lame version of PS 5 and Corel Draw 8 Photopaint. I designed tif2pgm so you could use it with 8 bit tiffs and so find some 16 bit utility in it even if you don't have PS CS. From what I've seen so far tif2pgm appears to be the most versitile tif to pgm converter to date but I'm sure given time that will change. Also from what I understand there are others working on the idea, so we'll see what they come up with as well. I think that it is a good thing that Agent Smith got so many people working on the idea; eventually someone will come up with something that is so good because of that that even I will be happy. I had plans to expand the 8-bit part into something way more interesting to work with and provide that publically for free in the future, but for various reasons I'm rethinking that idea: Last week geep almost left these forums due to the negativity of others, Helmut left because of all negativity of the war supporters some time ago and not too long ago _Dodger left because he was ostricised for reacting to some negative comment. I don't put myself in the same category as these great people, but as I try to offer more to these communities I am beginning to see why they left. - TJ


AgentSmith posted Tue, 20 January 2004 at 6:48 PM

Forums can be tough on people. And, it is grossly unfortunate that any member is lost here especially for reasons that aren't directly art-related (imho). And, it's a bit of a mental balancing act for some to offer up their time, teaching, resources, or your own creations freely to anyone and then still be able to let bad vibes roll off their back. Lol, its difficult to do that even if you aren't offering up anything. ;o) I stay out of the non-art discussions unless I'm needed in there as a Mod. I'm here for the art. *As far as tif2pgm goes, what does set it way apart is it is a stand alone utility, no other host program needed. More of a chance for future versatility. (hope hope) AgentSmith

Contact Me | Gallery | Freestuff | IMDB Credits | Personal Site
"I want to be what I was when I wanted to be what I am now"


Quest posted Tue, 20 January 2004 at 6:59 PM

Bikermouse, I hope you arent interpreting my heads up to you about this Photoshop PGM converter as negative feedback from me. To the contrary, Ive already praised you on your generosity for having undertaken this project on our behalf. I only wondered if you knew about its existence before you started out to write yours and I didnt want to disappoint you if you didnt know already, thus the comment about not wanting to burst any bubbles or rain on anyones parade. Im happy to hear that Im not bursting anything. I firmly believe you deserve your just rewards for your accomplishments. So again I say to you, thank you for your kind generosity and in putting the Bryce community foremost. I know nothing of this other converter and I didnt know it was a Johnny-come-lately Photoshop plugin because it says its version 2.0, so I assume there must have been a version 1.0 and all the updates in between. I personally dont know what this plugin can or cant do, I simply havent tried it. Im sorry to hear that people are leaving this forum because others dont agree with other members political opinions. People should understand that people are wide and varied and from all walks of life, from different parts of the world and not everyone is going to agree. This forum is not a political or religious discussion forum. Not everyone knows the art of debate and in a political or religious discussion, someones feelings are going to get hurt and yes, youre going to get negativity as a result. So this doesnt surprise me and should be expected in such a situation. The best thing would be, not to air your political views unless youre looking for a rebuttal. People feel very strongly about their personal convictions and can often times get down right combative when it comes to defending them. Im truly sorry that youre sensing an air of none appreciation. For without people such as yourself, where would this forum be?


bikermouse posted Tue, 20 January 2004 at 8:14 PM

Huh? oh yeah those were two of my olt time favorite beachboys songs. Quest, I didn't want to imply or talk politics - I'm as hardboiled as they come there but thats a topic for another forum . I generally feel pretty good about the forums especially Bryce. I wasn't too worried about intellectual property even psps converter which I understand has been around since psp 7 is predated by the work of Dr. John Levine who as far as I know was the first one to make an implimentation of 'whthaveyou including tif to p?m' and back out as another format. rather than emulate his work I started from scratch as this was a hobby project, using only the tiff spec and a minor exploration of the pgm text file. With Agent Smith's help I was able to bring to you all something that I thought would be useful. I originally got the impression that some of those using PSP seemed smug in the fact that they already had this feature and also I got the impression from them that they were saying what was I doing duplicating what was already available to them? To any of them that still feel this way I say ok fine, apparently you have the capacity to do this already, but what about the rest of us? Therre are a few well to do people here but most of us can't afford to buy every application that comes around no matter how good. To the rest of the PSP users I say I'm sorry my frustration with a few restless souls affected you as well. Perhaps I did become overly sensitive about it partially because the project took a lot of my free time, well over 50 hours that I could have put into other things. As simple as it is the source code is over 40 typewritten pages already, and I estimate it will be over three times that large at its end. Any frustration that I feel about it isn't really about me being appreciated. It would take a lot more than a simple utility for that to happen but rather the looking a gift horse in the mouth. "... Although is is only tomato water, I hope you will accept the gift I bring; for although it is only tomato water I bring it to you as a gift in the proper spirit of giving ... " - unknown. Agent Smith, I set it up so it would be expandable. come the middle of the year I might get back to it and really show what this baby'll do with the right algorithms under its hood. One of the things about tiff is it will handle clipping, multible images and "curves". That would take some experimenting with and perhaps it's barking up the wrong tree but there's more to explore there. the tiff processing code needs to be able to handle at least LZW and JPEG compression but these might have to wait for patent expirations (LZW patents expire this year as this is an international forum Japan's (the last international one)patent runs out middle of June.) There are things I'd like to explore in layering, but that would require ps or other to save a tiff as a layered image and I think paint programs intentionally save layers only in native(propriatary) format which is another can of worms. As I said right now I have other things to do but all comes to "He who waits". ... Inshort I guess I blew a fuse - sorry about that, - TJ


AgentSmith posted Tue, 20 January 2004 at 9:13 PM

Lol, I love how Brycers think what "blowing a fuse" consists of...;o) Makes this the easiest/best forum to Mod. You people are the nicest/best. (imho) AS

Contact Me | Gallery | Freestuff | IMDB Credits | Personal Site
"I want to be what I was when I wanted to be what I am now"


burgi posted Wed, 21 January 2004 at 3:15 AM

if you need a some extra coding doing, drop me a line i can help if you want it. John


Erlik posted Wed, 21 January 2004 at 11:57 AM

He who waits? bikermouse, I hope you don't have any truck with the Old Ones. They are a tricky bunch at best.

-- erlik


gammaRascal posted Wed, 21 January 2004 at 12:20 PM

i hate to highjacks this thread back but since there is an ebot audience... (: being new to bryce and pgm for that matter. maybe im doing something wrong. when i import the pgm i then get a terrain but split in four. and it still has the base. is that what the base and basehi attributes are for? sorry im still a little blurry. (me eyes are fine, im just an old kid with a low attent.....




bikermouse posted Wed, 21 January 2004 at 1:46 PM

Twisted_Symmetry, Gotta watch your eyes. I used to get afterimages after being on the computer too long. I've learned to take breaks wevery hour or two, where you get up, exercise or just stretch, look at other things for a few minutes then get bach to it. First make sure you are using the uPDATE version of the tif2pgm converter (t2p9). Secondly what program did you make the tiff in? version? non-Photoshop/Corel Photopaint generated files might not work right. Next: try using 512x512 or 1024x1024 as the size of the image in your paint program. This is a problem within Bryce from what I understand - If the image is nonsquare or not an exponet of 2(256,512,1024,2048 etc) you will get an offset such as you describe. Finally: to get rid of the "base" you will need to clip the bottom in bryces terrain editor until the "base" just shows up as red. If you don't know how to clip terrains in the editor, Aldaron posted a tut a while ago on hoodooies(sp) which describes how to do this along with other neat stuffYou should find a thread about it by searching this forum under the keyword Aldaron(recommended reading). If you are having difficulty getting the "base" to go away without clipping the rest of the image using 8 bit tiffs, try reducing TNC to about 8000(you lose some resolution that way but you should be able to clip it). leave the other options alone until you get used to the program - mostly they're for people to mess around with to alter the image height/scale once thy're used to the program; right now TNC(total number of colors) should be the only one you need to mess with and then only if you can't get rid of the base in Bryce terrain editor (this could also be edited manually in the pgm file (TNC is merely a convienience). You might also try altering the height(y size) in Bryce attributes to get clipping to work. - TJ