Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008299opensim[REGION] Script Functionspublic2018-03-03 20:422018-03-05 08:28
Reportermewtwo0641 
Assigned Tomelanie 
PrioritynormalSeveritytweakReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0008299: [PATCH] Spheres are returning an incorrect number of faces
DescriptionWhen using llGetNumberOfSides() or llGetLinkNumberOfSides(); spheres are returning an incorrect number of faces when using hollow and dimple. Spheres can only have a max of 6 faces regardless of using dimple begin, end, or both in combination with path cut and hollow. I narrowed it down to a workaround being done in llGetNumberOfSides() which seems to no longer be necessary now as GetNumberOfSides() in regard to spheres is initially returning the correct number of sides (6 with profile cut, hollow, and any dimple setting) but the workaround adds 2 more which incorrectly makes it return 8.
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (Multiple Regions per Sim)
Physics EngineubODE
Environment.NET / Windows64
Mono VersionNone
Viewer
Attached Filespatch file icon 0001-Remove-the-work-around-for-sphere-number-of-faces-si.patch [^] (1,346 bytes) 2018-03-03 20:42 [Show Content]
jpg file icon sphere test.JPG [^] (37,885 bytes) 2018-03-04 05:22

- Relationships

-  Notes
(0032561)
melanie (administrator)
2018-03-04 04:29

This workaround was put there because SL itself returned the wrong number of sides. Please confirm by testing in SL that SL no longer shows these wrong values. SL scripts and existing opensim scripts would have been written expecting these values and changing that now could break them.
(0032562)
mewtwo0641 (reporter)
2018-03-04 05:18

Hi Melanie, I was able to verify on SL via stepping through path cut, hollow, dimple begin, and dimple end gave me the number of faces results consistent with OpenSim's reported number of faces when I took the workaround out.

I started with a default sphere and called llGetNumberOfSides() on it to get the number of faces and stepped through each the options with these results calling llGetNumberOfSides() on each step:

Test Results
--------------

---------------
Second Life
---------------
Default Sphere (No changes yet) = 1 face
Add Path Cut = 3 faces
Add Hollow = 6 faces
Add Dimple Begin = 6 faces
Add Dimple End = 6 faces

CTRL + ALT + SHIFT + T (Texture Info) on each step for the object to get face information:

Default Sphere (No changes yet) = Texture info for: Sphere Sides Test 32x32 opaque on face 0

Add Path Cut = Texture info for: Sphere Sides Test 32x32 opaque on face 0 1 2

Add Hollow = Texture info for: Sphere Sides Test 32x32 opaque on face 0 1 2 3 4 5

Add Dimple Begin = Texture info for: Sphere Sides Test 32x32 opaque on face 0 1 2 3 4 5

Add Dimple End = Texture info for: Sphere Sides Test 32x32 opaque on face 0 1 2 3 4 5

----------
OpenSim
----------

llGetNumberOfSides() with workaround intact:
---------------------------------------------------
Default Sphere (No changes yet) = 1 face
Add Path Cut = 3 faces
Add Hollow = 8 faces
Add Dimple Begin = 8 faces
Add Dimple End = 8 faces

llGetNumberOfSides() with workaround removed:
---------------------------------------------------
Default Sphere (No changes yet) = 1 face
Add Path Cut = 3 faces
Add Hollow = 6 faces
Add Dimple Begin = 6 faces
Add Dimple End = 6 faces

CTRL + ALT + SHIFT + T results remained the same as the SL results when testing on OpenSim

As far as I can tell, on SL, the reported number of faces the script reports and the number of faces the viewer reports are in agreement with each other.

Repeating the same test on OpenSim with the workaround code intact reports 8 faces by the time I reached the hollow step which doesn't agree with the SL test. When I took the workaround code out and repeated the test then the numbers agreed with each other based on the SL test.
(0032563)
UbitUmarov (administrator)
2018-03-05 08:28

Sorry i did miss that workaround when i did improve the number of sides code on SceneObjectPart, covering several more cases we also had wrong.
( that now also needs testing :( )
Your fix was added to master by Melanie.

- Issue History
Date Modified Username Field Change
2018-03-03 20:42 mewtwo0641 New Issue
2018-03-03 20:42 mewtwo0641 File Added: 0001-Remove-the-work-around-for-sphere-number-of-faces-si.patch
2018-03-03 20:42 mewtwo0641 Status new => patch included
2018-03-04 00:23 mewtwo0641 Description Updated View Revisions
2018-03-04 04:29 melanie Note Added: 0032561
2018-03-04 05:18 mewtwo0641 Note Added: 0032562
2018-03-04 05:19 melanie Assigned To => melanie
2018-03-04 05:19 melanie Status patch included => patch ready
2018-03-04 05:22 mewtwo0641 File Added: sphere test.JPG
2018-03-04 05:23 melanie Status patch ready => resolved
2018-03-04 05:23 melanie Resolution open => fixed
2018-03-05 08:28 UbitUmarov Note Added: 0032563


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker