Discussion:
[osg-users] 3D model preparation question
Trajce Nikolov NICK
2021-03-26 15:58:38 UTC
Permalink
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
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
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+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/CAO-%2BzinaeCFHF%3D2rc_NwZ0fYL9HZTvvYPUMJ4VHkXHMXkJg4_g%40mail.gmail.com.
Jeff White
2021-03-26 21:41:01 UTC
Permalink
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.
Post by Trajce Nikolov NICK
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
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
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+***@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.
Trajce Nikolov NICK
2021-03-27 10:31:17 UTC
Permalink
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]
Post by Jeff White
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.
Post by Trajce Nikolov NICK
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
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
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
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+***@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.
Wojciech Lewandowski
2021-03-27 12:04:04 UTC
Permalink
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
Post by Trajce Nikolov NICK
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]
Post by Jeff White
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.
Post by Trajce Nikolov NICK
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
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
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
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
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+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/CAHhtjQZRoqP%2Bzvcxwzh3xJPaX%2BxULHEhL6QCtoARDUnVo8QNoA%40mail.gmail.com.
Continue reading on narkive:
Loading...