View Full Version : Grr.... transparent render problems

04-15-2010, 06:04 AM
I've come across this a couple of times now and its driving me nutty. I'm sure this use to never happen in the 8.x cycle or even back in 5.6 days.

I've always used a lot of texture work with alphas rather than always using geometry (its the gamedev background!) but I'm doing more rendered stuff thesedays.

See the attached screenshot and can anyone explain why this small texture with alpha doesn't render the alpha properly, but comes out in GL fine?
Its as basic a setup as you could possibly use. Plain material colour for the hinge, textured onto a square poly with an alpha texture to form the shape, silhouette style if you like.

Of course I can go about this another 20 ways, but just wondering why a simple, simple element that used to work `back in the day` now breaks in a render.

Incidentally, I've set this up in the old texture system, and a simple node version to exactly the same results.....

04-15-2010, 06:41 AM
Not sure I understand what is going on, I guess you know that textures with alpha have nothing to do with transparency of the surface, they just let the underlying surface show.
It might be a shadow you are seeing (happens with shadow mapped lights) or it might be a low setting on ray recursion.

04-15-2010, 07:06 AM
Thanks Danner.
Hmm.. I've switched off the shadows off all the lights that have them, turned the ray recursion up to 8, and higher, and also turned the raytracing switches on and off, all to no avail.

I've also moved my `decal` away (50cm) from the surface closest to it, and moved them ALL right up close to the camera, so there's no other transparent polys in front of it, to eliminate any multiple-transparent surfaces-on-top-of-each-other issues that sometimes hamper game engines.
still all to no avail.

this is sooo simple and basic.....

04-15-2010, 09:36 AM
That's weird.. If you turn off all shadows, (in globals and per light for shadowmaps) and you still see it, then maybe it's not the underlying surface. You need to load this asset from your scene into a test scene. You can quickly figure out if your clipping is correct. Just render it and check the alpha.. should not be a white poly. You can try it in the current scene by selecting that object and hitting F11, but a new clean scene may be better.
Is the clipping image you are using have an alpha channel built in on accident that may be messing with your clip? OpenGL lies bigtime. :)

If you don't want to waste time by deconstructing and debugging it, just use the transparency channel and call it a day.

04-15-2010, 01:23 PM
under render globals, have you checked the "raytrace transparency" box? the number of times i've forgotten about that.........

04-15-2010, 02:55 PM
If its the "door hinges" shape you mean, is there any reason why you dont use clipmap in the object panel?

04-15-2010, 03:27 PM
It may be something as daft as what file format they have been saved in. Are they PNG files with alphas embedded, or are the alphas a seperate image? Sometimes LW doesn't like the Alpha to be embedded, maybe use a seperate file, and use that as a mask, and use PNG, as other formats can go screwy sometimes too, like TIFF is a huge all-encompasing format, so maybe the loader is having a problem with your settings etc.

04-16-2010, 02:48 AM
!!!! AAAh!!! Got it!!!! (Finally)
I've got occlusion piped into the diffuse of the poly behind it. As the poly in front with the hinge mask texture was very close to the door, it completely occluded (and hence, made a very clean black occlusion on the door surface). Because the occlusion works off polys and not the alpha value of a surface, thats why I saw a solid black, the same shape as the hinge mask poly (sorry.. its very wordy, but sometimes difficult to write... even if English is my native tongue! 8)))

Thanks for all the help everybody.
And yes, Salv8or- Clips worked also.... you know, thats the first time in nearly 10 years of Lightwave use that I've clicked the [T] of a clip map!!!! Totally forgot about that!

And thanks Tobian- good point. Texture was my first thought. PNGs are odd, but I do use them. Normally, I make a 32bit TGA or PNG as a texture, clone it in the image editor and `use alpha only` of the clone as my alpha texture. It was what I originalyl had set up in this case too, but I'd alread swapped the mask out as a basic 24bit bmp... doesn't get any more basic than that!!! Thats why I'd been tearing my hair out trying to work out WTF was going on!!! Sheesh

Anyway, thanks again everybody.... now get back to work instead of reading this guff! 8)

04-16-2010, 03:03 AM
Clipmaps is theonly way to go for making leavs or other dense "one-poly" details. The clipmap funktion is not at all the same as transparency.
It actually works so that lw dont "notice" the black barts of a clipmap as far as the renderer is conserned. The ray dont have to "pickup" any information about it, so in that maner black in a clipmap does not excist.

Use it well and often.

04-16-2010, 03:22 AM
good stuff man. I'll have to use it more in future.
Moving over from RT game work to pre-rendered stuff is good fun. I now need to go back and re-learn all the stuff in Lightwave I've not used for years, or never used even!!!!

04-16-2010, 05:34 AM
DOH! Haha, simple mistake! It's the first thing I usually check for. stupid logical fails in my brain! :D

and depending on which occlusion node (assuming you are using a shader, rather than the ambient occlusion switch in radiosity settings, which is not quite the same thing) some of them will respect transparency. Clip maps may be the way to go too, though the problem I always find with them is you do need to go a bit bigger in res to make up for the lack of alpha transparency in them, and you may not have a double-res version! :D

04-16-2010, 10:28 AM
Hey its already paying some dividends. I had another area of the scene with some alpha mapped vines/overgrowth hanging. This too caused some issues, which have become fixed by using my alpha texture in the clip rather than the transparency channel.

Clip map = my new best friend! 8)))