-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inward facing cylinder wall has normals pointing the wrong way #1734
Comments
Which constructor are you using? The one with signature
is not assigning its facingOut parameter to anything |
Add to the definition of this constructor should fix Or you can use the other constructors |
I'm using this signature:
The FacingOut field is working okay with this function except for the normals. It looks like what you've found is a different bug. |
ok. In the normals are actually not conditionally generated. We should add something like if (params.FacingOut) { |
I ran a similar test using X3D which calls the same Cylinder object and Cylinder Params.
It looks like the Normals inside the Cylinder are not flipping, except on the top and bottom of the Cylinder.
The left Cylinder has a texture map (same texture applied to a plane in the background) and a blue Cylinder on the right.
I attached screen shot as well as the X3D file plus texture map.
mitch
Mitch Williams
Samsung GearVR X3D development
310-809-4836 (outside line)
From: Bo Huang [mailto:[email protected]]
Sent: Friday, February 9, 2018 11:59 AM
To: Samsung/GearVRf <[email protected]>
Cc: Subscribed <[email protected]>
Subject: Re: [Samsung/GearVRf] Inward facing cylinder wall has normals pointing the wrong way (#1734)
ok. In
private void createBody(CylinderParams params)
the normals are actually not conditionally generated. We should add something like
if (params.FacingOut) {
nx0 = -nx0;
nx1 = -nx1;
...
...
//so on and so forth before copying to the normal buffer
}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#1734 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ARSfvmx656z6MytDcjGk_LyVW3OEuoZlks5tTKN3gaJpZM4SAQa1>.
|
Just another screen shot.
I rotated both cylinders to show the texture mapping on the inner top of Cylinder, but not on the sides.
Mitch Williams
Samsung GearVR X3D development
310-809-4836 (outside line)
From: Bo Huang [mailto:[email protected]]
Sent: Friday, February 9, 2018 11:59 AM
To: Samsung/GearVRf <[email protected]>
Cc: Subscribed <[email protected]>
Subject: Re: [Samsung/GearVRf] Inward facing cylinder wall has normals pointing the wrong way (#1734)
ok. In
private void createBody(CylinderParams params)
the normals are actually not conditionally generated. We should add something like
if (params.FacingOut) {
nx0 = -nx0;
nx1 = -nx1;
...
...
//so on and so forth before copying to the normal buffer
}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#1734 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ARSfvmx656z6MytDcjGk_LyVW3OEuoZlks5tTKN3gaJpZM4SAQa1>.
|
PR #1741 should fix this issue for you. |
I'm using a GVRCylinderSceneObject with FacingOut set to false to use as a circular room. Inside the cylinder I've placed a GVRPointLight to light the walls. I find if I set the light to mainly diffuse then the walls are very poorly lit.
If I run this function to reverse the normals then walls are lit up properly.
The text was updated successfully, but these errors were encountered: