amit ben-david | 1 Jan 2010 13:12
Picon

PositionAndAttitudeTrabsform

Hi,

beginner question : 

i just used the PositionAndAttitudeTransform with 
setScale(0.1, 0.1, 0.1)
to scale down an object in my scene graph.

the object indeed scaled down but the light behaviour changed totaly from blue to white, like in specular
highlights. 
for a different object it just colored everything differently.

to my understanding scaling an object should not change normals or colors, and therefore the coloring
should stay the same and not change that drastically.

what am i missing ? 

Thank you!

Cheers,
amit

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

Gordon Tomlinson | 1 Jan 2010 15:35
Favicon

Re: PositionAndAttitudeTrabsform

Your right it does not scale the normals. So the normal are no longer
correct for the model once you scale it

See http://www.vis-sim.com/osg/osg_faq_1.htm#f19

____________________________________________________________________________
__
Gordon Tomlinson 

gordon@... IM:
gordon3dBrit@... 
www.vis-sim.com        
www.gordontomlinson.com
www.PhotographyByGordon.com
____________________________________________________________________________
__

-----Original Message-----
From: osg-users-bounces@...
[mailto:osg-users-bounces@...] On Behalf Of amit
ben-david
Sent: Friday, January 01, 2010 12:13 PM
To: osg-users@...
Subject: [osg-users] PositionAndAttitudeTrabsform

Hi,

beginner question : 

i just used the PositionAndAttitudeTransform with 
(Continue reading)

Simon Hammett | 1 Jan 2010 15:54

Re: PositionAndAttitudeTrabsform

2010/1/1 Gordon Tomlinson <gordon-bkwKKJBfO3PxMieFBcWOEVaTQe2KTcn/@public.gmane.org>
Your right it does not scale the normals. So the normal are no longer
correct for the model once you scale it

See http://www.vis-sim.com/osg/osg_faq_1.htm#f19

That should really mention that rescale only works with uniform scaling.
 
--
http://www.ssTk.co.uk
<div>
<div class="gmail_quote">2010/1/1 Gordon Tomlinson <span dir="ltr">&lt;<a href="mailto:gordon@...">gordon@...</a>&gt;</span><br><blockquote class="gmail_quote">
Your right it does not scale the normals. So the normal are no longer<br>
correct for the model once you scale it<br><br>
See <a href="http://www.vis-sim.com/osg/osg_faq_1.htm#f19" target="_blank">http://www.vis-sim.com/osg/osg_faq_1.htm#f19</a><br>
</blockquote>
<div>
<br>That should really mention that rescale only works with uniform scaling.<br>
&nbsp;</div>
</div>-- <br><a href="http://www.ssTk.co.uk">http://www.ssTk.co.uk</a><br>
</div>
Simon Hammett | 1 Jan 2010 15:58

Re: Updating tesselator



2009/12/31 Martin Beckett <mgb-VvLNCCEKHnzby3iVrkZq2A@public.gmane.org>
I am trying to draw a rubber band wioth the mouse around a selection
I get the mouse position, convert into world coords (assumign a plan view) then add the new point to the geometry.
I then call osg::Util Tessellator to build the selection into a polygon.

This works, but only for the first 4 points! After that I can continue to draw a line but not a filled polygon?


You probably need to clear the display list, try

 _geometry->dirtyDisplayList();

If that works and you are updating it every frame, you may as well turn display lists off.

 _geometry->setUseDisplayList(false);

--
http://www.ssTk.co.uk
<div>
<br><br><div class="gmail_quote">2009/12/31 Martin Beckett <span dir="ltr">&lt;<a href="mailto:mgb@...">mgb@...</a>&gt;</span><br><blockquote class="gmail_quote">
I am trying to draw a rubber band wioth the mouse around a selection<br>
I get the mouse position, convert into world coords (assumign a plan view) then add the new point to the geometry.<br>
I then call osg::Util Tessellator to build the selection into a polygon.<br><br>
This works, but only for the first 4 points! After that I can continue to draw a line but not a filled polygon?<br><br>
</blockquote>
<div>
<br>You probably need to clear the display list, try<br><br>&nbsp;_geometry-&gt;dirtyDisplayList();<br><br>If that works and you are updating it every frame, you may as well turn display lists off.<br>
</div>
</div>
<br>&nbsp;_geometry-&gt;setUseDisplayList(false);<br><br>-- <br><a href="http://www.ssTk.co.uk">http://www.ssTk.co.uk</a><br>
</div>
Paul Martz | 1 Jan 2010 16:48

Re: PositionAndAttitudeTrabsform

PositionAttitudeTransform, like any OSG Transform, sets the OpenGL 
ModelView matrix, and that matrix is used to transform the normals (see 
the OpenGL spec, or any OpenGL book). So, scaling an object does indeed 
scale the normals.

GL_RESCALE_NORMAL works only for uniform scaling, as noted in Simon's 
post. For non-uniform scaling, use GL_NORMALIZE.

If you're using shaders (and I don't think you are, but if you do in the 
future), a third option would be to transform your normals directly in 
the shader code, giving you total control over how they are transformed.

Paul Martz
Skew Matrix Software LLC
_http://www.skew-matrix.com_ <http://www.skew-matrix.com/>
+1 303 859 9466

Martin Beckett | 1 Jan 2010 19:02
Gravatar

Re: Updating tesselator

Yes, I am clearing the display lists (sorry I cut it out with a bunch of other irrelevent code)

It's odd that it draws a filled polygon upto 4 points but then no further - it doesn't matter if the extra
points would make it convex or simple, or if I go cw or ccw.

I know the tesselator works for more complex shapes since I use it elsewhere in the app.

Martin

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

Mark Evin | 1 Jan 2010 22:13
Picon

[osgPlugins] blender osgExport with IPO Curve

Hi, 

First of all, great job to Cedric (and colleagues) for creating the osgExport from Blender.  It has helped
immensely.  

The armature animations export perfectly, but I still have not been able to export an animation with an IPO
curve (as animation path).  The IPO curve seems to work fine in Blender, but when I export, in the log file I
get "WARNING Curve Curve not exported". 

Cedric, I see in your July 02 changelog, you write "To bake ipo correctly the object must be check in the
active scene, else the bake of ipo will fail".  I guess this is the answer to my issue, but I can't seem to
implement it correctly.  Can someone please elaborate on how this should be done?

I have attached a very simple blender example file of an object that animates via armature and IPO curve.  
When I export this file, the IPO curve is lost. 

Thank you very much!
Markooz

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

Attachments: 
http://forum.openscenegraph.org//files/test_path_121.zip

Cedric Pinson | 1 Jan 2010 22:43
Gravatar

Re: [osgPlugins] blender osgExport with IPO Curve

Hi Markooz,

I will check the issue tomorrow with your blender file, then i will fix
the blender exporter if needed. I will give your more information
tomorrow.

Happy new year

Cheers,
Cedric

-- 
Provide OpenGL services around OpenSceneGraph and more
+33 659 598 614 Cedric Pinson mailto:cedric.pinson@...
http://www.plopbyte.net

On Fri, 2010-01-01 at 21:13 +0000, Mark Evin wrote:
> Hi, 
> 
> First of all, great job to Cedric (and colleagues) for creating the osgExport from Blender.  It has helped
immensely.  
> 
> The armature animations export perfectly, but I still have not been able to export an animation with an IPO
curve (as animation path).  The IPO curve seems to work fine in Blender, but when I export, in the log file I
get "WARNING Curve Curve not exported". 
> 
> Cedric, I see in your July 02 changelog, you write "To bake ipo correctly the object must be check in the
active scene, else the bake of ipo will fail".  I guess this is the answer to my issue, but I can't seem to
implement it correctly.  Can someone please elaborate on how this should be done?
> 
> I have attached a very simple blender example file of an object that animates via armature and IPO curve.  
When I export this file, the IPO curve is lost. 
> 
> Thank you very much!
> Markooz
> 
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=22027#22027
> 
> 
> 
> 
> Attachments: 
> http://forum.openscenegraph.org//files/test_path_121.zip
> 
> 
> _______________________________________________
> osg-users mailing list
> osg-users@...
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 
Hi Markooz,

I will check the issue tomorrow with your blender file, then i will fix
the blender exporter if needed. I will give your more information
tomorrow.

Happy new year

Cheers,
Cedric

-- 
Provide OpenGL services around OpenSceneGraph and more
+33 659 598 614 Cedric Pinson mailto:cedric.pinson@...
http://www.plopbyte.net

On Fri, 2010-01-01 at 21:13 +0000, Mark Evin wrote:
> Hi, 
> 
> First of all, great job to Cedric (and colleagues) for creating the osgExport from Blender.  It has helped
immensely.  
> 
> The armature animations export perfectly, but I still have not been able to export an animation with an IPO
curve (as animation path).  The IPO curve seems to work fine in Blender, but when I export, in the log file I
get "WARNING Curve Curve not exported". 
> 
> Cedric, I see in your July 02 changelog, you write "To bake ipo correctly the object must be check in the
active scene, else the bake of ipo will fail".  I guess this is the answer to my issue, but I can't seem to
implement it correctly.  Can someone please elaborate on how this should be done?
> 
> I have attached a very simple blender example file of an object that animates via armature and IPO curve.  
When I export this file, the IPO curve is lost. 
> 
> Thank you very much!
> Markooz
> 
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=22027#22027
> 
> 
> 
> 
> Attachments: 
> http://forum.openscenegraph.org//files/test_path_121.zip
> 
> 
> _______________________________________________
> osg-users mailing list
> osg-users@...
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 
amit ben-david | 2 Jan 2010 08:35
Picon

Re: PositionAndAttitudeTrabsform

Hi,

Right on the button, 

Thank you very much  
amit

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

Simon Armstrong | 2 Jan 2010 05:35
Picon

Re: New 3DS reader/writer is ready to test

Hi,

Am attempting to migrate from 2.8.2 to 2.9.6 and have some problems with new 3ds plugin due to the c++ issue.

Thank you!

Cheers,
Simon

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


Gmane