Re: [osg-users] How can I change the colour of the model?
Hi Duan, On Tue, Nov 30, 2010 at 3:55 PM, Duan Linghao linghaod...@gmail.com wrote: I'm not so familiar with that,I want to have a single colour for the whole model.Someone told me to use setState,but I have no idea how to use that.Can you say it more specificly,I'm a beginner on OSG.Thanks a lot! Are you a beginner at OpenGL as well? Are you familiar with glMaterial? The osg::Material StateAttribute is a wrapper around this, and provide the ability to set the colour of objects. You can attach a Material to a StateSet and attach the StateSet at the top node of your subgraph. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How can I change the colour of the model?
Hi Duan, On Tue, Nov 30, 2010 at 3:11 AM, Duan Linghao linghaod...@gmail.com wrote: I read a model (ive),which is created by 3dMax.How can I change the colour of the model when it is displayed on the screen? It depends upon what you want to achieve and how your model is put together. I know nothing about your model, and what precisely you be my colour of your model as there are multiple ways one could interpret colour changes. I also don't know how much you know about OpenGL/OSG so don't know where to start. Are you familiar with how OpenGL manages colour? Are your familiar with controlling colour via osg::Geometry? Are you familiar with osg::Material + OpenGL's glMaterial and color material? Do you want to have a single colour for the whole model? Do you want the model light, or do your want to disable lighting? Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How can I change the colour of the model?
robertosfield wrote: Hi Duan, On Tue, Nov 30, 2010 at 3:11 AM, Duan Linghao wrote: I read a model (ive),which is created by 3dMax.How can I change the colour of the model when it is displayed on the screen? It depends upon what you want to achieve and how your model is put together. I know nothing about your model, and what precisely you be my colour of your model as there are multiple ways one could interpret colour changes. I also don't know how much you know about OpenGL/OSG so don't know where to start. Are you familiar with how OpenGL manages colour? Are your familiar with controlling colour via osg::Geometry? Are you familiar with osg::Material + OpenGL's glMaterial and color material? Do you want to have a single colour for the whole model? Do you want the model light, or do your want to disable lighting? Robert. ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum I'm not so familiar with that,I want to have a single colour for the whole model.Someone told me to use setState,but I have no idea how to use that.Can you say it more specificly,I'm a beginner on OSG.Thanks a lot! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=34266#34266 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How can I change the colour of the model?
robertosfield wrote: Hi Duan, On Tue, Nov 30, 2010 at 3:11 AM, Duan Linghao wrote: I read a model (ive),which is created by 3dMax.How can I change the colour of the model when it is displayed on the screen? It depends upon what you want to achieve and how your model is put together. I know nothing about your model, and what precisely you be my colour of your model as there are multiple ways one could interpret colour changes. I also don't know how much you know about OpenGL/OSG so don't know where to start. Are you familiar with how OpenGL manages colour? Are your familiar with controlling colour via osg::Geometry? Are you familiar with osg::Material + OpenGL's glMaterial and color material? Do you want to have a single colour for the whole model? Do you want the model light, or do your want to disable lighting? Robert. ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=34267#34267 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How can I change the colour of the model?
Greetings! For what it's worth, I used code from the example osgtexture1D to paint an object I raped it into it's own node (parent of the Group Node) and now anything that is a child of that node gets painted. Hope that helps! D Glenn D Glenn (a.k.a David Glenn) - Join the Navy and See the World ... from your Desk! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=34279#34279 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How can I change the colour of the model?
Hi, I read a model (ive),which is created by 3dMax.How can I change the colour of the model when it is displayed on the screen? Thank you! Cheers, Duan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=34229#34229 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org