Re: [osg-users] Problem with output - OSG/Shader

2018-08-05 Thread Rômulo Cerqueira
Hi Johny,

I would like to draw what I want... the red was just an example.

My main goal is to simulate the reverberation phenomena using rasterization 
(for the first reflection) + ray tracing (for the second reflection). I would 
like to output the surface of reflected scenes, which are always not visible 
from the viewpoint.

... 

Thank you!

Cheers,
Rômulo

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





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


Re: [osg-users] Problem with output - OSG/Shader

2018-08-05 Thread Johny Canes
Hi,

It could be that maybe the black portion of the texture you are doing postproc 
on has the wrong alpha value... just a stab in the dark lol.

And why exactly would you want an all red scene?

Cheers,
Johny

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





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


Re: [osg-users] Crash when using LineSegmentIntersector

2018-08-05 Thread Robert Osfield
On Sat, 4 Aug 2018 at 17:24, Sam Brkopac  wrote:
> Most of the OSG examples use Geodes. What is the type you would use for a 
> modern scene graph?

Most of the examples pre-date the change to allow Drawables to be
added directly to the scene graph.  Since there are so many examples
it's a bit of task to rewrite them all.  New examples won't use Geode.

>
>
> > However, as I've only seen a tiny snippet of your code and explanation
> > I can't really say where you've understanding of how best to implement
> > what you need has gone off in the weeds.
>
>
> This is a very real possibility. To keep it short and sweet: I have a plugin 
> that returns a geode from a custom file format. There is supporting data 
> associated with the format such as walkable flags. I use Geodes to group 
> together drawables (using the visitor) to draw them if the user wants to see 
> them. Basically debug data for the node.

All classes of osg::Object have support for a object->setValue("name",
valu) and bool result = object->getValue("name", value);  This is what
I'd use for debug/supporting data.

Nest a Geode within a Geode is just plan bad practice.  It's misusing
something that was never intended to be used in the way you were using
it.  There are *no* OSG examples that do what you were doing, you've
invented a new way to misuse the OSG.

> > Another general comment is that it's not recommend practice to go
> > adding objects to the scene graph from within a NodeVisitor.
>
> Understood. Is there a best practice I can align myself with? Should I be 
> handling that all in the plugin loader and potentially use something like 
> osg::Switch to turn them on and off?

I don't know enough about what you are doing to pinpoint exactly what
you should use for the task.  At this point you've provided a
"solution" that you want to debug, what I'm saying is the "solution"
has a number of odd things about it is likely completely the wrong way
to tackle that task.

The best way to get feedback on how to do things is provide a clear
high level explanation of what functionality you'd like to implement
then others can suggest the way they would tackle it.

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