Trajce, The way I read it, they can't use materials to colour their object.
OSG's .OBJ reader supports vertex colours when written like this: v -7.941349983215332 -11.136899948120117 -3.4483699798583984 1.0 0.0 0.0 with the last three values here being the red, the green and the blue. This works at least with the text version of .OBJ files. If the user has actually access to the .mtl file, your approach is fine. This vertex colour approach here is an alternative, although, as I understand, it's not totally supported by 3d graphics editors. - Vaillancourt On Tuesday, September 27, 2022 at 2:14:51 p.m. UTC-4 [email protected] wrote: > Hi, > > obj does support colouring by using mtl (material) associated text file > where materials are defined with all the color and texture info in it. if > the obj is text (not binary) you can set your material to be used per face > for example in text editor - for binary you are left to your modelling > software. And the osg obj loader uses the mtl file if present - from real > cases with obj from Blender you might need to adjust some color properties > in text editor > > On Tue, Sep 27, 2022 at 8:42 PM [email protected] < > [email protected]> wrote: > >> Hello Marco(?) >> >> Although wavefront .obj don't support vertex colours out of the box, it >> appears the OSG obj plugin code can read vertex colours the way MeshLab >> outputs it. I'm not sure how it's done, but I would give it a try. >> >> >> On Tuesday, September 27, 2022 at 10:23:50 a.m. UTC-4 >> [email protected] wrote: >> >>> Hi, >>> >>> if I can't use material to color the model loaded from obj file, now how >>> can I color that model avoiding to use shaders? >>> >>> >>> >>> Thanks >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "OpenSceneGraph Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/osg-users/c4473ca3-286e-4c9d-8a9f-4870af61f197n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/osg-users/c4473ca3-286e-4c9d-8a9f-4870af61f197n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > > > -- > trajce nikolov nick > -- You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/909a77b0-5159-4cc3-93a0-44039fecc91bn%40googlegroups.com.
