Re: [osg-users] [osgOcean] Shader again.

2011-03-02 Thread Bawenang Rukmoko
Hi,

Ok, after many googling (and stumbling around aimlessly) I've found a similar 
situation (and a revelation): 
http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2008-April/009746.html

So I think I'll try that one suggestion. Adding another camera pass that will 
only render the tip of my ship (which will have the 
osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR settings) and merge it with the 
scene. Wish me luck. :)

PS: Should I also put my code here? It's pretty situational though.

Thank you!

Cheers,
Bawenang


quot;There's no place like 127.0.0.1quot;

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





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


Re: [osg-users] [osgOcean] Shader again.

2011-03-02 Thread Bawenang Rukmoko

benang wrote:
 Thanks for the reply.
 
 Well I know I shouldn't and I wouldn't if I don't have this artefact of the 
 culled tip of the ship. I noticed that you're replying as a guest, not a 
 member of this forum, so I'm not sure that you can see all of my screenshots 
 that I've put here. If not, then I'll give you an illustration.
 
 Imagine a quake clone game. You've got a part of the weapon's model visible 
 at the bottom of the screen, near the HUD, that will also move along with 
 your first person camera. Now, in my application, that weapon will be culled 
 and won't be rendered perfectly, even invisible at times, based on that 
 camera's (and model along with it) translation and rotation. Now if I 
 disabled near / far computation, the screen turns blank because the glare 
 shader is also enabled. If I disable both the near / far computation and the 
 glare shader, the scene seemed normal and right. However there's another 
 artefact. The above water fog isn't implemented correctly. Even when there 
 are two objects with the same distance with the camera, one of them can be 
 rendered as if it's inside a fog and one of them is not.
 
 As for the missing model if I enabled glare, I've found the answer. It seems 
 like osgOcean hates targa. One of my model's textures is a targa image file 
 and that's why it wasn't rendered. When I changed it to a jpg, it worked just 
 fine. Maybe you should put this as a warning somewhere in the documentation 
 or such.
 
 Thanks again.
 
 
 Kim Bale wrote:
  You should need to use osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR. 
  
  *shouldn't 
  
  
  K.
  
  On 28 February 2011 06:25, Bawenang Rukmoko  () wrote:
  
No reply yet? I guess I've got to do this the hard way, researching them 
   myself. :(
   
   Thanks anyway guys.
   
   Thank you!
   
   Cheers,
   Bawenang
   
   
   quot;There's no place like 127.0.0.1quot;
   
   --
   Read this topic online here:
   
   http://forum.openscenegraph.org/viewtopic.php?p=37165#37165 
   (http://forum.openscenegraph.org/viewtopic.php?p=37165#37165)
   
   
   
   
   
   
   ___
   osg-users mailing list
()
   http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
   (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
   
   
   
  
  
   --
  Post generated by Mail2Forum
 



quot;There's no place like 127.0.0.1quot;

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





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


Re: [osg-users] [osgOcean] Shader again.

2011-03-01 Thread Kim Bale
Hi Bawenang,

You should need to use osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR.

I'm not familiar with Delta3D but last time I heard about the osgOcean actor
that was generated for it, it was using osgOcean 1.0. The version in the
trunk now contains quite a few changes.

The glare RTT camera simply takes the view and projection matrices from the
main camera, so it shouldn't be behave any differently from your main
camera. The glare is then rendered as a post render in a full screen quad.

You can see an example of how to include additional elements into the scene
in the OceanExample exe, take a look at the terrain and examine the shader
that is attached to it. The shader shows you how to deal with the glare
passes. Note: the version in the trunk is best for this.

Regards,

Kim.


On 28 February 2011 06:25, Bawenang Rukmoko ben...@cs.its.ac.id wrote:

 No reply yet? I guess I've got to do this the hard way, researching them
 myself. :(

 Thanks anyway guys.

 Thank you!

 Cheers,
 Bawenang

 
 quot;There's no place like 127.0.0.1quot;

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





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

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


Re: [osg-users] [osgOcean] Shader again.

2011-03-01 Thread Kim Bale
You should need to use osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR.

*shouldn't

K.

On 28 February 2011 06:25, Bawenang Rukmoko ben...@cs.its.ac.id wrote:

 No reply yet? I guess I've got to do this the hard way, researching them
 myself. :(

 Thanks anyway guys.

 Thank you!

 Cheers,
 Bawenang

 
 quot;There's no place like 127.0.0.1quot;

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





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

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


Re: [osg-users] [osgOcean] Shader again.

2011-03-01 Thread Bawenang Rukmoko
Thanks for the reply.

Well I know I shouldn't and I wouldn't if I don't have this artefact of the tip 
of the ship was not culled. I noticed that you're replying as a guest, not a 
member of this forum, so I'm not sure that you can see all of my screenshots 
that I've put here. If not, then I'll give you an illustration.

Imagine a quake clone game. You've got a part of the weapon's model visible at 
the bottom of the screen, near the HUD, that will also move along with your 
first person camera. Now, in my application, that weapon will be culled and 
won't be rendered perfectly, even invisible at times, based on that camera's 
(and model along with it) translation and rotation. Now if I disabled near / 
far computation, the screen turns blank because the glare shader is also 
enabled. If I disable both the near / far computation and the glare shader, the 
scene seemed normal and right. However there's another artefact. The above 
water fog isn't implemented correctly. Even when there are two objects with the 
same distance with the camera, one of them can be rendered as if it's inside a 
fog and one of them is not.

As for the missing model if I enabled glare, I've found the answer. It seems 
like osgOcean hates targa. One of my model's textures is a targa image file and 
that's why it wasn't rendered. When I changed it to a jpg, it worked just fine. 
Maybe you should put this as a warning somewhere in the documentation or such.

Thanks again.


Kim Bale wrote:
 You should need to use osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR. 
 
 *shouldn't 
 
 
 K.
 
 On 28 February 2011 06:25, Bawenang Rukmoko  () wrote:
 
   No reply yet? I guess I've got to do this the hard way, researching them 
  myself. :(
  
  Thanks anyway guys.
  
  Thank you!
  
  Cheers,
  Bawenang
  
  
  quot;There's no place like 127.0.0.1quot;
  
  --
  Read this topic online here:
  
  http://forum.openscenegraph.org/viewtopic.php?p=37165#37165 
  (http://forum.openscenegraph.org/viewtopic.php?p=37165#37165)
  
  
  
  
  
  
  ___
  osg-users mailing list
   ()
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
  (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
  
  
  
 
 
  --
 Post generated by Mail2Forum



quot;There's no place like 127.0.0.1quot;

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





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


Re: [osg-users] [osgOcean] Shader again.

2011-02-27 Thread Bawenang Rukmoko
No reply yet? I guess I've got to do this the hard way, researching them 
myself. :(

Thanks anyway guys.

Thank you!

Cheers,
Bawenang


quot;There's no place like 127.0.0.1quot;

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





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


Re: [osg-users] [osgOcean] Shader again.

2011-02-24 Thread Bawenang Rukmoko
Hi,

I've tried meddling around and put 
camera-setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR); on 
both the cameras of OceanScene::renderToTexturePass() and 
OceanScene::glareCombinerPass(). 

The results are: 
1. If I put it on the RTT method, it will cause the glare to be disabled and no 
glare rendered.
2. If I put it on the glareCombinerPass method, the screen would turn black 
like the one I experienced.
3. Furthermore, I think I know what causes the models' (ships in this case) 
color to be changed erratically if the camera angle is changed. I think it is 
because of the above water fog's calculation that has gone wrong if I use  
camera-setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);

So now I've got a situation here. If I don't use  
camera-setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);, 
the front of the ship will be culled and displays wrongly. But if do, the whole 
shaders from osgOcean will be corrupted. Any other idea to solve this guys? I'm 
so lost right now. :(


Thank you!

Fare Thee Well,
Bawenang

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





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


[osg-users] [osgOcean] Shader again.

2011-02-22 Thread Bawenang Rukmoko
Hi,

I seem to stumbled a lot on osgOcean's shaders. I've got lots of graphics 
artefacts because of them. Can you point me to the ones that are actually 
working on them? I may need to disturb them a bit with my questions. Thanks. Oh 
yea BTW I've successfully made my own bloom shader. Here's the screenshot. :D




Thank you!

Cheers,
Bawenang

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




Attachments: 
http://forum.openscenegraph.org//files/glow2_129.jpg
http://forum.openscenegraph.org//files/glow_139.jpg


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


Re: [osg-users] [osgOcean] Shader again.

2011-02-22 Thread Kim Bale
Hi Bawenang,

To my knowledge all the shaders work correctly.

Can you be more specific?

Regards,

Kim.


On 22 February 2011 13:04, Bawenang Rukmoko ben...@cs.its.ac.id wrote:

 Hi,

 I seem to stumbled a lot on osgOcean's shaders. I've got lots of graphics
 artefacts because of them. Can you point me to the ones that are actually
 working on them? I may need to disturb them a bit with my questions. Thanks.
 Oh yea BTW I've successfully made my own bloom shader. Here's the
 screenshot. :D




 Thank you!

 Cheers,
 Bawenang

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




 Attachments:
 http://forum.openscenegraph.org//files/glow2_129.jpg
 http://forum.openscenegraph.org//files/glow_139.jpg


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

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


Re: [osg-users] [osgOcean] Shader again.

2011-02-22 Thread Mahendra G.R
Hi Bawenang,

Did you manage to load a model by anychance, and get the material properites
(for example color) without changing the shaders?, it would really help me.


Thanks,
Regards

On Tue, Feb 22, 2011 at 2:07 PM, Kim Bale kcb...@googlemail.com wrote:

 Hi Bawenang,

 To my knowledge all the shaders work correctly.

 Can you be more specific?

 Regards,

 Kim.


 On 22 February 2011 13:04, Bawenang Rukmoko ben...@cs.its.ac.id wrote:

 Hi,

 I seem to stumbled a lot on osgOcean's shaders. I've got lots of graphics
 artefacts because of them. Can you point me to the ones that are actually
 working on them? I may need to disturb them a bit with my questions. Thanks.
 Oh yea BTW I've successfully made my own bloom shader. Here's the
 screenshot. :D




 Thank you!

 Cheers,
 Bawenang

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




 Attachments:
 http://forum.openscenegraph.org//files/glow2_129.jpg
 http://forum.openscenegraph.org//files/glow_139.jpg


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



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




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