bugGNU Octave - Bugs: bug #51875, Lighting effect on patch objects...

 
 

bug #51875: Lighting effect on patch objects do not work

Submitted by:  Tasos Papastylianou <tpapastylianou>
Submitted on:  Sun 27 Aug 2017 08:20:15 PM UTC  
 
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: InvalidAssigned to: None
Originator Name: Tasos Papastylianou <poacheR>Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 28 Aug 2017 11:37:47 AM UTC, comment #3:

Ok. Re-titling and closing as invalid.

Markus Mützel <mmuetzel>
Project Member
Mon 28 Aug 2017 11:30:49 AM UTC, comment #2:

Hi Markus, thank you for your reply, it is indeed useful and I'm sure will solve my problem, at least in the workaround sense. At least now I know the underlying cause for the fault, and I'm better informed on how lighting works, and can have a stab at it.

However, I'm of the opinion that it would be best to restore the original title, and simply close this particular bug under an appropriate status, and then start a new one with the title you suggested (perhaps linking the two during this process). Otherwise anyone coming to the bug tracker with the same bug / question is unlikely to find this discussion via such a title, unless they know what the problem is (which by definition they wouldn't), and may even submit unnecessary duplicate bugs.

Tasos Papastylianou <tpapastylianou>
Mon 28 Aug 2017 11:18:51 AM UTC, comment #1:

For lighting to work on patches, you need to define the "facenormals" or "vertexnormals" property manually. Some functions like sphere or isosurface set these properties. Thus, lighting works "out of the box" with them.

A while back I did some steps towards automatically calculating the normals from the face vertices in patch #8951. I don't know whether that patch would still apply.

In the meantime, you could manually calculate the facenormals e.g. by using the cross product of two face edges.

Marking this as a feature request and changing the title accordingly.

Markus Mützel <mmuetzel>
Project Member
Sun 27 Aug 2017 08:20:15 PM UTC, original submission:

Attempting to add a light source to a patch object does not work.
Adding a light to other types of plot (e.g. surface) works.
Creating a patch object automatically, e.g. using isosurface, also works. Removing the light source and then adding another one in an object which previously supported lighting works as intended, e.g.:

But attempting to create a patch object from scratch and then add light, doesn't seem to have an effect.

Example:

I'm not sure if this bug is related: https://savannah.gnu.org/bugs/?42006 (referring specifically to the line "It looks like 'glEnable (LIGHTING)' should only be called for patches and surfaces if a light object is present in the axes")

Tasos Papastylianou <tpapastylianou>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Digest:
   patch dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mmuetzel (Posted a comment)
  • -unavailable- added by tpapastylianou (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 18 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 28 Aug 2017 11:37:47 AM UTCmmuetzelSeverity1 - Wish=>3 - Normal
      Item GroupFeature Request=>Incorrect Result
      StatusConfirmed=>Invalid
      Open/ClosedOpen=>Closed
      SummaryCalculate facenormals or vertexnormals of patch objects automatically=>Lighting effect on patch objects do not work
    Mon 28 Aug 2017 11:19:49 AM UTCmmuetzelSeverity3 - Normal=>1 - Wish
      Item GroupIncorrect Result=>Feature Request
      StatusNone=>Confirmed
      Release4.2.1=>dev
      Operating SystemGNU/Linux=>Any
      SummaryCannot add light source to patch=>Calculate facenormals or vertexnormals of patch objects automatically
    Mon 28 Aug 2017 11:18:51 AM UTCmmuetzelSeverity3 - Normal=>1 - Wish
      Item GroupIncorrect Result=>Feature Request
      StatusNone=>Confirmed
      Release4.2.1=>dev
      Operating SystemGNU/Linux=>Any
      SummaryCannot add light source to patch=>Calculate facenormals or vertexnormals of patch objects automatically
      Dependencies-=>Depends on patch #8951

    Back to the top


    Powered by Savane 3.1-cleanup1