Re: [osg-users] Some question about osgShadow... can someone help me?

2011-02-02 Thread Axel Spirtaat
HI Wojtek,
thank you very much, your suggestion helped me a lot! Now the shadow works 
properly in my app.
For who may have my same problem (I'm sure nobody is newbie as me), the 
solution was to add the line:
FIND_OSG_LIBRARY(OSGSHADOW_LIBRARY osgShadow)
to CMakeModules/FindOSG.cmake file

Now I can go further, thank you again Wojtek!!

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=36281#36281





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Some question about osgShadow... can someone help me?

2011-02-02 Thread Axel Spirtaat
Hi Wojtek,
thank you for reply and suggestions. 

Wojciech Lewandowski wrote:
> Axel,
> 
> Messages suggest that Linker cannot find symbols. Looks to me as missing 
> osgShadow lib in your make file.
> 


I was supposing this, and of course I need to change the make file. 
Unfortunatelly, to create the make file I used the cmake, and my CMakeLists.txt 
contains the several lines of 4 CMakeLists.txt (openScenegraph 2.3.3, bullet 
physics 2.76, osgWorks and osgBullet). I checked the OpenSceneGraph's one, but 
seems that I haven't forgotten anything... seems. 
I also inclueded all #include  Axel,
> For the small scene like yours simplest ShadowMap technique should be 
> sufficient. I am recomending it because, extending this technique to support 
> multiple lights will be easiest thing to do. Its still advanced stuff but 
> probably not that complex as extending other techniques. Basically you would 
> need to multiply resources associated with shadows/light sources. So instead 
> of single resource of each type,  you will need array of  shadow cameras, 
> shadow textures, shadow texgens indexed by light ids.
> 
> Your modifications will mostly override ShadowMap::cull method. All 
> technique important work is done there. You will need to take most of the 
> code from this method (except first part traversing scene for main view 
> where shadows are applied) and put it into the loop iterating on all your 
> lightsources rendering neccessary shadows with their cameras and applying 
> proper texgens. And thats generally all whats needed in a shortcut. 
> Hopefully when you do this you will learn enough to hack other techniques...
> 


These suggestions are really precious to me. I hope to solve the make problem 
to try my scene with one light and then try to implement your suggestions with 
multiple lights.
Thank you again

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=36276#36276




Attachments: 
http://forum.openscenegraph.org//files/cmakelists_162.txt


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Some question about osgShadow... can someone help me?

2011-02-02 Thread Axel Spirtaat
Hi Steven,
thanks for reply. 
I tryed to add shadows on my scene copying the osgShadow demo example. When I 
clean&build the project, the make returns an error... I don't understand why. 
Can you help me? 

Here is the code I added to my project:

Code:
int ReceivesShadowTraversalMask = 0x1;
int CastsShadowTraversalMask = 0x2;

osg::ref_ptr shadowedScene = new 
osgShadow::ShadowedScene;
shadowedScene->setReceivesShadowTraversalMask(ReceivesShadowTraversalMask);
shadowedScene->setCastsShadowTraversalMask(CastsShadowTraversalMask);
osg::ref_ptr st = new 
osgShadow::StandardShadowMap;
shadowedScene->setShadowTechnique(st.get());
shadowedScene->addChild(root);

viewer.setSceneData(shadowedScene.get());




I alo removed a light, and added the one to shadoewScene and set a model to 
cast and receive shadows...
The make error is the following:
Linking CXX executable ../bin/Room
CMakeFiles/Room.dir/main.cpp.o: In function `main':
main.cpp:(.text+0x621): undefined reference to 
`osgShadow::ShadowedScene::ShadowedScene(osgShadow::ShadowTechnique*)'
main.cpp:(.text+0x698): undefined reference to 
`osgShadow::StandardShadowMap::StandardShadowMap()'
main.cpp:(.text+0x6d0): undefined reference to 
`osgShadow::ShadowedScene::setShadowTechnique(osgShadow::ShadowTechnique*)'
collect2: ld returned 1 exit status
make[2]: *** [bin/Room] Error 1
make[1]: *** [src/CMakeFiles/Room.dir/all] Error 2
make: *** [all] Error 2



I tryed to change ShadowTEcnhique but I obtain the same issue... :(

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=36255#36255





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Some question about osgShadow

2011-02-01 Thread Axel Spirtaat
Hi,

I just need to add shadows to my simple virtual room. I understood that have to 
create a ShadowedScene node, assign to it a ShadowTechnique and 
add to the the shadowdScene the children. Then, I can set to each children (en 
also to the shadowedScene) 2 bits, CastsShadow  and/or the ReceivesShadow bit.

I read the documentation at  
http://www.openscenegraph.org/projects/osg/wiki/Support/ProgrammingGuide/osgShadow,
 and I have some question:
1) can I have 2 positionalLights in my scene?
2) My scene is simple, but there is a compound convex object wih a simple grid 
uoon it... so i need to see the shadow of the bottom of the objetc. Do I just 
have to add the object (as a osg::Group) to the shadowedScene?
3) Can you suggest a stable technique to use for my issue? (Simple scene of a 
room with 2 positional lights, the object describend in 2), a couch  and a 
moving sphere)? I have a recent 3D graphics card (Nvidia Geforce 9800)0

Thank you for help,
Cheers


Axel

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=36235#36235





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to set the frame rate and full screen

2011-01-31 Thread Axel Spirtaat
Hi Jean-Sebastien,

thanks for the reply, you were realy helpful, now I have a better idea on how 
to proceed!


Axel

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=36203#36203





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to set the frame rate and full screen

2011-01-31 Thread Axel Spirtaat
Hi,

I finished my application and I want to improve it. I have to issues: I need to 
increase the frame rate, since I rotate fast the camera and I need to start the 
simulation window at fullscreen (for now, I have to fix the dimensions 
manually). 
How can I do this?

Thank you!

Cheers,
Axel

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=36198#36198





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Improper rotation

2011-01-14 Thread Axel Spirtaat
Hi Sergey,
really thanks for your help.

hybr wrote:
> Hi,
> 
> Basically what you need to do is translate rod to (0,0,0), apply rotation 
> that u need, and translate back to original position.
> If your math is right and you still haven't expected results i'd say that 
> your model has static transforms removed and translated to vertices coords, 
> so center of your rod in local coords is not gonna be (0,0,0), and hence you 
> will get wrong results with rotations, since your math assume that center of 
> your rod in local coords is (0,0,0) to do proper rotation.
> You can try use like model bbox or bounding sphere center in local model 
> coords and transform model to that coords instead of (0,0,0) before rotation 
> or re-export your model without flatten static transforms optimization.
> 


I checked more times my  math operations on matrix and seem to be right. 
I also checked the center of table, and center of each rod and you got reason: 
the model has static transforms removed and translated to vertices coords.  I 
downloaded this model from Google Sketchup, it was done in Sketchup and then 
converted in .3ds. 
Now the issue is this: i don't have much experience in 3dsmax, so i tryed to 
set manually a pivot for each rod but this doesn't help. 
can you tell me how to fix my model as you suggested? Alternatively, can you 
post here a link to a useful hot-to ?
I'm really in crisis, I have already lost a lot of time to fix these issues -_-'
Thanks a lot,

Axel

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=35653#35653





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Improper rotation

2011-01-13 Thread Axel Spirtaat
Hi Tom,
thanks a lot for your answer!


Tom Pearce wrote:
> 
> In the step where you're calculating m, it looks like you're applying the 
> rotation to the original matrix, which includes a translation already.
> 


Yes, this is (perhap) what i want. I try to be less ambiguous: my scene is a 
small room with a table at the center. The table, how you can see in pics has 8 
rods, The table is translated by (0, 0, -309) to be placed on the floor
My goal is to rotate a rdd using the mouse wheel: when i pick & scroll up on a 
rod it should rotate the related rod by +angle (the variable rotation in code) 
on Y axis (-rotation if i scroll down). 
This is why (in my reasoning) i use the original matrix for rotate: i should 
not know how much rotated is the rod. The rod only need to be rotated on its Y 
axis, it should not be translated 


Tom Pearce wrote:
> 
> I'm not sure why you say that the rotation and translation is formally right 
> - the final translation should be equal to the original translation if you're 
> rotating about a local axis, but it isn't.
> 

I said "formally right" because reading the output it seems that the rod is 
positioned right, but i'm not sure of this, since visually the rod is bad 
positioned after the rotation. Sincerely, more time I spend on this issue, more 
I feel confused :-))
However, to understand better how rods have to work (for rotating) , look some 
seconds of the following video:
http://www.youtube.com/watch?v=p06NT8M5cKU

PS: excuse my archaic English!

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=35602#35602





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Improper rotation

2011-01-12 Thread Axel Spirtaat
I understood part of the issue, and thus I corrected (part of) the error. Now 
seems that the rotation and the translation is formally right, but visually 
translation is wrong. I enclosed 3 pics of the scene, before rotating, after 
1st rotation and after 2nd rotation. I correct the source as follows:

Code:
printVector("Original amtRod trans: ", 
amtRod->getWorldMatrices()[0].getTrans());
printVector("Original amtRod rotate: ", 
amtRod->getWorldMatrices()[0].getRotate());
printVector("\t amtRod center: ", 
amtRod->getBound().center());

osg::Vec3 offset = amtRod->getWorldMatrices()[0].getTrans();
printVector("\t amtRod offset =  ", offset);

osg::Matrix get = osg::Matrix::translate(- offset);
osg::Matrix m = amtRod->getMatrix() * 
osg::Matrix::rotate(rotation, osg::Vec3(0,1,0));
osg::Matrix put = osg::Matrix::translate(  offset);
amtRod->setMatrix( get * m * put );

printVector("\t get.getTrans =  ", get.getTrans());
printVector("\t m.getRotate  =  ", m.getRotate());
printVector("\t m.getTrans   =  ", m.getTrans());

printVector("Current amtRod trans:  ", 
amtRod->getWorldMatrices()[0].getTrans());
printVector("Current amtRod rotate: ", 
amtRod->getWorldMatrices()[0].getRotate());





Now the output is:
Original amtRod trans: (0, 0, -309)
Original amtRod rotate: (0, 0, 0)
 amtRod center: (6.55547, 150.952, -142.15)
 amtRod offset =  (0, 0, -309)
 get.getTrans =  (-0, -0, 309)
 m.getRotate  =  (0, -0.130526, 0)
 m.getTrans   =  (79.9751, 0, -298.471)
Current amtRod trans:  (0, 0, -309)
Current amtRod rotate: (0, -0.130526, 0)


Original amtRod trans: (0, 0, -309)
Original amtRod rotate: (0, -0.130526, 0)
 amtRod center: (-36.8519, 150.952, -146.139)
 amtRod offset =  (0, 0, -309)
 get.getTrans =  (-0, -0, 309)
 m.getRotate  =  (0, -0.258819, 0)
 m.getTrans   =  (79.9751, 0, -298.471)
Current amtRod trans:  (-74.5249, 0, -339.869)
Current amtRod rotate: (0, -0.258819, 0)


Are there suggestions?

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=35587#35587




Attachments: 
http://forum.openscenegraph.org//files/after_2nd_rotation_175.png
http://forum.openscenegraph.org//files/after_1st_rotation_272.png
http://forum.openscenegraph.org//files/before_rotating_202.png


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Improper rotation

2011-01-12 Thread Axel Spirtaat
Hi,

i'm trying to rotate a rod (part of a 3rd party model) on its Y asxis. I read 
on OSG Startguide that to do it, i need to find the correct position of my 
object from the origin and apply a multiplication like T * M * -T. 
The source code that tries to do it is the follow
Code:
ing:
printVector("Original amtRod trans: ", 
amtRod->getWorldMatrices()[0].getTrans());
printVector("Original amtRod rotate: ", 
amtRod->getWorldMatrices()[0].getRotate());
printVector("\t amtRod center: ", 
amtRod->getBound().center());

osg::Vec3 offset = amtRod->getWorldMatrices()[0].getTrans();
printVector("\t amtRod offset =  ", offset);

osg::Matrix get = 
osg::Matrix::translate(-amtRod->getBound().center() - offset);
osg::Matrix m = amtRod->getMatrix() * 
osg::Matrix::rotate(rotation, osg::Vec3(0,1,0));
osg::Matrix put = osg::Matrix::translate( 
amtRod->getBound().center() + offset);
amtRod->setMatrix( get * m * put );

printVector("\t get.getTrans =  ", get.getTrans());
printVector("\t m.getRotate  =  ", m.getRotate());
printVector("\t m.getTrans   =  ", m.getTrans());

printVector("Current amtRod trans:  ", 
amtRod->getWorldMatrices()[0].getTrans());
printVector("Current amtRod rotate: ", 
amtRod->getWorldMatrices()[0].getRotate());



(printVector only prints the osg::Vec3 or a osg::Quat in a file).
The result isn't what i expect, since it rotates the rod but also translate it, 
as the following output demonstrates:
Original amtRod trans: (0, 0, -309)
Original amtRod rotate: (0, 0, 0)
 amtRod center: (6.55547, 150.952, -142.15)
 amtRod offset =  (0, 0, -309)
 get.getTrans =  (-6.55547, -150.952, 451.15)
 m.getRotate  =  (0, -0.130526, 0)
 m.getTrans   =  (79.9751, 0, -298.471)
Current amtRod trans:  (-36.5678, 0, -315.54)
Current amtRod rotate: (0, -0.130526, 0)


What's wrong in my reasoning?


Thank you for help!

Cheers,
Axel

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=35586#35586





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Can't interactively rotate an object

2011-01-09 Thread Axel Spirtaat
Hi /ulrich,
thanks for your answer. i've found the solution... i've restarted Netbeans :-\ 
I don't know why, but it hadn't save/update the source files, so the make 
continued to work with the wrong code sources.
However, now the rotations is applied, even if as not expected... (it changes 
position, not only directoin).

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=35440#35440





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Can't interactively rotate an object

2011-01-08 Thread Axel Spirtaat
I've tryed this same eventHandler on a simple graph containg:
group + matrixTransform + group + geode (to have the same structure) and the 
geode rotates...
could my issues depend on the imported model?

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=35430#35430





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Can't apply rotations

2011-01-08 Thread Axel Spirtaat
Hi,

I added the pickHandler to my application, and then I applied some changes in 
it to rotate a rod (that is part of an imported osg model) when scrolling the 
mouse on its handle (a geode). 
It picks correctly, but doesn't perform the visual rotation... here is the 
relevant code fragment:

Code:
void BabyFootManipulator::_pickRotate(osgViewer::View* view, const 
osgGA::GUIEventAdapter& ea, double rotation) {
osgUtil::LineSegmentIntersector::Intersections intersections;

float x = ea.getX();
float y = ea.getY();

if (view->computeIntersections(x, y, intersections)) {
for (osgUtil::LineSegmentIntersector::Intersections::iterator hitr = 
intersections.begin();
hitr != intersections.end();
++hitr) {
if (!hitr->nodePath.empty() && 
!(hitr->nodePath.back()->getName().empty())) {
// the geodes are identified by name.
osg::Node* node = hitr->nodePath.back();
if (node->getName() == "handle") {
osg::notify(osg::ALWAYS) << "\n\tFound handle.. " ;
osg::Group* parent = node->getParent(0);
osg::Group* grandpa = parent->getParent(0);
osg::Transform* t = grandpa->asTransform();
osg::MatrixTransform* mtRod = t->asMatrixTransform();
mtRod->setDataVariance(DYNAMIC);
osg::notify(osg::ALWAYS) << grandpa->getName() << ": " << 
grandpa->className() << std::endl;
osg::Matrix m = mtRod->getMatrix() *
osg::Matrix::rotate(rotation, osg::Vec3(0,1,0));
mtRod->setMatrix( m );

printVector("\t m.rotation =  ", m.getRotate());

osg::notify(osg::ALWAYS) << "\tRotation done" << std::endl;
return;
}
}
}
}
}





The output related to that code, when i scroll upon the handle is this:
Found handle.. mtRod: MatrixTransform
 m.rotation =  (0, -1.00629e-231, 0)
Rotation done

Found handle.. mtRod: MatrixTransform
 m.rotation =  (0, -2.01257e-231, 0)
Rotation done

Found handle.. mtRod: MatrixTransform
 m.rotation =  (0, -3.01886e-231, 0)
Rotation done

Found handle.. mtRod: MatrixTransform
 m.rotation =  (0, -4.02514e-231, 0)
Rotation done

Found handle.. mtRod: MatrixTransform
 m.rotation =  (0, -5.03143e-231, 0)
Rotation done

Found handle.. mtRod: MatrixTransform
 m.rotation =  (0, -6.03771e-231, 0)
Rotation done

Found handle.. mtRod: MatrixTransform
 m.rotation =  (0, -7.044e-231, 0)
Rotation done

... 

So, how you can see, the matrix is updated, but i can't see any visual 
rotation. What's wrong on my code? What do i forget?
I alwo tried to change the axis of rotation or to apply a translation instead 
of a rotation, but the result is the same...
Can someone help me?

Thank you!

Cheers,
Axel

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=35427#35427





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How can I get the bounding box of an imported model?

2010-12-29 Thread Axel Spirtaat
Hi guys,
thank you both for suggests, they were really helpful. Since the geometry of my 
table is complex and compound by a lot of geodes, i used the 
osg::ComputeBoundsVisitor to avoid errors. 
Now the table is placed correctly :-)

Really thank you again,


Axel

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=35209#35209





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How can I get the bounding box of an imported model?

2010-12-28 Thread Axel Spirtaat
Hi,

I need to place the imported model of a table on the floor of my virtual room. 
Since the table is longer and wider than high, the related boundingSphere 
radius is really imprecise and i can't place it correctly (i use also bullet 
for physics). 
Is it possible to get the bounding box of an object in any way? 
Since i need to decorate the room with many objects, this can result difficult 
only with the boundingSphere.

Thank you!

Cheers,
Axel

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=35188#35188





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Troubles with texture mapping

2010-12-22 Thread Axel Spirtaat
Hi,

I'm modelling a little room. I'm tryng to apply a texture to room walls, floor 
and roof. Reading the source code of osg examples, i've implemented a little 
class hierarchy to create the geometry shape, setting colors and normals of the 
quad and, finally applying the texture (how you can see in the attachments).
If i run my application, texture are applied only on 3 faces and, one of this 
faces have 2 textures :-( 
What is wrong in my setTexture() method?
Unfortunately i have never used C && openGL, so i don't understand weell the 
tutorials.  
In the future I would like that floor and roof  have a single texture on their 
face, and lateral walls have the texture repeated, but now for now I'd settle 
for have a single texture apply for each face of the room.
Can anyone help me or suggest a simple tutorial?
 

Thank you!

Cheers,
Axel

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=35057#35057




Attachments: 
http://forum.openscenegraph.org//files/lateralwall_156.cpp
http://forum.openscenegraph.org//files/wall_197.cpp
http://forum.openscenegraph.org//files/wallshape_143.h


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to handle camera by keyboard

2010-12-12 Thread Axel Spirtaat
Hi Robert,

Thanks for the advice, you have been enlightening.
I was focusing too much on details. now I'll try to implement a subclass of 
MatrixManipulator.

Best regards,


Axel

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=34734#34734





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to handle camera by keyboard

2010-12-11 Thread Axel Spirtaat
Hi,
I've created my scene, and now I need to move camera in it, using keyboard.
My idea is to handle camera using some key lik A, S, W, D to perform 
tranlations mouse movements to perform camera's rotations.

I know i need to write a new class that inherits from GUIEventHandler, but 
reading TrackballManipulator i'm not sure to have understood how a 
GUIAciontAdapter performs this operations.
For instance, in handle(const GUIEventAdapter& ea,GUIActionAdapter& aa, 
osg::Object*, osg::NodeVisitor*) method i could call the us.requestRedraw() to 
perform a visual change when the "D" key is pressed (to perform a translation 
on x axis). I think that the Viewer object, ccomputes some matrix operation, 
but i haven't found it.
Can anyone help me? 
 

Thank you!

Cheers,
Axel

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=34725#34725





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Length unit

2010-12-02 Thread Axel Spirtaat
Hi Torben,
thanks for your answer. I imagined it, but when i loaded the cow model in my 
scene, the model was bigger than my room (that is, 8x5x3), so I've had this 
doubt :-)

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=34429#34429





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Length unit

2010-12-02 Thread Axel Spirtaat
Hi,
i've an issue with my application. How kind of unit is used by osg for length? 
Can i configure it?
Moreover, between lighting techniques supported by osg, is there also a global 
one?

Thank you!

Cheers,
Axel

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=34426#34426





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG, bullet physics, collada and sketchup models on Ubuntu

2010-11-04 Thread Axel Spirtaat
Hi all,
for completeness i share here a site [¹] that allows to convert sketchup models 
into 3ds, obj and other formats. I found and tried it yesterday evening and 
sees to work well.
I hope this post can help those who had my own doubts and problems.

Thanks again to all, best regards,


Axel


[1] http://www.babel3d.com

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=33415#33415





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG, bullet physics, collada and sketchup models on Ubuntu

2010-11-03 Thread Axel Spirtaat
For completeness, i point out this site [1] which allow to convert sketchup 
files into 3ds, obj and other formats. 
I hope this post can help those who have my own doubts and problems.
Best regards,

Axel

[1] http://www.babel3d.com/

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=33404#33404





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG, bullet physics, collada and sketchup models on Ubuntu

2010-11-03 Thread Axel Spirtaat
Thank you all for your suggestions, since i had so many problems 
building/installing collada-dom i decide to convert sketchup model in the 3ds 
format which is loadable by osg.
I had already installed osgBullet to obtain physics... on next coming days i'll 
study how to use those libraries :-)
I'm sorry to have lost 4 days trying to fix collada-dom's bugs. 

However, thanks again for your help :-)
Cheers,


Axel

PS: @Jean-Sebastian: the name "baby foot" makes me feel like a kid! LOL

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=33397#33397





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG, bullet physics, collada and sketchup models on Ubuntu

2010-11-03 Thread Axel Spirtaat
Hi Jordi and Jan,
thank you for support. After reading Jordi's post i thought to install a i386 
arch of Ubuntu hoping to solve the problem... but then, reading Jan's post i 
changed idea...
i have to model in linux a calcio balilla table (i don't know if there's an 
english translation for "calcio balilla", i'm sorry!), using a sketchup model 
[1] and and some animation and/or interaction. So, my teacher suggested me to 
use osgBullet. osgBullet depends on osg, bullet and osgWorks, but to load hte 
model i need collada-dom. This morning i  found that google sketchup free can 
convert skp in dae (as Jordi supposed)...
At the end... what do you both advise me? To change project or to continue  
trying to install collada-dom + osg + bullet physics on a 32-arch of Ubuntu?
Please, let me know your opinion.. i need the advise of experts like you two :)

Thank you very much
Cheers,

Axel

[1] 
http://sketchup.google.com/3dwarehouse/details?mid=6f7074fb94c1f777bb1356f47c7f12bb
[/url]

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=33371#33371





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG, bullet physics, collada and sketchup models on Ubuntu

2010-11-02 Thread Axel Spirtaat
Excuse me Jordi,
i continue to have the same errors building building collada (also following 
the tutorial you've suggested me). 
Did you have a problem like this building it?

a...@axel-desktop:~/osg/collada-dom$ make os=linux project=minizip
make os=linux project=minizip -C dom
make os=linux project=dom -C dom
make os=linux project=fx -C fx
make os=linux project=rt -C rt
make os=linux project=viewer -C viewer
make[1]: ingresso nella directory «/home/axel/Scrivania/OSG/collada-dom/viewer»
Linking build/linux-1.4/viewer
/usr/bin/ld: skipping incompatible 
../rt/external-libs/bullet/lib/linux/libbulletopenglsupport.a when searching 
for -lbulletopenglsupport
/usr/bin/ld: cannot find -lbulletopenglsupport
collect2: ld returned 1 exit status
make[1]: *** [build/linux-1.4/viewer] Errore 1
make[1]: uscita dalla directory «/home/axel/Scrivania/OSG/collada-dom/viewer»
make: *** [all] Errore 2

a...@axel-desktop:~/osg/collada-dom$ find . -iname libbulletopenglsupport.a
./rt/external-libs/bullet/lib/linux/libbulletopenglsupport.a




I ask this here because on SourceForge the project seems to be inactive...


Thank you[/list]

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=5#5





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG, bullet physics, collada and sketchup models on Ubuntu

2010-11-02 Thread Axel Spirtaat
Thank you jordi,
now i begin to read the link you've suggested. Unluckily on Google warehouse i 
can find only skp files for the model i look for :-(
However, with a quick search i've seen that the is some tool to convert skp 
fines in 3ds format... maybe i could convert skp in 3ds and 3ds in dae :P
I hope to be more lucky now :-)

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=33322#33322





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OSG, bullet physics, collada and sketchup models on Ubuntu

2010-11-02 Thread Axel Spirtaat
Hi all,

i correctly installed osg 2.8.1 (by apt - ubuntu/debian package manager) and 
bullet physics 2.76 building the sources. 
When i tried to  load a sketuchup file (.skp) osgviewer reported an error. I 
read that i need collada-dom to load this kind of model. Is it right?
However, i also tried to build collada, but there are a lot of bugs for linux 
and seem to be no more supported...  i fixed some of them but not all. 
So i seen that bulet physics 2.75 (an older version) have collada included in 
its sources and i tried to build it too :P (hope successfully).
Now i think i have to re-installe the osg by sources selecting also the collada 
plugin. Is this right?
Since i installed in past also osgWorks and osgBullet, and had some problem 
with bullet physics, i think there's a lot of garbage in my libraries and maybe 
i need to reinstall the whole Ubuntu...
To prevent future problems can anyone answer to next questions?
1) Does OSG need collada to load sketchup files?
2) Is there anyone who succesfully installed collada-dom on ubuntu/linux?
3) can anyone provide me a link to a really good tutorial to install 
collada-dom and load sketchup files using osg?

I'm quite desperate, i've lost a lot of days... :-(


Thank you!

Cheers,
Axel

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=33315#33315





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Really stupid question about creating a new osg program on linux

2010-10-26 Thread Axel Spirtaat
Thanks to both,
now my app is correctly compiled and built with both solutions.
Now i just have to think how to integrete them to work with osgBullet libraries 
;-)  
Thank you again!

Axel

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=33088#33088





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Really stupid question about creating a new osg program on linux

2010-10-26 Thread Axel Spirtaat
Hi aa,
i know that my problem is probably really stupid, forgive me!
I'm novice of C++ and i need to create a small scene with osg libraries. So i 
successfully installed osg-sdk on my ubuntu 9.10 by apt, downloaded the sample 
datasets and configured environment variables. 
If i launch   osgviewer cow.osg it works correctly.
So i created a new executable c++ project in Eclipse and as main project file i 
copied/incolled the osgviewer.cpp source. When i try to build this project, it 
reports this errors:


Building file: ../src/osgviewer.cpp
Invoking: GCC C++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/osgviewer.d" 
-MT"src/osgviewer.d" -o"src/osgviewer.o" "../src/osgviewer.cpp"
Finished building: ../src/osgviewer.cpp
 
Building target: osgviewer
Invoking: GCC C++ Linker
g++  -o"osgviewer"  ./src/osgviewer.o   
./src/osgviewer.o: In function `main':
/home/omi/eclipseWorkspace/osgviewer/Debug/../src/osgviewer.cpp:34: undefined 
reference to `osg::ArgumentParser::ArgumentParser(int*, char**)'
/home/omi/eclipseWorkspace/osgviewer/Debug/../src/osgviewer.cpp:36: undefined 
reference to `osg::ArgumentParser::getApplicationName() const'
/home/omi/eclipseWorkspace/osgviewer/Debug/../src/osgviewer.cpp:37: undefined 
reference to `osg::ArgumentParser::getApplicationName() const'
/home/omi/eclipseWorkspace/osgviewer/Debug/../src/osgviewer.cpp:38: undefined 
reference to `osg::ArgumentParser::getApplicationName() const'
/home/omi/eclipseWorkspace/osgviewer/Debug/../src/osgviewer.cpp:39: undefined 
reference to 
`osg::ApplicationUsage::addCommandLineOption(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)'
/home/omi/eclipseWorkspace/osgviewer/Debug/../src/osgviewer.cpp:40: undefined 
reference to 
`osg::ApplicationUsage::addCommandLineOption(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)'
/home/omi/eclipseWorkspace/osgviewer/Debug/../src/osgviewer.cpp:41: undefined 
reference to 
`osg::ApplicationUsage::addCommandLineOption(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)'
/home/omi/eclipseWorkspace/osgviewer/Debug/../src/osgviewer.cpp:43: undefined 
reference to `osgViewer::Viewer::Viewer(osg::ArgumentParser&)'
/home/omi/eclipseWorkspace/osgviewer/Debug/../src/osgviewer.cpp:46: undefined 
reference to `osg::ArgumentParser::readHelpType()'
/home/omi/eclipseWorkspace/osgviewer/Debug/../src/osgviewer.cpp:47: undefined 
reference to `osg::ApplicationUsage::write(std::basic_ostream >&, unsigned int, unsigned int, bool)'
/home/omi/eclipseWorkspace/osgviewer/Debug/../src/osgviewer.cpp:52: undefined 
reference to `osg::ArgumentParser::errors(osg::ArgumentParser::ErrorSeverity) 
const'
/home/omi/eclipseWorkspace/osgviewer/Debug/../src/osgviewer.cpp:53: undefined 
reference to `osg::ArgumentParser::writeErrorMessages(std::basic_ostream >&, osg::ArgumentParser::ErrorSeverity)'
/home/omi/eclipseWorkspace/osgviewer/Debug/../src/osgviewer.cpp:58: undefined 
reference to `osg::ApplicationUsage::write(std::basic_ostream >&, unsigned int, unsigned int, bool)'
/home/omi/eclipseWorkspace/osgviewer/Debug/../src/osgviewer.cpp:64: undefined 
reference to `osgDB::Registry::instance(bool)'
/home/omi/eclipseWorkspace/osgviewer/Debug/../src/osgviewer.cpp:65: undefined 
reference to `osgDB::Registry::instance(bool)'
/home/omi/eclipseWorkspace/osgviewer/Debug/../src/osgviewer.cpp:69: undefined 
reference to `osgDB::Registry::instance(bool)'
/home/omi/eclipseWorkspace/osgviewer/Debug/../src/osgviewer.cpp:63: undefined 
reference to `osg::ArgumentParser::read(std::basic_string, std::allocator > const&, 
osg::ArgumentParser::Parameter, osg::ArgumentParser::Parameter, 
osg::ArgumentParser::Parameter)'
/home/omi/eclipseWorkspace/osgviewer/Debug/../src/osgviewer.cpp:77: undefined 
reference to `osgGA::TrackballManipulator::TrackballManipulator()'
/home/omi/eclipseWorkspace/osgviewer/Debug/../src/osgviewer.cpp:77: undefined 
reference to `osgGA::KeySwitchMatrixManipulator::addMatrixManipulator(int, 
std::basic_string, std::allocator >, 
osgGA::MatrixManipulator*)'
/home/omi/eclipseWorkspace/osgviewer/Debug/../src/osgviewer.cpp:78: undefined 
reference to `osgGA::FlightManipulator::FlightManipulator()'
/home/omi/eclipseWorkspace/osgviewer/Debug/../src/osgviewer.cpp:78: undefined 
reference to `osgGA::KeySwitchMatrixManipulator::addMatrixManipulator(int, 
std::basic_string, std::allocator >, 
osgGA::MatrixManipulator*)'
/home/omi/eclipseWorkspace/osgviewer/Debug/../src/osgviewer.cpp:79: undefined 
reference to `osgGA::DriveManipulator::DriveManipulator()'
/home/omi/eclipseWorkspace/osgviewer/Debug/../src/osgviewer.cpp:79: undefined 
reference to `osgGA::KeySwitchMatrixManipulator::addMatrixManipulator(int, 
std::basic_string, std::allocator >, 
osgGA::MatrixManipulator*)'
/home/omi/eclip

Re: [osg-users] [build] Problem building OsgWorks on Ubuntu

2010-08-03 Thread Axel Spirtaat
For precise, i add the result of make command:

Code:

Scanning dependencies of target osgwTools
[  3%] Building CXX object 
src/osgwTools/CMakeFiles/osgwTools.dir/AbsoluteModelTransform.cpp.o
In file included from 
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/src/osgwTools/AbsoluteModelTransform.cpp:21:
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:25:27:
 error: osg/NodeVisitor: Nessun file o directory
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:26:25:
 error: osg/Transform: Nessun file o directory
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/src/osgwTools/AbsoluteModelTransform.cpp:22:31:
 error: osgUtil/CullVisitor: Nessun file o directory
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/src/osgwTools/AbsoluteModelTransform.cpp:25:22:
 error: osg/Matrix: Nessun file o directory
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/src/osgwTools/AbsoluteModelTransform.cpp:28:24:
 error: osg/io_utils: Nessun file o directory
In file included from 
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/src/osgwTools/AbsoluteModelTransform.cpp:21:
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:47:
 error: ‘osg’ has not been declared
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:47:
 error: expected ‘{’ before ‘Transform’
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:48:
 error: invalid type in declaration before ‘{’ token
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:48:
 warning: extended initializer lists only available with -std=c++0x or 
-std=gnu++0x
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:49:
 error: expected primary-expression before ‘public’
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:49:
 error: expected ‘}’ before ‘public’
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:49:
 error: expected ‘,’ or ‘;’ before ‘public’
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:51:
 error: expected unqualified-id before ‘const’
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:51:
 error: expected ‘)’ before ‘const’
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:52:
 error: expected unqualified-id before ‘const’
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:52:
 error: expected ‘)’ before ‘const’
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:54:
 error: expected constructor, destructor, or type conversion before ‘(’ token
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:56:
 error: ‘virtual’ outside class declaration
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:56:
 error: ‘osg’ has not been declared
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:56:
 error: ‘matrix’ was not declared in this scope
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:56:
 error: ‘osg’ has not been declared
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:56:
 error: ‘nv’ was not declared in this scope
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:56:
 error: initializer expression list treated as compound expression
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:56:
 error: expected ‘,’ or ‘;’ before ‘const’
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:57:
 error: ‘virtual’ outside class declaration
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:57:
 error: ‘osg’ has not been declared
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:57:
 error: ‘matrix’ was not declared in this scope
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:57:
 error: ‘osg’ has not been declared
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:57:
 error: ‘nv’ was not declared in this scope
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:57:
 error: initializer expression list treated as compound expression
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:57:
 error: expected ‘,’ or ‘;’ before ‘const’
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:59:
 error: ISO C++ forbids declaration of ‘osg’ with no type
/home/axel/Desktop/OSG/osgWorks_01_01_00_rc2/include/osgwTools/AbsoluteModelTransform.h:59:
 error: exp

[osg-users] [build] Problem building OsgWorks on Ubuntu

2010-08-03 Thread Axel Spirtaat
Hi all,
i'm a newbie of OSG and quite a newbie on Linux. I've to create a small project 
for  my studies using OsgBullet. Reading about it i've seen that it depends on 
OpenSceneGraph, OsgWorks and Bullet. I installed OpenSceneGraph using apt-get, 
and then i tryed to build & install  OsgWorks by CMake-GUI and here comes my 
problem: the configure & generate process finish well but i don't know how to 
do after that. I haven't found a guide or how-to that explains the next steps 
in detail... going in the build-directory and typing make the compiler returns 
syntax errors.
Can anyone help me suggesting a detailed how-to or listing the instruction to 
complete my installation?

Thank you.

Cheers


Axel

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30490#30490





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org