Jump to content
The Dark Mod Forums

light not illuminating post?


Springheel

Recommended Posts

...continuing previous post...

@spring, if you replace the candle with a light entity, does it do the same thing?


I tested this, and yes, it does. This is a default light placed right up against the pillar, where the red dot is.

Maybe puffing out the vertex normals on the model


I have no idea what that means.

post-9-0-18808000-1475170404_thumb.jpg

Link to comment
Share on other sites

 


 

I have no idea what that means.

 

 

The vertex normals in the center of the model should be perpendicular to the surface then slightly angled away from the center as you

move towards the edge:

 

 

\ \ \ \ \ \ | / / / / / / / <- normals

_______________________________ <- surface

center

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Did a bit of reading on what vertex normals are. It sounds like 1) they primarily affect the smoothing of angles between polygons, which wouldn't impact the issue here, and 2) Lightwave doesn't include tools for editing them, so all our .lwo models are using whatever the default is (probably face normals).

Link to comment
Share on other sites

Hmm, it looks like you can change the "Angle Threshold" for overall Smoothing in Lightwave:

 

https://books.google.com/books?id=myLcfmxy_mQC&pg=PA28&lpg=PA28&dq=lightwave+angle+limit&source=bl&ots=ciYocn4Fat&sig=qc5V7mUU4x7NGdjjQBjg8QuLBno&hl=en&sa=X&ved=0ahUKEwiepbvSrcTPAhVFHD4KHbe3C_4Q6AEIHjAA

 

I saw some old Doom3world talk about using n-gons to cure workflow issues where smoothing groups are usually required but I'm not sure how relevant that is.

 

Another reference:

 

http://www.katsbits.com/tutorials/idtech/export-lightwave-lwo-models.php

 

It seems you could do something like:

 

blend bumpmap

 

map addnormals( path_to_regular_normal_map, smoothnormals(renderbump [-size <width> <height>] [-aa <aa_value>] [-trace <trace_value>] [-colormap] <image> <lwo model> ))

 

to add smoothed contours based on the underlying model.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Is there a reason to think that would have some effect when removing the normal entirely had none?

Link to comment
Share on other sites

I think the engine treats vertex normals from lwo different than it's default brush behavior. We are trying to bias the normals

to coax the engine to produce the same behavior (or better) than brushes.

 

Yes, the true fix would be to address why lwo is treated this way but it would probably require someone who understood the lwo decoder

in the engine. Eg. Not me. :)

 

Hmm our code...

 

 

 

 

 
/* ======================================================================
lwGetVertNormals()
Calculate the vertex normals.  For each polygon vertex, sum the
normals of the polygons that share the point.  If the normals of the
current and adjacent polygons form an angle greater than the max
smoothing angle for the current polygon's surface, the normal of the
adjacent polygon is excluded from the sum.  It's also excluded if the
polygons aren't in the same smoothing group.
Assumes that lwGetPointPolygons(), lwGetPolyNormals() and
lwResolvePolySurfaces() have already been called.
====================================================================== */

void lwGetVertNormals( lwPointList *point, lwPolygonList *polygon )
{
   int j, k, n, g, h, p;
   float a;

   for ( j = 0; j < polygon->count; j++ ) {
      for ( n = 0; n < polygon->pol[ j ].nverts; n++ ) {
         for ( k = 0; k < 3; k++ )
            polygon->pol[ j ].v[ n ].norm[ k ] = polygon->pol[ j ].norm[ k ];

         if ( polygon->pol[ j ].surf->smooth <= 0 ) continue;

         p = polygon->pol[ j ].v[ n ].index;

         for ( g = 0; g < point->pt[ p ].npols; g++ ) {
            h = point->pt[ p ].pol[ g ];
            if ( h == j ) continue;

            if ( polygon->pol[ j ].smoothgrp != polygon->pol[ h ].smoothgrp )
               continue;
            a = vecangle( polygon->pol[ j ].norm, polygon->pol[ h ].norm );
            if ( a > polygon->pol[ j ].surf->smooth ) continue;

            for ( k = 0; k < 3; k++ )
               polygon->pol[ j ].v[ n ].norm[ k ] += polygon->pol[ h ].norm[ k ];
         }

         normalize( polygon->pol[ j ].v[ n ].norm );
      }
   }
}

 

 

 

Seems to be looking for max smoothing angle too.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 5 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...