OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

issue with 3ds model after upgrading to 3.5.5


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
filnet
User


Joined: 10 Oct 2014
Posts: 47

PostPosted: Thu Feb 09, 2017 1:27 pm    Post subject:
issue with 3ds model after upgrading to 3.5.5
Reply with quote

Hi,

We have just upgraded our project from using osg 3.5.3 to 3.5.5 and we have issues with 3ds model.
As you can see in the attached screenshot the propellers are displayed at wrong position and orientation. The same happens with master osg.

Any clues where that could come from. I tried to look at the change history of the 3ds plugin but nothing jumped out as the possible cause.

Thank you!

Cheers,
Philippe[/url]
Back to top
View user's profile Send private message
mrchlblng
User


Joined: 07 Oct 2013
Posts: 23

PostPosted: Fri Feb 10, 2017 1:06 pm    Post subject:
Reply with quote

Could you try the following patch?

Code:
diff --git a/src/osgPlugins/3ds/ReaderWriter3DS.cpp b/src/osgPlugins/3ds/ReaderWriter3DS.cpp
index 9aa4a9d31..3c1d89c20 100644
--- a/src/osgPlugins/3ds/ReaderWriter3DS.cpp
+++ b/src/osgPlugins/3ds/ReaderWriter3DS.cpp
@@ -619,7 +619,7 @@ osg::Node* ReaderWriter3DS::ReaderObject::processNode(StateSetMap& drawStateMap,
         {
             // add our geometry to group (where our children already are)
             // creates geometry under modifier node
-            processMesh(drawStateMap,group,mesh,meshAppliedMatPtr);
+            processMesh(drawStateMap,meshTransform,mesh,meshAppliedMatPtr);
             return group;
         }


I noted some issues when updating OSG a few months ago; reverting this line fixed the issue I had. If it solves your issue, I'll open a PR.
Back to top
View user's profile Send private message
filnet
User


Joined: 10 Oct 2014
Posts: 47

PostPosted: Fri Feb 10, 2017 3:17 pm    Post subject:
Reply with quote

@mrchlblng the patch did not help unfortunately.

I enabled debug output:

Code:

NODE TRAVERSAL of 3ds file MAXSCENE
  node name [frame]
  node id    0
  node parent id -1
  node matrix:
    0.707107 -0.707107 -8.55878e-008 0
    -3.10363e-007 -4.03967e-007 1 0
    -0.707107 -0.707107 -5.0074e-007 0
    -1.43626e-005 2.62648e-006 -1.14441e-005 1
  mesh instance data:
    objectdata instance []
    pivot     -7.62939e-006 -1.12145e-005 -5.65686
    pos       -1.43626e-005 2.62648e-006 -1.14441e-005
    scl       1 1 1
    rot       0.653282 -0.270598 -0.270598 0.653281
  user data
  node name [prop4]
  node id    0
  node parent id -1
  node matrix:
    -0.999999 1.0411e-006 0 0
    -1.0411e-006 -1 0 0
    0 0 1 0
    -141.421 -141.421 34.447 1
  mesh instance data:
    objectdata instance []
    pivot     -0.0707169 0.0809479 3.39106
    pos       -141.421 -141.421 34.447
    scl       0.999999 1 1
    rot       -0 -0 -1 -5.20549e-007
  user data
  node name [prop3]
  node id    0
  node parent id -1
  node matrix:
    -1.01152e-006 -1 0 0
    0.999999 -1.01152e-006 0 0
    0 0 1 0
    141.421 -141.421 34.447 1
  mesh instance data:
    objectdata instance []
    pivot     -0.0707169 0.0809479 3.39106
    pos       141.421 -141.421 34.447
    scl       1 0.999999 1
    rot       -0 -0 -0.707107 0.707106
  user data
  node name [prop2]
  node id    0
  node parent id -1
  node matrix:
    1 0 0 0
    0 1 0 0
    0 0 1 0
    141.421 141.421 34.447 1
  mesh instance data:
    objectdata instance []
    pivot     -0.0707169 0.0809479 3.39106
    pos       141.421 141.421 34.447
    scl       1 1 1
    rot       0 0 0 1
  user data
  node name [prop1]
  node id    0
  node parent id -1
  node matrix:
    1.77017e-006 1 0 0
    -1 1.77017e-006 0 0
    0 0 1 0
    -141.421 141.421 34.447 1
  mesh instance data:
    objectdata instance []
    pivot     -0.0707169 0.0809479 3.39106
    pos       -141.421 141.421 34.447
    scl       1 1 1
    rot       -0 -0 0.707106 0.707107
  user data
MESH TRAVERSAL of 3ds file MAXSCENE
  mesh name frame
  0.707107 -0.707107 0 0
  -2.8379e-007 -2.8379e-007 1 0
  -0.707107 -0.707107 -4.01339e-007 0
  -1.43626e-005 2.62648e-006 -1.14441e-005 1
  mesh name prop4
  -1 1.40071e-006 0 0
  -5.06639e-007 -1 0 0
  0 0 1 0
  -141.421 -141.421 34.447 1
  mesh name prop3
  -1.49012e-006 -1 0 0
  1 -5.36442e-007 0 0
  0 0 1 0
  141.421 -141.421 34.447 1
  mesh name prop2
  1 -5.36442e-007 0 0
  -2.38419e-007 1 0 0
  0 0 1 0
  141.421 141.421 34.447 1
  mesh name prop1
  1.93715e-006 1 0 0
  -1 1.10269e-006 0 0
  0 0 1 0
  -141.421 141.421 34.447 1
Back to top
View user's profile Send private message
filnet
User


Joined: 10 Oct 2014
Posts: 47

PostPosted: Fri Feb 24, 2017 3:52 pm    Post subject:
Reply with quote

I used git bisect to find when the issue was introduced.
Culprit commit is https://github.com/openscenegraph/OpenSceneGraph/commit/3609d84cef43bca784b5f3c5e448e7f475e6bbbb

@mrchlblng, I must have messed up something when testing your patch.
I retested it against 3.5.5 and it fixes the 3ds plugin issue I was having Smile

Cheers,
Philippe.
Back to top
View user's profile Send private message
filnet
User


Joined: 10 Oct 2014
Posts: 47

PostPosted: Fri Mar 03, 2017 11:00 am    Post subject:
Reply with quote

Hi,

@mrchlblng,please submit a PR with your fix so you get credit for all eternity !

Thank you!

Cheers,
Philippe
Back to top
View user's profile Send private message
mrchlblng
User


Joined: 07 Oct 2013
Posts: 23

PostPosted: Mon Mar 06, 2017 1:19 pm    Post subject:
Reply with quote

Hi Philippe,

thanks for confirming the issue/fix!
I added a commit in https://github.com/openscenegraph/OpenSceneGraph/pull/213.

Best,
Marc
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Building OSG for Android -- Windowing... bwhaines Build system [build] 1 Sun Apr 23, 2017 2:01 am View latest post
No new posts Having an issue with OSG plugins error. Brigham Keys, Esq. General 2 Wed Apr 12, 2017 5:24 am View latest post
No new posts Convert .obj model into .osg model darshanpopat Plugins [osgPlugins] 1 Thu Mar 30, 2017 1:57 pm View latest post
No new posts osgShadow issue juilear General 0 Thu Feb 09, 2017 7:54 am View latest post
No new posts osgShadow issue juilear General 0 Thu Feb 09, 2017 3:48 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP