I was wondering if anyone knew a good way to substitute certain function or math for application that don't have certain functions available?
For example, I'm trying for a Atmospheric Scattering material in UDK, but there are snippets of code which don't work in UDK, like this for example:
float fFar = length( v3Vector );
Currently, UDK doesn't allow me to access the Length function, so I approximated it by using the 'Distance' function instead, but that doesn't seem right since my current output looks like a glow ball of fire.
This happens both for Planet and Sky based Atom-Scatter.
That's a start, but any ideas on how I would go about doing that? I'm not sure how or what UDK's values vs. others is, google is coming up empty. I'm guessing it's scaled to Max?
UE3 treats one Max Unit as one Unreal Unit, regardless of what length the units were originally set to in Max.
Same case from Maya.
The Units are also dependent of the game you use because they are specified in the script files. Gears of war use character much taller than in Unreal Tournament.
The "mobile" gametype in UDK use a player size larger than in the UT DeathMatch gametype for example.
yeah, i've switched to max's generic units as well.. after having used cm's in max and doing the 'math' in my head, which in retrospect is a little convoluted
Replies
That's a start, but any ideas on how I would go about doing that? I'm not sure how or what UDK's values vs. others is, google is coming up empty. I'm guessing it's scaled to Max?
sqrt(x^2, y^2, z^2)
In Unreal Tournament games it is. In Gears of War it is 1UU to 1/2 inch.
The Units are also dependent of the game you use because they are specified in the script files. Gears of war use character much taller than in Unreal Tournament.
The "mobile" gametype in UDK use a player size larger than in the UT DeathMatch gametype for example.
1/2 inch != 1cm
1/2 inch = 1cm * 2.54 * 0.5 = 1.27
1UU in GoW = 1.27cm