UFO: Alien Invasion Issue Tracker
UFO: Alien Invasion
Go to the previous open issue
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
icon_project.png UFO: Alien Invasion / Closed Bug report #2515 Missing normals in BSP models
Go to the next issue (open or closed)
Go to the next open issue
This issue has been closed with status "Closed" and resolution "Not determined".
Issue basics
  • Type of issue
    Bug report
  • Category
    Maps
  • Targetted for
    Not determined
  • Status
    Closed
  • Priority
    4. Useful
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (0)
There are no items
People involved
Times and dates
  • Posted at
  • Last updated
  • Estimated time
    Not estimated
Issue details
  • Resolution
    Not determined
  • Reproducability
    Not determined
  • Severity
    Not determined
  • Complexity
    Not determined
  • Platform
    Not determined
  • Architecture
    Not determined
Attachments (0)
There is nothing attached to this issue
Duplicate issues (0)
This issue does not have any duplicates
Description
[http://sourceforge.net/p/ufoai/bugs/2515 Item 2515] imported from sourceforge.net tracker on 2013-01-28 19:39:33

Some BSP models have well-defined vertex normal and tangent vectors, but others don't. If only the lightmap/deluxemap system is used, this doesn't matter, since vertex normals are ignored anyway. If we want to use actual light sources, on the other hand, this is a problem. Dynamic lighting won't work with models that have zero-length normal and tangent vectors. See attached screenshot for an example; the false-color in this image is created by R = tangent * lightdir, G = bitangent * lightdir, B = normal * lightdir. The black areas are models where the normals and tangents are all (0, 0, 0). I'm not sure how these models are generated at the moment, but I'm hoping this can be fixed by making an appropriate change to either ufo2map or uforadiant (ie. without requiring all the brushes to be re-created by hand).

Dynamic lighting (and dynamic shadows, which aren't working yet but are a work-in-progress) won't work for brushes until this is fixed.
===== Comments Ported from Sourceforge =====

====== arisian (2010-05-13 18:33:59) ======

screenshot of +mart, using r_debug_tangents
====== arisian (2010-05-13 18:45:22) ======

Actually, this issue *does* affect lightmaps, but only when bumpmapping is enabled; this is the cause of some strange, occasional artifacts with badly formed brushes and bumpmapping.
====== tlh2000 (2010-05-13 19:17:03) ======

the fix must be done in ufo2map - see lightmap.c BuildVertexNormals and SampleNormal
====== arisian (2010-05-13 19:19:03) ======

Okay; can you (or someone else) fix that? I'm sure I could do it, but I'd rather keep working on real-time shadows right now. If not, I'll get around to it sooner or later.
====== tlh2000 (2010-05-13 19:56:14) ======

i'm sorry - if i could i would gladly do it - but that's out of my scope.
====== arisian (2010-05-13 19:58:36) ======

Speaking of scope, is there some central list of who's in charge of (or knows about) what parts of the project? I've just been doing whatever I felt was best, but I don't want to step on anyone's toes.
====== tlh2000 (2010-05-14 05:59:41) ======

no, there is no such list - we could add something like that to http://ufoai.ninex.info/wiki/index.php/Category:UFO:AI_Team - btw. are you on the mailinglist already?
====== tlh2000 (2010-05-15 18:26:18) ======

btw. http://jdolan.dyndns.org/trac/browser/quake2world/trunk/src/tools/q2wmap

ufo2map bases on q2wmap in some parts - it might help to find this bug.
====== arisian (2010-06-06 18:21:18) ======

Fixed in renderer_work branch; turned out to be a client-side issue after all. The tangent arrays were sometimes (but not always) getting disabled for BSP models.
====== tlh2000 (2010-06-06 19:59:27) ======

should that be backported to trunk?
Steps to reproduce this issue
Nothing entered.
Todos (0 / 0)
Issue created
footer_logo.png The Bug Genie 4.3.1 | Support | Feedback spinning_16.gif