apply expfog inside a model

hi,

I am using the example in manual for the exponential fog and it is working fine. I want to apply this fog inside a house and not outside as it is now. Is that possible?

Thank you

I don’t understand what you mean. If you apply the fog to the objects inside the house, they will become foggy. Panda has no concept of inside or outside; you apply fog to the things that you want to look foggy in the distance.

Of course, inside a house you will probably have much closer distances, so your fog will probably need to be thicker for it to be visible.

David

yes this is the issue. Inside the house the fog is not much visible even it I add the higer ExpDensity.
self.expfog.setExpDensity(1)

How an I increase it more?

Maybe look into Linear Fog instead?

linfog.setLinearRange(0,320)
linfog.setLinearFallback(45,160,320)

panda3d.org/manual/index.php/Fog

You can set the density higher than 1. Set it as high as you need.

But I suggest you just use linear fog:

self.fog.setLinearRange(0, 100)

where 100 is the distance at which full whiteout occurs. It’s much easier to choose a number appropriate to interior scenes with linear fog.

David