[osg-users] CGFX

2010-02-01 Thread Rabbi Robinson
Hi,

What is the status on CGFX? Last post on this topic was back in 2008.

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] locking nodes

2010-02-01 Thread Rabbi Robinson
Hi,

Thanks, that helps alot. That kinda explain why in OpenSG you have lock each 
single update operation. I thought OSG handles that internally, but looks like 
its going to be more complicated than that.

I guess I will try to avoid multithread in this case and just have one single 
thread responsible for all the updating, at the cost of possibly lower 
performance.

Thank you!

Cheers,
Rabbi

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





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


[osg-users] locking nodes

2010-01-31 Thread Rabbi Robinson
Hi,

I have a multithread application which might update an node (add/remove 
children etc) at the same time. Is there any locking mechanism for ensuring 
only one thread is in a critical session at any time. 

I look at the source code of Group which just use std::vector for children 
list. As far as I know, std::vector is not safe for multiple write.

I also noticed there is a mutex for reference count, which does not protected 
the object itself. 

Thank you!

Cheers,
Rabbi

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





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


[osg-users] how to set camera perspective lookat

2010-01-13 Thread Rabbi Robinson
Hi,

I need to position my camera at certain location and look at another. Can 
someone tell me how to do that?

I have the following code the it does not do what it's supposed to do

camera->setProjectionMatrixAsPerspective(45.0, 1.0, 0.5, 1000);
camera->setProjectionMatrix(osg::Matrix::lookAt(Vec3(0, 0, 200), Vec3(0, 0, 0), 
Vec3(0, 1, 0)));

Thank you!

Cheers,
Rabbi

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





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


[osg-users] data sync between callbacks

2009-08-17 Thread Rabbi Robinson
Hi,

I have two callbacks that share some data. One saves the current transformation 
matrix into the member if it, other one gets it. It looks that the second 
callback always get the same even the transformation matris is different.

I guess it's probably has some thing to do with multi threading.

Can some one show me how to ensure the data is shared properly?

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] viewer.frame() rendering not complete

2009-08-14 Thread Rabbi Robinson
Hi,

I attach the image to the camera and use PRE_RENDER for the camera. I just use 
the osgDB to write the image to file. 

I also notice that the chance of getting an image for calling viewer.frame() 
once is zero. What I do now is calling frame() for 10 times before saving the 
image. Still, the image can be incomplete.

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] Image release question

2009-08-14 Thread Rabbi Robinson
Hi,

I compile the code in debug mode. Well, the image is good either on the screen 
or saved as file, which likely rules out the dimension problems. Its the delete 
that is causing the problem
Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] Image release question

2009-08-14 Thread Rabbi Robinson
Hi,

Well, I see the code and the reason why I am posting here is because even I 
match the allocation type properly, it still crashes. In VC, it complains that 
there is something wrong the heap.

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] viewer.frame() rendering not complete

2009-08-14 Thread Rabbi Robinson
Hi,

I add a camera to the scene that renders the texture I want and set the camera 
to use pixel buffer. I am trying to do some preprocessing for the texture map 
beforehand. The viewer is used only to render one frame or two before it 
deconstructs. 

The result is random, sometimes the rendered image is complete and sometimes 
not. 

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] Rotation and scaling problem

2009-08-14 Thread Rabbi Robinson
Hi,

Node* ResetNodeMatrices( Node *node)
{
osg::Group* root = new osg::Group;
osg::Matrix matrix;

osg::MatrixTransform* transform = new osg::MatrixTransform;
matrix.makeIdentity();

transform->setMatrix(matrix);
root->addChild(transform);
transform->addChild(node);
return root->getChild(0);
} 

It won't do. I meant you need to set the matrix from the "node" in the argument 
of your function. Think about it, if the "node" contain a transform you want to 
get ride of, what good is that you add an identity on top of it?

You need to find out what goes into the "node", for example, try

osg::MatrixTransform* transform = dynamic_cast(node);

then reset the matrix in transform to identity.

Thank you!

Cheers,
Rabbi

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





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


[osg-users] Image release question

2009-08-13 Thread Rabbi Robinson
Hi,

I am trying to create an image out of a memory block:

unsigned char * data= new unsigned char[1024];
image->setImage (int s, int t, int r, GLint internalTextureformat, GLenum 
pixelFormat, GLenum type, unsigned char *data, AllocationMode mode, int 
packing=1)

For Allocation mode, there are 

NO_DELETE   
USE_NEW_DELETE  
USE_MALLOC_FREE 

So far only NO_DELETE works for me. The other two will crashes no matter what.

Dose that mean that if I use USE_NEW_DELETE or USE_MALLOC_FREE, I don't need to 
pre allocate the memory for it and just pass a NULL for the data?

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] LOD for stateset

2009-08-13 Thread Rabbi Robinson
Hi,

Is there quick way I can get the distance from the camera or I need to save or 
reference to the position of the camera each frame and use that to compute the 
distance?
Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] transparent object sorting and back face culling

2009-08-13 Thread Rabbi Robinson
Hi,

I see there is a osgUtil::RenderBin, is that what you are refering to? If not, 
is the class you mentioned going to be released soon?
Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] Rotation and scaling problem

2009-08-13 Thread Rabbi Robinson
Hi,

Just set the transformation matrix to idenity
Thank you!

Cheers,
Rabbi

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





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


[osg-users] LOD for stateset

2009-08-13 Thread Rabbi Robinson
Hi,

What is the best approach to change stateset based on the distance between the 
object and the camera?

Thank you!

Cheers,
Rabbi

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





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


[osg-users] RTT buffer VS FBO VS FB

2009-08-13 Thread Rabbi Robinson
Hi,

For render-to-texture, there are several implementation. At least I know RTT 
buffer, Frame buffer and Frame buffer object. Can someone explain the 
difference to me and which one is more portable across different hardware?

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] transparent object sorting and back face culling

2009-08-13 Thread Rabbi Robinson
Hi,

Is there anyway that I can enforce drawing the objects inside first before 
drawing the outside membrane?
Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] transparent object sorting and back face culling

2009-08-13 Thread Rabbi Robinson
Hi,

The transparent blending works fine now. How ever the sorting does seem 
currect. Sometime the transparent object disappears or not drawn at all. , It 
view dependent Is there anyway it can be fixed? 


stateSet->setMode(GL_BLEND, StateAttribute::ON);
stateSet->setRenderingHint(StateSet::TRANSPARENT_BIN);

Thank you!

Cheers,
Rabbi

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



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


[osg-users] RTT getting image crashes

2009-08-12 Thread Rabbi Robinson
Hi,

I am trying to create a simple scene and render it to an image. The problem is 
the image that is attached to the camera is always null. Can some one tell me 
what is going on?

Thank you!

Cheers,
Rabbi

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



/* OpenSceneGraph example, osgprerendercubemap.
*
*  Permission is hereby granted, free of charge, to any person obtaining a copy
*  of this software and associated documentation files (the "Software"), to deal
*  in the Software without restriction, including without limitation the rights
*  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
*  copies of the Software, and to permit persons to whom the Software is
*  furnished to do so, subject to the following conditions:
*
*  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
*  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
*  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
*  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
*  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
*  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
*  THE SOFTWARE.
*/

#include 

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

using namespace osg;
using namespace std;

Group* createSimpleScene();
Image* image;

class SnapCallback : public NodeCallback{
	virtual void operator()(osg::Node* node, osg::NodeVisitor* nv){
		cout << image->s() << endl; //crashes because image is null
		traverse(node,nv);	
	}
};

int main(int argc, char** argv){
// construct the viewer.
osgViewer::Viewer viewer;
Group* root = new Group;
	
	//image
	const unsigned short size = 256;
	Image* image = new Image;
	unsigned char* buffer = new unsigned char[size * size * 4];
	image->setImage(size, size, 1, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, buffer, Image::NO_DELETE);

	//setup camera
	Camera* camera = new Camera();
	camera->setViewport(0, 0, size, size);
	camera->setRenderOrder(osg::Camera::PRE_RENDER);
	camera->setRenderTargetImplementation(Camera::FRAME_BUFFER_OBJECT);
	camera->addChild(createSimpleScene());
	camera->attach(osg::Camera::COLOR_BUFFER, image);
	
	root->addChild(camera);
	root->setUpdateCallback(new SnapCallback);
	viewer.setSceneData(root);
	//viewer.setCamera(camera);
return viewer.run();
}

class rotateCallback : public NodeCallback{
	virtual void operator()(osg::Node* node, osg::NodeVisitor* nv){
		static float angle = 0;
		PositionAttitudeTransform* pat =  (PositionAttitudeTransform*)node;
		pat->setAttitude(Quat(angle++/90, Vec3(0, 0, 1)));
traverse(node,nv);
	}
};

Group* createSimpleScene(){
	Group* group = new Group;
	Geode* box = new Geode;
	PositionAttitudeTransform* pat = new PositionAttitudeTransform;
	pat->addChild(box);
	box->addDrawable(new ShapeDrawable(new Box(Vec3(0.0f, 0.0f, 0.0f), 1, 1, 1)));
	group->addChild(pat);
	pat->setUpdateCallback(new rotateCallback);
	return group;
}
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] runtime error

2009-08-11 Thread Rabbi Robinson
Hi,

I am getting a lot of "Warning: detected OpenGL error 'invalid value' after 
RenderBin::draw(,)" at run time.
Can someone tell me how to narrow it down?

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] viewer.frame() rendering not complete

2009-08-11 Thread Rabbi Robinson
Hi,

I save it in a file. The problem is with frame(). If I call viewer.run() and 
hit Esc to quit the viewer the image is complete.

Thank you!

Cheers,
Rabbi

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





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


[osg-users] viewer invisible?

2009-08-11 Thread Rabbi Robinson
Hi,

How can I set a viewer invisible for RTT? 

Thank you!

Cheers,
Rabbi

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





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


[osg-users] viewer.frame() rendering not complete

2009-08-11 Thread Rabbi Robinson
Hi,

I have a code that creates a temporary viewer and uses it to render one frame 
and copy from the color buffer to an image. When I call viewer.frame() the 
rendered image is only half done. Is there anyone to tell the viewer to 
complete a frame, save it and close itself?

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] offscreen rendering

2009-08-10 Thread Rabbi Robinson
Hi,

Here is what I got so far.

osgViewer::Viewer viewer;
//graphics context
osg::ref_ptr traits = new 
osg::GraphicsContext::Traits;
traits->x = 0;
traits->y = 0;
traits->width = image->s();
traits->height = image->t();
traits->red = 8;
traits->green = 8;
traits->blue = 8;
traits->alpha = 8;
traits->depth = 24;
traits->windowDecoration = false;
traits->pbuffer = true;
traits->doubleBuffer = true;
traits->sharedContext = 0;

osg::ref_ptr pbuffer = 
osg::GraphicsContext::createGraphicsContext(traits.get());
if (pbuffer.valid())
{
osg::ref_ptr camera = viewer.getCamera();
camera->setGraphicsContext(pbuffer.get());
camera->setViewport(new 
osg::Viewport(0,0,image->s(),image->t()));
camera->setClearColor(osg::Vec4(0.0f,0.0f,0.0f,0.0f));
camera->setDrawBuffer(GL_BACK);
camera->setReadBuffer(GL_BACK);
viewer.realize();
}
else
{
std::cout << "Error cofiguring pbuffer\n";
exit(0);
}

//draw
viewer.setSceneData(geode);
viewer.frame();

It crashes at viewer.frame(), complaining some resource already in use.



Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] offscreen rendering

2009-08-10 Thread Rabbi Robinson
Hi,
What is the example called? I see there are some examples for prerendering. 
That's not what I need. In my case, I only need to do off screen rendering once 
at the beginning of the application for all.

Thank you!

Cheers,
Rabbi

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





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


[osg-users] offscreen rendering

2009-08-10 Thread Rabbi Robinson
Hi,
Can someone show me how to do offscreen rendering? 
What I have so far is a shader that render the texture on the screen after 
processing. I would like to render it offscreen and save it as a texture map.
Any reference will also be appreciated

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] maya plugin, anyone interested?

2009-07-21 Thread Rabbi Robinson
Hi,

Hi, I have prepared a tar ball for this exporter. Its located at 
http://vrac.iastate.edu/~freeman/Rocky_maya.tar

There is some detailed documentations. But basically you will need to use CMake 
to build it. 

All testers are welcome and please post your comments here on OSG forum.

Thank you!

Cheers,
Rabbi

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





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


[osg-users] how to set uniform is shaders by vertex

2009-07-01 Thread Rabbi Robinson
Hi,

Is there any way I can set the uniforms by vertex? I know uniforms are in 
stateset. There are some attribute for vertex I need to set in shaders for each 
vertex. How can I do it?

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] softshadowmap and glsl shader

2009-06-30 Thread Rabbi Robinson
Hi,

Thanks, I see there is only fragment shader, is vertex shader somewhere else?

Thank you!

Cheers,
Rabbi

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





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


[osg-users] softshadowmap and glsl shader

2009-06-30 Thread Rabbi Robinson
Hi,

I am writing my own shader (glsl) for rendering. Can anyone show me how to draw 
shadow in the scene? What is in the texture unit used by softshadow map. Is 
that depth, grey scale color ?

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] quaternion to euler

2009-06-30 Thread Rabbi Robinson
Hi,

Yes, I am using that. I will give it a try. Strangely there is "euler" in the 
animation but not more useful "quaternion". Can you show me how to add it?

Thank you!

Cheers,
Rabbi

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





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


[osg-users] quaternion to euler

2009-06-29 Thread Rabbi Robinson
Hi,

The animation supports euler but not quaternion. Is there any easy way to 
convert quaternion to euler?

Thank you!

Cheers,
Rabbi

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





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


[osg-users] get current accumulated transform

2009-06-29 Thread Rabbi Robinson
Hi,

How do I get current accumulated transform in a nodeupdatecallback? 
Specifically 
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)

What does NodeVisitior->apply(something) mean?

Thank you!

Cheers,
Rabbi

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





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


[osg-users] 64 bit 3rd party Dependencies

2009-06-27 Thread Rabbi Robinson
Hi,

Is there a 64bit 3rd party dependencies somewhere I can download?

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] maya plugin, anyone interested?

2009-06-27 Thread Rabbi Robinson
Hi,

Ok, I will give it a try and see how it works. Can .osg contain callbacks? They 
are needed in animation.

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] maya plugin, anyone interested?

2009-06-26 Thread Rabbi Robinson
Hi,

I should probably have used .ive file. I didn't consider such possibility ver 
carefully when I started. There is an other fellow doing exactly that for 
OpenSG, except for OpenSG use XML file format which I think is really 
cumbersome.  

One reason for the intermediate binary format is that it embeds texture files 
as opposed to a reference to the files. For our team, we have all the artists 
doing their modeling job on separate computers and it's just easier for us to 
pack the whole scene into just one file and send to the programmers. And it 
seems maya support sound for animation, so the sound would be saved in the 
intermediate file format too. 

I don't know how introspection works in OSG. If I create a new class in Maya's 
exporter and pack it into .ive file. Can it be read correctly in OSG?

Thank you!

Cheers,
Rabbi

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





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


[osg-users] maya plugin, anyone interested?

2009-06-26 Thread Rabbi Robinson
Hi,

We are currently developing a plugin for Maya. So far it supports basic 
geometry, texture, bump map, lod, instancing and animation, including keyframe 
animation and character/skeleton animation. Particle system will be added soon. 

This implementation is publicly funded so it doesn't have problem of being 
opensource. Current implementation consists of two parts. Part one is a Maya 
plugin which export Maya data into a intermediate binary format (images files 
for texture are embedded in the intermediate format). Part two is a reader to 
be written as an OSG plugin for the intermediate binary format in OSG. 

I know everyone is using COLLADA so I just wonder if anyone would be 
interested. 

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] osgShadow example

2009-06-26 Thread Rabbi Robinson
Hi,

Thanks, never tried with those arguments. My video cards are mostly nvidia 
Quadro something. We are developing this game so it can run on most reasonably 
recent graphics cards.

Thank you!

Cheers,
Rabbi

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





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


[osg-users] movie with sound

2009-06-26 Thread Rabbi Robinson
Hi,

We are developing a game with movies (mpeg) and would like to play them as cut 
scenes. I see there is a osgmovie example there and we would like to play sound 
in the movie using a sound library call FMOD. 

The example uses quicktime plugin and the plugin in calls quicktime routine. My 
question is can it handle all the video codec the quicktime on the system can 
handle. If I would like to get the sound and sync with the video play back. Is 
there any interface in the plugin I can use or I need to call quicktime routine 
to get to that part?

Thank you!

Cheers,
Rabbi

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





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


[osg-users] osgShadow example

2009-06-26 Thread Rabbi Robinson
Hi,

I tried osgShadow example and it just turned out to be black, unlit geometries. 
Much less the shadow. I have run the exmaple on Mac, Windows and Linux and all 
the same. Anyone else has the same problems?

Thank you!

Cheers,
Rabbi

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





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


[osg-users] light setup

2009-06-25 Thread Rabbi Robinson
Hi,

I have some basic questions about the light setup in osg. I looked at the 
example osglight. It seems there is a osg::Light class and there is a 
osg::LightSource. One is state attribute and another is a group. Can someone 
explain practically how a light and lightsouce work together. For example, if I 
have a geode that has normal and material set up. How do I enable OpenGL 
lighting on it using osg::Light and osg::LightSource?

Thank you!

Cheers,
Rabbi

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





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


[osg-users] setDataVariance(osg::Object::DYNAMIC);

2009-06-16 Thread Rabbi Robinson
Hi,

Hi, I wonder when I should use setDataVariance(osg::Object::DYNAMIC);

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] animation doc/tutorial

2009-06-07 Thread Rabbi Robinson
Hi,

Thanks, I guess I will need to learn it the hard way. I would prefer that 
whoever implemented the animation would spell out most of the details of it, 
like a tutorials for the basic osg features. It's just sometimes frustrating to 
copy and paste the sample code without fully understand it and even making 
wrong assumptions and if something goes unexpected, that will be pretty much 
clueless.

Thank you!

Cheers,
Rabbi

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





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


[osg-users] animation doc/tutorial

2009-06-06 Thread Rabbi Robinson
Hi,
I recently started looking at the animation part of osg. I have read some 
examples and wonder if there is tutorial or formal documentation for it. For 
example, I would like to replace the linear interpolation in the example 
osganimationsolid with cubic bezier interpolation. It doesn't really seem there 
is a good way to find out. The online documentation is minimal and with all 
those templates and definition, it's really hard to find a good place to start 
with. Can some one help me out?

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] maxium children count

2009-06-06 Thread Rabbi Robinson
Hi,

Oh, the problem was somewhere else. Thanks for the debugging tip tho.

Thank you!

Cheers,
Rabbi

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





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


[osg-users] maxium children count

2009-06-06 Thread Rabbi Robinson
Hi,

I am doing a PDB (protein data base) file importer. The number of atoms in a 
typical database is about 4000 to 6000, I organize them in to groups with 
positionattitudetransform. I noticed if the number of atoms exceeds certain 
number, the program crashes in run time. So, is there a max number of children 
allowed?

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] transparent object sorting and back face culling

2009-06-03 Thread Rabbi Robinson
Hi,

The alpha value is about .5, It works fine except for the renderinghint 
statement. 

ss->setRenderingHint(StateSet::TRANSPARENT_BIN);   

If I comment it out, I can see the transparent object but they are not sorted 
properly. So there must be some problem with the depth sorting.
 
Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] transparent object sorting and back face culling

2009-06-03 Thread Rabbi Robinson
Hi,

Thanks for the help, when I tried  

ss->setMode(GL_BLEND, StateAttribute::ON);
ss->setRenderingHint(StateSet::TRANSPARENT_BIN);

nothing shows up. The cull face works tho

Thank you!

Cheers,
Rabbi

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





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


[osg-users] transparent object sorting and back face culling

2009-06-02 Thread Rabbi Robinson
Hi,
There are simple questions: 

What do I need to do to make sure transparent object show up properly?

How do I cull the back face of polygon?

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] manual delete object

2009-06-02 Thread Rabbi Robinson
Hi,

Thanks, your hint already gave it all out. I was wondering if user need to keep 
track of the reference to Node assigned to Group. As you said, group use smart 
pointer internally so group->addChild(new Node) will delete the node created 
once group is gone.

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] Character animation

2009-06-02 Thread Rabbi Robinson
Hi,

We are doing animation export from maya 2008. So a guy in our group get the 
basic keyframe animation working. We still need to get the whole skeleton and 
skin animation going as soon as possible. I post what we find out here. 

It looks like there is already skeleton/skin animation in osg, albeit beta 
version. It's a good idea to test it and see what exactly it dose and then 
tried to export the information it needs from maya.

OSG support openflight, which can be used to import animation. However, the 
default openflight exporter in maya dosen't support animation. There is a 
commercial one that looks promising. Google it and give it a try.

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] manual delete object

2009-06-01 Thread Rabbi Robinson
Hi,
Thanks, if later I reference the node from a group, will the reference count be 
increased for the node?

{
osg::ref_ptr node = new Node;
osg::ref_ptr group = new Group;
group->addChild(node);
}

The reference count of node should be one outside the scope. Is it right that 
somehow group->addChild(node) increases the reference count of node?


Thank you!

Cheers,
Rabbi

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





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


[osg-users] manual delete object

2009-06-01 Thread Rabbi Robinson
Hi,

When I tried

Node* node = new Node;
delete node;

there is a compiler error saying destructor protected. How can I delete node 
that I am sure I no longer use.

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] osg::ref_ptr<> used anymore

2009-06-01 Thread Rabbi Robinson
Hi,

Ok, I started this thread, so I claim to have the right for the last words.

I have used boost before, it looks like a pretty well maintained library. I 
used it because I was working on my coworker's code and in our case, he only 
used the file separator ("\" vs "/") from boost. For that it probably took more 
that 45 minutes to build boost in VC++, which include all other things such as 
matrix manipulation, threads, signal, BLAS that we did not use.

I guess some people feel it heavy in a sense that you can't download and build 
just the components you need(if there is a way to do it, I don't know and 
apologize for my ignorance). Instead, everything comes in an all-inclusive 
package. For small or dedicated project where resource and performance count, 
it dose not look appealing.

Boost can be trusted as well tested library. Sometimes being "big" and 
"all-inclusive" is not necessarily a good thing. For example, there is BLAS in 
boost, but there are other free libraries around that dose the same thing (GSL, 
ITK or even IPP in linux). As a result users have a choice of the BLAS from 
boost, which is a component from an all-inclusive library, or they can select 
GSL, ITK or IPP, which specializes just in scientific computation and dose not 
offer more than that. Performance wise, I think boost still need to prove 
itself that it can compete with those dedicated libraries.

At this point, it's totally personal preference and project needs. For me, I 
tend to use the libraries that dose only one thing well and leave small memory 
footprints. I like it that way because I have the freedom to use that libraries 
for other purposes, so it's more flexible that way.

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] osg::ref_ptr<> used anymore

2009-05-29 Thread Rabbi Robinson
Hi,

Thanks for the replies. They really clarified a lot. Looks like for small 
pointer, it's all or none deal, e.g. it's best to use them every time a 
reference to the pointed object is needed. 

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] osg::ref_ptr<> used anymore

2009-05-28 Thread Rabbi Robinson
Hi,
Sorry, 404

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] osg::ref_ptr<> used anymore

2009-05-28 Thread Rabbi Robinson
Hi,

Thanks, that explains it. Correct me if I am wrong. So to use it, just create 
osg::ref_ptr<> and use it as regular pointer and the memory will be managed by 
osg::ref_ptr<>.

In a simple case, I careate Node* node = osg::ref_ptr and, call void* 
ptr = node. I suppose the reference count in node will be incremented 
If later I call, ptr = NULL, it doesn't seem that there is anyway to tell node 
to decrement the reference count in node. Can someone clarify how 
osg::ref_ptr<> behave in this case?

Thank you!

Cheers,
Rabbi

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





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


[osg-users] osg::ref_ptr<> used anymore

2009-05-28 Thread Rabbi Robinson
Hi,

I wonder osg::ref_ptr<> is used anymore for automatic memory management. I 
remember sometime ago I got an error from mishandling multiple inheritance, the 
error printed on the screen was that the reference count of a node is some 
non-sense number when the destructor of the node executes (some shared parent 
higher up got deallocated twice). 
Since I did not use osg::ref_ptr<> in that code and it looks like reference 
count is kept somewhere in the node. My question is that if automatic memory 
management is used even without osg::ref_ptr<>.

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] Attack the PrimitiveSet

2009-05-27 Thread Rabbi Robinson
Hi,

What exactly do you mean "attacking", are you trying to remove primitive from 
primitive sets. Indices are deprecated and they are not encouraged to be used 
anymore. The "dirty" way is the "classical" way.

Thank you!

Cheers,
Rabbi

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





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


[osg-users] texture and material of geode

2009-05-23 Thread Rabbi Robinson
Hi,

I run into problem when I assigned both material and texture to a geode. If I 
have just either material(ambient, diffuse, etc) or texture, it worked fine. 
However, if I have both of them, the geo looks black. Is there thing I need to 
do to blend the texture and the material?

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] multiple inheritance destructor

2009-05-18 Thread Rabbi Robinson
Hi,
Thanks Robert.
What I wanted to do is create a node that can automatically update itself. I am 
integrating its with ode so the position and orientation information is from 
ode. 
As for multiple inheritance, I thought that was one of the strength of c++ for 
code reusability. The problem can be avoided easily by putting the node inside 
the callback or the other, but not as compact in my opinion. I use osg itself 
uses multiple inheritance all the time. I probably need to overwrite the 
virtual destructor to avoid double deallocation on the same members that belong 
to Object.

Thank you!

Cheers,
Rabbi

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





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


[osg-users] multiple inheritance destructor

2009-05-17 Thread Rabbi Robinson
Hi,

I am creating a new class that inherits from "Group" and "NodeCallback", it 
works find except  for the deconstruct which always cause a segmentation fault. 
Can someone show me proper ways to destruct a class like this?

Thank you!

Cheers,
Rabbi

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





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


[osg-users] NodeTrackerManipulator how to

2009-05-16 Thread Rabbi Robinson
Hi,

I am using NodeTrackerManipulator in my application to follow a node. I would 
like NodeTrackerManipulator to be fixed in the followed node coordinate. e.g. 
the camera always follow a character, but always some distance behind it and 
looking forward in the character's coordinate. Can someone show me how it can 
be done? Thanks
Thank you!

Cheers,
OSG

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





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