Mapping question: 'solids'
#11
(23 Mar 13, 02:57PM)TheNihilanth Wrote: That's an unfortunate and sad answer. If that is true, then I guess I better start by world.cpp and see what comes up I'll post what I find if anyone interested.

Edit: no, generally the fog is used to disguise popping artifacts, that is, making less obvious when objects/geometry enters the viewing frustum therefore rendering the said objects/geometry all of a sudden, silent hill for the psx and lots of others used this technique (even today's AAA games do it). In AC, it's seems to be the case by looking at the code.

Well most often we don't have to mess with the engine itself, that's why our answers might not be as accurate as you might have expected.

Basically, it seems to be based on a simple raytracer. (which can be "disabled" with toggleocull). On each frame, the engine traces 512 rays from your position all around you and for each angle it stores the distance from you to the nearest solid wall.
(worldocull.cpp:void computeraytable(float vx, float vy, float fov))

The ray table is then used by isoccluded(float vx, float vy, float cx, float cy, float csize) (same file)

According to "CUBE TODO" log in the source, it was considered long time ago to replace this system by a quadtree algorithm.

(So, to answer your first question: yes, solid walls determine how far the camera can see from its location)
Thanks given by:


Messages In This Thread
Mapping question: 'solids' - by TheNihilanth - 23 Mar 13, 08:11AM
RE: Mapping question: 'solids' - by RandumKiwi - 23 Mar 13, 08:22AM
RE: Mapping question: 'solids' - by RandumKiwi - 23 Mar 13, 09:19AM
RE: Mapping question: 'solids' - by Mr.Floppy - 23 Mar 13, 10:40AM
RE: Mapping question: 'solids' - by Mr.Floppy - 23 Mar 13, 05:10PM
RE: Mapping question: 'solids' - by Luc@s - 23 Mar 13, 09:41PM
RE: Mapping question: 'solids' - by Mr.Floppy - 25 Mar 13, 12:48PM
RE: Mapping question: 'solids' - by Mr.Floppy - 25 Mar 13, 06:13PM