[Opensim-dev] How does PBR material scale/rotation/offset reach the viewer?

Mister Blue misterblue at misterblue.com
Sun Jul 9 15:20:32 UTC 2023


All of the mesh conversion/texture mapping that I have done has been to use
the prim texture information (repetition, rotation, ...) to update the UV
values for the generated mesh. MeshmerizerR routine in libOpenMetaverse
works that way (converts prim info to mesh with vertex, UV values). I would
presume that the PBR texture would have to apply the UV mapping to the
generated texture.

Not tested, so I could be very wrong.

On Sat, Jul 8, 2023 at 4:06 PM Dahlia Trimble <dahliatrimble at gmail.com>
wrote:

> It's been nearly a decade since I worked on the materials implementation
> for OpenSimulator, and it's possible that my memory may be inaccurate or
> things have changed since I left the project.
>
> i seem to remember that materials will default to the same texture
> transform parameters for the prim or mesh face that they are applied to as
> the texture for that face, unless they are overridden by the materials
> editor in the viewer. Therefore if you don't see them in any materials
> LLSD, use the texture parameters. This should be true for materials such as
> specular and normal maps. I haven't seen PBR but I would assume a similar
> approach were used but knowing LL, this may not be the case.
>
> I'm not aware of any glTF implementation in OpenSimulator; if there is one
> it must have been added after I left.
>
> Best of luck,
> -Dahlia.
>
> On Sat, Jul 8, 2023 at 1:38 PM John Nagle <nagle at animats.com> wrote:
>
> > Where are the "material overrides" sent over the network?
> >
> > Extra parameters on objects?
> >
> > - I'm recognizing the new type for PBR material info, and it's just
> > an array of face indices and a UUID.
> >
> > glTF content in PBR material assets?
> >
> > - I've dumped a few of those, and they didn't have scale/rotation/offset
> > data. The glTF spec does not show those as part of a material. They're
> > part of a 3D object in glTF.
> >
> > - LLSD content in PBR materials?
> >
> > There's an LLSD wrapper around the glTF material info (which is JSON
> > encoded). That could have extra parameters. But I haven't seen any.
> >
> > - LLSD content in regular materials?
> >
> > That's the logical place. Those are key-value pairs, and that's
> > where "SpecRepeatX", "NormRotation", etc. are sent to the viewer.
> > So adding new keys for something like "BaseColorRotation", etc.
> > would make sense. But I'm not seeing code in the Linden viewer, PBR
> > version, to read anything new from there.
> >
> > Anybody found this yet?
> >
> >                                         John Nagle
> >
> > On 7/8/23 13:26, Leal Duarte wrote:
> > > Think they are only on what they call the material overrides
> > >
> > >
> > > On 08-Jul-23 05:31, John Nagle wrote:
> > >> I'm implementing PBR in my viewer, and I haven't found yet how texture
> > >> UV scale, rotation, and offset reach the viewer. They're not in the
> > >> texture info sent over UDP; there are no slots for that. They're
> > >> not in the glTF texture info; the glTF texture doesn't provide for
> that,
> > >> because it's up to the primitive that uses the material, and we don't
> > >> have glTF primitives yet.  They might be in the
> > >> LLSD material info for regular materials.
> > >>
> > >> I've been looking in the SL viewer at
> > >>
> > >>
> >
> https://github.com/secondlife/viewer/blob/DRTVWR-559-SL-17699/indra/llprimitive/llgltfloader.cpp
> > >>
> > >> and I can see those values being processed, but haven't found
> > >> yet where the viewer gets them.
> > >>
> > >> Anyone know?
> > >>
> > >>             John Nagle
> > >>             Annimts
> > >> _______________________________________________
> > >> Opensim-dev mailing list
> > >> Opensim-dev at opensimulator.org
> > >> http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev
> > >
> > _______________________________________________
> > Opensim-dev mailing list
> > Opensim-dev at opensimulator.org
> > http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev
> >
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at opensimulator.org
> http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev
>


More information about the Opensim-dev mailing list