Hi Gerrit,

Thank you very much for your help.
Pressing "g" I got the example working and things got more clear.

Sadly I'm quite new to the "Override" concept of OpenSG2.0. Even If I
think to have understood, is there any doc about this?
If I've correctly understood, the TextureChunk is added to all child
of the "CubeMapGenerator" Node, isn't it?
And the scene rendered into the cubemap can be provided with the
"setRoot()" method of the CubeMapGenerator, right?

For some reasons  I want to see only the CubeMap Texture and not the
rest of the scene. Referring to the example, I want to see only the
mirrored sphere and not the objects around it.
How can I achieve that? I tried by giving the viewport only the
CubeMapGenerator node and passing the rest of the scene to the
CubeMapGenerator through the setRoot method, but with no luck.
Any idea on this?

Thank you,

Josef


On Fri, Jan 7, 2011 at 2:48 PM, Gerrit Voß <vo...@vossg.org> wrote:
>
> Hi,
>
> On Fri, 2011-01-07 at 13:27 +0100, Josef Grunig wrote:
>> Dear OpenSG Users,
>>
>> I was looking for the first time at OpenSG2.0 after some years working on 
>> 1.8.
>>
>> I wanted to set up a simple example that renders a cube map texture of
>> the scene into an FBO.
>> Having a look at the sources I found the CubemapGenerator class and
>> it's test. Unfortunately the test compiles, but not the shaders, so I
>> have not a good starting point.
>>
>> Can someone point me in the right direction on how use that class? It
>> seems to be a Core, how is it supposed to work?
>
> the shaders should only come from the hdr part of the test. Could you
> press 'g' and see if that gives you an image. This replaces the core
> of the hdrroot node with a simple group and should disable the shaders
> involved there (something you could also just add to the normal example
> code).
>
> In general the CubemapGenerator works with chunk overrides, so the
> generated texture chunk is added during the traversal as a texture
> override for the unit you specify with setTexUnit. In the default
> setupMode it also adds the needed TexEnv/TexCoordGen/TexCoordTransform
> chunks for a mirror setup. SetupMode controls which chunks are added,
> e.g. the default is
>
> SetupTexture | SetupTexEnv | SetupTexGen | OverrideTex
>
> SetupTexture controls whether or not the texture chunk is created
> internally (if set, otherwise the _sfTexture value is used). Note
> this does not control if the chunks is added as an override.
>
> SetupTexEnv : create, setup and add TexEnv override
> SetupTexGen : create, setup and add TexGen/TexTransform override
> OverrideTex : add the TexChunkOverride
>
> Let me know more detailed questions.
>
> A different example is in Examples/CSM/Mirror, that one should work
> without shaders out of the box. It at least gives you the scene
> structure.
>
>
> kind regards
>  gerrit
>
>
>
>
>
> ------------------------------------------------------------------------------
> Gaining the trust of online customers is vital for the success of any company
> that requires sensitive data to be transmitted over the Web.   Learn how to
> best implement a security strategy that keeps consumers' information secure
> and instills the confidence they need to proceed with transactions.
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> Opensg-users mailing list
> Opensg-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>



-- 
Josef

------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to