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

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • 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.
      · 7 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
×
×
  • Create New...