Hi, Filip

Huge count of unique statesets can have big influence on framerate. Also 
implementing just transform in vertex shader, but still drawing each object 
separately would not help you much.
Dont know how you can implement picking with instanced drawing (may be keep 
another scenegraph with pat's just for intersection testing?), but you can do 
culling yourself for instances:
test each instance transformed bounding box\sphere against view frustum, then 
set visible instances transforms to uniform array and set appropriate instances 
count in primitivesets.

Cheers,
Sergey

31.05.2012, 18:26, "Filip Arlet" <[email protected]>:
> Hi,
> I have similar problem. But instanced rendering is not an option, because I 
> want to draw different huge number of objects from time to time. Now I share 
> geometry (can't share Geode because of picking - every object has to be 
> different) between PositionAtitudeTransforms. It's pretty fast, but now I'm 
> trying to implement that transform using vertex shader and the performace is 
> low. I share Program between StateSets and don't do anything odd and it is 
> still slower than using PATs.
> Another thing is bad culling.
>
> So my two questions are:
> 1) Where to start, If I want to do what I have described (one uniform matrix 
> and program)
> 2) Best solution for culling and bounding box problem
> 3) If I manage to use Instanced Drawing, will be a big problem that very 
> large part of DataSet will be outside view ? (ie. can't cull multiple 
> instances in one draw)
>
> Thank you!
>
> Cheers,
> Filip
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=47970#47970
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to