Re: [osg-users] Matrix multiplication order

2018-03-22 Thread Florian GOLESTIN
Hi Robert, Thanks for the answer, I understand now. I worked as a Support Engineer and understand the hard choice of breaking an API :) Florian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73149#73149

[osg-users] Matrix multiplication order

2018-03-22 Thread Florian GOLESTIN
Hi everyone ! I don't get why in GLSL you transform a vertex like this: Code: vec4 result = matrix * vertex; While in OSG I have to do it in the reverse order : Code: osg::Vec4 result = vertex * matrix; Is it due to the Matrices major mode that are different from OpenGL and

Re: [osg-users] [3rdparty] ImGui integration

2017-12-18 Thread Florian GOLESTIN
Hi Everyone, I was thinking to integrate ImGUI with the non FPP version but I'm not sure how to do it. Itself, ImGUI render the ui inside a vector of (vector of ) struct containing the triplet Vertex Position, UV coordinates and Color value. As it's and "immediate GU", It refresh and refill

[osg-users] Collada Importer with Blender

2017-12-01 Thread Florian GOLESTIN
Hello everyone, I've built OSG 3.5.7 with the Collada Plugin, however when I try to import a .dae file exported by Blender it fails with the following message: Code: $ bin/osgconvd ~/Téléchargements/BLEND/Player2.dae Player2.osgt I/O error : Is a directory Error: Extra content at the end of

Re: [osg-users] Displaying the normals of your models

2017-12-01 Thread Florian GOLESTIN
Thanks! I forgot about EmitVertex. It's a nice solution! Cheers, Florian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72506#72506 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] Displaying the normals of your models

2017-12-01 Thread Florian GOLESTIN
Hi everyone, I have to debug a normal issue with my model, so I made a code to display them (transform normals in a bunch of gl_lines and create a resulted geometry). I share the gist in case it may help: https://gist.github.com/fulezi/95a9ac319fd1cbeca1b18a4cde3986dc Have a nice day,

Re: [osg-users] Unexpected different lightening

2017-12-01 Thread Florian GOLESTIN
Hi Tang, You should be right has the normals are incorrect anyway. I've maybe messed up my copy-past debug and have to dig it more. Thanks for you answer :) Cheers, Florian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72503#72503

Re: [osg-users] Mouse position to object space

2017-11-23 Thread Florian GOLESTIN
Hi Hakan, If you want to simply drag (or do other transformation to) an object you can use the Dragger from the osgManipulator pluggin: Code: osgManipulator::TranslateAxisDragger Otherwise you need to project the mouse to the world space. If I recall correctly: Code:

[osg-users] Unexpected different lightening

2017-11-22 Thread Florian GOLESTIN
Hi everyone, I've exported a blender scene with the osgexport module (https://github.com/cedricpinson/osgexport) however the lightening is not as bright as expected (see screenshot). I've exported the same scene as wavefront (.obj) and it renders correctly. Then I converted the .obj into a

Re: [osg-users] [3rdparty] ImGui integration

2017-11-22 Thread Florian GOLESTIN
Thanks ! Yes Shader version is "in the pipe" :) Florian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72436#72436 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] [3rdparty] ImGui integration

2017-11-09 Thread Florian GOLESTIN
Hi team, I integrated DearImGui into OpenSceneGraph. I forked the Gist from Megaton. You can find my version here: https://gist.github.com/fulezi/d2442ca7626bf270226014501357042c. Features: Integrated with the OpenGL fixed pipeline Works with ASCII char and special keys (Control, alt, Super,

Re: [osg-users] Solar system in OSG or OpenGL?

2017-01-07 Thread Florian GOLESTIN
Hi Chris, Just my two cents: As a beginner, when I started to use OSG, learning from the beginner guide and the net tutorials, I was quickly able to get a good rendering. However, due to my lack of knowledge in OpenGL, at some point I get stuck in m development. So I've decided to buy a book

Re: [osg-users] Multiples scenes

2016-05-31 Thread Florian GOLESTIN
Hi Robert I gave a look to the osg::Switch and it's interesting too! I don't need to mix the two scenes, in addition I need to restore the position and the animation of the monsters. So I've opted for the "viewer.setSceneData(newModel);". It works well so far! Thanks for your answer! Florian

Re: [osg-users] clamp mouse cursor / position

2016-05-23 Thread Florian GOLESTIN
Hi Sebastian, I'm not an expert, but in my case I've my own class overloading osgGA::StandardManipulator. In this case, while overriding the method handleMouseMove I can call requestWarpPointer without recusiving call handleMouseMove. Is it what you are looking for? Best, Florian

Re: [osg-users] Multiples scenes

2016-05-23 Thread Florian GOLESTIN
Hi Robert, The player just move to a new scene so the previous one can be discarded. By scene I wanted to mean the "root" node and all its children, and the callback, keeping only the view and the camera manipulator. In the application, the player walk along a maze (an interior scene) and when

[osg-users] Multiples scenes

2016-05-22 Thread Florian GOLESTIN
Hi everyone I'm looking for the method to go from a scene to another one. I've found that setting a new model scene works but is it the preferred way? Code: /* Changing the scene on the fly in a osg::NodeCallback */ viewer.setSceneData(scene2); Thanks, Florian -- Read this

Re: [osg-users] Using multiples texture for a geometry

2016-05-13 Thread Florian GOLESTIN
Hi Björn, Texture Atlas! That was what I've in mind, I though I could use multiples image files. This feeling when you worked hard on a subject and now it become clear! :) Thank you all for your help! Florian -- Read this topic online here:

Re: [osg-users] Using multiples texture for a geometry

2016-05-09 Thread Florian GOLESTIN
Hi Robert, hi Sebastian, Thanks for your help so far Robert, I hope you have a good trip in Germany! Sebastian, thanks for your help, I understand what you mean. Because I used 0's for my texture mapping I was binding "void". That's why it appeared black. On your example, I got the two

Re: [osg-users] Using multiples texture for a geometry

2016-05-06 Thread Florian GOLESTIN
Hi Robert, I followed your suggestion and indeed the exported scenes seem different but I don't get this difference. Please see in attachment for the source code and the exported scenes. This source code create one drawable with two faces and two TextCoords buffers. The result is the same: if

Re: [osg-users] Using multiples texture for a geometry

2016-05-04 Thread Florian GOLESTIN
Hi Robert, I tried without the SmoothingVisitor but it does not change anything. However during my tests today I put a "Axes" object (the axes.osgt model from the OpenSceneGraph examples) and some part of the texture on the block below the object just appeared but really dark. So it it make

Re: [osg-users] Using multiples texture for a geometry

2016-05-03 Thread Florian GOLESTIN
Hi Robert, Sorry my mistake, I wanted to put only the interesting part but this is not efficient. No more censure! Code: namespace Soleil { LevelReader::LevelReader() { //supportsExtension("level", "Text map format for Donjon"); } LevelReader::~LevelReader() { }

Re: [osg-users] Using multiples texture for a geometry

2016-05-02 Thread Florian GOLESTIN
Hi Robert, Thanks for your response! I might have the two vectors for the textures coordinate. Basically my idea is to have cubes to draw Labyrinth. I read a file such as: Code: x x.x x Where 'x' represents a wall. I've a class named Level that hold two Vec2Array for the two

[osg-users] Using multiples texture for a geometry

2016-05-01 Thread Florian GOLESTIN
Hi everyone, I've a Geometry (which is a wall) and I want to put two textures on it. A part with a first texture and a second part with a second texture. I wrote the code above : Code: //Texture 1 geom->setTexCoordArray(0, level->texcoords.get()); { osg::ref_ptr texture =

[osg-users] Create a custom StandardManipulator

2016-04-23 Thread Florian GOLESTIN
Hi everyone, I'm trying to develop my own Camera Manipulator (in order to have a Doom-like view). I've looked at documentations but there are still questions for me. First question I had was "How to translate an object relatively to its own position (and not to the world)". I'm still looking

Re: [osg-users] Drawing a textured cube

2016-04-11 Thread Florian GOLESTIN
Hi Christian, Thanks for your answer. Indeed using 4 faces solved the situation, now I've a cube fully textured. I've also change from triangles to quads. I don't know if I've eared anything. I add the code below (it may help someone else). Code: osg::ref_ptr vertices = new osg::Vec3Array;

[osg-users] Drawing a textured cube

2016-04-10 Thread Florian GOLESTIN
Hi everyone, I'm learning OSG with the quick start guide and the example but I'm struggling drawing a textured cube. The shape is correct but only 4 faces are textured on 6. Below is the shape: Code: osg::ref_ptr vertices = new osg::Vec3Array(8); (*vertices)[0].set( 0.0f, 0.0f, 0.0f);