Author Topic: Problems with visibility of opacity maps  (Read 4856 times)

mischa

    Reputation: 24
Problems with visibility of opacity maps
« on: September 28, 2012, 10:31:17 am »
September 28, 2012, 10:31:17 am
Hi folks,

hope you can help me. I am currently struggeling with a metal material. It is a kind of stretched material hiding fire escape stairs. The material is looking good when the camera is close, but when when the camera moves away, the opacity map effect gets lost very quickly and the object is looking like a simple gray box. Is there a setting to eliminate this effect? In the renderings I already made the mapping bigger, so that the holes are bigger. But it is still not like it should be.



Mischa

mischa

    Reputation: 24
Re: Problems with visibility of opacity maps
« Reply #1 on: September 28, 2012, 10:32:27 am »
September 28, 2012, 10:32:27 am
here are somemore renderings showin the problems (I don t find the button to add several images)

mischa

    Reputation: 24
Re: Problems with visibility of opacity maps
« Reply #2 on: September 28, 2012, 10:33:31 am »
September 28, 2012, 10:33:31 am
and one more where it looks like a gray box

Re: Problems with visibility of opacity maps
« Reply #3 on: September 28, 2012, 12:54:39 pm »
September 28, 2012, 12:54:39 pm
Hi Mischa, this problem can be fixed if you have Photoshop and the Nvidia Texture Tools plug-in:
http://developer.nvidia.com/content/nvidia-texture-tools-adobe-photoshop

The reason that the problem occurs is due to mipmapping (see below) and the fact that Lumion only uses 1-bit alpha transparency for opacity masks.

Pure white pixels on the alpha mask means that those pixels will be fully visible, and pure black pixels on the alpha mask means that those pixels will be invisible. If a pixel is somewhere between black and white, it will be rounded up or down to black or white.

As the camera moves away from the fence, the smaller mipmaps of the fence texture will be used, and those are scaled down so much that they're no longer white and black but greyish pixels that are closer to black than to white. For that reason, the texture will be fully invisible as the camera moves away.

So, bearing that in mind, how do you work around this problem?

Well, you need to manually make the visible pixels on the smallest mipmaps white instead of greyish, so that Lumion doesn't round them down so that they end up being interpreted as invisible when you move the camera away.

Here's how:

1) Install the Nvidia Texture Tools plug-in for Photoshop.
2) Make sure that your texture width/height is a power of two, e.g. 8/16/32/64/128/256/512/1024 pixels etc.
3) Save your texture including the alpha mask as DDS (RGBA format: 8.8.8.8 )
4) Load this texture again (Load Mipmaps -> On)
5) Edit the smallest mipmaps so that the pixels that you want to show up in Lumion are white on the alpha mask.
6) Save the DDS texture again (MIP Map generation -> Use existing MIP maps)

TIP: For those of you who don't know what mipmapping is, please read the "How it works" section here:
http://en.wikipedia.org/wiki/Mipmap
IMPORTANT: Please do not send private messages and emails to members of staff - unless we specifically ask you to send us sensitive information, for example License Keys.

mischa

    Reputation: 24
Re: Problems with visibility of opacity maps
« Reply #4 on: September 28, 2012, 01:24:03 pm »
September 28, 2012, 01:24:03 pm
Thx alot, Morten, with a mipmapping it is looking much better. Will post some images later. Currently playing around a bit with  the texture so that it looks also good from very far away, have the impression that I must make the holes bigger in the very small textures. How does he blend from one texture size to the other?

Re: Problems with visibility of opacity maps
« Reply #5 on: September 28, 2012, 04:06:01 pm »
September 28, 2012, 04:06:01 pm
The blending is based on the distance from the camera. This distance is hard-coded in Lumion.
IMPORTANT: Please do not send private messages and emails to members of staff - unless we specifically ask you to send us sensitive information, for example License Keys.

mischa

    Reputation: 24
Re: Problems with visibility of opacity maps
« Reply #6 on: September 28, 2012, 04:24:29 pm »
September 28, 2012, 04:24:29 pm
The blending is based on the distance from the camera. This distance is hard-coded in Lumion.

I see, so it is not possible to modify these values with an movie effect or with the settings of the material

Re: Problems with visibility of opacity maps
« Reply #7 on: September 28, 2012, 04:54:15 pm »
September 28, 2012, 04:54:15 pm
Unfortunately not. There is a mipmap bias value in DirectX (which Lumion uses). This value forces the smaller mipmaps to kick in further away from the camera (or closer). However, this parameter is so geeky that it hasn't been exposed to you guys in the Lumion user interface - we can't expect everyone to know what mipmaps are :)
IMPORTANT: Please do not send private messages and emails to members of staff - unless we specifically ask you to send us sensitive information, for example License Keys.

cpercer

    Reputation: 20
Re: Problems with visibility of opacity maps
« Reply #8 on: September 28, 2012, 05:47:30 pm »
September 28, 2012, 05:47:30 pm
Morten,  sort of on topic, but....is there a way in Lumion to have a material that has reflection, bump, and opacity (clip)?

Re: Problems with visibility of opacity maps
« Reply #9 on: September 28, 2012, 06:01:51 pm »
September 28, 2012, 06:01:51 pm
No.
IMPORTANT: Please do not send private messages and emails to members of staff - unless we specifically ask you to send us sensitive information, for example License Keys.