• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
MAINTENANCE ANNOUNCEMENT - JIRA will undergo maintenance starting 1:00am PDT through 3:00am on Saturday 2010.03.20. Please do not enter issues during this time as the system maybe restarted.
Issue Details (XML | Word | Printable)

Key: VWR-9384
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Qarl Linden
Reporter: Omei Turnbull
Votes: 67
Watchers: 17
Operations

If you were logged in you would be able to see more operations.
1. Second Life Viewer - VWR

Modify the calculation of sculpty mesh size to eliminate bad texture mapping and bad LOD transitions

Created: 27/Sep/08 08:36 PM   Updated: 15/Jun/09 04:52 PM
Component/s: Building (in-world)
Affects Version/s: 1.21 Release Candidate, 1.21
Fix Version/s: 1.23 Release Candidate, 1.23

Time Tracking:
Not Specified

File Attachments: 1. File oblong_planter.tga (8 kB)
2. Microsoft Excel sculpt_calc_mesh_resolution_versions.xls (30 kB)
3. Text File sculpt_calc_mesh_resolutions_versions.txt (5 kB)
4. File size_test.py (0.8 kB)
5. Text File VWR-9384-1.patch (2 kB)
6. Text File VWR-9384-1.patch.txt (2 kB)
7. Text File VWR-9384-2.patch (2 kB)
8. Text File VWR-9384-2.patch.txt (2 kB)
9. Text File vwr-9384-ratios.txt (2 kB)
10. Text File VWR-9384.patch (2 kB)
11. Text File VWR-9384.patch.txt (2 kB)

Image Attachments:

1. 8_or_9.jpg
(20 kB)

2. 8vs9.jpg
(316 kB)

3. oblong dims.png
(29 kB)

4. sculpt_calc_mesh_res_dom.png
(15 kB)

5. sculpt_calc_mesh_res_ext.png
(15 kB)
Environment:
CPU: AMD (Unknown model) (803 MHz)
Memory: 2047 MB
OS Version: Microsoft Windows XP Service Pack 3 (Build 2600)
Graphics Card Vendor: NVIDIA Corporation
Graphics Card: GeForce Go 7200/PCI/SSE2/3DNOW!
OpenGL Version: 2.0.1
Issue Links:
Relates
 

Linden Lab Issue ID: DEV-21570
Linden Lab Internal Branch: maint-viewer-11


 Description  « Hide
RC 1.21 introduced the ability to define non-square sculpties. This was immediately received with great enthusiasm in the SL builder's forum. However, initial experience showed that only a few selected values of non-square bitmaps gave good results. Most choices result in bad texture mapping (in some cases, at the highest LOD while for others, as the LOD changed) and unpredictable geometry changes as LOD is reduced. These are not fundamental problems in any way. Modifying one function, that determines how many points to sample from a given bitmap at a specific LOD, is all that is needed to make all combinations of bitmap dimensions behave in a clean way.

This issues has been discussed extensively in the builder's forum, and there is complete consensus that the following three principles should govern the mesh size calculation:

1) When creating the mesh from the sculpty bitmap, never double-sample points. Double sampling creates bad texture mapping.

2) Uniformly treat a 2^n x 2^m sculpty bitmap as specifying only 2^(n-1) x 2^(m-1) quad faces, consistent with the traditional 64x64 and 128x128 sculpty bitmaps. This preserves good texture mapping as LOD changes.

3) Modify the LOD reduction algorithm to strongly favor factor-of-two reductions in each dimension. Failing to do this makes it very difficult to manage the degradation of geometric features over multiple LODs.

These three principles strongly constrain the calculation, but do not completely specify it. We have also reached a consensus on a specific algorithm to propose, and a patch will be forthcoming.

For a complete history of the discussion, see http://forums.secondlife.com/showthread.php?t=278017 This thread has been viewed by more than 2700 people, and so far no one has expressed opposition.

I am marking the priority as Major mostly because if it is not fixed before the new code makes the main viewer, it will be all the harder to ever rectify it. If the change gets made now, people can go forward with the new feature confident that it is solid and will last.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Qarl Linden added a comment - 30/Sep/08 12:26 PM - edited
hey guys -

so i think #3 is the most controversial - tell me more about it. problems i see are: that either the aspect ratio will wildly vary (you won't get 1:2, you'll get either 1:1 or 1:4) or you'll only get half as many verts. but maybe i don't understand?


Omei Turnbull added a comment - 30/Sep/08 01:49 PM
Qarl, you understand the implications correctly. It is our belief that for a builder trying to manage LOD degradation, having the number of faces drop by factors of 2 (so that there is a subset of vertices that stay fixed across LOD changes) is more important than either maintaining the ratio of the sampling in the two dimensions or maximizing the total number of vertices sampled. But exactly how best to trade off these three considerations occupied much of the discussion on the forum.

Drongle McMahon added a comment - 30/Sep/08 02:09 PM - edited
I have made tables of the s and t from three versions of sculpt_calc_mesh_resolution in the file oblong dims.png
These are supposed to be for Domino's version described in the forum (apologies for any errors), for my own version (Drongle) and for the existing version (Qarl, again, apologies for any errors).

There is a key below indicating which parameters fail to preserve aspect ratio, which are(not) powers of two, and which are different in Domino and Drongle. I think we more or less agreed in the forum, to Domino's version, which does a better job with the aspect ratio than Drongle's. (The latter is more strict about the powers of two and sacrifices aspect ratio in some more cases. It might be useful if lookup tables are used instead of a function, but that's for a later jira). As can be seen, there are only two more cases (14) where the aspect ratio is wrong with Domino's than with the existing function (12). Domino's function also produces few cases which are not powers of two, so that these can be avoided by the geometrophiles without much loss of functionality. Note also that the existing function is fairly approximate in preserving the aspect ratio (orange cells) while Domino's function is exact in many of the same cases. The cases where Domino's numbers have the wrong aspect ratio are forced by the minimum dimension of 4.

I may have made some mistakes here, as the shading was by hand. Please donlt hesitate to correct me.


Omei Turnbull added a comment - 30/Sep/08 02:55 PM
That's a great set of comparison tables, Drongle!

I'm not sure whether it was on purpose, but I want to note that your shading only reflects principle 3. Many of the boxes left white in Qarl's table violate principles 1 and 2.


Drongle McMahon added a comment - 30/Sep/08 06:55 PM
It was on purpose - because that's what Qarl asked about

Domino Marama added a comment - 02/Oct/08 05:35 AM - edited
Yeah using 1 face as the minimum actually corrects all the ratios where the 4 face minimum causes a problem. But I don't think it will leave as many useful ratios and it allows more non-power of two sizes to creep in. For me there are two main issues:

A) The oblong sculpties as implemented break with the 2 pixels square per vertex that was established with the 64 x 64 sculptie maps.

B) The minimum of 3 faces is not artistically useful in the majority of use cases. Sculptie hedges and things like http://forums.secondlife.com/showpost.php?p=2022772&postcount=516 are obvious examples.

A) is principle 2. Fixing this automatically covers principle 1) as well.

Fixing B) by increasing the minimum to 4 faces means that principle 3) is mostly done. The majority of the cases where 3) is broken happen on LOD0, and this is to be expected as 6 x 6 is not a power of two size. The obvious fix for this is to increase LOD0 to 8 x 8. As this could have adverse performance effects, I suggested that there should be a user option to set LOD0 to 6 x 6 or 8 x 8.

The cases where principle 3) isn't followed all have an alternative ratio that provides a good solution: 32 x 32 instead of 32 x 16, 32 x 128 instead of 16 x 128 and 64 x 64 for 32 x 64.

Everyone is used to having control over the top 3 levels of LOD by treating them as subdivision surfaces. I think losing that is more controversial than having to explain that the long thin sculpties trade LOD in one direction for the other and to model accordingly.

If the LOD pops on some sizes are a problem, then the modeller should be using more sculpties of a smaller size. It puts the prim use / LOD precision equation directly in our hands.

Note: The chart of ratios shows my figures with an 8 x 8 LOD0 option enabled.


Omei Turnbull added a comment - 02/Oct/08 12:29 PM
Qarl wrote:

so i think #3 is the most controversial. ...

In extensive discussion in the Builder's forum, there has been no controversy at all about this. The only discussion has been how far to push it, e.g. the difference between Domino's and Drongle's tables. I suspect you really mean that #3 is a sticking point with you. If that's the case, can you tell us more?


Qarl Linden added a comment - 02/Oct/08 12:56 PM
hey Omei -

just after i finish this comment, i'll post the jira to my sculptie discussion group, and we'll talk about it in my office hours tomorrow. (i'll save you a transcript if you can't attend.)

but let me explain my own concern:

the 2:1 ratio is perhaps the most important setting for the new aspect feature. this is because it gives the most even coverage of a sphere (there are twice as many lines of longitude as latitude.) and most shapes are sphere-like. right now sculpties create a square 1:1 covering - which sadly gives a very uneven coverage.

but your proposals for #3 hurts 2:1 the most. almost making it not useful.

looking at the charts (thanks again for the charts) both of you have 32x16 for your highrez 2:1.

that gives nice coverage - but with the same limited resolution of the original 1:1 sculptie. in fact, since it is directly smaller than the 1:1 sculptie (which is 32x32) i can't see why i'd use 2:1 at all, unless i was trying to be efficient.

...

that said - i also don't see your fundamental problem with non-powers-of-2. (i went on a bit about this back in the forums, but let me repeat myself here

SL's basic prim geometry doesn't LOD on powers of 2. (the prim sphere has 24 verts at its highest rez.) when using NURBS based modeling packages - the artist can tessellate to any resolution - so it's a very similar system.

now - i do understand how it's maddening for someone trying to control every exact point of every LOD with a mesh-based modeling tool. and i sympathize. but i feel the correct fix for this problem is for SL to support true mesh structures, and leave sculpties for the NURBS crowd.

...

and my last concern (well, maybe not last but last for now i really don't like the idea of using a look-up table. whatever the solution may be - it needs to be easily describable.


Domino Marama added a comment - 02/Oct/08 01:38 PM
Qarl, check the higher resolutions on my solution, I think 64 x 128 gives what you want.

64 x 128 x 3: 22,45
64 x 128 x 2: 11,22
64 x 128 x 1: 5,11
64 x 128 x 0: 4,8


Qarl Linden added a comment - 02/Oct/08 01:47 PM
oh oh - maybe so. i didn't see that.

Domino Marama added a comment - 02/Oct/08 03:12 PM
It's principle 2 in action. We need at least 44 x 90 pixels to properly represent that ratio

The changes we are asking for don't remove any features, they just make them consistent with the expectations the original sculpties gave us.

The only known adverse effect will be on the currently unsupported map sizes below 64 x 64 such as 32 x 32. Adding principle 2 will fix the bug where that size gives degenerate faces, but it will also reduce LOD3 to be 16 x 16 faces where currently it would give 31 x 31 on planar mapping.


Omei Turnbull added a comment - 02/Oct/08 03:37 PM
Qarl wrote:

and my last concern (well, maybe not last but last for now i really don't like the idea of using a look-up table. whatever the solution may be - it needs to be easily describable.

As a fellow software developer, I completely agree with your second sentence, but not the first. Sometimes, a table is the easiest way to describe something. The fact that we're discussing the differences between proposals by referring to tables instead of algorithms suggests to me that this may be one of those instances. (I actually don't have a strong feeling here, other than to resist the notion that using or not using tables should be a goal in itself, rather than an implementation decision that comes into play after we figure out what the desired behavior is.)


Drongle McMahon added a comment - 02/Oct/08 04:41 PM
"but i feel the correct fix for this problem is for SL to support true mesh structures, and leave sculpties for the NURBS crowd." ..... (a) But from last weeks office hours, meshes may be very far away and (b) I have not understood how the proposal disadvantages the "NURBS crowd". (There are other solutions that maintain exact aspect ratios and power of two reductions with numbers of vertices between original and DM functions ... I'll see if I can make another table of them!).

"i really don't like the idea of using a look-up table." ..... (c) Omei said it exactly. Nothing can be more explicitly clear than a lookup table. Perhaps you mean that the thinking behind it needs to be describable? For that the algorithm is clearer, but a well written comment/prescription is much better for either. However, we don't need to waste any more time discussing this as we are all agreed on using an algorithmic function rather than a lookup function at this point.


Drongle McMahon added a comment - 02/Oct/08 05:49 PM
Domino said "...I think 64 x 128 gives what you want. "
In fact I think you can generalise that the higher dimensioned maps from Domino's function will all match the original function, but while the original function gives identical results for all maps with the same ratio, Domino's provides extra options from the low dimension maps. In other words, Domino's function fits the extra result sets into the redundant parameter space of the original function. If this is true, it should not disable anything that is needed by the "NURBS crowd".

Furthermore, Domino's function with low map dimensions allows the generation of sculpties with low triangle counts, saving rendering load when it isn't needed. This will (partly? more than?) pay back for the small added load from the change of SCULPT_REZ_1 to 8 instead of 6.


Qarl Linden added a comment - 03/Oct/08 09:29 AM
hey guys - i think i misunderstood you - i thought you meant to reduce all sculpt mesh resolutions to powers of 2. if your systems allows a 128x64 map to generate something around a 44x22 mesh - then i withdraw my concerns.

well, not all of them - i do still feel strongly about the lookup table business. as you say, i don't much care about the implementation - but the logical description of it. it's sorta an Occam's razor for software - if its smallest description is some giant table... something must be amiss. (but it sounds like both your proposals do have a simple description.)


Omei Turnbull added a comment - 04/Oct/08 10:37 AM
Qarl wrote: "we'll talk about it in my office hours tomorrow. (i'll save you a transcript if you can't attend.) "

Thanks, Qarl. As I suspected, I wasn't able to break away from work to attend, Is the transcript posted somewhere?


Qarl Linden added a comment - 04/Oct/08 10:50 AM
Omei -

here's a partial transcript (sadly a lot of the discussion was lost when our sim went down, and i forgot to save what i had before the relog. Drongle was present, perhaps he has the rest.)

[11:28] Qarl Linden: heya. we're back i guess....
[11:29] Yuu Nakamichi: so Qarl mentioned the framerate concerns with respect to 8x8 at LOD 0
[11:29] Qarl Linden: yup.
[11:29] Yuu Nakamichi: <--- paraphrasing
[11:30] Rex Cronon: qarl, could u possibly point me to any page on wiki that describes the reasons why the viewer needs to make a 33x33 mesh out of a 32x32?
[11:30] Qarl Linden: Drongle made the point that the proposals would allow for low-rez sculpte meshes, which could maybe offset the 8x8 problem.
[11:30] Qarl Linden: but i don't think it would - i bet most people won't use it.
[11:31] Fallingwater Cellardoor: i was thinking about how to justify a request for 8x8, and i can't really. but what about changing the distances at which LOD drops?
[11:31] Yuu Nakamichi: right
[11:31] Raz Welles: Yuu: framerate concerns?
[11:31] Qarl Linden: Fallingwater - that's available right now as a graphics setting: mesh->object detail or somesuch.
[11:31] Fallingwater Cellardoor: yeah but
[11:31] Yuu Nakamichi: yes Raz, the higher resolution at low LOD seems to bog down things quite a bit
[11:31] Qarl Linden: yeah. enforced.
[11:31] Fallingwater Cellardoor: the highest setting still affects my little shoes a lot
[11:32] Qarl Linden: ah.
[11:32] Qarl Linden: hm.
[11:32] Jade Lily is Online
[11:32] Drongle McMahon: There's no specific request for the 4x4...it just falls out of the function.
[11:32] Fallingwater Cellardoor: or what about changing the relation between object size and distance at which LOD drops?
[11:32] Qarl Linden: WELL - here's one thought - the new aspect ratio sculpts will probably help you. most shapes want a 2:1 aspect ratio.
[11:32] Aimee Trescothick has lamps that degrade too fast too
[11:32] Raz Welles: Ahh- I see. I think something to account for is that we've seen across SL that people will try to overcome LOD no matter what the cost to a viewer's card. If they can't get their verts, they'll just hurl more at it until they do.
[11:32] Qarl Linden: which wasn't previously available.
[11:32] Fallingwater Cellardoor: does that even make sense?
[11:32] Yuu Nakamichi: what are Domino's concerns regarding the non-power-of two degradations?
[11:32] Fallingwater Cellardoor: yeah, i tested a little and i think it will help some things
[11:33] Eleanora Newell: but does it help enough things to warrant it?
[11:33] Qarl Linden: Fallingwater - that does make sense. but it gets us back into low framerates...
[11:33] Fallingwater Cellardoor: ok
[11:33] Fallingwater Cellardoor: no problem
[11:33] Qarl Linden: yeah. i hear you.
[11:34] Drongle McMahon: Yuu, I can't speak for Domino, but for me the reason is in making geometric shapes work with lod changes.
[11:34] Qarl Linden: and we chose 6x6 b/c that's the rez of our regular prim spheres...
[11:34] Yuu Nakamichi: right
[11:34] Red Linden is Online
[11:34] Nyx Linden is Online
[11:34] Drongle McMahon: The need is for each lod step to use a subsample of the vertices used at the previous (higher) lod.
[11:34] Yuu Nakamichi: so right angles will look bad immediately
[11:35] Yuu Nakamichi: with the new proposal?
[11:35] Yuu Nakamichi: as soon as you drop from highest LOD?
[11:35] Qarl Linden: not sure i follow, Yuu.
[11:35] Drongle McMahon: No. It lets you design to keep angles correct as lod changes.
[11:36] Yuu Nakamichi: ok.
[11:36] Qarl Linden: yeah - i don't know the implications for you pixel pushers.
[11:36] Drongle McMahon: I do have another version of this that has slightly lower vertex counts, but has exact aspect rations instead of the approximate ones here.
[11:37] Zero Linden is Online
[11:37] Qarl Linden: i think we can haggle over the rest of the details in the jira - it sounds like the big issues have been resolved.
[11:37] Drongle McMahon: Well, for designing stape, frames, chairs, etc etc. it's important to control lod effects.
[11:38] Qarl Linden: yeah. although wouldn't it be so much easier with meshes?
[11:38] Yuu Nakamichi: yes this is what i was getting at drongle
[11:38] Eleanora Newell: will there be a transcript of today?
[11:38] Yuu Nakamichi: can you explain that a bit more?
[11:38] Qarl Linden: i'm making one, yes.
[11:38] Drongle McMahon: I will put these two tables in the jira as excel files.
[11:38] Raz Welles: Dare I ask what the status of meshes is?
[11:38] Eleanora Newell: thank you, qarl
[11:38] Qarl Linden: sure - LL knows it needs meshes desperately - and we promise to get them into SL before 2027.
[11:38] Drongle McMahon: Of course meshes would be better, but we donlt have them. I think 2027 was suggested last week
[11:38] Raz Welles: LOL
[11:38] Masami Kuramoto: wow ... so soon
[11:39] Masami Kuramoto:
[11:39] Nyx Linden: mark your calendars!
[11:39] Chosen Few: Well that's a relief. I've got plans for 2028.
[11:39] Qarl Linden: my guess is that it'll be sooner than 2027 - but i am not allowed to speak about it.
[11:39] Fallingwater Cellardoor: i'm glad we'll have them before i retire
[11:39] Eleanora Newell: wow, it'll be like getting to the promised land....will i live to see it
[11:39] Raz Welles: XD
[11:39] Qarl Linden: does that make me Moses?
[11:39] Eleanora Newell: yes, qarl
[11:39] Drongle McMahon: So for now, although it's not what Qarl intended, sculpties are a very good mesh substitute if we can use the right funstions.
[11:40] Eleanora Newell: explains the burning life bush, too
[11:40] Qarl Linden:
[11:40] Drongle McMahon: Likel all the best ideas, it's applixcations exceed it's design targets!
[11:40] Qarl Linden: heh.
[11:40] Qarl Linden: so - any other pressing issues?
[11:40] Nyx Linden: like all SL features actually
[11:40] Qarl Linden: we've got a bit of an issue with extra big sculpt maps...
[11:41] Qarl Linden: 256x256.
[11:41] Qarl Linden: does anyone here make 256x256 maps?
[11:41] Rex Cronon: i can
[11:41] Eleanora Newell: no, i stay with 64x64
[11:41] Masami Kuramoto: never
[11:41] Qarl Linden: HEH.
[11:41] Fallingwater Cellardoor: not me
[11:41] Raz Welles: Here's an interesting idea, how about 16 bits of precision for sculpties
[11:41] Drongle McMahon: I think a lot of people made them before lossless upload.
[11:41] Qarl Linden: Raz - that is an excellent idea for meshes.
[11:41] Qarl Linden: so - about 256x256.
[11:41] Drongle McMahon: So there may be quiate a lot of content around using them.
[11:42] Raz Welles: hehe
[11:42] Qarl Linden: they don't always load all the way to 256x256.
[11:42] Qarl Linden: depending on memory, etc, etc.
[11:42] Qarl Linden: we try to guarentee at least 128x128.
[11:42] Drongle McMahon: But dodnly you say the max pixels for lossless upload was 128x128?
[11:42] Qarl Linden: so with all the recent bug fixes - people have noticed that 256x256 don't load half the time.
[11:43] Qarl Linden: but i don't think we're going to fix that.
[11:43] Qarl Linden: b/c it's really inefficient.
[11:43] Qarl Linden: before lossless, people uploaded 256x256 to get more detail. in theory. maybe. sometimes.
[11:44] Chosen Few: How about just disallow anything bigger than 128x128 to be applied in the sculpt map field from this point on? Problem solved. Pre-existing stuff is grandfathered. New stuff is forced to comply or it can't be made.
[11:44] Qarl Linden: hm.
[11:44] Qarl Linden: not a bad idea.
[11:44] Qarl Linden: hm.
[11:44] Drongle McMahon: Pre-existing stuff could be dowsampled to 128x128
[11:44] Qarl Linden: i'll take that to my masters.
[11:44] Drongle McMahon: Automatically?
[11:44] Qarl Linden: that's the problem Drongle - it IS being downsampled... and that slightly shifts the verts.
[11:45] Drongle McMahon: Oh yes, I see.
[11:45] Eleanora Newell: yes, pre-existing stuff grandfathered...in the beginning, i did do 256 when i didn't know better
[11:45] Qarl Linden: ooo - are we finishing early today?
[11:45] Drongle McMahon: I donlt mind throwing bout my old ones, but I don't sell them, so I don't have irate customers!
[11:46] Qarl Linden: yeah - irate customers is the problem.
[11:46] Qarl Linden: but they've NEVER worked well.
[11:46] Runitai Linden is Online
[11:46] Qarl Linden: but there was some expectation that we'd fix them, i think.
[11:46] Qarl Linden: so.
[11:46] Drongle McMahon: That's right. I have given away a few sets of steps for people with horrible old ones.
[11:47] Qarl Linden: anyone up for a game of techwar?
[11:47] Garry Linden is Online
[11:47] Aimee Trescothick: lol
[11:47] Rex Cronon: techwar?
[11:48] Qarl Linden: downstairs - can't you hear it?
[11:48] Brad Linden is Online
[11:48] Qarl Linden: it's my favorite SL game.
[11:48] Yuu Nakamichi: ;p
[11:48] Eleanora Newell: heh
[11:48] Aimee Trescothick: need to get back to playing with my math expression parser for the tools floater
[11:48] Red Linden is Offline
[11:48] Qarl Linden: ???
[11:48] Qarl Linden: ????
[11:49] Qarl Linden: expressions in the tools floater?
[11:49] Chosen Few: If that rule is imposed, nothing bigger than 128x128 can be applied, do we allow, say, 64x256? In other words, is it the total pixel count that's the main concern, or the max for each dimension?
[11:49] Aimee Trescothick: yup, i have math parsing in my tools floater
[11:49] Runitai Linden is Offline
[11:49] Qarl Linden: total pixel count, i think.
[11:49] Chosen Few: Good.
[11:49] Qarl Linden: 128x128 = 16384 pixels, max.
[11:49] Drongle McMahon: So I will remove the bad ones from this table.
[11:50] Eleanora Newell: i have a jewelry expo next week....gotta get back, almost all the new pieces are fully sculpted
[11:50] Fallingwater Cellardoor: is there a reason to use 128x128? or you're just still supporting the old stuff?
[11:50] Drongle McMahon: Doesn't make a difference to what is available.
[11:50] Samuel Linden is Offline
[11:50] Qarl Linden: just supporting the old stuff.
[11:50] Qarl Linden: 64x64 is the right choice.
[11:50] Fallingwater Cellardoor: yeah
[11:50] Chosen Few: If it were up to me, I'd actually draw the line at 64x64. There's really no reason anyone should be using anything bigger than that at this point.
[11:50] Qarl Linden: or anything that has 64x64 pixels.
[11:50] Eleanora Newell: yeah, i've done fine at 64x64
[11:51] Qarl Linden: Chosen - with your idea - i think you're right.
[11:51] Raz Welles: is there any speed difference between 64 and 128 across clients now?
[11:51] Qarl Linden: grandfather the old content - but new content is < 64x64.
[11:51] Chosen Few:
[11:51] Drongle McMahon: 16x256 is great, and has the same number of pixels.
[11:51] Fallingwater Cellardoor: totally off-topic question: is anyone at LL interested in improving the avatar mesh?
[11:51] Qarl Linden: Raz - i would hope there's no speed difference. but if someone would test that, i'd be much obliged.
[11:52] Raz Welles nodnods
[11:52] haku Avro is Online
[11:52] Raz Welles: I bet cel might know ;P
[11:52] Qarl Linden: Fallingwater - we know we NEED to improve the avatar mesh... but i'm not sure of any plans to do so.
[11:53] Qarl Linden: if someone in the opensource community did that, it would be very cool.
[11:53] Fallingwater Cellardoor: yeah ok
[11:53] Drongle McMahon: I'm going to rez something Qarl will hate.....
[11:53] Qarl Linden: just say no.
[11:53] Fallingwater Cellardoor: there would be so many issues with backward compatibility
[11:53] Eleanora Newell: qarl, even remapping would help on the avatars
[11:53] Qarl Linden: there IS an avatar improvement project being designed - but i haven't been following it closely.
[11:54] Raz Welles: Well if you're already going to implement mesh, you could set it up like ReX, with their Avatar 2.0 you can upload a custom bone structure and mesh deformations
[11:54] Fallingwater Cellardoor: oh really!
[11:54] Raz Welles: even if you don't like their method, it's an interesting development to peek at
[11:54] Qarl Linden: Nyx might be involved with that, maybe?
[11:54] Eva Tiramisu is Online
[11:54] Qarl Linden: willdo Raz.
[11:54] Raz Welles: ^^
[11:55] Qarl Linden: what is ReX?
[11:55] Nyx Linden: sorry was distracted
[11:55] Chosen Few: I'd love to chat with whatever Lindens are heading that up, Qarl.
[11:55] Raz Welles: RealXtend, they just releaxed .31 of their server and client a few weeks ago
[11:55] Qarl Linden: AAAH.
[11:55] Qarl Linden: yeah, i'll check it out.
[11:55] Qarl Linden: are they still windows only??
[11:55] Raz Welles: Unfortunately yeah- but I think someone managed to compile it under linux at one point
[11:56] Qarl Linden: aaah. yeah, we should definitely look at ReX.
[11:56] Qarl Linden: is it coupled tightly with OGRE?
[11:56] Eleanora Newell: ah, qarl, it warms my heart that you're on mac....makes you more aware of what we don't have on the mac S
[11:56] Raz Welles: I believe so, the SL rendering engine might be disabled in the future or gotten rid of completely
[11:56] Raz Welles: but you can do some interesting things with python already- I can pull the wiki for you if you want, some new docs are there, sec
[11:57] Raz Welles: http://www.rexdeveloper.org/wiki/index.php?title=Main_Page
[11:57] Qarl Linden: yeah - i'd love to see them completely replace our renderer.
[11:57] Raz Welles: Oah
[11:57] Yuu Nakamichi: ogre?
[11:57] Qarl Linden: gives a good datapoint on what we should do next.
[11:58] Qarl Linden: OGRE is a 3D drawing system. sorta one level above openGL and directx.
[11:58] Yuu Nakamichi: i see.
[11:58] Raz Welles: I know that OpenLife Grid is going to migrate to ReX compatibility, they're trying to get a beta grid up based on their own server and Rex's-- I hear about 50% of the server code or more is different from Opensim now on the rex side
[11:58] Drongle McMahon: Does it have the alpha sort bug?
[11:59] Qarl Linden: yes.
[11:59] Garry Linden is Offline
[11:59] Brad Linden is Offline
[11:59] Yuu Nakamichi: ugh
[11:59] Yuu Nakamichi: ;p
[11:59] Raz Welles: I think everything has the alpha sort bug doesn't it
[11:59] Qarl Linden: yup.
[11:59] Eleanora Newell: there are so many things i try and avoid because of that alpha bug
[11:59] Qarl Linden: unsolved problem.
[12:00] Qarl Linden: they might be able to do a smidge better. but the core problem remains.
[12:00] Chosen Few: The alpha sorting glitch is a force of nature. Mark Twain said "everyone complains about the weather, but no one does anything about it." Same deal. No getting away from it.
[12:00] Qarl Linden: oooo - and that's time for today.
[12:00] Aimee Trescothick: anyone that finds a workable solution to that will be up for the Nobel prize for graphics
[12:00] Qarl Linden: guess there'll be no techwar.
[12:00] Eleanora Newell: thank,s qarl
[12:01] Lillie Yifu is Online
[12:01] Rex Cronon: bye everybody
[12:01] Raz Welles: I'd play but I suck at most games xD
[12:01] Masami Kuramoto: bye qarl
[12:01] Eleanora Newell: be well, everyone
[12:01] Eleanora Newell: and a good weekend
[12:01] Drongle McMahon: Bye qarl.
[12:01] Aimee Trescothick: time to go back to parser writing
[12:01] Fallingwater Cellardoor: thanks, bye
[12:01] Aimee Trescothick: bye
[12:01] Raz Welles: have a great weekend Qarl
[12:01] Qarl Linden: have a good weekend everyone.
[12:01] Chosen Few: Thanks, Qarl. Good discussion, everyone.
[12:01] Nyx Linden: take care all
[12:01] Qarl Linden:
[12:01] Eleanora Newell: i'll look forward to a notice on transcripts
[12:01] Eleanora Newell: bye


Domino Marama added a comment - 04/Oct/08 03:34 PM
Sorry, I couldn't make the office hours.

As the 8 x 8 minimum LOD0 option seems like a non starter, Drongle came up with a solution to the 4 x 9 ratios, which I've simplified somewhat.

After setting the vertices value but before the s & t calculations something like:

if width != height:
vertices = vertices & 0xFFF8

will limit the oblong sculpties to 4 x 8 at the minimum LOD. It has no effect on the higher LODs or square shapes.


Domino Marama added a comment - 04/Oct/08 05:26 PM - edited
(sorry for multiple edits again!)

Yuu Nakamichi: what are Domino's concerns regarding the non-power-of two degradations?

Minimal really now.

My main concerns are maintaining the 2n pixels to represent n vertices and that 3 as the minimum face value isn't good for a lot of shapes. I explored a lot of options and listened to what everyone else wanted and as it happened, the changes to fix my issues also meant that map sizes too small for a ratio, degrade to power of two results in the majority of cases.

When we add normal prim editing tools on sculpties into the equation, the 2 pixels per vertex to get the full sculptie (and non-power of two sizes) actually gives a little more flexibility. With cuts it leaves extra positions and the pixels used for the LODs would change with each cut, so a nurbs surface like sculptie makes sense.

So now I think the best solution is something like my test python code:

def fixed_size( width, height, detail ):
. v = float([ 6, 8, 16, 32 ][detail])
. ratio = float(width) / float(height)
. verts = min( 0.25 * width * height, v * v)
. if width != height:
.. verts = int(verts) & 0xfff8
. s = sqrt(verts) / sqrt(ratio)
. s = max( s, 4.0 )
. t = verts / s
. t = max( t, 4.0 )
. s = verts / t
. return int(t),int(s)

(each '.' is an identation level)

Chosen Few: How about just disallow anything bigger than 128x128 to be applied in the sculpt map field from this point on?

Being able to use bigger maps along with normal prim editing offers a fairly clean solution to animated sculpties. A 256 x 256 map could hold 16 frames of a 1:1 sculptie, just update the start and end cuts to use the appropriate part of the map. Updating the prim properties should force a graphics update, so the sculptie would change shape as the frame was changed.


Drongle McMahon added a comment - 04/Oct/08 07:38 PM - edited
I have added some files that describe the suggested changes in some detail.

sculpt_calc_mesh_resolutions_versions.txt
= Versions of C++ function sculpt_calc_mesh_resolutions that produce alternative values of mesh grid dimensions. Improvements are related to lod switching, texturing and making sculpties with less triangles. They are discussed above and briefly in the file. Main alterations by Domino Marama, with some additions by Drongle McMahon.

sculpt_calc_mesh_resolution_versions.xls; sculpt_calc_mesh_res_dom.png; sculpt_calc_mesh_res_ext.png
= Tables of the ouput s and t values (numbers of quads in each dimension of the rectangular mesh) produced by suggested versions of the function sculpt_calc_mesh_resolutions for the range of useful input W and H sculpt map dimensions (those that can be losslessly uploaded). There is an Excel file and png images for any without excel.

Although I prefer the output "extra" option quite strongly, because I think it will give smoother lod changes and because it bhas more segments that can be used for complex angular shapes, I have to admit that it is longer and less intellectually satisfying. Maybe Domino can shorten my cumbersome addition at the end, as he did the earlier one.

The functions were tested in the Borland C++ builder compiler. I cannot guarantee that they will behave identically with other compilers, but I don't know any reason why not.


Domino Marama added a comment - 05/Oct/08 02:28 AM
Drongle, just looking at your new version. What's the "just in case" part for? 64 x 128 and 128 x 64 should both work and at first glance it looks like you are disabling this by reversing the ratio.

Drongle McMahon added a comment - 05/Oct/08 04:29 AM - edited
Domino. The truncation depends on having s>t (truncs=trunct*ratio must be integer). I was thinking it doesn't matter which way round the map was, but now that you make me think about it, I see that it does if the stitching is not the same on both dimensions (cylinder).

I added stuff to make it work both ways. It gets uglier and uglier!


Domino Marama added a comment - 06/Oct/08 04:02 AM
I've attached my python test script for exploring the results from the changes. I think it's a good compromise between the various ways sculpties could be used. I'm not yet convinced that the benefits of power of two LODs on the maximum sizes are worth losing ~200 faces. So the function in the script doesn't have Drongle's latest suggestions.

Drongle McMahon added a comment - 06/Oct/08 07:04 AM - edited
I am inclined to agree. On reflection (mental, that is) I think the most useful dimensions for the sharp edged stuff are the ones that do satisfy the power-of-two rule (ie w x h = 4^n). That means there is plenty of scope for making sculpties that need this property. Personally, I would not work with the dimensions that juggle about with the aspect ratio and use strange numbers like 51, but I don't have to. However, while I enjoyed working out the more "perfect" scheme, it is unsatisfactorily cumbersome and I would be happy to see it left to gather dust as an intellectual curiosity.

So are we all agreed on this course, so that we can unanimously recommend it to Qarl?

I note that the 6x6 at lod0 for the square maps is strictly only needed for 64x64 for backward compatibility, but is presently applied with the other square ones too ... that's ok with me. Anyone object?

Lastly, Domino, I don't have python so I can't check. I use R for testing, and there I have done conversions to integer on all the assignments to s and t to get out the same numbers as from C+. I am sure this is because of the implicit cast on that assignment in C+. Could you check whether you get the same numbers as in my "Domino" table, or whether you would if you added the int() cast to each assignment? Just so we are sure we are talking about exactly the same thing.

PS - The loss of 400 triangles might just as well be considered a performance advantage an accuracy disadvantage

PPS - I should change my code to use your more effcient AND ... Done


Domino Marama added a comment - 06/Oct/08 07:28 AM
Yes, the Domino table is correct. My attached test script gives identical results to it.

The things it changes from the rc4 version are:

Maximum sculpty size is limited to map width / 2 and map height / 2.

Minimum faces in any direction is limited to 4.

4 x 9 is considered a non useful result and is corrected to 4 x 8 for oblong sculpties.


Omei Turnbull added a comment - 06/Oct/08 02:59 PM
Drongle and Domino, I'm happy with the current sculpt_calc_mesh_res_dom.png, which I think is what you two have agreed on. At this point, I think we're just making small adjustments to address Qarl's specific concerns, and as far as I can tell, this addresses all he has expressed so far.

Thanks for keeping on top of this.


Drongle McMahon added a comment - 07/Oct/08 03:11 PM
I think we have unanimity then. So it is up to Qarl now.

To summarise....

We prefer the shorter function that requires only small modifications to the existing code. This makes available optimal dimensions for all aspect ratios for organic sculpties, including the important 2:1 (64x128), and for many aspect ratios for sharp edged sculpties with accurate LOD subdivision on a subset of pixels. It replaces the redundancy in the original function with the option of low-triangle versions that may be used to improve performance where appropriate. It maintains backward compatability for the old 64x64 map. We think this deals with all the issues Qarl raised with the original proposal(s).

I guess the only open question is to check that the outputs work with the downstream stuff to give the expected rendered results. I can't help here as I don't have Visual Studio.


Omei Turnbull added a comment - 07/Oct/08 08:19 PM
Drongle said "I can't help here as I don't have Visual Studio."

Alas, you can't get off the hook that easily Visual C++ Express is a free download, and many people use it to build the SL client under Windows. (See http://www.microsoft.com/express/vc/). But having said that, it isn't trivial to build the viewer. You have to collect tools and libraries from a variety of sources, and each release has a new set of gotchas. It could take several hours' to a day's work to get set up. I've done it at times in the past, but that was on a machine that is no longer among the living, so I would be starting from scratch. Right now, my work schedule precludes that.

I was hoping from something he said in the forum that Domino was prepared to make a patch. But he didn't say so explicitly, so I may have been mis-representing him.

FWIW, as part of investigating the feasibility of VWR-2615 (http://jira.secondlife.com/browse/VWR-2615) a year or so ago, I built a version of the client that created small meshes from small square bitmaps, and in my personal testing I did not uncover any issues.


Domino Marama added a comment - 09/Oct/08 01:56 PM
Omei Turnbull said "I was hoping from something he said in the forum that Domino was prepared to make a patch. But he didn't say so explicitly, so I may have been mis-representing him"

I don't have a current build environment either. For speed I've just done a patch against the http://byteme.org.uk debian package. I'm doing a test compile as I type. If that's ok I'll apply the patch to the latest SVN and post up.

I've changed more than discussed to add better catching of images with 0 width or height which may or may not be related to // weird crash bug - DEV-11158


Domino Marama added a comment - 09/Oct/08 02:44 PM
I've attached VWR-9384.diff file with my patch. It compiles but is otherwise untested.

Drongle McMahon added a comment - 09/Oct/08 05:36 PM - edited
Thanks Domino, for rescuing me from Omei's challenge.
However, your change to the test for zero made me look closer. The original function returns s and t for the default square sculpt map when w==0 or h==0. But the patched function returns the zero(s). I don't know, but I imagine this might be a problem for the calling function (divide by 0?). Other parameters less than 8 also make rather silly returns (including zeros again for 2x2 and 3x3). Therefore I suggest we should add a range test right at the start, to guarantee that the default 4x4 will be returned for all smaller dimensions, including zeros. (Note that 1x1 or 1x2 also gives vertices==0 after the shift, and one vertex in any dimension has to be fairly useless!).

if (width < 8) width = 8;
if (height < 8) height = 8;

Since the old function works, I assume that it is acceptable to return numbers greater than the dimensions even if these are zero. I had ignored this because I couldn't imagine where the zeros might come from. Better to have this in than to wait and see if consequences are dire?

PS. Assuming that sculpt_sides can never return less than 6, this should mean that the test for zero can be removed? So it's only one extra conditional statement.


Domino Marama added a comment - 10/Oct/08 01:58 AM - edited
That's why I moved the check in the later function. Any 0s that get returned are caught and you should get the default sculptie sphere rather than trying to create one from invalid map values. I did consider whether the requested_sizeS & requested_sizeT would need setting at that point. It depends what mPath->generate and mProfile->generate do with zeros. Setting them to sculpt_sides(mDetail) is the correct action if the generates need the correct LOD requested.

if (requested_sizeS == 0 || requested_sizeT == 0 || sculpt_components < 3 || sculpt_data == NULL)

{ sculpt_level = -1; data_is_empty = TRUE; requested_sizeS = sculpt_sides(mDetail); requested_sizeT = requested_sizeS; }

There's oddities in map sizes below 8 x 8, but as this size gives 4 x 4 faces which is the smallest supported size, that's to be expected. The size* == 0s could be changed to < 4 in the above snippet to totally block these sizes.

The 0s thing is for when the client draws a sculptie before the sculptie map has downloaded as far as I know, so it's a different case than undersized sculpties.


Domino Marama added a comment - 10/Oct/08 03:09 AM
I've checked the generate and it would end up with a divide by zero. VWR-9384-1.patch has been attached which fixes this issue and blocks all sculpties with less than 4 faces in either direction.

Domino Marama added a comment - 10/Oct/08 04:20 AM
I've uploaded a new version of the patch (VWR-9384-2.patch) which is an optimized version of VWR-9384-1.patch

Domino Marama added a comment - 14/Oct/08 01:49 PM
Has anyone done a test build yet? I've just noticed in my python code I was returning t,s (not s,t) so the ratio might be the wrong way around in the patch. If so then

s = (S32)(fsqrtf(vertices / ((F32) width / (F32) height)));
s = llmax(s, 4); // no degenerate sizes, please
t = vertices / s;
t = llmax(t, 4); // no degenerate sizes, please
s = vertices / t;

should be:

t = (S32)(fsqrtf(vertices / ((F32) width / (F32) height)));
t = llmax(t, 4); // no degenerate sizes, please
s = vertices / t;
s = llmax(s, 4); // no degenerate sizes, please
t = vertices / s;


Domino Marama added a comment - 18/Oct/08 12:49 PM
The development version of my Blender scripts now supports these sculpties on both new sculpties (Add - Mesh - Sculpt Mesh) and importing maps ( File - Import - Second Life Sculptie). So if the math was confusing anyone, they can try them out instead of scratching their head

http://dominodesigns.info/second_life/blender_scripts_git.html

Please post any feedback on the scripts to the forum http://forums.secondlife.com/showthread.php?t=203571


Omei Turnbull added a comment - 19/Oct/08 11:44 AM
Corrected typo in Summary

Domino Marama added a comment - 27/Oct/08 04:25 PM
Added vwr-9384-ratios.txt which shows the full range of supported ratios (post patch) and shows the results for the number of faces each ratio gives including the changes from pre-patch.

Qarl Linden added a comment - 28/Oct/08 06:38 PM
hey guys - one question:

i'm sorta opposed to the & 0xfff8 in the code - which i'm guessing is an attempt to lock the numbers to powers of 2. my concern is nit-picky for sure - but i don't like the idea of forced powers of 2. do you mind terribly if i remove it (it seems to affect only the lowest LOD.)


Domino Marama added a comment - 29/Oct/08 01:43 AM
The & 0xfff8 targets one specific issue. That's the 4 x 9 faces result which it adjust to 4 x 8. That makes the LODs across the majority of the oblong ratios much cleaner.

Without & 0xfff8

32 x 128 LOD3: 16,64
32 x 128 LOD2: 8,32
32 x 128 LOD1: 4,16
32 x 128 LOD0: 4,9

With & 0xfff8

32 x 128 LOD3: 16,64
32 x 128 LOD2: 8,32
32 x 128 LOD1: 4,16
32 x 128 LOD0: 4,8

This makes the difference between LOD0 having almost no relation to the previous LODs and being an exact subset. Looking at the significant pixels of the sculpt map helps make the difference obvious:

32 x 128 LOD1: 4,16
[0, 8, 16, 24, 31] [0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 127]

32 x 128 LOD0: 4,9
[0, 8, 16, 24, 31] [0, 14, 28, 42, 56, 71, 85, 99, 113, 127]

32 x 128 LOD0: 4,8
[0, 8, 16, 24, 31] [0, 16, 32, 48, 64, 80, 96, 112, 127]

For geometric style sculpties this is a very big thing so I'd really hate to see it gone.


Qarl Linden added a comment - 29/Oct/08 10:06 AM
hm. well, one issue i have with it is that it is intentionally obfuscating its purpose. wouldn't

if ((s == 4) && (t == 9))
t = 8;

be more clear?


Domino Marama added a comment - 29/Oct/08 10:20 AM
It would, but you also need to catch the reverse ratio where s==9 so it's an ugly solution imho.

Would adding a comment such as

// Mask for oblong sculpties to set minimum faces to 32 rather than 36

be enough?


Qarl Linden added a comment - 29/Oct/08 10:50 AM
that's my problem too - imho - the logic is ugly regardless of how it's expressed in the code.

as just one example - what happens when SL starts letting you upload textures that aren't powers of 2?


Domino Marama added a comment - 30/Oct/08 03:22 AM
Qarl said "what happens when SL starts letting you upload textures that aren't powers of 2?"

We get lots of new interesting ratios to use

9 x 9 LOD3: 5,4
9 x 9 LOD2: 5,4
9 x 9 LOD1: 5,4
9 x 9 LOD0: 5,4
9 x 23 LOD3: 4,12
9 x 23 LOD2: 4,12
9 x 23 LOD1: 4,12
9 x 23 LOD0: 4,8
9 x 35 LOD3: 4,18
9 x 35 LOD2: 4,18
9 x 35 LOD1: 4,16
9 x 35 LOD0: 4,8
23 x 23 LOD3: 12,11
23 x 23 LOD2: 12,11
23 x 23 LOD1: 8,8
23 x 23 LOD0: 6,6
23 x 35 LOD3: 11,18
23 x 35 LOD2: 11,18
23 x 35 LOD1: 7,9
23 x 35 LOD0: 5,6
35 x 35 LOD3: 18,17
35 x 35 LOD2: 16,16
35 x 35 LOD1: 8,8
35 x 35 LOD0: 6,6

Although Drongle really wanted power of two results across everything, the original intention was to "strongly favour" them and that's what the patch does. It's minor adjustments that give great results on power of two textures and sensible results on everything else.

Odd ball sizes are something that were considered as they could be introduced via profile and path cuts without any changes to the texture pipeline.


Omei Turnbull added a comment - 30/Oct/08 09:13 AM
Qarl said "that's my problem too - imho - the logic is ugly regardless of how it's expressed in the code."

Qarl, are you really having a problem with the algorithmic logic? Or is it really the principle behind the algorithm, i.e.

3) Modify the LOD reduction algorithm to strongly favor factor-of-two reductions in each dimension. Failing to do this makes it very difficult to manage the degradation of geometric features over multiple LODs.

I suspect most of the builders who are supporting this don't understand or care much about the algorithmic details. But I think they do feel strongly about being able to manage LOD degradation.


Qarl Linden added a comment - 30/Oct/08 10:49 AM
guys - i'm trying to keep the sculptie definition as clean as possible. but:

"if the sculptmap is non-square, then reduce the number of available vertices to the nearest multiple of 8"

doesn't sound clean at all to me.

given that this only affects you for the lowest LOD - and given that all this is just a hack to tide you over until true meshes come along - and given that everything works fine for the typical sculptie user - and given that i'm conceding to you for roughly 95% of your use cases:

can we please just compromise here and drop this requirement?

please?


Shack Dougall added a comment - 30/Oct/08 01:14 PM
Omei said "I suspect most of the builders who are supporting this don't understand or care much about the algorithmic details. But I think they do feel strongly about being able to manage LOD degradation."

That's me, in a nutshell.

I defer to the opinions of Omei, Domino, and Drongle, about whether Qarl's request is an acceptable compromise, but the issue in general is extremely important. In the near future, I plan to implement tools in Prim Composer for 3ds Max for managing LOD similar to what Domino has done in Blender.


Drongle McMahon added a comment - 30/Oct/08 02:44 PM
Qarl. I am puzzled by your reasoning in favour of 4x9. The logical series of return values from sculpt_sides() would be 32, 16, 8, 4, for the four lod steps. I guess the comment shows why you changed this, but that is where the neatness was broken, by introducing the 6. If there is a kludge, that is it, as indicated in the comment....

"const S32 SCULPT_REZ_1 = 6; // changed from 4 to 6 - 6 looks round whereas 4 looks square"

Without this everything would be 4x4 anyway and neatness would rule supreme.

So that gives us the 6x6 for the lowest lod for the square maps, which we left for backward compatibility. But it also gives the 4x9 (or 9x4) for the oblongs, and that is really ugly. It is not logical, it is an artefact of breaking the logical series of returns from sculpt_sides(). So I would prefer the 4x8 even arguing from the purely aesthetic values you are starting from, quite apart from the fact that 4x9 produces serious problems for designing to cope with lod.

The mask form was an optimisation by Domino requiring one less conditional than my version. It is a bit obscure, but a comment can make it clear, just as does the existing comment for the otherwise obscure value of SCULPT_REZ_1 (which does not, by the way, explain 4x9).

I think this has just about the same clarity/logicality status

"if (width != height) vertices &= 0xFFFFFFF8; // change 36 to 32, to avoid problems with LOD switch to 4x9 quads, other values unchanged"

The other thing is that keeping to 4x8 does stick to the map aspect ratio as far as possible, whereas 4x9 breaks it.

I sort of hate making this comment because you have been so helpful, and it seems a bit mean, but it is my honest point of view

Anyway, I guess you do have the final say. If you feel that strongly, I am sure we will grin and bear it.

/Drongle sneaks away wondering if he will ever be allowed into Q again


Domino Marama added a comment - 30/Oct/08 05:34 PM
I've done a quick sculptie with a 4 x 8 base and two levels of detail which is attached as oblong_planter.tga

The image 8_or_9.png shows the effect of removing the & 0xfff8. The mesh on the left is an import without the modification and shows how the map is read for 4 x 9 faces. The middle one is 4 x 8 and the one on the right is the full sculptie.

I can't see how removing the & 0xfff8 is even an option personally.


Drongle McMahon added a comment - 30/Oct/08 11:37 PM
Domino. Still getting no-such-file-or-directory error for your new attachments. Can you redo them?

Domino Marama added a comment - 31/Oct/08 02:19 AM
Odd, they were working after the original upload. I've replaced them now.

Qarl Linden added a comment - 31/Oct/08 12:49 PM
well - i'd argue your graphic is a bit misleading - here's an in-world shot of the difference.

unless there's an objection, i'm going to implement everything but the ^2 thing - and you guys are more than welcome to try to get a different linden to take-up your cause.

sound good?


Domino Marama added a comment - 31/Oct/08 01:48 PM
Misleading in what way?

I'm unclear what your in world shot is showing. Are you assuming the lowest LOD will only be seen when the object is far off?

One of the use cases I'm considering is vehicles built for racing where sculpties are useful due to the fixed prim count. Often many of the racers will have their detail settings on the lowest to ensure the fastest frame rate. There is a very real need for the lowest LODs to look good close up.


Qarl Linden added a comment - 31/Oct/08 02:12 PM
Domino - please let me know what you want me to do: 1) implement everything but the ^2, or 2) bow-out and let someone else go with this.

Omei Turnbull added a comment - 31/Oct/08 02:12 PM
Qarl,

If I understand correctly, you really only consider a few bitmap sizes to be important for the "organic" shapes you have always considered to be the intended use for sculpties. If that's true, might you identify those sizes, and how you would like them to behave? Then all the others could be optimized for "geometric" sculpties. (Not that I really think there is a sharp distinction between the two.) My motivation in being persistent about this discussion is to make the full range of bitmap sizes useful, not to take something away from you. We all owe you for creating sculpties in the first place.

We could modify principle 3) to read:

3) Modify the LOD reduction algorithm to:

3a) for bitmap sizes designated as being for organic sculpties, favor getting the maximum number of faces at each LOD. Failing to do this makes organic sculpties too box-ish at lowest LOD, and

3b) for all other bitmap sizes, favor factor-of-two reductions in each dimension. Failing to do this makes it very difficult to manage the degradation of geometric features over multiple LODs. and the code could make that distinction explicit.

It makes sense to me to acknowledge this distinction up front rather than trying to make it fall out of a "uniform" formula and then debating the aesthetic merits of the resulting code.


Domino Marama added a comment - 31/Oct/08 02:23 PM - edited
Qarl said "Domino - please let me know what you want me to do: 1) implement everything but the ^2, or 2) bow-out and let someone else go with this."

I'd prefer not to make a decision until we've had chance to drum up support from another Linden, but if you feel that strongly about it I'd suggest doing both. Implement 1 and we'll raise another Jira specifically for the other issue which you could bow out off. Do you have any recommendations on who else would be interested in that area of code that we could talk to?


Qarl Linden added a comment - 31/Oct/08 03:03 PM
excellent. so i'm going to put this work into the maint-viewer-11 branch. as for another linden - i'd recommend Tofu - he's inclined to both graphics and jira-patches. or you could let it fall into the normal jira pipe - i think Bridie holds office hours once a week to triage patches. (or maybe that's Liana? not sure.)

Drongle McMahon added a comment - 01/Nov/08 09:18 AM
Pity, because I really can't see why Qarl doesn't want this simple no-cost improvement that has no detriment to organics, but it's much better to put up with this than to sacrifice the whole thing. So I agree with Qarl's proposed action. Thanks much, Qarl, for taking (nearly) all this forward. Domino, please feel free to quote any of my arguments in a new jira.

Domino Marama added a comment - 01/Nov/08 03:54 PM
Thanks Drongle. I'm going to have a good long think about it and see if the logic can be refined before I post a jira on it.

It might be that rewriting the "sculpt_sides" function to a "sculpt_faces" one that is ratio aware might be a cleaner solution. The 4 x 9 problem comes because that function and it's use was designed for square ratios where width equals height, so perhaps addressing it there would be more acceptable.


Keasley Islay added a comment - 24/Feb/09 11:20 PM
this issue should be implemented. right, as for now scilpties mostly are more like spheres, but it will change with progression of software\plugin etc.

Shack Dougall added a comment - 25/Feb/09 12:57 PM
The status of this is still OPEN. Does that mean that it hasn't been implemented in the viewer yet?

Rob Linden added a comment - 25/Feb/09 01:03 PM
This was committed to maint-viewer-11 a while back, which I believe puts it on track to be in the 1.23 release when that comes out

Omei Turnbull added a comment - 11/May/09 02:58 PM - edited
Although Qarl's changes did get into RC 1.23.1, they surfaced another problem (yes, again) with lossless compression. See https://jira.secondlife.com/browse/VWR-8551. Without a fix to VWR-8551, Qarl's changes aren't very useful.

Dessie Linden added a comment - 15/Jun/09 04:52 PM
Fixed in 1.23.4, released on 06/15/2009.