[osg-users] 3D model preparation question

Wojciech Lewandowski w.p.lewandowski at gmail.com
Sat Mar 27 12:04:04 PST 2021


Jeff,

This is most probably caused by lighting in osg viewer not set in the same
way as in blender. I bet ambient component is too low but I won't give a
penny for it.
Could be also related to materials not applied correctly although I doubt
it.

Check usual suspects:
GL_LIGHTING to on
add your own GL_LIGHT
If neccessary increase ambient lighting component

check GL_COLOR_MATERIAL settings
set GL_NORMALIZE_NORMALs to true

You can use osgconv to convert to osgt (most human friendly osg text
format) and examine the outputs in text editor (specifically materials and
lighting settings). Compare them or alter them with materials/lighting from
dumptruck model in osg data.
If your model is not proprietary attach it and we may check it ourselves.

Cheers,
Wojtek




sob., 27 mar 2021 o 11:31 Trajce Nikolov NICK <trajce.nikolov.nick at gmail.com>
napisał(a):

> there is a short procedure to export the model with textures - there are
> youtube videos online for this. I think you have to check the selected -
> see the image
>
> [image: image.png]
>
> On Fri, Mar 26, 2021 at 11:41 PM Jeff White <jeffrey.white at gmail.com>
> wrote:
>
>> Thanks for the info. I had already checked the .mtl file and there are no
>> textures referenced in this model.  It does everything with materials.  All
>> material names in the .obj match what is in the .mtl file as well so I'm
>> not sure what the problem is.  The paths all reference the current
>> directory so those should be fine.
>>
>> If anyone knows of a Blender export plugin for .ive or .osgb that might
>> be helpful.  I haven't found one yet so I am assuming I will probably have
>> to write one myself.
>>
>> On Friday, March 26, 2021 at 10:58:51 AM UTC-5 trajce.ni... at gmail.com
>> wrote:
>>
>>> Hi Jeff,
>>>
>>> I know this problem as well. Obviously each .obj file has .mtl file with
>>> it. It is a text file where materials and textures are defined. You can
>>> edit with values you find appropriate . As well check the texture paths
>>>
>>> On Thu, Mar 25, 2021 at 8:46 PM Jeff White <jeffre... at gmail.com> wrote:
>>>
>>>> A few of my 3D model files (which are in .obj format) look different
>>>> when loaded into Blender compared to viewing them in osgviewer.  I can see
>>>> all the colors clearly in Blender but in osgviewer the model appears dark.
>>>> I have attached a few pictures here.  I commonly see this with older model
>>>> files that have materials specified but no associated textures.
>>>>
>>>> I am a developer and not a 3D modeler so I don't have enough Blender
>>>> experience to know why it looks different in that software.  Is there
>>>> something else I need to do to prepare these models for use in OSG?  I know
>>>> that Blender places a light in the scene but I thought that osgviewer had a
>>>> small light pointing out of the camera as well.
>>>>
>>>> Any help would be appreciated.  Thanks,
>>>>
>>>> Jeff
>>>>
>>>> --
>>>> 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 osg-users+... at googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/osg-users/96f91a17-9cdd-4f03-9d98-7e2defcbcf55n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/osg-users/96f91a17-9cdd-4f03-9d98-7e2defcbcf55n%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 osg-users+unsubscribe at googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/osg-users/d8138555-c9e1-482b-96cd-4823178aed01n%40googlegroups.com
>> <https://groups.google.com/d/msgid/osg-users/d8138555-c9e1-482b-96cd-4823178aed01n%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 osg-users+unsubscribe at googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osg-users/CAO-%2BzikYyD%3DrLzTxNWoY-1Rbn68cPSYSsjykkAOMyj0kzQQCCA%40mail.gmail.com
> <https://groups.google.com/d/msgid/osg-users/CAO-%2BzikYyD%3DrLzTxNWoY-1Rbn68cPSYSsjykkAOMyj0kzQQCCA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 osg-users+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/CAHhtjQZRoqP%2Bzvcxwzh3xJPaX%2BxULHEhL6QCtoARDUnVo8QNoA%40mail.gmail.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20210327/8cf06104/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 312508 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20210327/8cf06104/attachment-0001.png>


More information about the osg-users mailing list