Re: [osg-users] Why to use Shaders to render model in Android with OpenGLES2

2012-11-17 Thread Chris Hanson
I have a small application build on desktop using OSG with OpenGL2 version.
I will get ready to render 3D models (with full texturing, lighting etc )
from 3DSMAX (Exported as .OSG from Max using OSGExporter).  As this
supports Fixed Function Pipeline the desktop application is able to render
these 3D models successfully.

  Yes.

Similarly does OpenGL 3 and OpenGL 4 versions supports Fixed Function
> Pipeline?
>

  They can. Around OpenGL 3, a number of FFP features were removed. Most
current drivers allow you to still request a legacy compatability GL3 or
GL4 context that still offers FFP functionality, or you can requesta pure
GL3/4 context that omits the FFP capabilities.


> Now I want to port the same on Android and iPhone. With your help and from
> some documents I came to know that GLES2.0 never supports Fixed Function
> Pipeline. So I can't port that code in Android.
>

  Remember, most GLES chipsets support GLES 1, which DOES offer FFP. Do you
NEED GLES 2?


> To make an application to work on both Desktop and Embedded devices,
> should I code my project by using only Shaders.
>

  If you need shader capability, then to support GLES devices, you must use
shaders, and you might as well use shaders exclusively, on both desktop and
GLES.


> In such case I should get 3D model in OBJ format and I should write
> shaders for Textures, Lightings etc. I think this is very painful work.
>

  This is what ShaderGen can help you with.


> Can I expect that GLES2  will support Fixed Functionality in near future
> like GLES1.
>

  No. It was intentionally removed. The intent, I believe, is that future
devices might ONLY support GLES2, and save die space by leaving out GLES 1
capacity. Or, certain resources might be re-used between ES1 and ES2, but
not duplicated.


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



-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio •
LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
@alphapixel  facebook.com/alphapixel
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Are shaders not saved during osgDB::writeNodeFile?

2012-11-17 Thread Stephan Huber
Hi,

Am 17.11.12 17:55, schrieb michael kapelko:
> Any idea what's wrong with my code, then?

you are adding the shader to the transform called box, but you are
writing the first child of the transform to a file.

cheers,
Stephan

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


Re: [osg-users] Are shaders not saved during osgDB::writeNodeFile?

2012-11-17 Thread michael kapelko
Any idea what's wrong with my code, then?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Are shaders not saved during osgDB::writeNodeFile?

2012-11-17 Thread Paul Martz

I did this:
  osgconv glsl_confetti.osgt out.osg
then looked at out.osg in an editor and it definitely contains shaders.
   -Paul


On 11/16/2012 9:36 PM, michael kapelko wrote:

Hi.
I've attached custom shader for a node in a ShadowedScene. I then called
osgDB::writeNodeFile upon it and found out that it doesn't save those shaders
into osg file.
Is it so by design or am I doing it wrong?

PS:
Source code: http://pastie.org/5390724
Source code archive: 
https://dl.dropbox.com/u/12634473/osg/shader_not_saved.tar.bz2


___
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


[osg-users] questions on simple skeletal animation for crowd simulation

2012-11-17 Thread Bruno Fanini
Hello osgUsers,

Within a osg-based crowd simulator I'm currently developing, I was trying
to investigate a simple skeletal animation for a given set of agents.
I'm digging the animtkviewer.cpp example (osganimationviewer) and it looks
like a good solution for this case.

In this context, I would just need a plain simple "walking" animation for
my characters.

I've a set of PositionAttitudeTransforms nodes to control position &
attitude of a single agent, so my questions are:
- is it possible to control the independent speed of the walking animation
for a single agent? (i.e. another agent is walking faster, etc..)
- what about instancing 3d models? is it still possible with this approach
somehow? (i.e. every p.a.t pointing to the same 3d model)
- what about the performance drop (estimate)?
- is there any example out there applied to crowd simulations or similar?

Thanks,


-- 
Bruno Fanini
http://BrunoFanini.co.nr
http://DevHelio.co.nr (Software Development)
http://www.facebook.com/DigitalDivadlo
(Digital
Art)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Why to use Shaders to render model in Android with OpenGLES2

2012-11-17 Thread Koduri Lakshmi
Hello Chris Hanson,

Thank you very much for the great help.

I have a small application build on desktop using OSG with OpenGL2 version. I 
will get ready to render 3D models (with full texturing, lighting etc ) from 
3DSMAX (Exported as .OSG from Max using OSGExporter).  As this supports Fixed 
Function Pipeline the desktop application is able to render these 3D models 
successfully. 
Similarly does OpenGL 3 and OpenGL 4 versions supports Fixed Function Pipeline?

Now I want to port the same on Android and iPhone. With your help and from some 
documents I came to know that GLES2.0 never supports Fixed Function Pipeline. 
So I can't port that code in Android.

To make an application to work on both Desktop and Embedded devices, should I 
code my project by using only Shaders. 

In such case I should get 3D model in OBJ format and I should write shaders for 
Textures, Lightings etc. I think this is very painful work. 

I have to see whether will  it be easy with ShadreGen. I need to go through 
ShaderGen.

Can I expect that GLES2  will support Fixed Functionality in near future like 
GLES1.

Once again thank you very much for the great help.
... 

Thank you!

Cheers,
Koduri

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




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