Author Topic: hovering trees in SP2 build3 beta 64bit  (Read 1558 times)

Lech Switala

    Reputation: 3
hovering trees in SP2 build3 beta 64bit
« on: July 02, 2011, 08:58:24 am »
July 02, 2011, 08:58:24 am
I read about the trees hovering 30 cm above the ground in the 64bit version - in my case (SP2 build3 beta 64bit) they hover too, only to touch the ground for the second I press the sun controls, afterwards they hover again.  Has there been a cure found for the hovering ? 

Re: hovering trees in SP2 build3 beta 64bit
« Reply #1 on: July 02, 2011, 09:02:01 pm »
July 02, 2011, 09:02:01 pm
It's a bug we are working on. The trees are also correct in final render.

Re: hovering trees in SP2 build3 beta 64bit
« Reply #2 on: July 06, 2011, 02:56:19 pm »
July 06, 2011, 02:56:19 pm
FINALLY found a solution.

It was an error in Speed tree wind algorithm. As it turns out the amount of wind depends on the height of a vertex.

So, for the trunk there are some vertices with y=0. In the shader there is a line which raises this value to a certain power. Normally raising 0 to the power of 2 should result in 0.

However, in HLSL the compiler implements the pow(0,2) function as: exp(log(0) * 2) which results in NaN causing the polygons with those vertices to disappear.


Will be fixed in next update!

Lech Switala

    Reputation: 3
Re: hovering trees in SP2 build3 beta 64bit
« Reply #3 on: July 06, 2011, 11:55:26 pm »
July 06, 2011, 11:55:26 pm
Damn NaN!
Does this mean with no wind the hovering wouldn't happen?

Love your explanation, although I do feel a bit inferior ;-) reading it.
The part with 0 to power 2 gives 0 I did understand.   However you lost me in "in HLSL the compiler implements the pow(0,2) function as: exp(log(0) * 2)".

So the trees will stop hovering in the next build or update?

Re: hovering trees in SP2 build3 beta 64bit
« Reply #4 on: July 07, 2011, 10:35:22 am »
July 07, 2011, 10:35:22 am
Damn NaN!
Does this mean with no wind the hovering wouldn't happen?

Love your explanation, although I do feel a bit inferior ;-) reading it.
The part with 0 to power 2 gives 0 I did understand.   However you lost me in "in HLSL the compiler implements the pow(0,2) function as: exp(log(0) * 2)".

So the trees will stop hovering in the next build or update?


Yes! The next build will have this fixed. Plus all the other bugs we could find and were reported.

Lech Switala

    Reputation: 3
Re: hovering trees in SP2 build3 beta 64bit
« Reply #5 on: July 07, 2011, 04:54:11 pm »
July 07, 2011, 04:54:11 pm
Great news!