bugGNU Octave - Bugs: bug #54970, Use of camlight when a patch is...


bug #54970: Use of camlight when a patch is not visible

Submitted by:  Guillaume <gyom>
Submitted on:  Tue 06 Nov 2018 04:11:34 PM UTC  
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Guillaume Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment(Rich Markup)

You are not logged in

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


( Jump to the original submission)

Mon 12 Nov 2018 01:45:49 PM UTC, comment #12:

I opened bug #55014 for this. Thank you!

Guillaume <gyom>
Mon 12 Nov 2018 12:28:57 PM UTC, comment #11:

That doesn't ring a bell immediately.
Can you please open a new bug report with a small example?

Markus Mützel <mmuetzel>
Project Member
Mon 12 Nov 2018 11:52:04 AM UTC, comment #10:

Thanks, I'm trying to assess how much visible differences have to be expected compared to a sign of an underlying bug.
In this particular instance, it seems that there is still a situation where normals are not updated. It's in a loop where vertices of a patch are modified at each iteration (set(p, "Vertices", v)). If it rings a bell to you, let me know or I'll come up with a small example and open a new bug report for it.

Guillaume <gyom>
Mon 12 Nov 2018 11:14:24 AM UTC, comment #9:

While I don't expect them to be identical, the results should be fairly similar in Matlab and Octave.
If they aren't, that might be a bug.

Do you notice any differences?

Markus Mützel <mmuetzel>
Project Member
Mon 12 Nov 2018 11:08:26 AM UTC, comment #8:

Thanks a lot for this, Markus, it now works well. The fix for the normals is also very useful. More generally, should we expect the exact same rendering between Matlab and Octave (apart from things like anti-aliasing)?

Guillaume <gyom>
Sat 10 Nov 2018 02:48:53 PM UTC, comment #7:

Everything works as expected now with the sample code. Marking as fixed and closing report.

Rik <rik5>
Project Administrator
Fri 09 Nov 2018 07:28:59 PM UTC, comment #6:

Thanks, Pantxo and Rik for the help. Very much appreciated.

I pushed a change that should fix this issue here:

There was also a problem when FaceNormals for surface objects were calculated on a non-regular grid which should be fixed by this change:

Markus Mützel <mmuetzel>
Project Member
Thu 08 Nov 2018 03:59:06 PM UTC, comment #5:

@Markus: Pantxo beat me to it, but that was the approach I was thinking of as well.

Rik <rik5>
Project Administrator
Thu 08 Nov 2018 08:23:39 AM UTC, comment #4:

@Markus: you need to add a "u" to base_properties::visible, make base_properties::update_visible virtual and overload it in patch::properties. The following works for me:

Pantxo Diribarne <pantxo>
Project Member
Thu 08 Nov 2018 07:41:44 AM UTC, comment #3:

I had a very short look at this patch. My first thought was that we might want to add an update_visible function to patch (and surface).
But that doesn't seem to work as I expected: Adding a line for the "visible" property to the block of other properties with an "u" basically renders the visible property non-functional: The patch is always visible.
Is there some special way to overload functions for properties that are inherited from "base_properties" in general or the "visible" property in particular?

Markus Mützel <mmuetzel>
Project Member
Tue 06 Nov 2018 04:35:39 PM UTC, comment #2:

Here is the output from Matlab:

Guillaume <gyom>
Tue 06 Nov 2018 04:26:32 PM UTC, comment #1:

@Markus: Adding you to the CC list for this bug. Apparently this is caused by the fact that the "FaceNormals" aren't calculated when the patch object is invisible.

@Guillaume: Can you try a modification of the code in Matlab?

Rik <rik5>
Project Administrator
Tue 06 Nov 2018 04:11:34 PM UTC, original submission:

If camlight is called while a patch is not visible, it does not seem to be effective when the patch is set to visible. To see this effect, run the following twice, setting the "visible" property of the patch "on" or "off".

Guillaume <gyom>


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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by gyom (Submitted the item)

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

    Only project members can vote.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-11-10 rik5 StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2018-11-09 mmuetzel StatusConfirmed => Ready For Test
    2018-11-08 mmuetzel Operating SystemGNU/Linux => Any
    2018-11-06 rik5 StatusNone => Confirmed
        Carbon-Copy- => Added mmuetzel

    Back to the top

    Powered by Savane 3.4