Sign in to follow this  
Guest Ralph Keune

SBuilder Photo Scenery Help please

Recommended Posts

Hi everyone,I've been trying to get the photo scenery option working in SBuilder and not having much luck... If anyone has time to type some step-by-step help that would be great!Here's what I've done so far...1. Click "Map" button, click in my scenery project, pick the map bitmap image, calibrate. All of this goes good.At this point, I'm not sure...2. Click "Photo" button? Photo Properties window pops up... (what's this for?) I'll stop describing what I've tried from here because it seems I've tried different combinations of things and get everything from Run-time errors (crashing the program) to nothing compiling.Again any help would be great. Thanks Luis for this so-far terrific tool. Roads/Polygon/Line manipulation is terrific with this program.-Ralph

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

>Hi everyone,>I've been trying to get the photo scenery option working in>SBuilder and not having much luck... If anyone has time to>type some step-by-step help that would be great!>>Here's what I've done so far...>>1. Click "Map" button, click in my scenery project, pick the>map bitmap image, calibrate. All of this goes good.>>At this point, I'm not sure...>>2. Click "Photo" button? Photo Properties window pops up...>(what's this for?) I'll stop describing what I've tried from>here because it seems I've tried different combinations of>things and get everything from Run-time errors (crashing the>program) to nothing compiling.>Hi Ralph,After clicking the Photo tool you select the seasons for which a photo scenery is to be generated. Then you click with the left mouse on the LOD13 squares that you want a phototile to be generated. Clicking a second time on a given LOD13 square will unselect it as a photo tile. If you click on a LOD13 which has no underlaying bitmap nothing happens.For alpha blending between the photo scenery and the default scenery, it seems that SBuilder only likes 8-bit alpha maps generated with PSP5.0 or PSP7.0 (it does not like PSP9.0). On this subject Scott will be posting his findings here ...Regards, Luis

Share this post


Link to post
Share on other sites

Thanks Luis for the quick response.I've got the photo tiles generating, but like Steve in a previous post, the alpha channel does not generate. The textures produced by sbuilder are only 43k.The alpha map I'm trying to use (after converting from RGB to greyscale) is the same pixel size as the photo bitmap, and also saved as an 8-bit .bmp file.Any other insight you or others could provide would be appreciated.If you have time to check my files, I've made available the project file and 2 .bmp files at:www.keune.org/fs/holidayshores1.zipThanks again - Ralph

Share this post


Link to post
Share on other sites

Hello Ralph,Thanks for the files! I will have a look to them! I just have received another set of 2 bitmap files made with the GreyScale tool of PSP. The case is that PSP5 (and 7) produces greyscale's alpha bitmaps that are well interpreted by SB (and 84kb bitmap slices are produced!). On the other hand if you use PSP9 GreyScale, the alpha bitmap is ignored by SB. I had some tests on SB before accepting the file as a good one. It seems that I only considered PSP5 and there should be something wrong in SB. I will post here what I will find.Thank you for the feedback, Luis

Share this post


Link to post
Share on other sites

Luis, The bitmap files I made were generated from Photoshop 7. (A little more reference info for you.)I look forward to what you find out!Thanks again - Ralph

Share this post


Link to post
Share on other sites

Hi,This is "real time" interaction :-)I will look to your files! I looked to Scott' files (there is a thread here on some missing alpha tiles). The 2 files have exactly the same size. However the 4 bytes at offset 46 are:good file 00 01 00 00bad file 00 00 00 00If I check the bitmap file formathttp://www.cs.hope.edu/csci342/projects/BMPFormat.htmlthis 4-byte sequence means the number of color used (Value = 0 for full color set). With PSP 5.0 when I use the tool "GreyScale" this 2-byte sequence becomes 00 01 00 00 meaning 256 colors. Apparently later versions of PSP will save the file with 4 Zeros on those 4 bytes.Now in Sbuilder I have this:If ALPHA Then M = ALP(19) + 256 * ALP(20) + 65536 * ALP(21) + 16777216 * ALP(22) ' width N = ALP(23) + 256 * ALP(24) + 65536 * ALP(25) + 16777216 * ALP(26) ' height If COLS <> M Or N <> ROWS Then ALPHA = False If (ALP(29) <> &H8) Or (ALP(47) <> &H0) Or (ALP(48) <> &H1) Then ALPHA = FalseEnd IfALP(1 to NUMBER_OF_PIXELS) is the array of bytes that corresponds to the alphabitmap. The problem is that SBuilder checks for 01 at offset 47 (array index 48) and sets ALPHA=False when it does not find this.I will remove this test on future versions of SBuilder. Regards, Luisps: I will check your files to see if this is consistent!

Share this post


Link to post
Share on other sites

>Luis, >The bitmap files I made were generated from Photoshop 7. (A>little more reference info for you.)>>I look forward to what you find out!>Thanks again - RalphHi Ralph,Your Alpha bitmap has a sequence of 4 zeros at offset 46. PSP (Paint Shop Pro) 5.0 and 7.0 save the greyscales bitmaps with a sequence of 00 01 00 00 . PSP 9.0 and Photoshop 7 (you say that) save the files with 4 zeros. If you have an hex editor you need to change from 00 to 01 the byte at offset 47 (the 48th byte from the begining of the file).Regards, Luis

Share this post


Link to post
Share on other sites

I'm still having problems... still getting 43k textures. I've modified (I think) the alpha file at the correct offset. Please check to see if this new file is right.www.keune.org/fs/hs3al-revised.zipThanks again for ALL the effort!-Ralph

Share this post


Link to post
Share on other sites

No Ralph,You changed the wrong byte! Here is the corrected file!Regards, Luis

Share this post


Link to post
Share on other sites

Yes! It compiles an 87k .bmp file with alpha.Are there any special requirements for texture locations, or other things... the scenery files (.bgl and .bmp) are crashing FS9 when loading.Here's what I have...www.keune.org/fs/sbuilder-sc.zipThis is almost as fun as pulling teeth out!-RalphPS - this scenery is north-east of KALN airport about 2 miles.

Share this post


Link to post
Share on other sites

Hi:-) For the crashes please see this:It is also very important that you set the BGL generation folders. Just right click an empty region of the display to enter the Project Properties Window. You have 2 folders. The first folder is the normal folder for SBuilder output. The second folder is the folder for Landclass and Photo BGLs. This second folder should not have a sister texture folder. You also need to activate both these folders (both these sceneries!) in the FS9 Scenery Library menu. Note that you can force FS9 to load the region that you are working on by choosing "Fly Aircraft to ..." in the View menu of SBuilder from:http://www.ptsim.com/downloads/sbuilder/sbuilder.htmRegards, Luis

Share this post


Link to post
Share on other sites

Hi RalphAs Luis has pointed out, I discovered (with his help) that both Photoshop 7 and Paintshop Pro 8 produce greyscale bitmaps that Sbuilder ignores when producing the alpha bitmap slices for photo scenery (you get slices of size 43kB instead of 84kB). If you try to use the resulting BGL and bitmaps, FS9 crashes.I have verified that bitmaps made with Paintshop Pro versions 7 and 5 do create greyscale bitmaps that work in Sbuilder. We can assume that versions between those also do the job correctly.Don

Share this post


Link to post
Share on other sites

Hi Scott,Thanks for the response and input. After several back and forth messages we got it figured out. As mentioned in an earlier post, I was able to fix my alpha map by changing a byte in a hex editor :)Luis said he was going to take the bit of code out that checks for this byte (or at least modify it) so we can use Photoshop or more recent versions of Paintshop Pro... seems we all can't agree on how to write a 8-bit .bmpYour screenshot looks great. I'd love to hear more about your project.cya - Ralph

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this