Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008670opensim[GRID] Asset Servicepublic2020-03-06 05:302020-03-08 01:08
Assigned ToUbitUmarov 
PlatformOperating SystemOperating System Version
Product Version0.9.1.0 
Target VersionFixed in Versionmaster (dev code) 
Summary0008670: BoM grid assets are missing alpha channels
DescriptionThe "magic" BoM textures are missing alpha channels. By default OpenSim sets the blendmode of an applied texture to "blend" instead of "mask" or "none" if the texture in question is 24-bit non-alpha. With the BoM textures being 24-bit (and thus automatically "blend"), this causes undesired texture glitching when objects covering the mesh below are also mode "blend". In SL it is typical to set a mesh body and head BoM to alpha mode "mask" (with say cutoff 127). We can't do that in OpenSim because the blendmode selector (in the build floater) is greyed out because the current BoM textures are non-alpha.

What I observed:

- Hair with alpha streaks will total alpha out the neck
- Hair with alpha streaks will cause head skin to show through the hair
- Sheer clothing with total alpha out the body below it
- If there are textures applied to an onion layer (such as tattoo) they will glitch because onion layer are typically blendmode "blend". Yes onion layers are contrary to the BoM idea, but some body creators may want to ship with it to stay compatible with legacy appliers.

Attached is a patch that updates all OS BoM textures to have an alpha channel. This way, a BoM object such as a body can be set to blendmode "mask" when attached. Note that this can't be done when the object is rezzed on the ground, but that is no different than in SL.
Additional InformationAlways test with a clean viewer cache, especially if you use the same viewer cache with SL which can give false results for having cached the SL assets instead of the OS assets.

When setting BoM object to alpha mode "mask", be sure to do this while wearing it and not having it rezzed on the ground else it won't work.

Pictures of the glitches will be attached to this bug report.

Some viewers may not show the defect. FS and Sing has a different way of prioritizing alpha. Dayturn and Cool Viewer clearly show the problem.
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (1 Region per Sim)
Physics EngineubODE
Script EngineXEngine
EnvironmentMono / Linux64
Mono VersionNone
Attached Filespng file icon alpha_hair_clips_through_alpha_blended_body (edit).png [^] (218,091 bytes) 2020-03-06 05:31

jpg file icon alpha_hair_clips_through_alpha_blended_head (edit).jpg [^] (204,457 bytes) 2020-03-06 05:31

zip file icon [^] (4,053 bytes) 2020-03-06 14:00
patch file icon 0001-update-bom-textures-with-alpha-channel.patch [^] (7,854 bytes) 2020-03-07 02:01 [Show Content]

- Relationships

-  Notes
UbitUmarov (administrator)
2020-03-06 07:50

sorry but those textures are not used on BoM viewers or when the mesh is rez on ground.
in last case the viewers do not let you assign the respective baked
they do let it when you wear the mesh, and then materials are avaiable

but i see the issue, and will fix those, possible addind then to lib, so it is easier to edit on ground.
such a fix is a pain, all regions asset cache and viewers will need to be cleared, in some asset services, they will need to be replaced by hand :(
UbitUmarov (administrator)
2020-03-06 10:26

those files don't seem to be on the correct j2k format
Lotek (reporter)
2020-03-06 11:01
edited on: 2020-03-06 11:05

Hmm strange as this is what Photoshop outputs as jpeg2k. I will do it again with Gimp

UbitUmarov (administrator)
2020-03-06 11:03

my gimp does not export j2k
the files must be in codestream format
UbitUmarov (administrator)
2020-03-06 11:26

to easy this updates on regions i added two floatsam comands
- fcache deletedefaultassets
removes from cache all the assets defined on bin/assets, so they can be refreshed from grid
- fcache cachedefaultassets
loads all assets define on bin/assets into cache, replacing the ones there

robust asset services should update this assets on every restart, with the default settings.

this comands can cause problems, so need to be used with care

viewers caches need to be cleared to see the effects
Lotek (reporter)
2020-03-06 14:03

Pff finally got something working. Converted from alpha png to jp2k with codestream using openjpeg:

opj_compress -jpip -i FALLBACK_BAKED_AUX1_32X32.png -o FALLBACK_BAKED_AUX1_32X32.j2k

Let me know if this is right. I used a new standalone (no caches or sqlite db) and everytime clearing browser caches.
aiaustin (developer)
2020-03-08 01:08

Note that a change in LL viewer code is coming, currently in the Love Me Render release candidate, which will allow bake textures to be selected when editing or changing textures for rezzed item in world as well as items worn. Once that code gets fully released it should make its way into TPVs.

- Issue History
Date Modified Username Field Change
2020-03-06 05:30 Lotek New Issue
2020-03-06 05:30 Lotek File Added: 0001-update-BoM-textures-with-added-alpha-channels.patch
2020-03-06 05:31 Lotek File Added: alpha_hair_clips_through_alpha_blended_body (edit).png
2020-03-06 05:31 Lotek File Added: alpha_hair_clips_through_alpha_blended_head (edit).jpg
2020-03-06 07:50 UbitUmarov Note Added: 0036257
2020-03-06 10:26 UbitUmarov Note Added: 0036258
2020-03-06 11:01 Lotek Note Added: 0036259
2020-03-06 11:03 UbitUmarov Note Added: 0036260
2020-03-06 11:05 Lotek Note Edited: 0036259 View Revisions
2020-03-06 11:26 UbitUmarov Note Added: 0036261
2020-03-06 14:00 Lotek File Added:
2020-03-06 14:03 Lotek Note Added: 0036262
2020-03-07 02:01 Lotek File Added: 0001-update-bom-textures-with-alpha-channel.patch
2020-03-07 02:01 Lotek File Deleted: 0001-update-BoM-textures-with-added-alpha-channels.patch
2020-03-07 14:09 Lotek Status new => resolved
2020-03-07 14:09 Lotek Fixed in Version => master (dev code)
2020-03-07 14:09 Lotek Resolution open => fixed
2020-03-07 14:09 Lotek Assigned To => Lotek
2020-03-08 01:08 aiaustin Note Added: 0036266
2020-03-08 01:08 aiaustin Status resolved => closed
2020-03-08 01:08 aiaustin Assigned To Lotek => UbitUmarov

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker