Hello,
I wasn't aware of these 3 ways to manage colors on vertices. It works fine now.
Thank you so much for your explanation !
...
Cheers,
Clement
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66711#66711
Hi Bemt,
i think you got something wrong in the beginning. There are 3 possible ways to
apply a color to a vertex:
- Material:
Materials define how the surface is interacting with lights.
Most times you are only intereseted in diffuse value.
osg::Material * mat =
dynamic_cast(geometry)->
I have a 3D model stored in .osgb files with different level of details, this
is the main reason I chose to use OSG. It consists of a 3D point cloud and
images painted on it.
Now, I want to focus on a pattern recognition process so I am trying to get
every vertices coordinates and assign them R
Hi Clement,
Hi,
After few tries on different files, I think osg::Material are not what I am
looking for since I have for example, for each drawable, ~900 vertices (with
different colors each) and only 1 material (which can return only 1 osg::Vec4
of RGBA).
Can you give us an example file? Som
Hi,
After few tries on different files, I think osg::Material are not what I am
looking for since I have for example, for each drawable, ~900 vertices (with
different colors each) and only 1 material (which can return only 1 osg::Vec4
of RGBA).
I tried to convert .osgb file into .osg to see wh
Hi Clement,
I checked what you suggested but I don't really understand how I can retrieve
the respective colors of each points I am looking for.
Do you have any idea how it can be done ?
You need to extend your visitor to capture the StateSet active for your
drawable. You need to add a osg::N
I checked what you suggested but I don't really understand how I can retrieve
the respective colors of each points I am looking for.
Do you have any idea how it can be done ?
...
Thank you!
Cheers,
Clement
--
Read this topic online here:
http://forum.openscenegraph.org/viewto
The colours may also be in a material. Which is in a osg::StateSet object.
Tony V
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=2#2
___
osg-users mailing list
osg-u
Hello,
Thank you for your quick answers, it was really helpful.
I defined a new visitor inherited from NodeVisitor and I have access to the
vertices. But I also need to get the colors of this vertices.
I tried to get colors in an osg::Vec4Array with getColorArray() but it doesn't
work on every
Hi Clement+Tony,
On 26 March 2016 at 02:16, Tony Vasile wrote:
> Hi Clement,
> This is rather easy to do. All you need is to define a NodeVisitor and
> run it on the group. Using this way you only need to have an accept call
> for the Geode and process the drawables under the Geode.
>
> Code:
Hi Clement,
This is rather easy to do. All you need is to define a NodeVisitor and run it
on the group. Using this way you only need to have an accept call for the Geode
and process the drawables under the Geode.
Code:
class InfoVisitor : public osg::NodeVisitor
{
public:
InfoVisitor()
Hi,
I have to work on a point cloud which was stored in .osgb files for LOD
management reasons. I have extracted it in an osg::Group, then this Group
contains other Groups and so on.
I need to access every points of my cloud to extract coordinate or colors. I
don't know if there is an easy way
12 matches
Mail list logo