For rendering: new material file format: jpg vs bmp

Started by George Smith, February 09, 2010, 11:19:05 AM

Previous topic - Next topic

George Smith

When adding new materials and items, which is a better format when it comes to rendering, .jpg or .bmp?
Does one render better and/or take longer to render?  It seems like jpgs are way smaller for the same picture, so I'm guessing they must be compressed, but I don't really know.

Not sure it matters, but specifically, I am working on different wall cladding materials (cedar siding, zinc tiles, etc).  I found a photo of a cedar sided wall, resized it, distorted it so the perspective is straight-on, cropped it, rotated it so that it lines up when tiled, photoshopped out an area that was lit differently by the sun, changed the color/hue so that it looked more like real clear-stained cedar, and then I saved it as a new siding material.  I plan to do this with a bunch of other stuff, so if anybody knows if one format works better, I'd love to know.

Thanks
George

Allan Chesney

Hi George,

No real differnce really in the end result.  The image stays on your PC drive and is referenced, so size is not really an issue.  The only consideration maybe is for trueness of colour - you will notice all the paint colours are saved as BMP.  The critical one however is if you want to make part of the image transparent - eg a 'cut out' of a person.  You do this by setting the part you want transparent to Magenta (Red 255, Green 0, Blue 255). They must be in BMP as the compression in the JPG causes some pixels to change colour ever so slightly, so you end up with a pink fringe around the transparent part.

Your siding has adjusted really well. The critical part is making sure the lighting is even or you get a square pattern all over it and that there is no unusual grain in the wood for example that repeats and hence looks wrong. Usually they are reduced in size to 128 or 256 pixels square.

I generally use JPG unless transparency is required.

Allan
Allan Chesney,
Kalamunda, Perth, Western Australia
www.alchesdesigns.iinet.net.au

TurboFloorPlan Home and Landscape Pro V16.0.C1.901
Envisioneer Construction Suite V9.1.2.1234
TurboCAD V17 Professional

George Smith

Allan,
Thanks for the info.
So, if I understand you correctly, a jpeg file that is 1/30th the size of a bmp will render basically the same? 
But, the bmp won't take any longer to render?

If that's the case, I can see why you would use the jpg, but I think I would use bmp, since if/when I modify it with another program down the road, it's in a better format.

What did you mean
QuoteUsually they are reduced in size to 128 or 256 pixels square.
Does TFP reduce it when applying it the the surface?

Draft Patrick

George,

There are several reasons why an image looks better than other in a texture, but certainly, the format of the image is not the most important reason

Digital images are defined by pixels--> the pixels are small squares that contain the image info. If you set more squares in a surface, there will be more information therefore the image will have best quality
In the first image attached (pixels) you will see the same image--> left side: less pixels (this means larger pixels) therefore bad resolution --> Right side--> more pixels (this means smaller pixels) therefore a good resolution

So the secret for the quality is not in the format, but in the PPI factor--> PPI means Pixel Per Inch--> usually, for good resolution (for textures or background) you need to use at least 300 PPI (see second image attached)

Now, how do you define the PPI factor? Again, you will need a good image program and set the compression factor. The MS Paint program uses max. compression for JPG, this is the reason of the small size of the files. But in other programs, you can set this factor.
BMP is an old format, this is the reason of the larger sizes of the files, and it is absolutely not related with quality

I will be glad to help if you have additional questions about this issue

I hope this helps

Pat

Patrick Sullivan

Doug.S

Yes, I agree the "ppi" is very critical.  Too large an image and all you waste is time and file space. Too small and the final render may look mushy/blurry/soft/out-of-focus.   If you match the "ppi" of your texture image close to your final TFP rendered image ppi then you have the best balance of image quality and small file size.

For the same ppi, tho, a highly compressed (lo quality, small file size) .jpg is usually of poorer quality than its original .bmp.  Look at one of each side by side and decide if a .jpg is good enough or has too many artifacts from compression.  From a distance, our eyes wash out the irregularities....but up close we see bad detail easily.

Also.....when making your texture image....be sure that the final step makes it a "seamless" texture map....otherwise when applied you will see a line everywhere the image is "tiled" side by side.

Photoshop easily makes seamless images ....use the "offset" filter  and repair any interior image mis-matches, then save for output.

Doug.

Allan Chesney

Hi George,

Pat and Doug have added a lot more detail there which you may find useful. As they point out, if you are rendering up close, a good quality textures are important - from a distance it does not matter much.

Re your question about my comment 128 and 256 pixels size. You will notice if you look in the TFP Textures folder with Windows Explorer, there about over 5,000 textures and about 25% are BMP, the rest JPG. There are exceptions, but most are either 128 or 256 pixels square.  In the previous versions of the program (before V12) all the textures I think were 128 square but TFP (V12 on) will accept much larger.  It may just be to make it easier for users so they do not have to keep setting the scale within the program itself.  If the sizes are consistent then the scaling will be also, so adjustments rarely needed. 

Obviously if you an image with a large number of pixels (yours was 1000+ square) the scale would have to be adjusted so the size of the planks will be in the right proportion to the building. That is easy enough to do but if all textures were random sizes, every one would have to have the scale adjusted. TFP gives you the ability to adjust the scale of the image you insert and then replicates (tiles) it across the space where you use it. As you change the scale there will be more or less of copies of the image across the space, so the planks in the image you inserted will be wider or narrower accordingly. You need to set the scale so that you end up with the correct number of planks in the height of the wall. No doubt there is a mathamatical way of doing that but I am not a Mathematician! I just change the scale and count the planks (or brick rows usually for me) so that it is correct. Working in metric, I know that if I have a file that is 300mm square and set the scale to 300 x 300 (default is 1000 I think) then the tiles turn out the right size.

Whether there is a reason they seem to prefer 128 or 256 I don't know - presumably a computer programming default consideration (leaves me for dead that side of computers) - maybe Pat or Doug can throw some light on that.

Allan

Allan Chesney,
Kalamunda, Perth, Western Australia
www.alchesdesigns.iinet.net.au

TurboFloorPlan Home and Landscape Pro V16.0.C1.901
Envisioneer Construction Suite V9.1.2.1234
TurboCAD V17 Professional

Draft Patrick

Quote from: Allan Chesney on February 09, 2010, 07:39:49 PM
Whether there is a reason they seem to prefer 128 or 256 I don't know - presumably a computer programming default consideration (leaves me for dead that side of computers) - maybe Pat or Doug can throw some light on that.

Usually the images used for textures are 128 x 128 pixels or 256 x 256 or 512 x 512. The size means compression and definition-->  512 has more pixels than 128, therefore more definition
Regarding the number--> why 256 and not 247 for example--> Once I was given a very complex explanation using algorithms and integers ....  :o making the story short...  :D --> two settings--> subblocks of 4x4 pixels / 8 bits per pixel

Pat
Patrick Sullivan

Allan Chesney

Hi Pat,

Thanks for the short explantion - I knew there would be a long one - thanks for NOT giving us that, as I know it would be wasted on me at least!!!

I know these things are all multiples of each other (2, 4, 8, 16, 32, 64, 128, 256, 512 etc) in the computer world and they relate to bits and bytes etc but that is about the point I lose it!!  Thanks to the megapixel race in digital cameras, I at least understood that, but I am too old to worry about the inner workings of computers. I am just satisfied when they keep working!!

Allan
Allan Chesney,
Kalamunda, Perth, Western Australia
www.alchesdesigns.iinet.net.au

TurboFloorPlan Home and Landscape Pro V16.0.C1.901
Envisioneer Construction Suite V9.1.2.1234
TurboCAD V17 Professional

Draft Patrick

Patrick Sullivan

George Smith

When I have the time, I'm going to read these over again very carefully, and I'll probably have a couple follow-up questions.
Just wanted to say thanks, though, for all the great information (Allan, Pat, Doug).
George