[osg-users] Retrieve the triangles indices array from a geometry.

2019-05-13 Thread Dario Minieri
Hello,

I need to retrieve the triangles indices from a geometry. 

I'm able to get all the verticies via getVertexArray() and then build an array 
that contains the getVertexArray() datas as list of scalars: [v1.x v1.y v1.z 
v2.x v2.y v2.z ... ]

I additionally need to build a bidimensional array that represent the 
interconnected coordinates like this:

static int gIndicesBunny[BUNNY_NUM_TRIANGLES][3] = {
{126, 134, 133},
{342, 138, 134},
{133, 134, 138},
{126, 342, 134},
{312, 316, 317},
  ...
  ...
}

where the triplet is the list of indices inside the array of scalars described 
above. So a triplet contains the indices of interconnected coordinates for a 
triangle.

How I can do that?

Here is attached the complete BunnyMesh.h example.

Thank you!

Cheers,
Dario

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



#ifndef BUNNY_MESH_H_
#define BUNNY_MESH_H_

//***THE FAMOUS BUNNY TRIMESH//

#define REAL btScalar
const int BUNNY_NUM_TRIANGLES = 902;
const int BUNNY_NUM_VERTICES = 453;
const int BUNNY_NUM_INDICES = BUNNY_NUM_TRIANGLES * 3;

static REAL gVerticesBunny[BUNNY_NUM_VERTICES * 3] = {
	REAL(-0.334392), REAL(0.133007), REAL(0.062259),
	REAL(-0.350189), REAL(0.150354), REAL(-0.147769),
	REAL(-0.234201), REAL(0.343811), REAL(-0.174307),
	REAL(-0.200259), REAL(0.285207), REAL(0.093749),
	REAL(0.003520), REAL(0.475208), REAL(-0.159365),
	REAL(0.001856), REAL(0.419203), REAL(0.098582),
	REAL(-0.252802), REAL(0.093666), REAL(0.237538),
	REAL(-0.162901), REAL(0.237984), REAL(0.206905),
	REAL(0.000865), REAL(0.318141), REAL(0.235370),
	REAL(-0.414624), REAL(0.164083), REAL(-0.278254),
	REAL(-0.262213), REAL(0.357334), REAL(-0.293246),
	REAL(0.004628), REAL(0.482694), REAL(-0.338626),
	REAL(-0.402162), REAL(0.133528), REAL(-0.443247),
	REAL(-0.243781), REAL(0.324275), REAL(-0.436763),
	REAL(0.005293), REAL(0.437592), REAL(-0.458332),
	REAL(-0.339884), REAL(-0.041150), REAL(-0.668211),
	REAL(-0.248382), REAL(0.255825), REAL(-0.627493),
	REAL(0.006261), REAL(0.376103), REAL(-0.631506),
	REAL(-0.216201), REAL(-0.126776), REAL(-0.886936),
	REAL(-0.171075), REAL(0.011544), REAL(-0.881386),
	REAL(-0.181074), REAL(0.098223), REAL(-0.814779),
	REAL(-0.119891), REAL(0.218786), REAL(-0.760153),
	REAL(-0.078895), REAL(0.276780), REAL(-0.739281),
	REAL(0.006801), REAL(0.310959), REAL(-0.735661),
	REAL(-0.168842), REAL(0.102387), REAL(-0.920381),
	REAL(-0.104072), REAL(0.177278), REAL(-0.952530),
	REAL(-0.129704), REAL(0.211848), REAL(-0.836678),
	REAL(-0.099875), REAL(0.310931), REAL(-0.799381),
	REAL(0.007237), REAL(0.361687), REAL(-0.794439),
	REAL(-0.077913), REAL(0.258753), REAL(-0.921640),
	REAL(0.007957), REAL(0.282241), REAL(-0.931680),
	REAL(-0.25), REAL(-0.550401), REAL(-0.557810),
	REAL(-0.267633), REAL(-0.603419), REAL(-0.655209),
	REAL(-0.446838), REAL(-0.118517), REAL(-0.466159),
	REAL(-0.459488), REAL(-0.093017), REAL(-0.311341),
	REAL(-0.370645), REAL(-0.100108), REAL(-0.159454),
	REAL(-0.371984), REAL(-0.091991), REAL(-0.011044),
	REAL(-0.328945), REAL(-0.098269), REAL(0.088659),
	REAL(-0.282452), REAL(-0.018862), REAL(0.311501),
	REAL(-0.352403), REAL(-0.131341), REAL(0.144902),
	REAL(-0.364126), REAL(-0.200299), REAL(0.202388),
	REAL(-0.283965), REAL(-0.231869), REAL(0.023668),
	REAL(-0.298943), REAL(-0.155218), REAL(0.369716),
	REAL(-0.293787), REAL(-0.121856), REAL(0.419097),
	REAL(-0.290163), REAL(-0.290797), REAL(0.107824),
	REAL(-0.264165), REAL(-0.272849), REAL(0.036347),
	REAL(-0.228567), REAL(-0.372573), REAL(0.290309),
	REAL(-0.190431), REAL(-0.286997), REAL(0.421917),
	REAL(-0.191039), REAL(-0.240973), REAL(0.507118),
	REAL(-0.287272), REAL(-0.276431), REAL(-0.065444),
	REAL(-0.295675), REAL(-0.280818), REAL(-0.174200),
	REAL(-0.399537), REAL(-0.313131), REAL(-0.376167),
	REAL(-0.392666), REAL(-0.488581), REAL(-0.427494),
	REAL(-0.331669), REAL(-0.570185), REAL(-0.466054),
	REAL(-0.282290), REAL(-0.618140), REAL(-0.589220),
	REAL(-0.374238), REAL(-0.594882), REAL(-0.323298),
	REAL(-0.381071), REAL(-0.629723), REAL(-0.350777),
	REAL(-0.382112), REAL(-0.624060), REAL(-0.221577),
	REAL(-0.272701), REAL(-0.566522), REAL(0.259157),
	REAL(-0.256702), REAL(-0.663406), REAL(0.286079),
	REAL(-0.280948), REAL(-0.428359), REAL(0.055790),
	REAL(-0.184974), REAL(-0.508894), REAL(0.326265),
	REAL(-0.279971), REAL(-0.526918), REAL(0.395319),
	REAL(-0.282599), REAL(-0.663393), REAL(0.412411),
	REAL(-0.188329), REAL(-0.475093), REAL(0.417954),
	REAL(-0.263384), REAL(-0.663396), REAL(0.466604),
	REAL(-0.209063), REAL(-0.663393), REAL(0.509344),
	REAL(-0.002044), REAL(-0.319624), REAL(0.553078),
	REAL(-0.001266), REAL(-0.371260), REAL(0.413296),
	REAL(-0.219753), REAL(-0.339762), REAL(-0.040921),
	REAL(-0.256986), REAL(-0.282511), REAL(-0.006349),
	REAL(-0.271706), REAL(-0.260881), REAL(0.001764),
	REAL(-0.091191), REAL(-0.419184), 

Re: [osg-users] Procedural terrains in oder to dig it.

2018-09-06 Thread Dario Minieri
Hello,

have you some example to show me the result?

Your code is opensource?

Many thanks, bye


Steal wrote:
> I have written a geoclipmap for Osg that works with all kinds of maps.
> 
> It works by having 5 rings position independently within one another, with 
> the bigger one having a cutout that fits the one within it...
> 
> It's works really well and making the exponentially larger grids was easy.


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





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


[osg-users] Procedural terrains in oder to dig it.

2018-09-06 Thread Dario Minieri
Hi,

I'm trying to work on procedural terrain creation because I need to dig them at 
runtime.

Can you suggest to me the best way to start this task? I'm using OSG 3.4.0.

Thank you!

Cheers,
Dario

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





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


[osg-users] [osgPlugins] Win 10 + VS17 + OSG 3.2.3 = Failed to read from stream. At osg::Node osgAnimation::AnimationManagerBase

2018-01-29 Thread Dario Minieri
Hi,

I'm working on Win 10, compiling OSG 3.2.3 with VS17 using official 3dparty 
deps (side note, I have to disable dicom and ktx because errors in headers).

Using SimViewer to open some osgb, works fine for all models with NO ANIMATION, 
but for those with animations I got this error (under linux works fine in both 
cases!):

InputStream::readObject(): Unsupported wrapper class ì
InputStream: Failed to read from stream. At osg::Node 
osgAnimation::AnimationManagerBase

Some ideas about the error?

Thank you!

Cheers,
Dario

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





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


[osg-users] [osgPlugins] BVH and model axis centering: a modeling and exporting problem...

2017-10-16 Thread Dario Minieri
Hi,

I'm working on BVH files and retargeting on model. My tests say that BVHReader 
supports the MotionBuilder BVH only, so the 3D model needs to have the skeleton 
bones with Y up convention.

I have some models from MAXIMO that come in an old 3D model set that works fine 
(exported by MotionBuilder 7.5). Because I need to apply BVHs to a different 
model, I've tried to copy the original working skeleton to a my model.

I'm using C4D R18 (exporting in FBX 2010 because is the only one that works 
well with textures export too) to do that and basically works.

But there is a problem. In the first video ("ok") we can see the original 
model: he falls on your knees correctly using as origin point one at foots 
level.

https://drive.google.com/open?id=0BwklgQHmJ_FuZlRsS2RPb0d0ak0

In the second video ("wrong") we can see the new model with the original 
skeleton exported via C4D: it falls on your knees in a wrong way using as a 
point of origin one at waist level.

https://drive.google.com/open?id=0BwklgQHmJ_FuVzNBemk4NlVJdlE

In C4D the main axis of 3D model is EVER at foots level, there are no changes 
about axis position. Simply, if I'm import in the C4D the MIXAMO original model 
and I export the SAME model without any modification, the incorrect behavior 
come up! We have a similar behaviour using Blender also. 

Someone had a similar experience using BVHs?

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osganimation branch] Review, test, critics

2017-09-14 Thread Dario Minieri
Hi,

I post my request here because osgAnimation related.

There is some examples/possibility to blend two animations? So, make the 
transition from an animation to another in a smooth way?

Thank you!

Cheers,
Dario

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





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


[osg-users] [osgOcean] osgOcean and Stereo view.

2017-06-08 Thread Dario Minieri
Hi,

I'm looking to run an osgOcean based application in a Stereo mode (split or 
anaglyphic). Doesn't work because multiple rendering pass, I think...Someone 
have suggestions about this problem? Have you tried stereo mode with osgOcean?


Thank you!

Cheers,
Dario

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





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


[osg-users] Merge Shader::Program from differents node kits.

2017-02-28 Thread Dario Minieri
Hi,

I'm planning to using osgVegetation 
(https://github.com/leadcoder/osgVegetation) with osgOcean.

Unfortunately, both use a lot of shaders and there are obviously problems in 
the underwater visualization because osgVegetation shader pipeline (which 
generates the vegetation billboard instances) overwrites the osgOcean 
underwater program. So the vegetation don't get the underwater effects (dof, 
fog, scattering, etc...).

Normally, I proceed to integrate physically the shaders, merging 2 vertex and 
fragment shader into one program. In this case it's a terrible prospective 
because they are huge node kits (not only shaders, but a lot of osg layers 
above).

So, can you suggest to me a way to procede? I know that similar problems come 
out time to time but right now I'm not able to figure out a way. I'm using OSG 
3.2.3 and I can't use newer version for now.

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] LOS Intersection and osgOcean segmentation fault issue.

2016-10-27 Thread Dario Minieri
Hi,

No ideas?  :?  :( 

Thank you!

Cheers,
Dario

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





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


[osg-users] LOS Intersection and osgOcean segmentation fault issue.

2016-09-14 Thread Dario Minieri
Hi,

I'm experiencing some problem using LOS with osgOcean. Executing LOS with 
osgOcean enabled there are some strange segmentation fault that speak about LOS 
intersection visitor and osgOcean main traverse. The traceback isn't the same 
at all times, but is something like that:


Code:

0  0x73370efa in osg::Group::traverse (this=0xd66fd0, nv=...) at
/Sources/OpenSceneGraph-3.2.3/src/osg/Group.cpp:62
#1  0x71eb3073 in osgOcean::OceanScene::traverse (this=0xd66fd0,
nv=...) at ../../../src/osgOcean/OceanScene.cpp:1081
#2  0x7749cd65 in osg::NodeVisitor::traverse (this=0x7fffc1458860,
node=...) at /usr/local/include/osg/NodeVisitor:193
#3  0x700994d5 in osgUtil::IntersectionVisitor::apply
(this=0x7fffc1458860, group=...) at
/Sources/OpenSceneGraph-3.2.3/src/osgUtil/IntersectionVisitor.cpp:221
#4  0x7337213a in osg::Group::accept (this=0xd66fd0, nv=...) at
/Sources/OpenSceneGraph-3.2.3/include/osg/Group:38
#5  0x73370f13 in osg::Group::traverse (this=0xcd59b0, nv=...) at
/Sources/OpenSceneGraph-3.2.3/src/osg/Group.cpp:62
#6  0x7749cd65 in osg::NodeVisitor::traverse (this=0x7fffc1458860,
node=...) at /usr/local/include/osg/NodeVisitor:193
#7  0x700994d5 in osgUtil::IntersectionVisitor::apply
(this=0x7fffc1458860, group=...) at
/Sources/OpenSceneGraph-3.2.3/src/osgUtil/IntersectionVisitor.cpp:221
#8  0x7337213a in osg::Group::accept (this=0xcd59b0, nv=...) at
/Sources/OpenSceneGraph-3.2.3/include/osg/Group:38
#9  0x73370f13 in osg::Group::traverse (this=0xe084d0, nv=...) at
/Sources/OpenSceneGraph-3.2.3/src/osg/Group.cpp:62
#10 0x7749cd65 in osg::NodeVisitor::traverse (this=0x7fffc1458860,
node=...) at /usr/local/include/osg/NodeVisitor:193
#11 0x700994d5 in osgUtil::IntersectionVisitor::apply
(this=0x7fffc1458860, group=...) at
/Sources/OpenSceneGraph-3.2.3/src/osgUtil/IntersectionVisitor.cpp:221
#12 0x7337213a in osg::Group::accept (this=0xe084d0, nv=...) at
/Sources/OpenSceneGraph-3.2.3/include/osg/Group:38
#13 0x7095c6ff in osgSim::LineOfSight::computeIntersections
(this=0x7fffc1458840, scene=0xe084d0, traversalMask=4294967184)
at
/Sources/OpenSceneGraph-3.2.3/src/osgSim/LineOfSight.cpp:123
#14 0x7095c9d3 in osgSim::LineOfSight::computeIntersections
(scene=0xe084d0, start=..., end=..., traversalMask=4294967184)
at
/Sources/OpenSceneGraph-3.2.3/src/osgSim/LineOfSight.cpp:156



Seems to be some side-effect interaction among visitors. Disabling osgOcean the 
segmentation fault doesn't appear. 

Have you noted a problem like that?

Thank you!

Cheers,
Dario[/code]

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





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


Re: [osg-users] HUGE performance issue using models with bones (and animation).

2016-09-07 Thread Dario Minieri
Hi,

... 

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] HUGE performance issue using models with bones (and animation).

2016-09-07 Thread Dario Minieri
Hi,

Ok, Robert I'm looking for osganimationhardware but right now I'm not able to 
understand the right way to switch on hardware animation easily. 

In any case I've made another test: object with bones -> low fps (i.e 45fps). 
During visualization I make an "hide" (masking the root of model). The model 
disappears but the fps stays exactly the same ( 45fps)!! The "update" field in 
stats stays very high in any cases even if the object is masked! 

So, there is another performance problem: I can accept the high cpu load using 
software skinning, but I can't optimize my simulation masking critical objects 
with bones which are not in camera view (because the cpu loading is the 
same!!). Its normal? 

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] HUGE performance issue using models with bones (and animation).

2016-09-06 Thread Dario Minieri
Hi,

As I said, in a real simulation the issue comes up again. It is osg 3.2.3. In a 
real simulation if I have no object with bones I have for example 90fps, with 
only one object with bones the fps low down to 45/50if I use the same 
object without bones the fps come up to 90 again so isn't triangles a trivial 
count related problem.

Another strange thing: 

with an object with bones I have the same low fps in any situation even if I 
have the object on camera range or not! Otherwise, if I have the same object 
without bones in the frustum, I have a good fps rate but if I change the view 
the fps are higher! And that 's what I expect : If an object isn't in cemera 
view the fps should increase . Using a model with bones this not happens: fps 
are lower even if have no one object in camera.

Thank you!

Cheers,
Dario

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





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


[osg-users] HUGE performance issue using models with bones (and animation).

2016-09-06 Thread Dario Minieri
Hi,

I'm experiencing for a very huge performance issue using models with bones (and 
animation). Look at images attached. The little cute dolphin WITH bones 
(animation stopped) show 107FPS, the one WITHOUT bones (animation stopped) show 
over 3400FPS. Used in a simulation, performances issue is very annoying. I 
think the presence of bones produces this issue.

Can you tell me something about the problem?

Thank you!

Cheers,
Dario

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



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


[osg-users] Sidescan sonar image

2016-07-28 Thread Dario Minieri
Hi,

I would to implement a rendering pass which emulates a sidescan sonar. In 
practice I would to rendering an image of current frustum view "colored" in 
base to distance of objects.  Can you suggest to me a good way to achieve that? 
I think I have to work about depth map but maybe you can suggest to me some 
example which works around this problem. 

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] osgViewer Threading Model problem.

2016-07-01 Thread Dario Minieri
Hi,

All data change on osg tree are made inside callback, so theoretically we have 
no "parallel" change during frame. However there are a lot of visitors that I 
have to check, may be could do data alteration. In my test, actually, there is 
osgHimmel and osgOcean also inside scene.

This type of problem, anyway, is generated by osg tree alteration parallel to 
frame only? 

Thank you!

Cheers,
Dario

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





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


[osg-users] osgViewer Threading Model problem.

2016-07-01 Thread Dario Minieri
Hi,

I'm using SingleThreaded model inside the Viewer. Using another model threading 
like DrawThreadPerContext I have various errors like: 

Warning:TextureRectangle::apply(..) failed, texture rectangle is not support by 
your OpenGL drivers. 

and

Warning: RenderStage::runCameraSetUp(State&) Pbuffer does not support multiple 
color outputs.

That is strange, because the card is Nvidia GTX 770, driver 352.63 which have 
to support texturerectangle... 

Have you some ideas about this problem?

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] Near/Far problem using models with bones.

2016-06-24 Thread Dario Minieri
Hi,

Yes, it works!

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] Near/Far problem using models with bones.

2016-06-24 Thread Dario Minieri
Hi,

Nice! I'll try as soon as possible!

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] Near/Far problem using models with bones.

2016-06-24 Thread Dario Minieri
Hi,

As I said in first post, I have experience with scale problem...if a model is 
modeled with scale 10 (for example...) with bones in scale 10 and then rescaled 
at 1, this near/far problem is a lot visible! This happens with all sw I have 
tried like 3ds, blender, c4d. If I build the model in scale 1 at beginning and 
bones in scale 1 also, this problem doesn't go away as you can see, but isn t 
so visible

We have to understand where is this scale problem...

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] Near/Far problem using models with bones.

2016-06-23 Thread Dario Minieri
Hi,

May be Robert can clarify this behaviour... :D

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] Near/Far problem using models with bones.

2016-06-23 Thread Dario Minieri
Hi,

I'll try that but this is a problem for me, because my engine expect a 
matrixtransform as root...I can ingest that but I'll substitute a problem with 
another hehehe :D 

Thanks again!

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] Near/Far problem using models with bones.

2016-06-22 Thread Dario Minieri
This problem happens using fbx exported from c4d and 3ds max alsoso the 
problem is inside fbx plugin or fbx format/version..I using fbx 2014.2 and ls 
3.2.3hummm...very annoying problem


mp3butcher wrote:
> Just my opinion but you shouldn't try to display FBX directly in osg: i don't 
> believe the osg FBX reader deals greatly with animated model
> A guess could be that there's a bone translation not correctly interpreted
> either by your FBX blender exporter or either by the osg FBX reader. 
> In all cases that will be hard to find out.
> You could try to remove  the Blender World Transform perhaps it will solve 
> the problem ..:/
> 
> 
> 
> Paradox wrote:
> > Yes I know, it's difficult. Yes I'm using osganimation but it's wrapped 
> > inside a larger engine. I thought that this is a known problem but it's not 
> > so evidently.
> > 
> > Grossly, if I open one model with bones inside native osganimationviewer I 
> > see the same issue: if I move the camera view close to the model this one 
> > dissapears when it still must to be visible.  
> > 
> > I attach a short video showing the problem. The model was generated in 
> > Cinema 4D (R17), modified in Blender (last version) and exported in FBX 
> > 7.4. 
> > 
> > I thought that nearfar setup (DO NOT COMPUTE) or cull visible setup would 
> > solve the problembut no luck right now...
> > 
> > VIDEO
> > 
> > https://vimeo.com/171760352
> > 
> > 
> > 
> > mp3butcher wrote:
> > > Hi Paradox
> > > As you havent' give us much details  (for ex: in my last post I assumed 
> > > you use osganimation) your problem is hard to diagnose 
> > > Can you give use the minimum code that cause your issue?
> > > 
> > > 
> > > 
> > > Paradox wrote:
> > > > Yes, same issue... :(
> > > > 
> > > > 
> > > > Trajce Nikolov NICK wrote:
> > > > > Hi Dario,
> > > > > 
> > > > > 
> > > > > did you try node->setCullingActive(false)
> > > > > 
> > > > > 
> > > > > On Wed, Jun 22, 2016 at 12:20 PM, Dario Minieri < ()> wrote:
> > > > > 
> > > > > > Hi,
> > > > > > 
> > > > > > Thanks mp3butcher but unfortunately I've already tried to disable 
> > > > > > the compute and the problem doesn't goes away. I don't really sure 
> > > > > > about the problem concerning near/far strictlysome other ideas?
> > > > > > 
> > > > > > Thank you!
> > > > > > 
> > > > > > Cheers,
> > > > > > Dario
> > > > > > 
> > > > > > --
> > > > > > Read this topic online here:
> > > > > > http://forum.openscenegraph.org/viewtopic.php?p=67731#67731 
> > > > > > (http://forum.openscenegraph.org/viewtopic.php?p=67731#67731)
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > ___
> > > > > > osg-users mailing list
> > > > > >  ()
> > > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > > > > >  
> > > > > > (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > -- 
> > > > > trajce nikolov nick
> > > > > 
> > > > >  --
> > > > > Post generated by Mail2Forum
> > > > 
> > > 
> > 
> 


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





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


Re: [osg-users] Near/Far problem using models with bones.

2016-06-22 Thread Dario Minieri
Yes I know, it's difficult. Yes I'm using osganimation but it's wrapped inside 
a larger engine. I thought that this is a known problem but it's not so 
evidently.

Grossly, if I open one model with bones inside native osganimationviewer I see 
the same issue: if I move the camera view close to the model this one 
dissapears when it still must to be visible.  

I attach a short video showing the problem. The model was generated in Cinema 
4D (R17), modified in Blender (last version) and exported in FBX 7.4.

VIDEO

https://vimeo.com/171760352



mp3butcher wrote:
> Hi Paradox
> As you havent' give us much details  (for ex: in my last post I assumed you 
> use osganimation) your problem is hard to diagnose 
> Can you give use the minimum code that cause your issue?
> 
> 
> 
> Paradox wrote:
> > Yes, same issue... :(
> > 
> > 
> > Trajce Nikolov NICK wrote:
> > > Hi Dario,
> > > 
> > > 
> > > did you try node->setCullingActive(false)
> > > 
> > > 
> > > On Wed, Jun 22, 2016 at 12:20 PM, Dario Minieri < ()> wrote:
> > > 
> > > > Hi,
> > > > 
> > > > Thanks mp3butcher but unfortunately I've already tried to disable the 
> > > > compute and the problem doesn't goes away. I don't really sure about 
> > > > the problem concerning near/far strictlysome other ideas?
> > > > 
> > > > Thank you!
> > > > 
> > > > Cheers,
> > > > Dario
> > > > 
> > > > --
> > > > Read this topic online here:
> > > > http://forum.openscenegraph.org/viewtopic.php?p=67731#67731 
> > > > (http://forum.openscenegraph.org/viewtopic.php?p=67731#67731)
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > ___
> > > > osg-users mailing list
> > > >  ()
> > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > > >  
> > > > (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
> > > > 
> > > > 
> > > > 
> > > 
> > > 
> > > 
> > > -- 
> > > trajce nikolov nick
> > > 
> > >  --
> > > Post generated by Mail2Forum
> > 
> 


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





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


Re: [osg-users] Near/Far problem using models with bones.

2016-06-22 Thread Dario Minieri
Yes, same issue... :(


Trajce Nikolov NICK wrote:
> Hi Dario,
> 
> 
> did you try node->setCullingActive(false)
> 
> 
> On Wed, Jun 22, 2016 at 12:20 PM, Dario Minieri < ()> wrote:
> 
> > Hi,
> > 
> > Thanks mp3butcher but unfortunately I've already tried to disable the 
> > compute and the problem doesn't goes away. I don't really sure about the 
> > problem concerning near/far strictlysome other ideas?
> > 
> > Thank you!
> > 
> > Cheers,
> > Dario
> > 
> > --
> > Read this topic online here:
> > http://forum.openscenegraph.org/viewtopic.php?p=67731#67731 
> > (http://forum.openscenegraph.org/viewtopic.php?p=67731#67731)
> > 
> > 
> > 
> > 
> > 
> > ___
> > osg-users mailing list
> >  ()
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
> > (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
> > 
> > 
> > 
> 
> 
> 
> -- 
> trajce nikolov nick
> 
>  --
> Post generated by Mail2Forum


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





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


Re: [osg-users] Near/Far problem using models with bones.

2016-06-22 Thread Dario Minieri
Hi,

Thanks mp3butcher but unfortunately I've already tried to disable the compute 
and the problem doesn't goes away. I don't really sure about the problem 
concerning near/far strictlysome other ideas?

Thank you!

Cheers,
Dario

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





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


[osg-users] Near/Far problem using models with bones.

2016-06-20 Thread Dario Minieri
Hi,

I'm experiencing the follow problem: I have some models with bones. When those 
models reach frustum edge (or corner), they disappear (like near cutoff). I 
know the scale of bones is really important, if there is an incongruence 
between the model scale and bones this problem is very annoying, but I'm sure 
that scales are corrects.

I'm using an ocean scene with a very aggressive near/far value (0.0900). 
Using others values the problem doesn't go away.

Have you some suggestions?  

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] Uniform set and callback

2016-04-12 Thread Dario Minieri
Hi,

ok, interesting, thanks. I'm using SingleThreaded model right now. I take this 
opportunity to speak about the problem using another thread model, like 
DrawThreadPerContext. In this case I have an error like:

TextureRectangle::apply(..) failed, texture rectangle is not support by your 
OpenGL drivers.

That is strange, because the card is Nvidia GTX 770, driver 352.63 which have 
to support texturerectangle...

Thank you!

Cheers,
Dario

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





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


[osg-users] Uniform set and callback

2016-04-12 Thread Dario Minieri
Hi,

Simple question: set a uniform value via set() method is thread-safe or we have 
to set the value via Uniform callback? Apparently, set() works fine, but thread 
interactions are devious :D 

Thank you!

Cheers,
Dario

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





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


[osg-users] Avoid "render flickering" using low height cameras angles.

2016-01-22 Thread Dario Minieri
Hi,

Using low camera height angles (simulating camera zoom action), I can see a lot 
of model "artifacts" (faces flick). Apart a massive model optimization, I think 
this is due to the fact the effective distance camera<->object remains 
unchanged and maybe some render pass cull-off some faces. There is a way to 
avoid this effects using a low height angle?

Thank you!

Cheers,
Dario

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





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


[osg-users] Write frame on file.

2016-01-22 Thread Dario Minieri
Hi,

Maybe I've not looked deeply all codes examples around the net, but there is 
some simple way, in osg, to write rendered frames on file? 

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] Alter tree in safe mode.

2015-12-18 Thread Dario Minieri
Hi,

Thanks Robert for your reply. I'm using OSG3.2.1. I can see Mutex lock/unlock 
in Node. I've to look the DatabasePager implementation...but I can't understand 
the crash, because locks there are...

Thank you!

Cheers,
Dario

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





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


[osg-users] Alter tree in safe mode.

2015-12-17 Thread Dario Minieri
Hi,

I have a system which use an UpdateCallback for every node which can be 
modified (adding or removing his children).  Sometime I have segmentation fault 
inside the callback, like this one:

#0  0x74b02cc9 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x74b060d8 in __GI_abort () at abort.c:89
#2  0x75107535 in __gnu_cxx::__verbose_terminate_handler() () from 
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x751056d6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x75105703 in std::terminate() () from 
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x75105922 in __cxa_throw () from 
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x75105e0d in operator new(unsigned long) () from 
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7  0x70e83ac6 in std::vector 
>::_M_insert_aux(__gnu_cxx::__normal_iterator > >, osg::Group* const&) 
() from /usr/local/lib/libosg.so.100
#8  0x70e83266 in osg::Node::addParent(osg::Group*) () from 
/usr/local/lib/libosg.so.100
#9  0x70e14bad in osg::Group::insertChild(unsigned int, osg::Node*) () 
from /usr/local/lib/libosg.so.100
#10 0x7488501f in AlterTreeNodeCallback::operator()(osg::Node*, 
osg::NodeVisitor*) () from /usr/local/lib/libSimWorld.so
#11 0x70e150b2 in osg::Group::accept(osg::NodeVisitor&) () from 
/usr/local/lib/libosg.so.100
#12 0x70e13af3 in osg::Group::traverse(osg::NodeVisitor&) () from 
/usr/local/lib/libosg.so.100
#13 0x70e150b2 in osg::Group::accept(osg::NodeVisitor&) () from 
/usr/local/lib/libosg.so.100
#14 0x70e13af3 in osg::Group::traverse(osg::NodeVisitor&) () from 
/usr/local/lib/libosg.so.100
#15 0x70e150b2 in osg::Group::accept(osg::NodeVisitor&) () from 
/usr/local/lib/libosg.so.100
#16 0x7fffeff514a1 in osgViewer::Viewer::updateTraversal() () from 
/usr/local/lib/libosgViewer.so.100
#17 0x7fffeff5b685 in osgViewer::ViewerBase::frame(double) () from 
/usr/local/lib/libosgViewer.so.100
#18 0x704356e4 in QGLWidget::glDraw() () from 
/usr/lib/x86_64-linux-gnu/libQt5OpenGL.so.5
#19 0x704326f9 in QGLWidget::paintEvent(QPaintEvent*) () from 
/usr/lib/x86_64-linux-gnu/libQt5OpenGL.so.5
#20 0x75521302 in QWidget::event(QEvent*) () from 
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x754e5c8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) 
() from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x754eae56 in QApplication::notify(QObject*, QEvent*) () from 
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x76488c2d in QCoreApplication::notifyInternal(QObject*, QEvent*) 
() from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x7551bbea in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion 
const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
  
Adding (insertChild) some new node at runtime, show the problem. This happens 
especially when I made some remove and insert in short time.

The callback is something like this:


Code:
void AlterCallback::operator()(Node* p_node, NodeVisitor* p_nv) {
  if (p_node != NULL) {
Group* p_group = p_node->asGroup();
if (p_group != NULL) {
  while (m_add_nodes.size() > 0) {
  Node* l_node = (Node*)m_add_nodes.popFront();
  p_group->addChild(l_node);
}

  while (m_remove_nodes.size() > 0) {
Node* l_node = (Node*)m_remove_nodes.popFront();
p_group->removeChild(l_node);
  }
}

traverse(p_node, p_nv);
  }
}



m_add_nodes and m_remove_nodes are thread-safe structures which holds the list 
of nodes (pointers) to add and remove. 

This is a good way to alter the tree at runtime?

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgOcean] Cylinder underwater problem with dimensions 2000.

2015-07-01 Thread Dario Minieri
Hi,

I have tried the osgOcean example also and in effect this problem seems to 
happen here also. After a lot of movement underwater I can see the plane 
behind. Rotating left or right disappears.


Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgOcean] Cylinder/Skydome flicker when using CompositeView

2015-06-30 Thread Dario Minieri
Hi,

...same problem here...have you found some workaround or solution? Bye.

Thank you!

Cheers,
Dario

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





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


[osg-users] [osgOcean] Cylinder underwater problem with dimensions 2000.

2015-06-30 Thread Dario Minieri
Hi,

I'm looking into a problem inside underwater scene: normally I use those 
parameters for underwater cylinder: 

CylinderHeight=4000.0 
CylinderRadius=2000.0 

I'm using osgHimmel as sky /but I can see the same problem with the original 
osgOcean sky dome) and the camera setup for near-far is:

Near-Far Mode: osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR
Near-Far value: 0.0009

If I attach a camera to an object inside position (0, 3000, -20)-(0,-3000,-20) 
all works fine. For all values greater then above I can see the sky behind in 
some camera setup. I've made a video which make a camera rotation at (0, 3500, 
-20) position. You can see the problem. 

I've tried some other configuration about Near-Far mode and value without 
success. In others, seems to be impossible to set a greater value for 
CylinderRadius because in this case the same problem come for low distance also!

In practice, it's impossible to move object over 2000 units from 0 without this 
problem. For example, cylinder at 20.000 and object in 0 show the sky behind 
underwater. 

Can you tell me some way to look?

Can you see the video here: https://vid.me/NAeB

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] Problem using Bones

2015-03-06 Thread Dario Minieri
Hi,

I will make some debug in a few daysmany thanks for now :D

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] Problem using Bones

2015-01-22 Thread Dario Minieri
Hi,

No one idea? :(

Thank you!

Cheers,
Dario

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





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


[osg-users] [osgOcean] Enabling reflection and others effects for particles.

2014-11-22 Thread Dario Minieri
Hi,

I'm looking to a workaround to enable the reflection (end/or refraction) for 
osgParticles particles! I've tried to set the mask for the geode which contains 
the emitter without results. There is a simple way to achieve that? 

My goal, is to generates particles with one or more emitters visible to the 
reflection of ocean and hide the particles to the main cull camera (the 
particles aren't visible in the air). Can you suggest me a way? 

Many thanks!

Cheers,
Dario

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





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


Re: [osg-users] [osgOcean] Wake effects?

2014-10-27 Thread Dario Minieri
Hi,

I'm bringing back this thread up also after 2 years. Did anyone get any success 
about the wake effect? I'm working around foam+shoreline without any 
interesting results at moment 


Thank you!

Cheers,
Dario

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





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


[osg-users] [osgOcean] Error linking osgOcean

2014-07-10 Thread Dario Minieri
Hi,

I'm trying to compile osgOcean lib and examples under windows with mingw32. The 
library compile fine but I have a link fail for exe example. The error is the 
next:  

Linking CXX executable ../../bin/oceanExample.exe
CMakeFiles/oceanExample.dir/objects.a(Scene.cpp.obj):Scene.cpp:(.text+0xb34): 
undefined reference to `osgOcean::Cylinder::setColor(osg::Vec4f const)'
CMakeFiles/oceanExample.dir/objects.a(Scene.cpp.obj):Scene.cpp:(.text$_ZN8osgOcean10OceanScene16setUnderwaterFogEfRKN3osg5Vec4fE[__ZN8osgOcean10OceanScene16setUnderwaterFogEfRKN3osg5Vec4fE]+0x4a):
 undefined reference to `osgOcean::Cylinder::setColor(osg::Vec4f const)'
c:/msys/1.0/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe:
 CMakeFiles/oceanExample.dir/objects.a(Scene.cpp.obj): bad reloc address 0x4a 
in section 
`.text$_ZN8osgOcean10OceanScene16setUnderwaterFogEfRKN3osg5Vec4fE[__ZN8osgOcean10OceanScene16setUnderwaterFogEfRKN3osg5Vec4fE]'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [bin/oceanExample.exe] Error 1
make[1]: *** [src/oceanExample/CMakeFiles/oceanExample.dir/all] Error 2
make: *** [all] Error 2

I've tried various CMake mod without success, I have enabled the DYNAMIC base 
option also without success. Any ideas?

Thank you!

Cheers,
Dario

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





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


[osg-users] Hold texture transparency with a view inside the model

2014-01-07 Thread Dario Minieri
Hi,

I'm using a simple png texture with some transparency to render a glass effect. 
Outside the model (you can think to a glass of a car) all looks good, but 
inside the model (for example at drive place) the glass is black. This is 
obvious because culling: I'm able to disable this using GL_CULL_FACE OFF inside 
the model material definition but in this way I don't see any glass polygons 
and the glass texture effect obviously disappears. There is a simple way to 
avoid this? 

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgOcean] Regulate the Ocean Reflection intensity.

2013-12-02 Thread Dario Minieri
Hi,

Nice, I've seen now the mod, I'll try them as soon


Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgOcean] Regulate the Ocean Reflection intensity.

2013-12-02 Thread Dario Minieri
Hi,

Looking the patch, I've seen that this is the same mod that I've tried but 
doesn't looks good to me...I'm using the trunk version, so the patch is 
different because some stuffs are moved in Technique file, but the mod is the 
same and I'm not really able to tone down (mean: add a lower reflection 
intensity) the reflection. Playing with fresnel mul and reflection mul don't 
move to me along a right final effect.

Have you tried some other parameters combination?  Have you a snapshot to see 
your result?

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] Troubles with shadows migrating on 3.2.0.

2013-10-31 Thread Dario Minieri
Hi,

No, in this example I have no custom shadersif I try to use my own custom 
shaders based on 3.0.1rc3 lspsm I receive a Warning: detected OpenGL error 
'invalid operation' at after RenderBin::draw(..) and the screen comes 
obviously black. So, right now, I'll be happy if shadows re-work without others 
complications.

Sorry for low quality attach, but this one give you the idea.

Thank you!

Cheers,
Dario

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



attachment: shadow_301rc3.jpg___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Troubles with shadows migrating on 3.2.0.

2013-10-30 Thread Dario Minieri
Hi,

I'm using right now the osg 3.0.1-rc3. I have a project with shadows. With osg 
3.0.1-rc3 all shadows and objects look good. Running same project with osg 
3.2.0 I see a problem with shadows: all objects become darkish even if the 
shadows there are. Seems to be the source light that don't make the correct 
luminance contribution. There are some changes about light and shadows which 
I'm lost?

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] Troubles with shadows migrating on 3.2.0.

2013-10-30 Thread Dario Minieri
Hi,

I forgot to say that the shadow there is, but shadow itself is very darkish, 
not semi-transparent as previous version.

I'm using LightSpacePerspectiveShadowMapCB.

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] Troubles with shadows migrating on 3.2.0.

2013-10-30 Thread Dario Minieri
Hi,

In effect, I have tried right now all shadow type: lspsm, sm, ssm and pssm but 
no one looks good

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgOcean] Regulate the Ocean Reflection intensity.

2013-10-02 Thread Dario Minieri
Hi,

In effect, I see the env_color computation in the fragment shader. I'm able to 
multiply this one by a tiny constant  1 (like 0.2) to obtain the result 
desired, but the problem is that the total final tone change drastically. 

I don't know if I've made right operation, but I'm trying to re-calibrate the 
total tone using wave and bottom top color and come another problem: changing 
those values at runtime I receive a double corruption from FFTOceanSurface like 
this:


Code:
*** glibc detected *** bin/Demo: double free or corruption (!prev): 
0x06fab330 ***
=== Backtrace: =
/lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7f0ac5ab8b96]
/usr/local/lib/libosgOcean.so(_ZNSt12_Destroy_auxILb0EE9__destroyIPSt6vectorIN8osgOcean9OceanTileESaIS4_vT_S8_+0x52)[0x7f0ac126d602]
/usr/local/lib/libosgOcean.so(_ZN8osgOcean15FFTOceanSurface10computeSeaEj+0x142)[0x7f0ac126b782]
/usr/local/lib/libosgOcean.so(_ZN8osgOcean15FFTOceanSurface5buildEv+0x40)[0x7f0ac126c970]
/usr/local/lib/libosgOcean.so(_ZN8osgOcean15FFTOceanSurface18getSurfaceHeightAtEffPN3osg5Vec3fE+0x145)[0x7f0ac12676d5]




Parameters for wave and top color are thought to runtime change? I need to 
perform some operation to achieve the runtime modification?

Best

Thank you!

Cheers,
Dario

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





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


[osg-users] [osgOcean] Regulate the Ocean Reflection intensity.

2013-09-27 Thread Dario Minieri
Hi,

I'm looking to modify the amount of reflections intensity inside ocean. I'm 
using last trunk rev 258. 

I'm stuck into this piece of code inside OceanScene:


Code:
_reflectionMatrix = osg::Matrixf(  1,  0,  0,  0,
   0,  1,  0,  0,
   0,  0, -1,  0,
   0,  0,  2 * 
_oceanScene-getOceanSurfaceHeight(),  1 );

osg::ref_ptrosg::Texture2D reflectionTexture = 
_oceanScene-createTexture2D( _oceanScene-_reflectionTexSize, GL_RGBA );

// clip everything below water line
_reflectionCamera = _oceanScene-renderToTexturePass( 
reflectionTexture.get() );
_reflectionCamera-setClearColor( osg::Vec4( 0.0, 0.0, 0.0, 0.0 ) );
_reflectionCamera-setComputeNearFarMode( 
osg::Camera::DO_NOT_COMPUTE_NEAR_FAR );
_reflectionCamera-setCullMask( _oceanScene-_reflectionSceneMask );
_reflectionCamera-setCullCallback( new 
CameraCullCallback(_oceanScene.get()) );
_reflectionCamera-getOrCreateStateSet()-setMode( GL_CLIP_PLANE0+0, 
osg::StateAttribute::ON );
_reflectionCamera-getOrCreateStateSet()-setMode( GL_CULL_FACE, 
osg::StateAttribute::OFF | osg::StateAttribute::OVERRIDE );

_surfaceStateSet-setTextureAttributeAndModes( 
_oceanScene-_reflectionUnit, reflectionTexture.get(), osg::StateAttribute::ON 
);



I think that I should operate on texture properties, maybe the shader but right 
now I'm not able to see a significative change on intensity reflection 
effect...Someone can suggest to me a way? 

Thank you!

Cheers,
Dario[/code]

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





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


Re: [osg-users] Make object totally transparent, but not hide :D

2013-08-22 Thread Dario Minieri
Hi,

Thanks for replies, this works with traversal mask and drawcullback override 
also.

Thank you!

Cheers,
Dario

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





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


[osg-users] Make object totally transparent, but not hide :D

2013-08-20 Thread Dario Minieri
Hi,

Sorry for noob question, but I need to make an object totally transparent (as 
invisible) but I have to maintain your presence in the world (the object 
can't be masked). This means that the object isn't visible but all collisions 
and others interactions in the world have to work.

I can make the transparency using code like this, but the object isn't never 
really invisible:


Code:

osg::Material* l_material = 
(osg::Material*)p_Object-getStateSet()getAttribute(osg::StateAttribute::MATERIAL);
l_material-setTransparency(p_face_mode, 1-p_transparency);
p_Object-getOrCreateStateSet()-setMode(GL_BLEND, osg::StateAttribute::ON);
p_Object-getOrCreateStateSet()-setAttributeAndModes(l_material, 
osg::StateAttribute::OVERRIDE);




Where p_face_mode is FRONT_AND_BACK for example.

Thank you!

Cheers,
Dario
Code:




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





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


Re: [osg-users] Using OSG with QTViewer plugin and dynamic scenes.

2013-07-04 Thread Dario Minieri
Hi bradenedmunds

Many tanks for your reply. I'll try as soon some modification suggested and let 
you know.

Thank you!

Cheers,
Dario

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





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


[osg-users] Using OSG with QTViewer plugin and dynamic scenes.

2013-07-03 Thread Dario Minieri
Hi,

This post is related to this my post:

http://forum.openscenegraph.org/viewtopic.php?t=12384

The main problem is to understand how to design a QTOsgViewer plugin used 
inside an application which modify dinamically the 3D osg scene.

It's really hard to explain the global situation but in a nutshell is as 
follows:

I have a QT widget which extends QGLWidget: this is fundamentally a QT Plugin 
which extends the osg viewer also. My main application thread make all 3D 
graphics operations and when I done I call the QGLWidget::update() to force the 
call of an overrided paintGL() slot to make the frame (calling osg frame()) and 
repaint the widget. In base of my tests right now, frame() method must be 
called inside paintGL(): if I don't call the frame() inside paintGL() there are 
a lot of errors about openGL, shaders and graphics context. 

So, I assume to have to call the frame() only inside the paintGL(). This is the 
main assumption and can be wrong but for now I have no other idea.

At random times, happens that the QWidget::update() DON'T calls the paintGL(), 
so, there is not 1:1 correspondance between update() and paintGL() slot. As I 
understand this is an intentional and normal behavior for QT framework. 

In general this can't be a problem, but in my case I use a semaphore release 
inside the paintGL(): if the paintGL() is lost, the semaphore release don't 
comes and my application freezes (stuck on a pre-gived semaphore). I have to 
use this semaphore because others my application modules have to wait until 
paintGL() is finished: frame() have to work over 3D tree which can't be 
modified from others component until are done. if I don't use the semaphore the 
application crash because the slot paintGL() (and then the osg frame()) can be 
called when another module works on 3D tree causing a race-condition. 

In others words, if we modify the 3D OSG tree WHEN the frame() method running 
we probably receive a segmentation fault because we can't modify the tree when 
OSG designs it.
So, I need to implement a methodology to avoid this situation. So, when I have 
finished to modify the OSG 3D tree, I have to force the paintGL() method to 
call the frame() method and then return to modify the OSG 3D tree again. 
If I'm not able to understand when the frame() is finished (this means when 
paintGL() is finished) I can't able to procede with 3D tree modifications. 
This is the reason for the semaphore inside paintGL().

Now, I think that the problem is inside the first assumption: we have to don't 
call the frame() inside paintGL() but I don't understand how.

This is a problem between QT and OSG and is diffult for me to find a solution.

Many thanks for any ideas.

Cheers,
Dario

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





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


Re: [osg-users] Viewer QT Freeze (refresh problem).

2013-06-28 Thread Dario Minieri
Hi Robert

In your QT viewer example you have 5 statics scenes. A single viewer shows a 
single object and never changes: you update the widgets using a QTimer. 

Now, I have a dynamic system where the scene graph changes continuously and 
there is OsgOcean. I think that the QT problem is the next: If I change the 
scene graph tree when QT updates the viewer QGLWidget (paintGL() calls a new 
frame()), there is a race condition.

The chain is: 

1. I make osg tree scene changes.
2. I call the QWidget::update() which call the relative paintGL() slot.
3. paintGL() slot call the osg frame(). 

This slot (paintGL()) is asynchronous (means we have no garantees when the 
paintGL() comes...), so I can return to change the osg scene tree again even if 
the frame() (an old frame() call) is still in execution. I have tried to use 
a mutex but without luck at now.  The crash report is next: 


Code:
0x706e1e5a in osg::Group::traverse(osg::NodeVisitor) () from 
/usr/local/lib/libosg.so.80
(gdb) bt
#0  0x706e1e5a in osg::Group::traverse(osg::NodeVisitor) () from 
/usr/local/lib/libosg.so.80
#1  0x7211858c in osg::Group::accept(osg::NodeVisitor) () from 
/usr/local/lib/libosgOcean.so
#2  0x7fffef94f962 in osgViewer::Viewer::updateTraversal() () from 
/usr/local/lib/libosgViewer.so.80
#3  0x7fffef958f62 in osgViewer::ViewerBase::frame(double) () from 
/usr/local/lib/libosgViewer.so.80
#4  0x75d37633 in GfxViewer::paintGL() () from 
/usr/local/lib/libSimViewer.so
#5  0x7fffefe3b450 in QGLWidget::glDraw() () from 
/usr/lib/x86_64-linux-gnu/libQtOpenGL.so.4
#6  0x7fffefe3ade9 in QGLWidget::paintEvent(QPaintEvent*) () from 
/usr/lib/x86_64-linux-gnu/libQtOpenGL.so.4
#7  0x76e3a802 in QWidget::event(QEvent*) () from 
/usr/lib/x86_64-linux-gnu/libQtGui.so.4
#8  0x7fffefe3cc38 in QGLWidget::event(QEvent*) () from 
/usr/lib/x86_64-linux-gnu/libQtOpenGL.so.4
#9  0x76deae9c in QApplicationPrivate::notify_helper(QObject*, QEvent*) 
() from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#10 0x76def30a in QApplication::notify(QObject*, QEvent*) () from 
/usr/lib/x86_64-linux-gnu/libQtGui.so.4
#11 0x768c656e in QCoreApplication::notifyInternal(QObject*, QEvent*) 
() from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#12 0x76e36524 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion 
const, QPoint const, int, QPainter*, QWidgetBackingStore*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#13 0x76fff68c in QWidgetPrivate::repaint_sys(QRegion const) () from 
/usr/lib/x86_64-linux-gnu/libQtGui.so.4
#14 0x76e2b794 in QWidgetPrivate::syncBackingStore() () from 
/usr/lib/x86_64-linux-gnu/libQtGui.so.4
#15 0x76e3ae4c in QWidget::event(QEvent*) () from 
/usr/lib/x86_64-linux-gnu/libQtGui.so.4
#16 0x7fffefe3cc38 in QGLWidget::event(QEvent*) () from 
/usr/lib/x86_64-linux-gnu/libQtOpenGL.so.4
#17 0x76deae9c in QApplicationPrivate::notify_helper(QObject*, QEvent*) 
() from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#18 0x76def30a in QApplication::notify(QObject*, QEvent*) () from 
/usr/lib/x86_64-linux-gnu/libQtGui.so.4
#19 0x768c656e in QCoreApplication::notifyInternal(QObject*, QEvent*) 
() from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#20 0x768ca3f1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, 
int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#21 0x768f4a63 in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#22 0x73e62ab5 in g_main_context_dispatch () from 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x73e62de8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x73e62ea4 in g_main_context_iteration () from 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x768f4bf6 in 
QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () 
from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#26 0x76e8fc1e in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#27 0x768c52bf in 
QEventLoop::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from 
/usr/lib/x86_64-linux-gnu/libQtCore.so.4
#28 0x768c5548 in 
QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from 
/usr/lib/x86_64-linux-gnu/libQtCore.so.4
#29 0x768ca708 in QCoreApplication::exec() () from 
/usr/lib/x86_64-linux-gnu/libQtCore.so.4

 


You can suggest to me some example to look, using QTViewer and dynamics scenes?

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] Viewer QT Freeze (refresh problem).

2013-06-25 Thread Dario Minieri
Hi,

Same problem using osg 3.0.1-rc3hummm

Thank you!

Cheers,
Dario

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





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


[osg-users] Viewer QT Freeze (refresh problem).

2013-06-24 Thread Dario Minieri
Hi,

I'm using now osg 3.0.0-rc7 and osgOcean r258 trunk. 

I'm experimenting a problem: sometime, the viewer freezes temporarly (the scene 
render freezes), but is sufficient change the focus of the viewer window to 
restart the render (for example, reducing the viewer at icon and then enlarge 
the window again, or changing focus with mouse over another window). 

This happens in particular way using osgOcean and a lot of particles (6 or 7 
emitters with RandomRateCounter range as 300-400 particles), but this happens 
less in others scenes configuration without particles.

Seems a problem of graphics context update (updateGL and similar calls). I'm 
using a QTViewer similar to osg examples. 

Someone has noticed a similar problem or someone can suggest to me an idea to 
debug this problem?

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgOcean] Refraction Map issue: isn't visible...

2013-06-16 Thread Dario Minieri
Hi,

Mha, this is strange, because the snapshot showed above are oceanExample 
related with no alteration of code and options (different settings are changed 
in realtime using the feature of the example). I'm looking into refraction code 
and, in effect, this is drastically changed between two version: in rev208 the 
refraction is made by a dedicated camera pass render, in last rev258 not. I 
don't know if this problem can be a videocard problem...If you execute the 
oceanExample you can notice the same behaviour or it works for you?


Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgOcean] Refraction Map issue: isn't visible...

2013-06-16 Thread Dario Minieri
Hi,

Using last dev osg release (3.1.7) and trunk osgOcean revision (I'm using the 
suggested tags version) works


Thank you!

Cheers,
Dario

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





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


[osg-users] [osgOcean] Refraction Map issue: isn't visible...

2013-06-14 Thread Dario Minieri
Hi,

I'm using still now OsgOcean rev 208. I'm update to the last rev 258. 
Refraction seems don't work. I have a scene with refraction enabled, withe 
rev208 I can see the refraction, not with the rev258. 

Someone has reported this issue?  I'm looking now around the refracition code, 
but is a bit expansive...

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgOcean] setLightColor and dynamic sun problems.

2013-06-14 Thread Dario Minieri
Hi kcbale

I've fixed the problem implementing a simple setLightColor with no stateSet 
dirty: i've updated the uniform value only. This work.

Right now, I look around another issue on the last ocean revision (258). Your 
ideas are really appreciated: 
http://forum.openscenegraph.org/viewtopic.php?t=12313

many thanks again

bye!


kcbale wrote:
 Hey Dario,
 
 Ah Ok i understand. I'll check over the code tomorrow, it does sound like it 
 might need some minor changes to accommodate your needs.
 
 Regards,
 
 Kim.
 
 Sent from my iPhone
 
 On 13 Jun 2013, at 22:45, Dario Minieri  wrote:
 
 
  Hi kcbale
  
  The light is a uniform and it is used to compute the wave top/bottom color. 
  Because the setLightColor set a statSetDirty, ocean is instructed tu reload 
  all stuffs. This cause a freeze at any time this reload is called. I'm 
  planning to setup directly the uniform without dirty the stateSet...I'm try 
  some ideas tomorrow...
  
  
  kcbale wrote:
  
   Hi Dario,
   
   I'm not sure I understand what you mean by a 'latch', could you describe 
   the symptoms a little more? I can't remember if the light variable is a 
   uniform or a #define and I'm not in front of a pc to check. 
   
   Regards
   
   Kim.
   
   Sent from my iPhone
   
   On 13 Jun 2013, at 17:04, Dario Minieri  wrote:
   
   
   
Hi,

I'm implementing a simple sun walk into skydome, calculating the light 
color during day. I'm using osgocean. To setup the ocean scene 
accordingly with the light color variation, I have to set the light 
color in osgocean itself via setLightColor. This works but 
setLightColor dirty the shader anytime and I see a latch into the 
scene when this happens. 

You can suggest to me a workaround to avoid the latch? Obviously I 
don't sets the ocean light color any microsecond, I update the light 
any 5 secs.

Thank you!

Cheers,
Dario

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





___
osg-users mailing list

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


   ___
   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=54600#54600
  
  
  
  
  
  ___
  osg-users mailing list
  
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
 ___
 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=54621#54621





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


[osg-users] [osgOcean] setLightColor and dynamic sun problems.

2013-06-13 Thread Dario Minieri
Hi,

I'm implementing a simple sun walk into skydome, calculating the light color 
during day. I'm using osgocean. To setup the ocean scene accordingly with the 
light color variation, I have to set the light color in osgocean itself via 
setLightColor. This works but setLightColor dirty the shader anytime and I see 
a latch into the scene when this happens. 

You can suggest to me a workaround to avoid the latch? Obviously I don't sets 
the ocean light color any microsecond, I update the light any 5 secs.

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgOcean] setLightColor and dynamic sun problems.

2013-06-13 Thread Dario Minieri
Hi kcbale

The light is a uniform and it is used to compute the wave top/bottom color. 
Because the setLightColor set a statSetDirty, ocean is instructed tu reload all 
stuffs. This cause a freeze at any time this reload is called. I'm planning 
to setup directly the uniform without dirty the stateSet...I'm try some ideas 
tomorrow...


kcbale wrote:
 Hi Dario,
 
 I'm not sure I understand what you mean by a 'latch', could you describe the 
 symptoms a little more? I can't remember if the light variable is a uniform 
 or a #define and I'm not in front of a pc to check. 
 
 Regards
 
 Kim.
 
 Sent from my iPhone
 
 On 13 Jun 2013, at 17:04, Dario Minieri  wrote:
 
 
  Hi,
  
  I'm implementing a simple sun walk into skydome, calculating the light 
  color during day. I'm using osgocean. To setup the ocean scene accordingly 
  with the light color variation, I have to set the light color in osgocean 
  itself via setLightColor. This works but setLightColor dirty the shader 
  anytime and I see a latch into the scene when this happens. 
  
  You can suggest to me a workaround to avoid the latch? Obviously I don't 
  sets the ocean light color any microsecond, I update the light any 5 secs.
  
  Thank you!
  
  Cheers,
  Dario
  
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=54595#54595
  
  
  
  
  
  ___
  osg-users mailing list
  
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
 ___
 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=54600#54600





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


[osg-users] How to set attribute shaders vars into ShadowedScene.

2013-04-03 Thread Dario Minieri
Hi,

Sorry for noob question, but I'm going crazy setting attribute vertex shaders 
variables starting from ShadowedScene. I've some code like this:

//create shadowed scene...
//create shadow technique l_MinimalShadowMap 
l_MinimalShadowMap-setShadowFragmentShader(l_sf);
l_MinimalShadowMap-setShadowVertexShader(l_sv);
l_MinimalShadowMap-setMainFragmentShader(l_mf);
l_MinimalShadowMap-setMainVertexShader(l_mv);  
//set technique to the shadowed scene...

Now, l_sf, l_sv, l_mf and l_mv are fragment and vertex shaders and they 
contains a lot of others features and integrations then shadows. In particular, 
a vertex shaders contains some attribute variables which I have to set from my 
program. This is the problem: to set attribute vartex vars I need to access the 
program shaders, but this program is setted inside a stateset's technique using 
CullVisitor. So, I'm not able to retrieve this program to set others attributes 
vertex shaders variables.

Someone can explain a method?

Thank you!

Cheers,
Dario[/code]

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





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


[osg-users] BW or grayscale vision based on camera.

2013-03-25 Thread Dario Minieri
Hi,

I would to implement the possibility to make a blackwhite vision and/or 
grayscale vision. It's possible to implement this feature modifying the camera 
properties only and not the geometry? Any suggestions are appreciated.  

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] BW or grayscale vision based on camera.

2013-03-25 Thread Dario Minieri
Hi,

Robert, thanks for your reply. I'm following the shaders way and this 
works...unfortunatly, I've ocean plugin also to make bw and in this case is 
more difficult because I've no control over ocean shaders chain...I need to 
glow ocean shaders chain with mine...hummm

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] Trouble with LightSpacePerspectiveShadowMap artifacts.

2012-08-29 Thread Dario Minieri
Hi

Yes, polygonoffset methods are presents in ShadowMap class only, but I use a 
technique derived from StandardShadowMap which redefines the polygonoffset 
variables and here we have no methods to set.

However, I've tried polygonoffset tweak and the final result is much better 
even if not perfect in all scenes. Thanks for your suggestions. However I 
will try the new robert's technique also in next days. I still have to try the 
the GL_CULL_FACE option in my models...

Best Regards


Wojtek wrote:
 Hi, Dario
 
 0: Ops I was sure these methods are available Thats awkward ommission 
 considering how old this technique is. We probably should add them. But as a 
 temporal workoaround you can derive your own class from LispSM and add proper 
 setter and getter for polygon offset...
 
 
 1: Yes closed was not a stric term but you got it right: cube is closed in 
 this definition and single quad is not. 
 
 
 2: Yes you can. Assuming the vertices are oriented properly and it not change 
 how it looks of course.
 
 
 Cheers,
 WL
 
 2012/8/28 Dario Minieri  ()
 
   Hi,
  
  Thanks for your reply. Yes, I see now the polygonoffsetfactor and 
  polygonoffsetunits variables even if there are no methods to set them (osg 
  3.0.0), they are setted as attribute camera StateSet because shadow map 
  generation. I can try to tweak these values in some way. You speaks about 
  two stuffs which I would to discuss:
  
  1. You say that the model must be closed, but what do you means precisely? 
  Closed in term of vertex mesh or closed in terms of shape? For example 
  a cube is a closed model, my truck obviously not...
  
  2. I can set the cull faces on my objects stateset via GL_CULL_FACE, do you 
  means that?
  
  Many thanks
  
  Thank you!
  
  Cheers,
  Dario
  
  --
  Read this topic online here:
  
  http://forum.openscenegraph.org/viewtopic.php?p=49624#49624 
  (http://forum.openscenegraph.org/viewtopic.php?p=49624#49624)
  
  
  
  
  
  ___
  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


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





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


Re: [osg-users] Trouble with LightSpacePerspectiveShadowMap artifacts.

2012-08-28 Thread Dario Minieri
Hi,

Thanks for your reply. Yes, I see now the polygonoffsetfactor and 
polygonoffsetunits variables even if there are no methods to set them (osg 
3.0.0), they are setted as attribute camera StateSet because shadow map 
generation. I can try to tweak these values in some way. You speaks about two 
stuffs which I would to discuss:

1. You say that the model must be closed, but what do you means precisely? 
Closed in term of vertex mesh or closed in terms of shape? For example a 
cube is a closed model, my truck obviously not... 

2. I can set the cull faces on my objects stateset via GL_CULL_FACE, do you 
means that? 

Many thanks

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] Trouble with LightSpacePerspectiveShadowMap artifacts.

2012-08-27 Thread Dario Minieri
Hi,

I've tried to use the CASTS_SHADOW_TRAVERSAL_MASK on my terrain but the final 
result is pretty the same.


Code:
GfxTerr-setNodeMask(m_GfxTerr-getNodeMask()  ~CASTS_SHADOW_TRAVERSAL_MASK);



hummmartifacts don't go away...

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] Trouble with LightSpacePerspectiveShadowMap artifacts.

2012-08-24 Thread Dario Minieri
Hi

Thanks robert for your suggestion, yes this seems the case, the terrain is very 
very large. I wiil try your suggestion soon. Thanks! Bye!


robertosfield wrote:
 Hi Dario,
 
 The issue looks like one of depth precision of the shadow map such
 that the depth test makes an erroneous judgment about whether the
 front surface is in shadow or not, this often is a surface self
 shadowing itself.  The normal solution is to use a polygon offset in
 the shadow map generation so that the surface doesn't shadow itself,
 if this polygon offset is too small you still get the self shadowing
 artifact if the value is too large you no longer get shadows where you
 should see them.
 
 The better the depth precision of the shadow map the lower the polygon
 offset will be required, and in your case perhaps it's the ground
 layer that is very large and it part of the shadow casting scene to
 pushes out the depth range of the shadow map reducing it's precision.
 If this is the case then using the Cast/RecivesShadowMask
 functionality would be appropriate as this will you could use the mask
 to avoid the ground being used in the shadow map generation.
 
 Robert.
 
 On 24 August 2012 14:57, Dario Minieri  wrote:
 
  Hi,
  
  I'm using a shadowed scene with LightSpacePerspectiveShadowMapCB technique 
  with a single light. I've seen that in some positions of the camera, the 
  shadows appear artifacts, while in other positions not. See snapshots. 
  Moving the camera in a continuous manner, this results in an annoying 
  shadows flickering on the objects.
  
  You have some kind of idea for that? GLSL Shadow shader issue? Graphix card 
  issue? Other?
  
  Thank you!
  
  Cheers,
  Dario
  
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=49505#49505
  
  
  
  
  ___
  osg-users mailing list
  
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  
 ___
 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=49522#49522





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


Re: [osg-users] Using shaders (vert and frag) with StandardShadowMap shaders.

2012-08-07 Thread Dario Minieri
Nice! Thanks for the suggestion, I'm now able to start with blending my shaders 
with shadow shaders...


danoo wrote:
 Regarding your code, I think you missunderstood the concept of shaders and 
 shadowtechnique. You do not need to have a visitor to add the shaders to your 
 objects. You have to set the shaders to your shadow technique! Its the 
 shadowscene node which takes responsibility to render your scene using the 
 shadowtechnique's shaders. The scene objects do not have to know anything 
 about the shader...
 
 
 Paradox wrote:
  Hi,
  
  No one can give me an idea to integrate lppsm with customs shaders?
  
  Thank you!
  
  Cheers,
  Dario
 


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





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


Re: [osg-users] Using shaders (vert and frag) with StandardShadowMap shaders.

2012-08-05 Thread Dario Minieri
Hi,

No one can give me an idea to integrate lppsm with customs shaders?

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] Using shaders (vert and frag) with StandardShadowMap shaders.

2012-07-25 Thread Dario Minieri
Hi,

...but, my question is: is correct the whole procedure? In practice, we 
reassign the program shaders to all objects and osgShadow traversal will 
compute the uniforms to pass to the shaders via stasetthis look correct to 
me, but there must be another way to make it work...

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgOcean] Problem: models are too bright, whitewashed.

2012-04-04 Thread Dario Minieri
Hi,

Ok, this is a classic problem about ocean shader. We have to re-set the 
attributes mode with a custom or empty shader.

Thank you!

Cheers, bye.

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





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


[osg-users] [osgOcean] Problem: models are too bright, whitewashed.

2012-04-03 Thread Dario Minieri
Hi,

Depending to the camera position, all sea models appear too bright, like 
whitewashed. Seems to be not  a light issue or osg model material 
configuration, I've tried many parameters variations without luck. How I can 
try to fix the problem?

Thank you!

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





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


Re: [osg-users] [osgPlugins] FBX texture export problem.

2011-06-18 Thread Dario Minieri
Simply, the FBX C4D exporter is buggy: the bigger problem is the texture 
exporting in this format. 

In fact, no textures fbx sdk compliant section is exported from C4D in a 
correct way. Osg convert plugin isn't able to interpret the fbx texture section 
correctly, but this problem seems to be known. The UNITY team also, as wrote in 
the past a patch to import the C4D FBX.

The problem affect all C4D versions, even the latest 11.5 and 12 versions, 
because the FBX exporter has no changes.

This is my experience. For now I use C4D for all modeling and lighting pipeline 
but I'm forced to switch in 3DSMAX to export a compliant FBX.

Bye


PlotPath wrote:
 Can you tell me more about the incompatibility of Cinema 4D with 3rd party 
 software? I have been instructed by one of my peers to try and create a few 
 menus combining features in C4D and Blender, but I am becoming a bit deterred 
 based on your statement.


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





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


Re: [osg-users] Methods definition problem passing 2.8.3 - 2.9.12

2011-04-01 Thread Dario Minieri
Hi,

Thanks, this is usefull. 

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgPlugins] osg svn and fbx 2011.3 compile issue.

2011-03-31 Thread Dario Minieri
Hi,

Thanks, sorry, my fault. I'm using a wrong library.

Thank you!

Cheers,
Dario

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





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


[osg-users] Methods definition problem passing 2.8.3 - 2.9.12

2011-03-31 Thread Dario Minieri
Hi,

I was trying  to compile some of my  projects based on OSG 2.8.3 using 2.9.12. 
I'm getting these errors:

Rend.cpp: In constructor 'GfxRenderer::GfxRenderer(osg::Camera*)':
Rend.cpp:58: error: 'setTargetFrameRate' was not declared in this scope
Rend.cpp:59: error: 'setMinimumTimeAvailableForGLCompileAndDeletePerFrame' was 
not declared in this scope.

I'm not able to find those methods, seems  to haven't been simply 
moved...perhaps renamed in another way and moved?

Can anyone give me any suggestions?

Thank you!

Cheers,
Dario

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





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


[osg-users] [osgPlugins] osg svn and fbx 2011.3 compile issue.

2011-03-30 Thread Dario Minieri
Hi,

The fbx plugin for osg svn version 2.9.12 would be compile fine with the sdk 
2011.3? No problem with 2011.2 but with .3 no luck..this is my config problem 
or the plugin isn't compatible with last sdk yet?

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgPlugins] FBX texture export problem.

2010-10-28 Thread Dario Minieri
Hi,

I want to update this post to update any interested peoples on the situation.

It seems that, in fact, the FBX file 2010.2 exported by cinema4d (R11, R11.5, 
R12) are not compliant with the autodesk fbx format for some reason.

The QTFBXViewer is able to visualize the object geometry but not the textures. 

Opening a 2010.2 C4D exported fbx with 3DSMAX works fine under 3DSMAX only: 
3DSMAX is able to render correctly but if I try to export the current object in 
a new FBX, then the texture problem comes up.

Contrary, if I REASSIGNS all materials to the current object inside 3DSMAX, 
then the exported FBX file is correct: OSG (2.8.3) fbx plugin converter works 
well on textures and the QTFBXViewer visualization works fine. 

So, I've reported this kind of problem to MAXON but seems that their fbx format 
is validates.

So, at the end, we have no direct solution to direct carry fbx file from C4D to 
OSG. Where is possible, we set the materials on 3DSMAX to then export a new FBX 
or we use a WRL format that works fine in some cases (not for ALL cases because 
this format has some problems about selections...).

Someone else has a similar experience about fbx files from C4D?

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgPlugins] NO Normal Map from FBX.

2010-09-30 Thread Dario Minieri
Hi,

No ideas? 

Thank you!

Cheers,
Dario

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





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


[osg-users] [osgPlugins] NO Normal Map from FBX.

2010-09-24 Thread Dario Minieri
Hi,

I was noticing that the Normals maps, assigned in 3DSMAX, aren't exported in 
the osg format. The Normal map file reference is in the FBX model but no in the 
converted osg file.

This is a my problem? I'm using OSG 2.8.3 with the FBX SDK 2010.2.

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] Textures problems in FLTK Viewer utility with LOD model and Viewer.

2010-08-25 Thread Dario Minieri
Hi Ulrich.

I save the osg format and the Texture2D record is inserted correctly but the 
file path disappears (I load objects that already have the textures, I don't 
apply the textures in my tool).

I'm going to try to use setUnRefImageDataAfterApply before using setSceneData. 
I'll tell you if it works, meanwhile thanks :D

Best regards

Dario


Ulrich Hertlein wrote:
 
 Are you saving '.ive' files with inlined textures by any chance?
 
 Once a texture is applied/used its associated image data by default is 
 removed from memory
 to save space.  This means that the image *data* cannot be saved to disk 
 anymore (but the
 file name can).
 
 You can prevent this by calling 'setUnRefImageDataAfterApply(false)' on the 
 textures.
 


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





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


Re: [osg-users] Textures problems in FLTK Viewer utility with LOD model and Viewer.

2010-08-25 Thread Dario Minieri
Hi,
Hi Ulrich.

Yes, I've made a Visitor to setUnRefImageDataAfterApply(false) for all textures 
properties and now works like charm.

Thank you!

Cheers,
Dario

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





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


[osg-users] Textures problems in FLTK Viewer utility with LOD model and Viewer.

2010-08-24 Thread Dario Minieri
Hi,

I have a very strange problem. I've written an FLTK application, which use the 
viewer (pretty similar to the FLTKViewer in the OSG examples), that compose and 
show LOD models. I can load multiples models and I inserted these models as 
childs of an osg::LOD node. Then, I've tried to write the LOD model into a file 
using writeObject method and ref_ptr original LOD pointer as first parameter. 

Now, I've a strange behaviour. In the viewer ALL WORKS FINE, I can see the 
models switch and all relatives textures correctly. The written LOD model is 
correct in terms of meshes (I see the correct models transition when the bound 
is reached) but there is a very strange problem with the textures (assuming to 
use 2 models):

1. If I DON'T switch between near and middle object in the viewer, then the LOD 
model written have NO TEXTURE for the NEAR object, but have the CORRECT texture 
for the second model!

2. If I SWITCH between near and middle object in the viewer, then I see NO 
TEXTURE for all LOD objects models.

I've tried to disable the my_viewer-setSceneData(LOD_model_pointer) (and the 
Fl::redraw() idle action), so that I can't view the models loaded in the 
viewer. In this case, the LOD written model is correct!!! There are all 
textures!!! I've tried also writing the LOD model without using the graphical 
application (this is rougly the same test...) and, obviously, all works fine!!!

So, seems that if an object is visualized under the viewer, then the 
writeObject method don't writes the textures informations, otherwise is ok. In 
effects, the near model is ever showed as first and so don't ever has the 
textures. The viewer locks the texture informations...?!? This is very 
strange for me...

Can you help me?

Many thanks!

Thank you!

Cheers,
Dario

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





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


[osg-users] Manage DOF nodes within LOD models.

2010-08-04 Thread Dario Minieri
Hi,

I wanted to ask if there is a best practice to manage DOF nodes in the LOD 
models. 

For example, I have a model with 2 level-of-detail with the same DOF nodes for 
each sub-detailed model. So, I have a root LOD node that has as childrens 2 
Group which are the two models with different levels of detail. 

Now, when I search a DOF node by name with a visitor, I find always the first 
DOF in the first model LOD hierarchy, obviously. So, if I'm viewing the first 
range I have no problems, but if I'm viewing the second I see no movement 
because the catched DOF is related to an unloaded model.

Then, I wondered if there is another smart form for models with LOD and DOF 
(maybe something can unify the DOF) or if I have to change the code to check 
what is the current displayed model and then catch the correct DOF.

Sorry for nub question. :D

Thank you!

Cheers,
Dario

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





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


[osg-users] [osgPlugins] FBX plugin compile error in OSG 2.9.8 SVN

2010-07-27 Thread Dario Minieri
Hi,

I'm trying to compile OSG 2.9.9 from the SVN but I have some errors with fbx 
plugin during compilation:


Code:
[ 84%] Building CXX object 
src/osgPlugins/fbx/CMakeFiles/osgdb_fbx.dir/fbxRMesh.o
In file included from 
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxReader.h:7,
 from 
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:26:
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxMaterialToOsgStateSet.h:65: 
warning: comma at end of enumerator list
In file included from 
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:26:
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxReader.h: In constructor 
'OsgFbxReader::OsgFbxReader(fbxsdk_2011_2::KFbxSdkManager, 
fbxsdk_2011_2::KFbxScene, FbxMaterialToOsgStateSet, const std::setconst 
fbxsdk_2011_2::KFbxNode*, std::lessconst fbxsdk_2011_2::KFbxNode*, 
std::allocatorconst fbxsdk_2011_2::KFbxNode* , const osgDB::Options, 
OsgFbxReader::AuthoringTool, bool, bool)':
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxReader.h:37: warning: 
'OsgFbxReader::authoringTool' will be initialized after
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxReader.h:30: warning:   
'bool OsgFbxReader::lightmapTextures'
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxReader.h:47: warning:   
when initialized here
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp: In member 
function 'osgDB::ReaderWriter::ReadResult 
OsgFbxReader::readMesh(fbxsdk_2011_2::KFbxNode*, fbxsdk_2011_2::KFbxMesh*, 
std::vectorStateSetContent, std::allocatorStateSetContent , const char*)':
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:717: warning: 
suggest parentheses around assignment used as truth value
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:737: error: 
template argument for 'templateclass _Alloc class std::allocator' uses local 
type 'OsgFbxReader::readMesh(fbxsdk_2011_2::KFbxNode*, 
fbxsdk_2011_2::KFbxMesh*, std::vectorStateSetContent, 
std::allocatorStateSetContent , const char*)::PolygonRef'
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:737: error:   
trying to instantiate 'templateclass _Alloc class std::allocator'
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:737: error: 
template argument 2 is invalid
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:737: error: 
invalid type in declaration before ';' token
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:807: error: 
request for member 'push_back' in 'polygonRefList', which is of non-class type 
'PolygonRefList'
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:840: error: 
expected initializer before 'it'
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:841: error: 'it' 
was not declared in this scope
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:841: error: 
'itEnd' was not declared in this scope
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp: In function 'int 
getVertexIndex(const fbxsdk_2011_2::KFbxLayerElementTemplateT*, const 
fbxsdk_2011_2::KFbxMesh*, int, int, int) [with T = fbxsdk_2011_2::KFbxVector4]':
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:563:   
instantiated from here
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:76: warning: 
enumeration value 'eNONE' not handled in switch
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:76: warning: 
enumeration value 'eBY_EDGE' not handled in switch
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:76: warning: 
enumeration value 'eALL_SAME' not handled in switch
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp: In function 
'bool layerElementValid(const fbxsdk_2011_2::KFbxLayerElementTemplateT*) 
[with T = fbxsdk_2011_2::KFbxVector4]':
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:697:   
instantiated from here
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:59: warning: 
enumeration value 'eINDEX' not handled in switch
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp: In function 
'bool layerElementValid(const fbxsdk_2011_2::KFbxLayerElementTemplateT*) 
[with T = fbxsdk_2011_2::KFbxColor]':
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:698:   
instantiated from here
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:59: warning: 
enumeration value 'eINDEX' not handled in switch
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp: In function 
'bool layerElementValid(const fbxsdk_2011_2::KFbxLayerElementTemplateT*) 
[with T = fbxsdk_2011_2::KFbxVector2]':
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:700:   
instantiated from here
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:59: warning: 
enumeration value 'eINDEX' not handled in switch
/tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp: In function 'int 
getPolygonIndex(const fbxsdk_2011_2::KFbxLayerElementTemplateT*, 

Re: [osg-users] [osgPlugins] FBX Plugin convert LOD into OSG correctly?

2010-07-27 Thread Dario Minieri
Hi,

With my preliminary test the answer is no...

Thank you!

Cheers,
Dario

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





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


[osg-users] [osgPlugins] FBX Plugin convert LOD into OSG correctly?

2010-07-25 Thread Dario Minieri
Hi,

Because a lot of dependencies on my framework I can't try now. FBX 2011-2 
support LOD from MAX LOD plugin, then I would ask to you if the FBX plugin in 
the last OSG (2.9.8) is able to create an OSG with LOD from an FBX with LOD.

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgPlugins] FBX texture export problem.

2010-06-10 Thread Dario Minieri
Hi,

anyone has any other information about this problem?

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgPlugins] FBX texture export problem.

2010-06-01 Thread Dario Minieri
Hi,

At this time I just found that malfunctioning. The first thing I noticed is the 
use of LayeredTexture but obviously this is not the problem from what you say. 
The problem is in the export C4D tool, but it is unclear where he is. Apart 
from the use of LayeredTexture, the two files seem roughly similar. I have not 
had time to perform additional tests.

let me know if you find something. However, this is weird because FBX should be 
an interchange format but, at the end, only Autodesk products allow you to use 
it properly.

P.S. (Export in FBX 6 with 5 compatibility (always in C4D...) works fine but 
Material applied on selection isn't allowed in this version and this is a 
strongly limitation...)

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgPlugins] FBX texture export problem.

2010-05-31 Thread Dario Minieri
Hi,

Thanks for your reply. I tried your trick but the result  seems the same as 
above. Seems strange that nobody else in the forum has the same problem. You've 
encountered this kind of problem?

Some friends also, are having this problem and, as I said earlier, we used both 
version 2.8.3 (with FBXSDK 2010) and svn version (with FBXSDK 2011).

Thanks for any idea :D

Cheers,
Dario



Sukender wrote:
 Hi Dario,
 
 Maybe the FBX code doesn't use the FBX file's directory as a base dir for 
 textures; try copying the FBX+textures in osgconv's dir for testing. I may 
 (should?) investigate this, but I'm far too busy right now.
 Help, anyone?
 
 
  Hi,
  
  I've a very annoying problem converting an fbx file into an osg
  through osgconv. The fbx file contains the (correct) refer to a
  texture (I'm able to correctly show the fbx in my modeling tool and I
  see the path in the fbx ASCII version...) but when I try the
  convertion I see those messages error:
  
  Warning: Could not find plugin to read objects from file .
  Warning: Could not find plugin to read objects from file .
  Warning: Could not find plugin to read objects from file
  //Parent/Dir/of/current/path.
  
  The osg file is created, all meshes there are, but no texture. I've
  tried with both fbx plugin in osg 2.8.3 and current OSG svn build.
  I've the same problem.
  
  You have some suggestion?
  
  Thank you!
  
  Cheers,
  Dario
  
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=28328#28328
  
  
  
  
  
  ___
  osg-users mailing list
  
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
 ___
 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=28351#28351





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


[osg-users] [osgPlugins] FBX texture export problem.

2010-05-28 Thread Dario Minieri
Hi,

I've a very annoying problem converting an fbx file into an osg through 
osgconv. The fbx file contains the (correct) refer to a texture (I'm able to 
correctly show the fbx in my modeling tool and I see the path in the fbx ASCII 
version...) but when I try the convertion I see those messages error:

Warning: Could not find plugin to read objects from file .
Warning: Could not find plugin to read objects from file .
Warning: Could not find plugin to read objects from file 
//Parent/Dir/of/current/path.

The osg file is created, all meshes there are, but no texture. I've tried with 
both fbx plugin in osg 2.8.3 and current OSG svn build. I've the same problem.

You have some suggestion?

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] Highlight OSG Geode node in the viewer.

2010-05-10 Thread Dario Minieri
Hi

I was just working on these ideas, thanks for osgFX tips that I had completely 
forgotten. I see what comes out :D

Thanks again

best


Skylark wrote:
 Hi Dario,
 
 
  If I know the geode name node to highlight, there is a simple method to 
  achive that? Is there any example to see that I missed?
  
 
 You can make a visitor to find the node you want by name (osgWorks has a 
 canned visitor to do this, or you can write your own in about 10 lines 
 of code). From there you have to decide what you want to do to 
 highlight the node... You could apply a material with a yellow 
 emissive color, or you could decorate it with an osgFX::Outline / 
 osgFX::Scribe / osgFX::Cartoon node, or you could just set a uniform 
 bool variable and then do something in the shader when rendering that 
 object. It's up to you.
 
 Hope this helps,
 
 J-S
 -- 
 __
 Jean-Sebastien Guay
 http://www.cm-labs.com/
 http://whitestar02.webhop.org/
 ___
 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=27720#27720





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


[osg-users] Highlight OSG Geode node in the viewer.

2010-05-09 Thread Dario Minieri
Hi,

I integrated the osgviewer in my application extended the osgViewer class. 
Viewing and manipulation (rotate and zoom) works fine, but I need to highlight 
part of an object shown in the osgviewer. 

If I know the geode name node to highlight, there is a simple method to achive 
that? Is there any example to see that I missed?

Thank you!

Cheers,
Dario

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





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


[osg-users] [osgPlugins] FBX conversion lost NULL nodes.

2010-04-28 Thread Dario Minieri
Hi,

Converting a FBX file (2010.2) into an OSG I saw that some NULL nodes are 
lost. For example I've tried a convertion of a simple scene:

OBJECT
|OBJ_WRAPPER
|object_with_mesh

OBJECT and OBJ_WRAPPER are simple NULL nodes, typically used to group others 
object.

I've exported in FBX a scene structured as the above example and then I have 
converted this file into an OSG file (osgconv). The OSG file don't contains the 
NULL nodes but only the object_with_mesh.

Analyzing the FBX file, I think that this happens when to a NULL node is 
applied no one transformation. OBJECT and OBJ_WRAPPER aren't inserted in the 
OSG file if they have FBX properties like:

Property: Lcl Translation, Lcl Translation, A+,0,0,0
Property: Lcl Rotation, Lcl Rotation, A+,0,0,0
Property: Lcl Scaling, Lcl Scaling, A+,1,1,1
Property: Visibility, Visibility, A+,1 

Instead, if they have some non-zero Translation field or others properties, 
then they are inserted in the OSG file as MatrixTransform node.

So, this behavior can be an optimization but the OSG file not always respect 
the original hierarchy. Is there any way to keep the original hierarchy?

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgPlugins] FBX conversion lost NULL nodes.

2010-04-28 Thread Dario Minieri
Hi, thanks for your reply.

This sound like but unfortunatly don't works. I've exported the variable 
(export OSG_OPTIMIZER=OFF) but the result is the same as above. HummThere 
is some other way to control the optimizer behaviour in this cases? OSG is 
2.8.3 version.

Many thanks again

Bye


Skylark wrote:
 Hi Dario,
 In our case, we often use DOF nodes with no geometry under them to 
 position cameras / lights on models, and the Optimizer removes those by 
 default (because it thinks they're useless if they have no geometry 
 under them).
 
 So I suspect something similar is happening to you. Try setting 
 OSG_OPTIMIZER=OFF to see if that helps.
 
 Hope this helps,
 
 J-S
 -- 
 __
 Jean-Sebastien Guay
 http://www.cm-labs.com/
 http://whitestar02.webhop.org/
 ___
 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=27370#27370





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


Re: [osg-users] [osgPlugins] FBX conversion lost NULL nodes.

2010-04-28 Thread Dario Minieri
Thanks Michael

I have some errors at compile time for the fbx plugin in the fbxRAnimation.cpp.

.../fbx/fbxRAnimation.cpp:25: error: variable or field 'readKeys' declared void
.../fbx/fbxRAnimation.cpp:25: error: 'KFbxAnimCurve' was not declared in this 
scope
.../fbx/fbxRAnimation.cpp:25: error: 'curveX' was not declared in this scope
.../fbx/fbxRAnimation.cpp:25: error: 'KFbxAnimCurve' was not declared in this 
scope
.../fbx/fbxRAnimation.cpp:25: error: 'curveY' was not declared in this scope
.../fbx/fbxRAnimation.cpp:25: error: 'KFbxAnimCurve' was not declared in this 
scope
.../fbx/fbxRAnimation.cpp:25: error: 'curveZ' was not declared in this scope
.../fbx/fbxRAnimation.cpp:26: error: expected primary-expression before 'const'
.../fbx/fbxRAnimation.cpp:27: error: expected primary-expression before '' 
token
.../fbx/fbxRAnimation.cpp:27: error: 'keyFrameCntr' was not declared in this 
scope

I'm using FBX 2010-2 SDK, FBX2011-2 is mandatory for this new FBX plugin? 
Inside 2.8.3 version of fbxRAnimation file, for example, isn't used the 
KFbxAnimCurve, but KFCurve.

Many thanks again.

Bye


Michael Platings wrote:
 Just saw your last email - you'll need to get the latest FBX plugin code from 
 the subversion trunk
 


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





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


Re: [osg-users] [osgPlugins] FBX conversion lost NULL nodes.

2010-04-28 Thread Dario Minieri
Hi

I read right now this message. I try now your trick.


Michael Platings wrote:
 Hi Dario,
 it just occurred to me that if you're using the 2.8.3 version then changing 
 to the latest code will be a big pain for you. Instead, in your code go to 
 the switch statement at line 417 of fbxRNode.cpp and delete the whole of the 
 case statement for KFbxNodeAttribute::eUNIDENTIFIED
 
  --
 Post generated by Mail2Forum


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





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


  1   2   >