OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

CubeMap reflection


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> osgPPU [osgPPU]
View previous topic :: View next topic  
Author Message
vincent.honnet@oktal.fr
Newbie


Joined: 23 Sep 2010
Posts: 8

PostPosted: Thu Sep 23, 2010 7:39 am    Post subject:
CubeMap reflection
Reply with quote

Hi,


I'm not very experienced with shaders and I'm trying to write a reflection shader for the cubemap exemple.
I tried to compute the normals and so on, but I don't get the result I'm expecting.
Do have someone a shader (and the modified c++ source code) that is working in this demo ?

Thanks a lot in advance,
Vincent

...


Thank you!

Cheers,
Vincent
Back to top
View user's profile Send private message
art (Art Tevs)
Site Admin


Joined: 20 Dec 2008
Posts: 414
Location: Saarbrücken, Germany

PostPosted: Tue Oct 05, 2010 1:18 pm    Post subject:
Reply with quote

Hi Vincent,

take a look into the osgreflection example shipped with OSG. One of this examples shows the cubemap reflection implementation. You cannot achieve reflection with osgPPU, since it does not know anything about your cameras or other stuff.

The cubemap exampel showed with osgPPU is just to show that you can also use CubeMap textures as input/output with osgPPU.

Cheers,
Art
Back to top
View user's profile Send private message Visit poster's website
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 10859

PostPosted: Tue Oct 05, 2010 1:25 pm    Post subject:
CubeMap reflection
Reply with quote

Hi Art and Vincent,

On Tue, Oct 5, 2010 at 2:18 PM, Art Tevs <> wrote:
Quote:
take a look into the osgreflection example shipped with OSG. One of this examples shows the cubemap reflection implementation.

Just for clarification, the osgreflection examples use a multi-pass
stencil buffer based approach for planar reflections, while the
osgprerendercubemap uses a render texture based approach with a cube
map for reflections.

Robert.


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
vincent.honnet@oktal.fr
Newbie


Joined: 23 Sep 2010
Posts: 8

PostPosted: Tue Oct 05, 2010 2:30 pm    Post subject:
CubeMap reflection
Reply with quote

Hi Art,

I agree, I couldn't get it working. The only way I found was to let
osgPPU process my computation until the normals and then use it as
output texture on the geometry that has the reflection and refraction
shader like one do in the example osgvertexprogram.

Vincent

Le 05/10/2010 15:18, Art Tevs a écrit :
Quote:
Hi Vincent,

take a look into the osgreflection example shipped with OSG. One of this examples shows the cubemap reflection implementation. You cannot achieve reflection with osgPPU, since it does not know anything about your cameras or other stuff.

The cubemap exampel showed with osgPPU is just to show that you can also use CubeMap textures as input/output with osgPPU.

Cheers,
Art

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









------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
vincent.honnet@oktal.fr
Newbie


Joined: 23 Sep 2010
Posts: 8

PostPosted: Tue Oct 05, 2010 2:35 pm    Post subject:
Reply with quote

Hi,

your are right Robert. I got something working by having a look to osgvertexprogram (for reflection/refraction, I just converted the ARB shader into a glsl one) and some other shader examples that process normals.

Thanks !
Vincent

...


Thank you!

Cheers,
Vincent
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> osgPPU [osgPPU] All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Cubemap loading from dds SMesserschmidt General 1 Mon Oct 12, 2015 6:13 pm View latest post
No new posts 3ds plugin fix for map transparency+r... Giampaolo Viganò Submission 3 Wed Apr 01, 2015 12:18 pm View latest post
No new posts 3ds plugin (ReaderWriter3DS.cpp) fix ... Giampaolo Viganò Submission 0 Fri Mar 27, 2015 4:45 pm View latest post
No new posts Enabling reflection and others effect... Paradox osgOcean [osgOcean] 0 Sat Nov 22, 2014 12:03 pm View latest post
No new posts Skydome-texture, badly rendered in cu... Patrik Andersson General 0 Tue Jul 22, 2014 12:36 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP