Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Mobius on August 24, 2010, 02:01:59 pm

Title: Set-fov <1°. Why doesn't it work?
Post by: Mobius on August 24, 2010, 02:01:59 pm
Not sure about it being a code issue so I decided to post it here. Why does FRED not tolerate FOVs <1 degree? The minimum I can set is 1 and anything like 0.5 or 0.01 results in a FRED warning.

I tried to get around the problem with arithmetics (0.01 = 1 / 100), but it didn't work. Any suggestions?
Title: Re: Set-fov <1°. Why doesn't it work?
Post by: Droid803 on August 24, 2010, 02:06:41 pm
FRED doesn't tolerate decimal coordinates either IIRC.
Title: Re: Set-fov <1°. Why doesn't it work?
Post by: The E on August 24, 2010, 02:13:10 pm
it's a code issue. As in, the sexp code only accepts decimal input, meaning that you can't set values that low. In fact, the minimum value is 1. Why do you think you need a value lower than that?
Title: Re: Set-fov <1°. Why doesn't it work?
Post by: Mobius on August 24, 2010, 02:26:27 pm
Why do you think you need a value lower than that?

Extreme zooming.  :drevil:
Title: Re: Set-fov <1°. Why doesn't it work?
Post by: Shivan Hunter on August 24, 2010, 04:31:08 pm
I don't mean to be presumptuous or anything but shouldn't 1 degree be extreme enough for, well, anything?
Title: Re: Set-fov <1°. Why doesn't it work?
Post by: The E on August 24, 2010, 04:33:09 pm
Pretty much, yes. It'll certainly make any background look extremely ugly.
Title: Re: Set-fov <1°. Why doesn't it work?
Post by: Mobius on August 24, 2010, 05:09:00 pm
I don't mean to be presumptuous or anything but shouldn't 1 degree be extreme enough for, well, anything?

That's what I thought until I tested it myself. 1 degree allows you to monitor Argo sized assets or smaller from a distance of a few dozen clicks, but can't do more; I was actually looking for an extreme zooming effect, capable of monitoring objects from a distance of 100 or more clicks.

Pretty much, yes. It'll certainly make any background look extremely ugly.

OCPsTM are smart: they don't show backgrounds when the player zooms in. I will also use templates to create new entries in ships.tbl, all with hacked LODs to make remote monitoring more realistic. :drevil:

On a partially related note, since you appear to have a lot of experience with programming, do you think this script (http://www.hard-light.net/forums/index.php?topic=70411.0) is capable of handling FOVs <1 degree?
Title: Re: Set-fov <1°. Why doesn't it work?
Post by: The E on August 24, 2010, 05:13:19 pm
Good luck with Templates. They're not guaranteed to work at the moment.

As for the script, yes, the Camera::setFOV() function accepts fractional input.
Title: Re: Set-fov <1°. Why doesn't it work?
Post by: Mobius on August 24, 2010, 05:15:35 pm
Good luck with Templates. They're not guaranteed to work at the moment.

Alright, I'll use separate table entries for them.

As for the script, yes, the Camera::setFOV() function accepts fractional input.

Awesome, thanks! :)
Title: Re: Set-fov <1°. Why doesn't it work?
Post by: blowfish on August 24, 2010, 07:07:33 pm
Erm, you could move the camera forward a bit too...
Title: Re: Set-fov <1°. Why doesn't it work?
Post by: Mobius on August 24, 2010, 07:20:26 pm
Sure, but it screws zooming. A lot.