• 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.
Issue Details (XML | Word | Printable)

Key: VWR-9203
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: Qarl Linden
Reporter: Zwagoth Klaar
Votes: 854
Watchers: 152
Operations

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

Flexible Sculpted Prims

Created: 15/Sep/08 12:42 AM   Updated: 25/Sep/09 10:18 AM
Return to search
Component/s: Building (in-world), Graphics
Affects Version/s: Source code, 1.21 Public Nightly
Fix Version/s: Source code, 1.21 Public Nightly

File Attachments: 1. Text File flexi-sculpti.patch.txt (11 kB)
2. Text File flexible_sculpted_prims_v0.5.1.patch (15 kB)
3. Text File flexible_sculpted_prims_v0.5.2.patch (16 kB)
4. Text File flexible_sculpted_prims_v0.5.patch (15 kB)

Image Attachments:

1. fexisculptie.png
(129 kB)

2. Non-flexi sculpted tail.jpg
(64 kB)

3. Normal flexi vs. sculpted flexi.jpg
(145 kB)
Environment: N/A
Issue Links:
Relates
 

Last Triaged: 17/Sep/09 08:44 AM
Source Version: 1.21 /trunk as of 9-15-2008
Linden Lab Issue ID: DEV-20566
Patch attached: Patch attached


 Description  « Hide
Attached is a unified diff of the code that will allow you to create flexible sculpted prims.

Thanks to:
Kristie Young
Uchi Desmoulins

Videos of the end results of this patch:
http://www.youtube.com/watch?v=N8SPB8aIWrQ
http://www.youtube.com/watch?v=-VGHkuvx1Zs

Notes about the patch:
This is NOT a final, production release patch. It is a show of progress and proof of concept. It works, but has a way to come. I am continuing to work on it. I posted this here to show that it is possible, and so that others could know whats going on.

Sims do not approve of you doing this, expect to have things changed back randomly, or flexible to be unselected if you mess around with the shape.

Have fun with this. I hope it opens up a lot of possibles. Vote if you want this added to the viewer!



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Tyken Hightower added a comment - 15/Sep/08 12:49 AM
Whoop whoooooop.

Chalice Yao added a comment - 15/Sep/08 01:22 AM
This is totally 'do want' <3

Kira Zobel added a comment - 15/Sep/08 09:31 PM
Something like this would be a revolution in avatar creation, as well as other things! This needs to be implemented.

Talulah Bancroft added a comment - 15/Sep/08 09:40 PM
Wow... that didn't take long. Gotta love SL's residents. Go Qarl!

TigroSpottystripes Katsu added a comment - 15/Sep/08 09:51 PM
nice!

would it be too hard to make this also work for spheres, toruses (torii?) and company?


Zwagoth Klaar added a comment - 15/Sep/08 09:57 PM
At the time, flexibles uses a path shape that is enforced as being a straight line, this deters the ability for them to be feasible for other shapes without re-writing the code to generate the points specific to flexibles.

Sculpted prims got lucky because they retain their shape even when you change the path shape.


reddot99 Republic added a comment - 15/Sep/08 10:01 PM
so thats why it uses a box collision set?

Brandon Shinobu added a comment - 15/Sep/08 10:45 PM
A feature I'd like to see, which would tie into what Zwagoth mentioned above, is to see flexmaps, similar to Sculpmaps, but instead, defining points of "flexiness" and even anchor points. Having multiple anchor points would be wonderful. However, I'll disclaim I haven't thought much about the idea as I figured it was far in the future.

Agahnim Griffith added a comment - 16/Sep/08 12:38 AM
I fully support this. As a builder and one make avatars, this feature will benefit many in their building needs and the people of Grendel's Children will most defintely would benefit by this feature with their creature avatars.

Shai Delacroix added a comment - 16/Sep/08 12:52 AM
Horray! Wishes do come true. I've dreamed of this for awhile for sl clothing. This along with improved mesh support can go a long way. Cheers, Qarl and Linden Labs!

Zwagoth Klaar added a comment - 16/Sep/08 03:57 AM - edited
Updated the patch to include a UI change (to allow you to select flexible when it was a sculpt) and to remove some other changes that had slipped into the patch file by accident.

damien fate added a comment - 16/Sep/08 08:58 AM
Oh the things I could do with this, here's hoping!

TigroSpottystripes Katsu added a comment - 16/Sep/08 10:30 AM
I wonder how long till we get a trully 3d Halloweener Xp

Lex Neva added a comment - 16/Sep/08 10:41 AM
Wow! Let's hear it for open source!

Also, I hope you realize that this will open many doors in the adult industry


Tensai Hilra added a comment - 16/Sep/08 11:34 AM
I suspect this was always known as possible, but the shoddy system that is 'flexi' was hoped to be replaced with the flexmaps. maybe this article/patch will push the hand into implementation.

Qarl:
I know with hacks alot can be implemented, but this does show basic code level support for flexi sculpts... perhaps now is the time to push forward on bones and Flexmap/Skinweight channels.

My reasoning is, if everyone exploits like this and these prims are out there, we may not be able to back-peddle. of course, a Flag for Flexmap/standard Flexi would be useful.

OOOoh.. I would so like to see flexmaps by Halloween... Some of the Chain Sculptmaps would be perfect for this tech! though, even Christmas with beards and bells on harnesses would be nice too


Chalice Yao added a comment - 16/Sep/08 11:36 AM - edited
A compiled version of a viewer based on the latest 1.21 + flexible sculpties is available at

http://78.47.71.225/FlexiSculptView121.rar

for testing

Feel free to make download mirrors (I'd appreciate that)

p.s. Just unrar and run it. no need for an actual installation.


Chalice Yao added a comment - 16/Sep/08 12:32 PM
Oh, and by the way folks, this patch was not made by Qarl or Linden Labs.

It was made by Zwagoth Klaar, Kristie Young and Uchi Desmoulins

Read the description :>


Tensai Hilra added a comment - 16/Sep/08 01:07 PM
Chalice:
Yes I know it's not a LL thing... but now that it affects Qarl's sculpts, it falls in his lap. no offence LL, but you do have a habit of introducing something then moving on to something else before fleshing it out cough windlight per parcel settings cough

All cudos to Zwagoth, Kristie, and Uchi as it's about time someone force the hand


Qarl Linden added a comment - 16/Sep/08 03:21 PM
VERY VERY interesting.

i plan to investigate thoroughly - but i'm busy for the next couple weeks. i'll keep you posted.

in the meantime - here's a concern:

when textures are downloaded to the viewer - they are immediately shuttled into VRAM. to "sculpt" a prim - this texture is temporarily loaded back out of VRAM into the CPU, where it's used to create the shape.

currently - this only happens when a sculpt rezzes or changes LOD. but for flexisculpts - this is happening every frame. and that's no good. so we'll need to find some (good) way to cache this data in the CPU (either the texture itself or an undeformed mesh, not sure.)


Zwagoth Klaar added a comment - 16/Sep/08 03:41 PM - edited
Qarl:

I noticed this, it was a concern of mine for the final patch, but I was looking to implement the feature before tackling the issue of this performance problem. Working from the existing flexible subsystem was a design goal so that things behaved similarly.

It might be noted that normal flexibles are regenerated from scratch every frame, so it might be worth my time to redo a bit of the framework for them, so that they are a bit less intensive on the system.

Some other things I may or may not try to address is that in a sculpt, the Z offset of any pixel can be considerably different from the ones after it. In a normal flexible, you have a very well defined, line path, with predictable Z increments. The resulting effect of this "chaos" of Z offsets in sculpts makes for very odd transformations when something has multiple points at a specific height, but at different x/y coordinates. It effectively breaks the illusion that the shape is really bending, and more that its being sliced up and pushed around(This would be perfectly accurate for how it is currently done.)

There are a few ways to address this, but they are somewhat unfeasible for real-time purposes.

The inability to scale these things is driving me right batty, because I can't locate a logical reason why they would not scale. They run through the same transform matrix as any other flexible prim would, and its applied to the final shape. If anyone has any insight about how the scaling transform process applies to shapes, and the exact order that its run in, please, let me know. Until then I will dig my way through the code until I come up with something useful and can fix this rather annoying pitfall.

Once that is addressed, I will work on and address the performance concern of both flexibles, and sculpted flexibles.For the moment, they have a slightly higher performance impact than normal flexibles, but are still governed by the time limits that can be set by the user. They shouldn't cause any more "lag" than other flexibles because of this, the updates are just throttled.

I would go with storing the unmodified vertex data, it should be faster to use than having to run the sculpt algorithm on a in memory texture every frame. It should use about the same amount of memory either way.


Jacek Antonelli added a comment - 16/Sep/08 08:26 PM
Nice work, Zwagoth, Kristie, and Uchi! I hope to see the little issues worked out and this feature added soon! \o/

Contessa Marquez added a comment - 16/Sep/08 08:30 PM
WOW Id love to see this be implemented, sounds GREAT!!!! Do it LL

velma paine added a comment - 16/Sep/08 08:50 PM
Really would love to see this happen....PLEASE *smiles

wayfinder wishbringer added a comment - 16/Sep/08 08:50 PM - edited
This looks interesting, but may I mention one word?

lag

Before we jump off the cliff and inundate SL with flexible sculpties... maybe we should check into whether the system can handle it technically. I'm as much for it as anyone else but already flexis and sculpties are both two of the most lag-inducing constructs on SL. It only makes sense to ask what will happen if we mix the two together.

Before I give this my vote... I'd like to see the stats:
1) Standard prim performance
2) Standard flex performance
3) Standard sculpty performance
4) Comparative of flexi-sculpty performance

Once we see those states, we might better judge whether this is a good idea or not. SL is already lagged to death. I think a good test might be the (what's it called I can't remember... measurement tool for avatar system requirements). Anyhow, use that tool, measure an avatar wearing 10 flexis, then 10 sculpties, then 10 flexis sculpties. See what happens.

For a fair test they should all of course be relatively the same shape and size. However, there may be far better ways to test than that. I'm not a graphics tech, I dunno. But surely would need to be tested.

If they pass the test, I'm all for the idea (especially since someone already did all the work).


Adeon Writer added a comment - 16/Sep/08 09:02 PM
This NEEDS to happen. There are so many applications I can think of for this. Full support.

Linda Haber added a comment - 16/Sep/08 10:56 PM
Ohh yes please

Enysy Mikita added a comment - 17/Sep/08 12:12 AM
Yep. If we are going to have "sclupties", we ought to make it possible to make 'em flexie. This is a no brainer.

Nikk Papp added a comment - 17/Sep/08 12:29 AM
Please, please, please.... I want flexible sculpted prims. As a matter of fact, I would die without them.

moonflower Summers added a comment - 17/Sep/08 05:52 AM
This looks great! I have been wondering if this functionality would become available since sculpties came about. Full support here!

Tensai Hilra added a comment - 17/Sep/08 09:14 AM
Wayfinder: Lets be frank, you are dead on. as explained between posts from Qarl and Zwagoth, the system uses an inefficient method of Level of detail management. This is known and would be addressed in a mainstream application of this.

I'd like to believe, that in the process they would also take the sculpty OUT of the normal rendering path and allow it a better LOD function/priority/caching/etc...(slightly overdue? /me pokes Qarl)

In the long run, this feature may fix both the problems with Sculpty lag and Flexi lag.

on a side note, with sufficient hardware, comes very little impact. Always the scapegoat, but I don't like the idea of having my investment gimped because someone else's laptop is insufficient.

This flexi implementation would really probably classify as a viewer hack. (as could be argued for flexi AND sculptys as well, but lets not) I see this feature request as a way to 'light a fire' under the need for advanced features that people are looking for currently. I'm all for viewer skin changes, but the push for that was just so people could get the old one back :/ this feature would help with the quality of the experience in SL.

/me steps down from standard prim soap-box


Lex Neva added a comment - 17/Sep/08 09:26 AM
Zwagoth, I'm not sure why you deleted your comment, but I found it insightful.

Deany Fall added a comment - 17/Sep/08 01:23 PM
I FAVOUR THIS!

Gigs Taggart added a comment - 17/Sep/08 02:50 PM
Actually yes putting sculpt textures in VRAM breaks other things, such as S3TC. It would be nice to never let them get there. I am going to try to contact Qarl about this as soon as I can.

Gigs Taggart added a comment - 17/Sep/08 02:58 PM
I should also note, the patch, as it exists now, is indeed very laggy. But Zwagoth is correct, we can fix it, there's nothing inherently slow about these.

Tensai Hilra added a comment - 17/Sep/08 03:43 PM
To be honest, I'm not quite sure why they are in the VRAM render path in the first place, other than legacy throwbacks to their life as a texture.

Obvious benefit being the ability to allow the client to use the video card to LOD the object, but the update/transfer overhead has to outweigh the gain of having the process farmed like that. besides, with more specific algorithms for LOD, we could have more intelligent Poly drops that don't trash complex shapes (chains, leaves, furniture, railings, etc...) I'll be surprised if a feature like bones or multiple attach points is possible until it's pulled off card, let alone flexmap/skinweight


Zwagoth Klaar added a comment - 17/Sep/08 06:07 PM
I posted this because it caught interest, both in residents and in a few Lindens, one of them even asked me to post it to allow people to know what was going on. It is indeed a large hack at the moment, but it can be revised and made a much more integral part of the viewer.

The reason I even started this project is because Uchi showed interest in the idea, and I wondered how feasible it was. I wrote it to prove it could be done, mostly to myself.

I think that Qarl is the wrong person to poke about LOD functions, they are written over time by a larger number of employees within LL, as a joint project, some of the code in the viewer dates back far into 2003. This brings up a lot of other issues, about how it maybe should be reworked and started up from scratch to take advantage of both things learned over time, but also to take advantage of newer technology and methods that have been founded since then. When the project was started it was easily state of the art, and pushed the technology edge in both graphics and infrastructure. It has since outgrown the initial design many fold.

In the run of its discussion and evolution it has brought up a great many performance claims as well as issues with current implementation, some of them should be addressed more for the good of the entire rendering engine, while others are specific to this feature. I am a bit torn as to if I should put this specific feature on hold and investigate some lower level graphical performance issues, or if I should continue along with this project, and then maybe look at those issues afterwards. Either choice has pitfalls and advantages.

Lex Neva:
I removed my earlier comment because it overstepped being a friendly comment, and had turned into a personal attack, something I think never should have been posted here, both in professional sense, but also out of respect for others opinions. I sometimes forget that not everyone has higher end hardware and machines that can support some of the newer features that give large performances boosts to features such as flexibles and sculpted prims. The more technical information it contained, I cannot verify to be absolute accurate, and never should have been posted in faith of being true. I would like to apologize for having posted it at all.


Tensai Hilra added a comment - 17/Sep/08 06:39 PM - edited
re Hack reference:
I didn't mean to offend. Simply stating, every major advancement usually starts off as a hack. and yes, this feature has quite a bit of potential.

Performance:
Yes, the current sculpty/flex implementations are laggy. but, the problem lies in many of the legacy methods they are fighting against even for physical existence! (LOD) Very aware that Qarl isn't the only person at linden labs, but to find a good place to start, he's the guy for sculptys. looking at his work-queue, he's over most of the jiras relating to them. My frustration is that everyone seems to burn so much time streamlining the broken functions, instead of stepping back and saying... "you know that's broken, lets do this" It's breakthroughs like THIS PATCH that allow for out of the box thinking that bring stuff like sculptys into existence!

DO NOT TAKE ME WRONG. this has stirred up interest in innovation that has long since been dead in these forums! one or two detractors stating performance issues... shesh! 300+ who think it's an amazing idea!

The open-source Viewers are already passing us (REX and alternate character meshes), lets keep the innovation going in the main grid!


Zwagoth Klaar added a comment - 17/Sep/08 07:41 PM
Added the most recent patch. Appears that scale had to be applied using the method for normal prims, not the one for sculpts. This seems to fix things. It also brings up another issue with these. You lose half your resolution because things that are in the negative region of the flexible do not behave correctly, this caused me a large amount of confusion, it makes things warp and flip inside out, also causes distortions.

So, for the moment, people wanting to create sculpts for this, should keep their exports above the 0,0,0 center of the sculpt frame, or it will not behave correctly. Objects flex along the Z axis, keep that in mind.


samsara nishi added a comment - 18/Sep/08 04:29 AM
OMG! This is my dream comming true!
Some time ago there was a post in SLX asking about "What is missing in SL", and flex sculped prims was my answer!
PLEASE! Implement it! I dream about creating my clothes using Flexible Sculpted Prims!!

http://www.slexchange.com/modules.php?name=Forums&file=viewtopic&t=55763&postdays=0&postorder=asc&start=30


violaine villota added a comment - 18/Sep/08 08:57 AM
Is this new viewer and the patches only for Windows? Or will it work with Mac? Oh please please tell me it will work with a Mac!!!

Zwagoth Klaar added a comment - 18/Sep/08 09:22 AM
The patch itself will work on any platform currently supported by the viewer. The test viewer compiled by Chalice with the patch applied, for testing, is for windows only.

Don't worry, its a cross platform change.


violaine villota added a comment - 18/Sep/08 10:00 AM
How do I go about installing the patch? I just downloaded the newest RC client, is that what I need?
I have never tried installing a patch before so I don't know what the steps are. I would be eternally grateful for any info

Zwagoth Klaar added a comment - 18/Sep/08 04:16 PM
This patch is a source code patch. To preview this ability you must be able to compile a copy of the viewer from the public source repository. I know this is disappointing, but it is the way that code patches are submitted and reviewed by most open-source projects that allow outside contributions.

If you are lucky, somebody will compile a version of the client for mac that includes this patch for testing purposes. Otherwise, you will have to wait until/ / if it gets added into the official client. Judging from votes and overall response, it seems almost silly to think that it wont happen. It may be a few weeks before it happens though.


Willow Graysmark added a comment - 18/Sep/08 06:32 PM
I'm all for this idea!!!

Farallon Greyskin added a comment - 18/Sep/08 09:59 PM
There are plenty of ways that this could actually REDUCE flexi -lag

There are TONS of objects like plants, tails and hairdos that use 5, 10 even up to 50 flexible planes or cones which could all be reduced to ONE flexible sculpty!

Ok in reality a 6 flexi tail could be reduced to one, a plant from 10 down to 2-3 and hairdo of 50 down to maybe 5. And of course they would all look 100 times better in the process. That would be a HUGE improvement on the current situation assuming the CPUload between sculted flexis could be made the same as non sculpted.


TigroSpottystripes Katsu added a comment - 18/Sep/08 10:14 PM
don't forget those monstrous dresses, I can't remember having counted, but I bet they often beat the count for some hairdos, and many could be re-created using a single sculpty

Chalice Yao added a comment - 19/Sep/08 12:58 AM
Just a note about the Windows viewer I linked above:
  • currently it is up to patch 0.5.1, not 0.5.2, so there may be scaling problems.
  • To fully use it, extract the rar file into a new folder, then copy

llkdu.dll
the 'fonts' folder
the slvoice*.exe files
vivoxsdk.dll

from your normal installed viewer into the extracted folder. Run secondlife-bin.exe


xtasy lurra added a comment - 20/Sep/08 10:34 PM
omgawd this is liek so awesome VOTE FOR IT NAO!! do it do it do it!! XD

uchi desmoulins added a comment - 12/Dec/08 07:50 AM
Has anything been done over there at Linden Labs? Any progress at all? In two days time, Zwagoth Klaar was able to put this patch together. He did it in his free time. It was a voluntary, nonpaid effort. An exercise just to see if he could do it, without even being familiar with half the code involved. As soon as this jira entry was filed and the youtube videos posted, word of the possibility of having FLEXIBLE SCULPTS spread like wildfire. It generated such a buzz with the community, with content creators specifically, and they were drooling. People came in droves to support this feature.

What's happened since? Nothing. The whole idea of having this has been quietly swept under the rug and ignored.

This feature's dead.


Qarl Linden added a comment - 12/Dec/08 09:30 AM
oh Uchi. it's not dead.

ok - here's the thing. in order to use this patch, two things need to be addressed:

one, the texture readback from openGL. as noted (here? maybe elsewhere) the current implementation causes MUCH lag... and this is the reason. it needs to be cached on the CPU somehow (maybe as the raw texture, or maybe as the un-flexed sculptie mesh. i dunno.)

two, it needs to be tweaked so that it works better for ALL sculpties. the current flexi-code assumes that the flexible spine runs straight-up the z-axis. with a little cleverness, it could be taught that the spine runs between the poles of the sculptie. (or maybe there's an even better solution. again, i dunno.) but right now, most sculpties won't flex the way you expect.

so flexi-sculpties require more work. and LL right now is in no mood to work on unplanned features - we've become MUCH more disciplined about what we work on (for better AND worse.) so.

absolutely - if the community wants to fix the patch so that it handles the two problems above - that'd go A LONG way toward speeding up the process. otherwise..... it's on hold. sorry.


uchi desmoulins added a comment - 12/Dec/08 01:36 PM - edited
To put things into perspective, this has over TWICE as much support as the official, Linden-sponsored Jira entry that you made asking the community if they wanted IMPORTABLE MESHES. And, as anyone who spends any time in SL knows, most people have been craving THAT since the beginning.

http://jira.secondlife.com/browse/MISC-1494 - Importable Meshes survey

And yes, I understand that it needs work, that it isn't ready in its present form. And no, I don't think leaving 100% of the work to the community and then, only by LL's discretion, adding it or not is reasonable at all. Is requesting and pushing for features through the JIRA the most futile thing in the world?

The community wants this bad.


uchi desmoulins added a comment - 13/Dec/08 07:10 PM
Sorry for being a butt. I know you guys are working tirelessly.

Qarl Linden added a comment - 15/Dec/08 12:14 PM
no worries Uchi. i totally understand what you're saying.

it's out of my hands ATM - but i can pester the person who's hands it is in, and see what the verdict is for priority, time frame, etc.


Adeon Writer added a comment - 09/Jan/09 08:04 AM
The natural location for the spine for any given sculpty would seem to be the color-average of each 'row' of pixels on the sculpt map. For a standard 32x32 mesh, that would give a curved string of 32 points that would be used as the 'spine' of the flexible prim.

Qarl Linden added a comment - 09/Jan/09 10:25 AM
Adeon - i tend to agree. my question is - how easily can the existing flexi-code handle a non-straight, non-z-axis spine? probably not well.

Zwagoth Klaar added a comment - 30/Jan/09 08:39 PM
I have heard that there is a go ahead on flexible sculpts, but I would like to mention why I have not submitted a cache fix.

Currently flexibles are implemented where their verts are calculated each frame(kind of) on the cpu. The prim geometry generation code is fairly overhead intensive, when combined with the pull of image data, I do think it will be a serious problem.

The idea I have, is to move the flexibles system over to a vertex shader. It is both faster, and requires almost no cpu side generation of verticies as you can pass the vertex shader any geometry you want. This also opens up other possibilities as there is no specific shape limitations behind them that way. One can also upgrade the flexibles system to use a tiny texture as a flexible map, and move it into a 2D mapping system instead of a one dimensional spine.

Avatar mesh is done this way. But, I have not had the time to fully understand how it manages this. (They surely made it REALLY confusing from a code perspective what goes on.)


Pim Peccable added a comment - 01/Feb/09 03:30 AM
When implemented, this will have great impact on client side processing.

I propose including a preference that will allow the user to let flexible sculpties to remain rigid on the viewer. This could help those with older hardware reduce lag and chance of crashing.


Qarl Linden added a comment - 13/Feb/09 09:01 AM
Pim - agreed. we'll definitely provide a graphics preference for these.

i'm beginning work on this starting monday. it won't take long - but it WILL take a long time for it to reach our released viewer. i'll put the code into one of our publicly available branches, so the hackers can play with it early (and maybe provide viewers for the non-hackers.)


Qarl Linden added a comment - 19/Feb/09 06:02 PM
hey guys - i think i've got the basic groundwork finished. see the attached patch "flexi-sculpt.patch.txt".

the code still needs a GPU readback cache - that's being done by another Linden as a part of a different project - which will take quite a bit of time to complete. i'll try to get you an estimate of when you can expect to see it in a released viewer - but don't look for it anytime in the next few months - we've got a lot of work in the queue.

although, if someone with coding chops were to take this patch and build it - i think you'd become an instant hero in the community.


Tensai Hilra added a comment - 19/Feb/09 06:13 PM
Qarl, you are my hero Thank you for doing this, and I know it has a long way to go, but thank you for really developing something cool into the viewer!

I'll try and merge this into a compiled version ASAP!

(BTW, whats a good way to get ahold of the nightly viewer builds to base on?)

Thanks!


uchi desmoulins added a comment - 19/Feb/09 07:54 PM
Yayyyy! =D

Moy Loon added a comment - 20/Feb/09 01:52 AM
Awesome Qarl <3

I noticed the default patch would only do 8x8 sculpties when flexi, But with some messing around I was able to make it work with the regular 32x32 sculpts, When this hits the main viewer will it only be 8x8s, Or will it show higher quality ones?

with 32x32 sculpts: http://www.youtube.com/watch?v=xTQgb7x_now


Qarl Linden added a comment - 20/Feb/09 09:07 AM
ah yes. so now the bad news.

flexis are a SERIOUS load on our rendering engine. normal flexis only get 8 verts... and that's what we decided to do for sculptie flexis too. so now we need to figure-out what to do from here... i'm open to suggestions. (i completely understand the desire for more detail... that video is awesome.)


Tofu Linden added a comment - 21/Feb/09 03:30 AM
To what extent will the 'readback cache' be expected to save us that load?
Other idea - leave the CPU pretty much alone, let a vertex shader do the flexing. If that is performant, this is cosmetic enough that we simply don't have to support a CPU implementation for those without vertex shaders (who are probably having a miserable time with performance anyway).

Chalice Yao added a comment - 21/Feb/09 03:45 AM
I think Zwagoth was working some on making flexies run purely off shaders. I think it's a good idea to make use of the GPU as much as possible for the flexies, and fall back to CPU if it's not supported...the GPU should be, to put it mildly, alot better at handling them.

TigroSpottystripes Katsu added a comment - 21/Feb/09 08:43 AM
how about a separate LOD slider setting for flexy sculpties separated from both object detail and flexy detail, so people that are being hit too hard by flexy sculpties can force them to a lower LOD if necessary?

Qarl Linden added a comment - 21/Feb/09 01:38 PM
Tofu - well, right now the load is completely unacceptable - it's transferring the sculptie texture data from the GPU to CPU for every frame of animation. i'm sorta not even considering that load because it MUST be fixed before we can release. no, most of the load i'm talking about is the physics simulation, and then GPU encoding of the flexi every frame. so right now flexi-sculpties have almost an identical load as flexi-regular-prims. but that's because we limit the resolution to be the same for the two. (roughly 8x8 verts at highest LOD.)

i agree - a vertex shader solution would be ideal. sadly that's a bunch more work. i know Zwagoth has been threatening to do it. AND Runitai (Linden) has explored doing all flexis on the GPU - but you'll have to ask him why he gave up. (maybe an issue with compatibility for the physics?)

(and as an aside - maybe it's simply better to multi-thread this stuff and rely on additional CPUs. i know Runitai was been working heavily on threading...)

i think we'll end-up providing a debug setting to turn-up the maximum for people with honken-CPUs. i think we might get pushback if we try to make it a full preference - novice users play with those settings without understanding them - and then they have a horrible experience.


McCabe Maxsted added a comment - 23/Feb/09 06:44 AM - edited
I love all the work that's been done here! A great example of the strength of the community!

In case anyone wants to toy around with this in a viewer, I've applied the latest patch to Imprudence:
http://imprudenceviewer.org/2009/02/23/just-for-fun-flexible-sculpties/

(sorry for the downloads being Windows and Linux-only. We need a mac dev!)


Theblack Box added a comment - 23/Feb/09 11:16 AM
"normal flexis only get 8 verts... and that's what we decided to do for sculptie flexis too. so now we need to figure-out what to do from here... i'm open to suggestions."

Questions/Suggestions

"8 verts for flexi"
That refers to the underlying bone-structure, i guess ?
8 consecutive bones and flexi happens at the "joints" between them ?

So we will have some extra settings for flexi as prim-settings, that seems inevitable.
Will there also be information encoded in the sculpt-texture ?

I kinda see 3 different approaches as possibilities:

1. no flexi-information in the sculpt-texture ... everything as extra-settings

2. alpha-layer of sculpt-texture is being used to assign a vertex to a position in the bone-strip (0 is the start of the first bone ... 255 is the end of the last bone)

3. the bone-structure is saved in the alpha-layer ... not value-per-pixel ... but as meta-info like a watermark.

Please correct me if any of this is non-sense.


TigroSpottystripes Katsu added a comment - 23/Feb/09 11:27 AM
mapping the the vertexes to bones using alpha value sounds interesting, and would work with any given number of bones just by adjusting the range of the mappping, and it would allow for curved flexyness by interpolating the influence of two bones by having the alpha for a vertex be between the exact values of two bones

TigroSpottystripes Katsu added a comment - 23/Feb/09 11:33 AM - edited
though perhaps there should be an additional checkbox to ignore the alpha and do it as it is currently done so people can use the current sculptmaps without the weight map being messed up and the thing becoming just a stiff shape bobbing

Oken Hax added a comment - 23/Feb/09 11:43 AM
I don't agree with the use of the alpha layer. Many people do use this layer to watermark/hide the map. that's a bad idea.
It would also force the creation of new tools to create those sculpties and edit them to add infos on this layer. So waiting tools to be developped and released. and make things probably harder to create those said sculpties.
Using the color average is fine to me: it's easy, no need new tools, no need new skills, doesn't break older content, allow re-use of the older maps.

Adeon Writer added a comment - 23/Feb/09 11:53 AM - edited
Would it be fair if an alternate method of hiding the map from view were provided?

Since current sculpt maps were never uploaded with the intention of being flexible, I don't believe it would be considered breaking content if those maps were not readily available to support custom spines. All current maps, wither they had no alpha layer at all or used it for watermarking, could not use a custom spine; so an option to not use the alpha layer for a custom spine would be mandatory. This way you can still use the alpha for watermarking and use the default color-average bone line for old sculpts, or, if you wish, new ones.


Oken Hax added a comment - 23/Feb/09 12:04 PM - edited
alternate methode to hide the map yes, i think it's anyway absolutly not needed to be able to see the map ( seriously when you see the map you know what object is supposed to be ? no... it just allow snapshots. but that's another story )

But let see that in another way. You want to define custom bones/weight map for sculpties. Why stopping on sculpties ? If you choose an external way of defining it. You also can apply to basic non-sculpted prims. Wouldn't it be better? Choosing to put those "settings" on the alpha layer you stay stucked to apply it on sculpties only.

Question: Could this new system allow to have basic flexy torus, spheres, tubes, etc. prims ? I believe so. Making a more generic algorithme is better.


Theblack Box added a comment - 01/Mar/09 11:03 AM
Image added, to clarify the idea about bone-mapping.
To get 8-vert flexi on a full-resolution sculptie.

Aeron Kohime added a comment - 07/Mar/09 04:57 AM
I could live with an 8x8 verts if the sculpty itself is still full quality, otherwise as soon as you enable flexi on a sculpt its detail tanks (well if its greater than 8x8 at least).

Pim Peccable added a comment - 07/Mar/09 06:49 AM
Could the client preferences include setting how many vertices to use? A user could then reduce it from 8 to 4 id they wish.

Adeon Writer added a comment - 07/Mar/09 07:32 AM
Pim: It will likely be debug setting to set higher or lower than 8 rather than a slider.
I really hope this can all be moved over to the GPU, it seams the ideal solution.

Shannon Lean added a comment - 10/Mar/09 04:59 PM
Can some one repost a compiled version of a viewer based on the latest 1.21 + flexible sculpties? The link up top from Chalice Yao is dead.

TYVM!

Furry AV builder
Shannon Lean


McCabe Maxsted added a comment - 10/Mar/09 05:01 PM
@Shannon: hit "page up" twice from your comment

Shannon Lean added a comment - 10/Mar/09 05:06 PM
Tyvm. Dont know how I missed that. Hopefully if all goes well this will make sculpted prim tails, ears, and fluff on my av's to be a reality.

gianna Zapedzki added a comment - 10/Mar/09 05:42 PM
please please please some clever dick get the mac version up and running for imprudence as i wanna play too. I cant wait to get my hands on this and start making some cool things it has so many applications my imagination is doing overtime at the thought of whats possible.

Ta

gianna Zapedzki


Maya Remblai added a comment - 10/Mar/09 05:50 PM
Don't get too excited guys, remember Imprudence uses only 8 verts for the flexi as the patch calls for. That's not nearly enough to be useful. I had trouble uploading the video so I can't illustrate it, but at its current level of functionality it's not really viable for anything more complicated than a cylinder. The sculpty loses too much detail.

Qarl Linden added a comment - 11/Mar/09 11:37 AM
guys - i wouldn't hold your breath for >8 verts on flexi-sculpties.

already in this thread we're seeing push-back against spending too much CPU on flexis. and that concern is warranted - flexis currently take-up a HUGE amount of our per-frame cost. even once we provide a slider for 32 vert flexi-sculpties, you can believe we'll ship with 8 as the default, and MANY people won't venture past the 8 limit.


Theblack Box added a comment - 11/Mar/09 12:09 PM
Qarl Linden: What about bone-mapping with alpha ?

A fixed mapping, to a fixed bone-strip (Z-Axis), with a fixed relation to a reduced 8x8 (fixed) sculptie.
That seems to worst possible way to me.

I see that the fixed bone-strip (Z-Axis) might be hard to avoid.

But alpha-bone-mapping would make it so much more usable and adjustable.

Without unlinking the mesh-size from the bone-count, it is even hard to determine if the current bottleneck is more along the lines of:

"Flexi-Physics on a long bone-strip is too much computational load"
or "Dynamically changing geometry cant be compiled to OpenGL display-lists for fast rendering"

The complaints you are seeing about detail on flexi-sculpties are not like "We must have a long flexi-bone-stip",
they are more along the lines of "We need to have standard sculptie-meshes be usuable as flexi-sculptie".

I think it would be very sad, if sculptors had to threat flexi-sculpties and regular sculpties totally differently. (due to the 8x8 mesh)

"spending too much CPU on flexis" sounds like "Flexi-Physics on a long bone-strip is too much computational load" to me.

Therefore it might be VERY interesting to have 8-Vert Flexi on regular Sculptie-meshes (32x32 and all oblong ratios).

I would love to know, if any of this is non-sense .... because if it isnt, it should be looked at.


Maya Remblai added a comment - 11/Mar/09 03:26 PM - edited
Qarl: The flex doesn't need more than 8 verts, but the SCULPT does. I just uploaded a video showing the problem. Sculpts lose so much detail now that they're not usable.

EDIT: Here's a video: http://www.youtube.com/watch?v=tfjPUJKjPdw


Qarl Linden added a comment - 11/Mar/09 04:15 PM
Maya - i'm not sure i'm understanding you - but let me make a guess and see how it goes.

i'm assuming you mean something like: 8 points for the joints of the flexi-spring system drives 32x32 verts of the sculptie. (which is a variation of BlackBox's idea for bone mapping.)

the problem is: that is exactly what is too CPU expensive to do. it's the recomputation of those 1000 points and pushing them out to the GPU (every frame.) all this animations is EXTREMEMLY expensive. (that's why we have avatar impostors, to reduce this sort of thing.) (yes, BB, as you say we can't use display lists - although we actually use vertex buffers.)

BTW: i love the tail in that video. but i'm confused, isn't it suppose to show unusable flexi-sculpties?


Danny Nolan added a comment - 11/Mar/09 04:38 PM
Hey there, I'm fairly noob to game programming, but, what's the problem with offloading the computation on the GPU? I'd imagine it's possible, right? SL already has wayyy too much of a CPU load. I still don't get that great of FPS with a 4ghz Quad Core, and the video card barely makes any difference on FPS.

DEF shoot for the GPU if you can since it's more meant to be doing this kinda heavy scale computation. Almost everybody these days, has a decent video card these days, and even if the user doesn't have a decent vid card, this doesn't have to be a mandatory feature, either.

This may be impossible, or just difficult. I have no idea. Haha. Just my two cents. Features like this, and the shadow client, I really think could make suuuge a huge impact to this game, and I'd hate to see them end up never being a part of the client


Moy Loon added a comment - 11/Mar/09 04:54 PM
Yeah, With my 32x32 version of the flexi-sculpts, you can feel a large fps difference having only about two dozen or so flexi sculpts out on a high end machine, A lower end machine would probably be crippled with that many out...

(Having 36 full-res flexi-apples out in a moderately busy sim brings my FPS from around 85ish to around 35ish, and the flexies begin to not update as fast as they should...
Imagine the usual generic lagatar with a head full of flexi hair, and then skirts or whatever else as flexie sculpts, Not the pretty sight performance-wise)

Vertex shaders would have no problem at all doing the 1024 verts on hundreds of apples with a modern videocard


Qarl Linden added a comment - 11/Mar/09 08:10 PM
Maya - i understand your concern - but i see no way to fix it. do you see some way to fix this problem? please - i'm all ears.

Maya Remblai added a comment - 11/Mar/09 08:13 PM
Qarl: I understand that using the current method of rendering flexi doesn't allow for more detail, but that fact just underscores the need to have the GPU doing this stuff. See my screenshots posted above for clarification.

The first shows two flexi tails, one made with normal flexiprims (4 flexiprims) and one made with a sculpted flexiprim (1 prim). As you can see, at 8 verts the sculpt loses most of its detail. I wouldn't use such a thing in any product. It looks like something on a Nintendo64 game. The second screenshot shows the same sculpt without flexi. Not a perfect sculpt sure, but it's smooth. The "nostalgia look" of the flexi is not the fault of the sculpt.

There's also the issue of smaller details. I should be able to sculpt tufts of fur into that same shape, and have them still be there on the flexi. As it is, if SL's sculpty ability doesn't eat the details, they disappear when flexi is applied.


Maya Remblai added a comment - 11/Mar/09 08:16 PM - edited
Beats me, Qarl. :/ I don't know the technical side of things, all I can do is show the end-user results.

EDIT: Please don't read any hostility into my posts. I'm really excited about the progress made on this! I'm just trying to point out what content creators are going to expect or want from a given feature.


Darien Caldwell added a comment - 11/Mar/09 09:42 PM
As I recall having been told, LL has a rather broad array of hardware they have to maintain compatibility with, far broader than most games you see on the market. This has the benefit of making SL accessible to a wide array of users, from the most dismal integrated video card (like my work laptop) to the highest end hardware. While having great graphics is certainly something to reach for, there have to be compromises, I would guess.

To be honest, the tail in the video looks great to me. And if we are afforded some configurable sliders as alluded to previously, I thinkt hat would be a good compromise. It can be frustrating, but I think I'd still like to have this as is rather than not at all.


Theblack Box added a comment - 12/Mar/09 04:15 AM
Ok here is an additional thought:

How about we bring LoD into the equation more ?
How about more harsh LoD-settings for flexi-sculpties ?
If we could only unlink the joint-count of the flexi-spring from the vertex-count of the sculptie it would be so much more adjustable.

The flexi for a highest LoD sculptie could be full 8 joints ....
On a lower LoD a sculptie could become non-flexi (locally).

Anything else than a hard-coded, fixed solution with conservative hardware-assumptions would be nice

i am not complaining either ... just saying what i think sculptors will tell you once they are trying to use flexi-sculpties for real.


Danny Nolan added a comment - 12/Mar/09 03:29 PM
Darien: That's understandable. What could be done to get around this, is give the option to turn it on/off, adjust the quality, etc. That'd let the people with modern hardware take full advantage of the change or changes, and people with older hardware still be able to run the game, with just less quality.

And even on that note, most people, even the lowest hardware being sold right now, has a decent GPU somewhere in the mix. GPU rendering is an absolute standard anymore, and I think this game in particularly would jump leaps and bounds if was ALLOWED to use it.

I'm also fairly sure SL checks your hardware, and scans it pretty thoroughly, so you could code it to check if they have a decent GPU, or even a GPU at all, and then scale the usage of it accordingly. If you have a good GPU, allow shaders to control the arithmentic and rendering of objects. If it's a weak one, throttle the GPU usage, and use more CPU. If no GPU or 3D acceleration, just stick it all on the CPU.

Like I said before, I'm by no means a profession game programmer, so I don't particularly know if it can work like that. But if it can, that, imo, would be the way to do it. And I'm a firm believer in using the GPU. It's just meant to Crunch numbers. shrug


Aeron Kohime added a comment - 25/Mar/09 08:02 PM
I am afraid I do not have the know how on how to do the things described, by such I mean create the system so that flexible prims to use vertex shader or otherwise cache the data. I am not a graphics programmer sadly, and I have little doubt I would just make things worse.

ponk bing added a comment - 27/Mar/09 12:52 AM - edited
I'm still pretty unclear on the reason why the bounding box is any different to that of a regular cube and be made to flex in the same way. It seems to me that the overall performance hit of giving the box the existing object controls (pathcut, twist, etc including flex controls) would be less than adding another experimental flex method.

Obvious questions to ask just so more can grasp what's going on here:
Is the problem with flexing a sculpty something completely obvious like the box physically being a sphere, which can't flex?
Is this in any way related to the reason that the torus, sphere, tube and ring can't flex?
Is the box no more than the physical attribute to the object and has no other bearing on how it looks?
If not, what were the original reasons for making bounding boxes / sculpties work in a separate manner to regular prims?
Is there a chance that reasoning could be reevaluated for the purpose of adding flex?

I found this regarding vertex shaders for physics, maybe something useful to be learned from it http://playcontrol.net/ewing/jibberjabber/waveinterference_opengl_sha.html


Laurent Bechir added a comment - 28/Mar/09 11:39 PM
I've made a Mac build with flexible_sculpted_prims_v0.5.2.patch available here :

http://dl.getdropbox.com/u/51818/Second%20Life-flexi-sculpt.dmg

It has at least worked once Enjoy...


Qarl Linden added a comment - 30/Mar/09 09:43 AM
hey all - wanted to give you a status report on the flexi-sculpti work.

flexi-sculpties are implemented and ready for official viewer integration - however they still require cache work in our texture system (as detailed above.) this work is being done by another linden as he reworks all of our texture system. i think there's almost NO chance of all of this being in 1.23, but a good chance that it'll appear in 1.24 (or whatever we call that version.)


Danny Nolan added a comment - 30/Mar/09 03:54 PM
Goood to hear Qarl . Is the flexi math and/or new texture system (which intrigues me a lot) done on the CPU or GPU?

Jacek Antonelli added a comment - 30/Mar/09 04:17 PM
@Qarl: That's great!

Does it work at all without the cache work? If so, is the code somewhere in the public repo? I'm sure there'd be a lot of people happy to give it a test run and flush out any bugs there might be.

Also, would it be possible to have the 1.23 viewer render flexible sculpts as regular sculpts, instead of as flexible cylinders? That way when official flexible sculpt support rolls out, content creators can start using them right away without a deluge of customers on older viewers complaining that their new hair looks like cylinders. (This seems like it should be a simple tweak to the way volume parameters are processed. I'd happily do it myself if there's a decent chance of the patch being used.)


Qarl Linden added a comment - 30/Mar/09 10:08 PM
Jakek - that's a fantastic idea. it should be a VERY simple change, and will make the transition easier/better faster. let me run it past my release team and see what they say. about the preview - it's largely the same code as the patch i posted a month ago. i know there are a few links above pointing to test viewers.

Danny - no, we just don't have time for a GPU solution now. if someone in the community wants to provide one, well, i'm sure we'd jump at it.


Brandon Shinobu added a comment - 14/Apr/09 08:37 PM
Qarl, semi-related to this (and just a thought) is there any chance that the reworking of the textures for flexible sculpts would also enable implementation of the frame-limited llSetSculptAnim() proposed function?

Obsidian Stormwind added a comment - 22/Apr/09 02:50 PM - edited
Does anyone happen to have a compiled client/viewer that allows 32x32 sculpt maps as flexible prims? The current viewers that I find render the flexible sculpts as 8 x 8, but I'd like to test out how it looks/works with the heavier detail.

Pandora Wrigglesworth added a comment - 24/Apr/09 07:51 PM
8x8 flexible sculpts are certainly better than none but I suspect that, if they are only 8x8, it will lead artists to compensate for low detail by using more sculpts per project.

Which would be harder on the client: a single 32x32 flexible sculpt or four 8x8 flexible sculpts?

Would it be possible to have flexible sculpts with 32x32 maps but with only 8 or even 4 flex bones?

If the number of polygons is intrinisically linked to the number of flex bones, could we allow oblong 128x8 sculpts, thus providing greater detail with the same number of bones?


Mimika Oh added a comment - 15/May/09 04:22 AM
Qarl, is it possible you release your patch so we can prepare content, or is it same behaviour as one of those attached? If so, which? Thanks!

Contagious Republic added a comment - 19/Jun/09 04:21 PM - edited
While it's either not feasible or too ressource intensive to fix https://jira.secondlife.com/browse/VWR-27 (a transparency-related issue)

But making a sculptie sort its own faces before it is sent to rendering (which could keep the old behavior of sorting only according to the distance from viewer of the center of each prim, but each prim would sort itself first) would allow llTextureAnim based animation which makes only part of a sculptie visible at a time, the other part being 100% transparent (i.e. load sculptie and texture on it only once, no physical calculations needed as the sculpt creator can pre-compute it with third-party sculptie tools).

This would have the lag level associated with llTextureAnim and not the TOTALLY HUMONGOUS lag of this patch. It would also allow arbitrary animations not just flexi, i.e. grenade explosion... (since it's the same texture just rotated, it fixes a long-standing annoyance with preloading animation frames).

Of course both ways of doing it can co-exist, it would not be too hard to duplicate flexi-type behavior with my method - even if it would have the downside of not showing all the sculptie at once (less vertex at once, but then all the vertex can be animated separately) and no ability to adjust to avatar motions like the common flexi tail, but still it would be another "must have" for animators.


TigroSpottystripes Katsu added a comment - 19/Jun/09 04:31 PM
baked flexiness isn't anywhere as good as true flexiness :/

Ann Otoole added a comment - 19/Jun/09 04:51 PM
While I love the idea of flexi sculpts I have to wonder if the nature of them involves so many vertices that the entire concept needs to be scrapped given LL's decision to begin limiting vertices because of extreme edge case griefers.

Moy Loon added a comment - 19/Jun/09 05:05 PM
Actually Ann, with lod, Chances are it would effect them less.
I've been running off of the trunk and I've noticed only one time that stuff hasn't rendered with the new limits, That was with someones hair that was exactly 255 sculpted prims, And with some really bad necklace, that was again, exactly 255 sculpted prims, save for one that was a root sphere..

Both of thoose items were quite laggy and would easily shave off several fps, even with my high end machine... And with the flexi's limits, they would appear static, or frozen in place if people use too many in one scene


Maya Remblai added a comment - 12/Aug/09 07:16 PM
Hm, I wanted to play with the flexi sculpt patches in a test viewer of mine, but Cygwin always reports failures when I apply any of the patches. Is the 1.23.4 release code not compatible or something?

It's not really a big deal to me, since the feature is almost ready anyway, but I thought I'd post out of curiosity anyway.


Obsidian Stormwind added a comment - 25/Sep/09 10:18 AM
Qarl, any update on how far this project's coming along or if it's being put on the backburner?