Hi -

I am working on an application where the user navigates across a plane. The surface of the plane is a grid of square regions. Each square requires a unique texture. The textures are generated prior to the start of rendering.

I have several questions regarding implementation. I've done quite a bit of searching in the archives but haven't come across a solution suggestion.

1. In any given frame there may be several (<10) of the squares visible. Prior to rendering the frame I determine which squares are required. I'd like to tie this operation to changes in the camera beacon transformation. Where is the best place to do this?

My first thought is to subclass (via fcdEdit) the Transform and to use its changed() method. Is this a good idea? My subclass will need to have a NodePtr, and it will need to add/sub children to/from it. I'm worried about changes I make to the scenegraph in this method. Any nodes which I modify will be _below_ the Transform (camera beacon node) in the graph. Can I modify the node itself (that is, the node which owns the transform) by adding/subbing children from inside the changed() method?

If I don't use changed, is there another method which is preferable?

It seems that materials (and hence textures) must be 1:1 with a geometry. This is why I've been assuming that each square must have its own geometry and material.

2. For each animation sequence I will need to traverse hundreds of the rectangular grids. Thus, I'll be using hundreds of unique textures. The textures cannot be repeated. What is the most efficient (fastest) way to accomplish this? I can afford to pay a cost up front (pre-loading textures in some way), but during the rendering of frames I must have frame-by-frame control, so I have to avoid (computationally) costly operations during animation.

So, part of the solution to is to add or modify the grids in the graph (from (1) above, probably by modifying a transform for each), and a part of the solution is to (?) attach a different material/texture to the "new" grids that appear in the scene.




Any suggestions or comments are appreciated!

Dan



--
=======================================================================

Daniel J. Sperka, Ph. D.
Software Developer
Center for Neuroscience
University of California, Davis

=======================================================================




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to