Author Topic: transparency via magenta in photo-board and .3ds/texture map???  (Read 1185 times)

Doug.S

  • Hero Member
  • *****
  • Posts: 1137
    • View Profile
transparency via magenta in photo-board and .3ds/texture map???
« on: October 12, 2007, 04:27:06 pm »
I'm trying to apply a texture map to a photo-board and a .3ds object and hoping the ability to get transparency works in both places
(all program usage with HA off)

See attached results.
RT3 = raytrace q=3
RS5 = radiosity q=5

Help file says to use magenta in applied image map (r=255, g=0, b=255) which I did....but it does not work...

RT does not work at all

RS:

on photo-board it seems like the gray areas (shadows) between object and magenta (where I was not real careful to paint magenta) are transparent (sun shines thru)

but as applied to a .3ds object....magenta turns black???...AND most of the image is black, not the photo colors...and gray areas turned white-ish???

(same .jpg image applied to both the photo-board and the table side)

Anyone with any ideas to help resolve?

.bld file attached in .zip in next "reply"

Doug.S


PS   after looking at images a while....WOW the shadows in raytrace vs. radiosity are substantially different too for the photo-board.....raytrace has a thin line shape and radiosity has a rectangular shape....I think I may have set the photo-board to auto-face the camera between raytrace and radiosity.

Table shadows the same for both renders.

EDIT:  figured out the reason the "magenta" did not act as transparent in radiosity render....when saved as a .jpg, compression changed color from true magenta to close to color....look carefully and a few places have real magenta.  Lesson learned = save-as .bmp (no compression) and magenta stays true color.

BUT still no explanation why in radiosity render the other colors all turn black (transparency via magenta works OK).

And apparently raytracing render does not ever recognize magenta as transparent (but does render all colors OK).
« Last Edit: October 13, 2007, 06:42:17 pm by Doug.S »

Doug.S

  • Hero Member
  • *****
  • Posts: 1137
    • View Profile
Re: transparency via magenta in photo-board and .3ds/texture map???
« Reply #1 on: October 12, 2007, 04:35:06 pm »
.bld file for above renders attached here

Doug.S

  • Hero Member
  • *****
  • Posts: 1137
    • View Profile
Re: transparency via magenta in photo-board and .3ds/texture map???
« Reply #2 on: October 13, 2007, 09:27:03 am »
More testing....more confusion.....hope IMSI has an answer????

See attached files.

RT5 = raytrace q=5
RS5 = radiosity q=5

Used 2 standard printer test files, with all ranges of colors, to see what colors render as transparent....applied to photo-board

Not expecting raytrace to render transparency (why not?)...and it looks OK

But radiosity rendered no transparency like above, not even in expected "magenta" colors

AND one photo-board face again rendered all black....WHY??? 

both applied texture maps are "face" and approx. 40K files

Doug.S

PS the supplied TFP12 images such as flag or animal does render and "cut away" unwanted image edges...perhaps I'll try to find and open those images to investigate....if can "open" the library file.
EDIT:  I looked thru the TFP12 texture files and discovered that files with MAGENTA for transparency ALL seemed to be .bmp files (none as .jpg that I found) and most are quite large file size such as larger than 100K each.....so more testing on my part to apply my images as .bmp instead of .jpg to get transparency.....I can create a simple object shape in Ps to test....see future "reply" below.


EDIT:  having problems with "black" renders of images, I swapped the applied images and found it was the source image that caused the problem.  Tried another size of same image; got same problem.  Tried a different image source file and rendered OK.  Conclusion: source file (all .jpg no known problems) may not render correctly in all cases....why = unknown  (but had similar problems on rare occasion with FP10 and FP11 but was always fixed by using a different file compression size of same source file.)

ALSO learned that on occasion a radiosity render would make a terrible result....fix is to "reset" and re-render....turned out OK.  I did not have to close program and restart program or PC as yet as Allan has had to do at times.
« Last Edit: October 13, 2007, 10:39:34 am by Doug.S »

Doug.S

  • Hero Member
  • *****
  • Posts: 1137
    • View Profile
Re: transparency via magenta in photo-board and .3ds/texture map???
« Reply #3 on: October 13, 2007, 12:20:52 pm »
more testing...not much more progress

I made a .psd file and saved as .bmp   .jpg  and .tga   and applied to photoboards and rendered as raytrace and as radiosity from with q = 1,2,3,4,5 and results are:

screen shot view (see attached) shows the view correctly (magenta is transparent), other colors OK, "transparency" in Ps does not show (maybe need to save with alpha channel?....but no matter if magenta works).  Screen shot also shows that when saved as .jpg the magenta at the edges gets its color shifted and is not a "clean cut"....which is understandable.  Tried playing with color edge adjustment "blur edge bleed" or something deep in materials...can't remember name exactly.

Raytrace renders OK....no transparency but colors all OK (magenta renders as magenta)

BUT no radiosity works at all....yes magenta cuts out transparency OK but everything else is black....for all 3 file formats (jpg  bmp   tga)


Also with so many renders and resets I can notice that if I reset and re-render the results are a bit different....sometimes a bit brighter and sometimes a bit darker for same settings....no change, just reset and render = different results....not terrible, but noticeable.

So IMSI, why doesn't radiosity want to render my images from photoshop into color?  (24 bit)...any hints on what to do to get usable results?

Doug.S
« Last Edit: October 13, 2007, 12:23:25 pm by Doug.S »

Doug.S

  • Hero Member
  • *****
  • Posts: 1137
    • View Profile
Re: transparency via magenta in photo-board and .3ds/texture map???
« Reply #4 on: October 13, 2007, 07:05:57 pm »
Some good progress....able to apply magenta (same .bmp image as previous post) to 3D object (cuboid.3ds  vertex surfaces) and get transparency thru.

See renders below...works in raytrace and radiosity

But render results not always predictable...mostly raytrace will render colors but not transparency...but transparency worked on this imported 3D object (as opposed to photo-board)...
But radiosity render still made object non-transparent parts all black...where I have rendered both color and transparency once using radiosity in previous post.
Sadly I cannot always get predictable results with each render.

Doug.S

PS  as an observation guess...radiosity renders seem to generate an alpha mask but it never gets merged with the .bmp color image correctly...hence result is a black object????
« Last Edit: October 13, 2007, 07:11:05 pm by Doug.S »

Doug.S

  • Hero Member
  • *****
  • Posts: 1137
    • View Profile
Re: transparency via magenta in photo-board and .3ds/texture map???
« Reply #5 on: October 14, 2007, 09:57:29 am »
More studies....

I tried the TFP "dog" photo-board and both raytrace and radiosity render just fine

Checking the "dog" info:  243K, 288x288, .bmp

So knowing its a file issue for successful rendering in radiosity in correct image colors and transparency....I made 3 files, all .bmp

128x128 (49K),    256x256 (193K), and what was used above: 512x512 (796K)   (all done in photoshop)

The results below....(in each image, the objects are from left to right 128x128, 256x256, 512x512)
while quality evident in image resolution and render quality setting...I cannot get good radiosity renders. Thus file size/resolution is NOT the issue

Restart project file = same results
Restart TFP program = same results

Since I know it works, maybe its the image source....so I'll try a simple .bmp from MS Paint as the source program.....wonder what .bmp creation program was used by IMSI Design to generate their .bmp images which seem to work OK?

Doug.S

PS other findings of interest:

- tho .bmp's are added to materials catalog...I think they are only "pointers" because if you delete the original file (after adding to the library), the library no longer has the file available....so keep your ref. files in a safe and fixed place. This makes good sense otherwise the database would get huge.

- I tried adding duplicates of 200K images... and nicely, .bld file increases only slightly (1K)...and if multiple different .bmp files (each about 200K) are used from library, the .bld file does NOT grow as fast as the file sizes are added....very good....probably .bld is compressed file.  So using .bmp files not .jpg files is not so .bld file size "expensive".


EDIT:.........................

with new found learnings of rendering indoors (which was previously an outdoor scene....see reply #8 below using MS Paint generated shapes)

I decided to re-do the above as an indoor scene by adding a one room house with roof & no windows around the objects above.

Results duplicated what was found in #8 reply below....EVERYTHING...billboard rotation (or not), correct colors & transparency, with & without indoor lighting, with & without daylight (sun), for raytracing and radiosity renders

So its GOOD to see consistency on different days with different scenes and different source data.

But BAD that interior radiosity renders with sun + interior lighting "on" (even as repetitive as render/reset/render/reset/render....) are never consistent....almost never 2 radiosity renders the same in succession. But you can trust raytrace renders almost all the time. And indoor vs. outdoor renders have different "rules of engagement" to get good renders.

Lesson learned: for radiosity renders...especially with both sun (daylight) and interior lights "on"...you can get a render as white, black, anywhere in between from washed out to near perfect....if what you see looks bad/incorrect....reset and re-render (maybe many times) until you get something good...then SAVE it.

Doug.S
« Last Edit: October 15, 2007, 06:18:49 am by Doug.S »

Nik

  • Full Member
  • ***
  • Posts: 112
    • View Profile
Keep on trucking...
« Reply #6 on: October 14, 2007, 10:25:57 am »
Keep up the good work, Doug !!

Reminds me of the fun I had importing custom 3DS doors to FP...

FX: Shudder...

There were two entirely different issues with those, first the need to control 'centre of extent' to align with wall, and, second, the problem(s) with topology. I  solved the former with a fleck of space-dust, the latter by using simplest possible TC operations to make the components, and making sure all holes were blocked...

Keep on trucking !!
« Last Edit: October 14, 2007, 10:45:05 am by Nik »

Allan Chesney

  • Administrator
  • Hero Member
  • *****
  • Posts: 2881
    • View Profile
    • www.alchesdesigns.iinet.net.au
Re: transparency via magenta in photo-board and .3ds/texture map???
« Reply #7 on: October 14, 2007, 03:19:41 pm »
Doug,

I have not tried playing with the photoboards yet (have big plans for them later) but I can't help but wonder whether your black renders are related to the black renders I get of the outside walls if I start the render inside the building. Have you tried one inside a room with interior lighting only and the sun off?

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

TurboFloorPlan V16.0.C1.901
Envisioneer CS 7.2.C1.972
TurboCAD V17 Professional

Doug.S

  • Hero Member
  • *****
  • Posts: 1137
    • View Profile
Re: transparency via magenta in photo-board and .3ds/texture map???
« Reply #8 on: October 14, 2007, 03:43:30 pm »
No I have not, but since doing TFP now, I'll do that next and report back here as an EDIT to this post.

Doug.S

EDIT:   (also see reply #5 above)

Wow thanks for asking me to try...learned a lot...some makes sense, other does not.  See attached .jpg for example pics.

I used the same .bld as posted below with MS paint .bmp's on photo-boards set as "billboard" (faces camera)  (see reply #9)
I built a one room house around the photo-boards, added roof...all renders done with q=3
I ran tests with/without sun light and with/without fluorescent light (in center at ceiling) in/on

First amazement is both objects render OK every time....when outdoors, one object did not render in radiosity....ever.

Of course with no sun and no Fl light, radiosity rendered all black...but raytrace with no lights still renders well.

REVISED...I looked more carefully at all the images and now think in all cases...raytracing correctly "turns" object to face the camera but radiosity renders do not....may need more testing...or simply check it at the time of renders using this feature.

The other obvious finding...raytrace adds light every time even with no sun or lights "on"...radiosity does not, ever.

Raytracing indoors, with sun/daylight "on" or "off" makes no difference (no windows)

Radiosity renders indoors adds the sun light to indoor light (if sun is "on", does not if sun is "off".....well most of the time; not totally consistent)....results in too much light/white/blown out.

Radiosity with sun on and no lights (no windows) = black

Radiosity with/without sun  +/- indoor light total luminance may not make sense but at least I know what it is....most of the time.

Also, reset usually works, but not always...once it "takes" then it seems to "stick" and more renders yield repetitive/consistent results.....but we do not have full control.

Indoor vs. outdoor radiosity render differently for same objects...the inconsistencies of render, reset, billboarding, lights with/without sun, and indoors vs. outdoors = bugs to me that should be easily fixed now that the issues are known.  Gosh I'm beginning to feel like a beta tester as these kinds of basic render differences should be easy to test in QC.

Doug.S
« Last Edit: October 15, 2007, 07:02:00 am by Doug.S »

Doug.S

  • Hero Member
  • *****
  • Posts: 1137
    • View Profile
Re: transparency via magenta in photo-board and .3ds/texture map???
« Reply #9 on: October 14, 2007, 04:16:58 pm »
as noted above I've been using Photoshop to create test images...but not always working...so now tried using MS Paint...a dirt simple program not likely to induce issues...just saved one ms paint image in 2 sizes/resolution

results: can't just blame the source program!

See attached pics.....higher resolution (300x300) does not render in radiosity (neither the magenta transparency nor the image colors)(BTH the one color is red not magenta)...and some radiosity renders "blew out", reset seemed to work tho.

So TFP is "sensitive" to something in .jpg and .bmp images causing no reasonable renders...especially using radiosity; less so for ray traces.

I'm not going to do any more testing on this...there is a BUG here somewhere unless IMSI can explain the issue or if I'm doing something wrong...not only for "magenta" but also for getting good consistent reliable radiosity renders....it can be done but lady luck needs to be holding your hand....although using TFP supplied image was successful...maybe just lucky?

I do have one more idea to test...."magenta" transparency using a gradient to see if transparency is "on/off" or variable with the opacity of magenta....as many graphics programs do % transparency with color brightness/saturation....(as well as trying Allan's indoor black render results, see post immediately above)

Doug.S

PS another lesson learned....bld file setup once and not changed...photo-boards set to "face" the camera...REVISED: raytrace renders shadow differently than radiosity ....hmmm I would have expected the same behaviour for both renders...only IMSI can tell us if its a bug or a feature.
« Last Edit: October 15, 2007, 07:05:53 am by Doug.S »

Allan Chesney

  • Administrator
  • Hero Member
  • *****
  • Posts: 2881
    • View Profile
    • www.alchesdesigns.iinet.net.au
Re: transparency via magenta in photo-board and .3ds/texture map???
« Reply #10 on: October 14, 2007, 05:07:08 pm »
Doug,

This is not good - I was hoping you were going to sort out all the problems for me before I started on photoboards!!

Interesting that in an earlier conversation with Jack he mentioned the good results he had had using photonoards of trees in place of some of the TFP ones.  Obviously they must work somehow - unless a problem was introduced in the release version that was not in the pre-release version that he was using.

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

TurboFloorPlan V16.0.C1.901
Envisioneer CS 7.2.C1.972
TurboCAD V17 Professional

Doug.S

  • Hero Member
  • *****
  • Posts: 1137
    • View Profile
Re: transparency via magenta in photo-board and .3ds/texture map???
« Reply #11 on: October 15, 2007, 10:42:37 am »
I have had excellent results (only tried 2 items tho) with pre-made TFP photo-board objects (dogs and flags)...tho I was not checking for billboard mode facing camera.

All my problems have been with images made by me, imported, and applied as I was testing with magenta for transparency  (tho the pre-made supplied images for photo-boards do have magenta to do the "cut-out".....and if you look closely at them they have some stray pixels of near magenta color that are not transparent...but from a distance are not noticeable.

But it does work sometimes...just not predictable

Doug.S

Doug.S

  • Hero Member
  • *****
  • Posts: 1137
    • View Profile
Re: transparency via magenta in photo-board and .3ds/texture map???
« Reply #12 on: October 15, 2007, 10:52:10 am »
Since in an earlier post above I mentioned I would test for "variable" transparency (gradient magenta to give a blended or semi-transparent result), I thought I'd follow-up and report...it won't work.

Why?  Because generating a magenta gradient results in all the gradient no longer as magenta 255,0,255  but gradual changes to 255,1,255   255,2,255 etc. and those colors are no longer exactly magenta and render as color, not transparency.

That seems correct and OK as transparency can be "dialed/slider" adjusted via the advanced materials menu...buried deep but available. Just can't get as fancy a result....but not hardly needed often either.....maybe in a future release "real" masking (gray scale alpha) may be available.

Doug.S

Doug.S

  • Hero Member
  • *****
  • Posts: 1137
    • View Profile
Re: transparency via magenta in photo-board and .3ds/texture map???
« Reply #13 on: October 15, 2007, 11:59:52 am »
I guess I'm a glutton for punishment as all these trials are time consuming but serve for me (and I hope you) some learning how TFP renders and will save me time later.

Based on all the data above, it seems like camera location along with light and sun is tedious....so I put it all together in a single setup and the results seem to make a lot of sense.  (I kept the photo-boards stationary, not "billboard" to reduce the variables).

First image is a 2D view of the setup of house with lite, 2 walls open (no windows), and my transparency objects inside and out (outside ones are duplicates but doubled in size to see better from greater distance from cameras)

Next is a set of radiosity rendered (q=2) images, self explanatory titles and you can draw your own conclusions.

I did the same with raytrace renders and they all rendered as expected.

Renders were very consistent and reset worked well every time.

I cannot explain why these may not be consistent with images above...either I got smarter or program works better now?....but the future results look more promising.  With sun "off",  exteriors may be too dark and require exterior lights....and that seems logical.

Doug.S
« Last Edit: October 15, 2007, 12:06:58 pm by Doug.S »

Allan Chesney

  • Administrator
  • Hero Member
  • *****
  • Posts: 2881
    • View Profile
    • www.alchesdesigns.iinet.net.au
Editing photoboards
« Reply #14 on: October 16, 2007, 11:07:13 pm »
Doug,

I had my first go with my own photoboard and it worked first go. Mind you this was inside - haven't tried it in sunlight yet.

I just took a photo of our cat, used PaintShop Pro to make it smaller (200 pixels square), traced the outline and deleted everything expect the cat, then filled the space with Magenta (Red 255, Green 0 and Blue 255). I saved it in the a TFP Textures folder as a BMP and then inserted it.

The first render worked perfectly although it showed a problem - the shadow on the cat was the wrong side for the light from the window. Since you had speculated that the image remains in the folder, not in the model, I though I would prove it, so.... I opened the image, flipped it sideways and saved it again - it flipped over in TFP and so the shadow was on the right side!!

This means that you can change any of the existing images or your own and they will be reflected in TFP automatically - no need to re-insert them. Interesting I did have two cats in the model,  the other a TFP one, but it was nowhere to be found.  Was sitting on the chair, and still is, but it will not render.  May it does not like our cat because it did earlier in the same model but on a different chair.

I learnt something else in the process too - it is better to reduce the image size first before doing the cutout.  If you cutout first and then reduce, you end up with antialiased edges, which result in a white outline around the image or if you fill with Magenta first you end up with shades of Magenta fringe.  The edge is a bit more jagged but the results better as the fringe is not natural.

As you mintioned it highlights the need to keep the images in one place under lock and key so to speak.

I need to play with this more - needs a better quality photo so the resolution is similar but has potential to be very useful.

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

TurboFloorPlan V16.0.C1.901
Envisioneer CS 7.2.C1.972
TurboCAD V17 Professional