X3D exporter sets solid to inverted value #30580

Closed
opened 2012-03-18 07:09:53 +01:00 by Michalis Kamburelis · 3 comments

%%%In X3D, "solid=true" means to activate backface culling (back faces are not visible). Current X3D exporter makes two mistakes:

  1. It uses
fw('solid="%s"\n' % ('true' if mesh.show_double_sided else 'false'))

which means that double-sided=true results in solid=true, which means that the meaning is inverted. Intuitively, double-sided means that solid should be false.

One can fix it trivially (by swapping 'true' with 'false' in line above). But Blender's "Double-sided" checkbox is actually (for Blender) to control two-sided lighting. It's just wrong to overuse it for backface culling during X3D export, since these are two different things.

  1. Fortunately, I see that new Blender got rid of old "Two-sided" checkbox in "Texture face" panel. Instead, material has now simple "Backface culling" checkbox in "Game settings" panel (in "Blender game" mode). This is a great change, as this new "Backface culling" checkbox is precisely what should be used to determine X3D's solid field. The attached trivial patch makes this happen.

There is an additional request to make this really useful: "Game Settings" panel should really be visible even in "Blender Render" mode, not only in "Blender Game" mode. Looking at forums, some people still do not realize that there are hidden buttons, visible only in "Blender Game" mode. In this case, probably noone will realize that some options crucial for X3D export are hidden under "Blender Game" mode. Additional argument is that "Backface culling" checkbox (as well as "Invisible" checkbox, and maybe others) affect what is visible in Blender's "Texture" display mode (Alt+Z). So I think it would be best to apply this patch, and additionally make material's "Game Settings" panel just visible also in default "Blender render" mode.%%%

%%%In X3D, "solid=true" means to activate backface culling (back faces are not visible). Current X3D exporter makes two mistakes: 1. It uses ``` fw('solid="%s"\n' % ('true' if mesh.show_double_sided else 'false')) ``` which means that double-sided=true results in solid=true, which means that the meaning is inverted. Intuitively, double-sided means that solid should be false. One can fix it trivially (by swapping 'true' with 'false' in line above). But Blender's "Double-sided" checkbox is actually (for Blender) to control two-sided lighting. It's just wrong to overuse it for backface culling during X3D export, since these are two different things. 2. Fortunately, I see that new Blender got rid of old "Two-sided" checkbox in "Texture face" panel. Instead, material has now simple "Backface culling" checkbox in "Game settings" panel (in "Blender game" mode). This is a great change, as this new "Backface culling" checkbox is precisely what should be used to determine X3D's solid field. The attached trivial patch makes this happen. There is an additional request to make this really useful: "Game Settings" panel should really be visible even in "Blender Render" mode, not only in "Blender Game" mode. Looking at forums, some people still do not realize that there are hidden buttons, visible only in "Blender Game" mode. In this case, probably noone will realize that some options crucial for X3D export are hidden under "Blender Game" mode. Additional argument is that "Backface culling" checkbox (as well as "Invisible" checkbox, and maybe others) affect what is visible in Blender's "Texture" display mode (Alt+Z). So I think it would be best to apply this patch, *and* additionally make material's "Game Settings" panel just visible also in default "Blender render" mode.%%%

Changed status to: 'Open'

Changed status to: 'Open'

%%%applied r3140.%%%

%%%applied r3140.%%%

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#30580
No description provided.