Another approach might be

, If the geom is the same for both or multi spectral states,  it would be 
cheaper just to swap the textures and all you need is to create 2 sets of 
osg::State sets one with your normal out the window images and the other with 
your thermal etc, then simply swap the states sets on the relevant nodes , 
saves duplicating all the geometry. And if your textures have naming scheme etc 
then you can write a straight forward visitor to build these state sets for you

______________________________________________________________________________
Gordon Tomlinson 

gor...@gordontomlinson.com
IM: gordon3db...@3dscenegraph.com
www.vis-sim.com www.gordontomlinson.com 
______________________________________________________________________________

-----Original Message-----
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Colin Rayment
Sent: Friday, February 13, 2009 5:12 AM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] Swapping Textutes for Thermal Signatures

We are currently doing something similar. We've considered two approaches:-

One involves providing a switch node for each node/geometry that applies a 
different texture. One path applies the normal texture and the other applies 
the thermal texture, both branches then reference the same geode containing the 
geometry. By changing the status of each switch node it is then possible to 
select either the normal or thermal views.

The other approach adopts a similar structure but with a group node replacing 
the switch node and each branch having a different node mask e.g. 1 for normal, 
2 for thermal. The relevant view is then obtained by setting the appropriate 
mask settings when doing the cull traversal.

Our view is that the former has the benefit of explicitly setting the viewing 
mode within the structure of the model and could be considered more appropriate 
for situations where the viewing mode doesn't change that often, but has issues 
if dynamically switching between viewing modes in that all the associated 
switch nodes will need to be changed. It also doesn't allow support for 
multiple views with differing viewing modes. The latter provides the benefit of 
a single setting changing the viewing mode and thus providing an easier method 
to switch between modes and also allows multiple views to be rendered 
simultaneously with different viewing modes. However it does require your 
viewer to explicitly set the mask settings as the default setting 0xffffffff 
would render both views simultaneously.

Hope this helps

Colin

-----Original Message-----
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Guy Volckaert
Sent: 13 February 2009 00:50
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Swapping Textutes for Thermal Signatures

Hi,

I was wondering what’s the best way to simulate thermal signatures for targets 
and the terrain (i.e heat vision). 

One simple and easy way is to load 2 models - one for day view and another for 
thermal view. However, this poses a big problem for the terrain. I really don't 
want to load the geometry of 2 terrains since that would require too much 
memory. BTW, I use the term "model" to refer to an OpenFlight (FLT) file that I 
load.

Since the geometry of both day and thermal models are identical (at least in my 
case), I should be able to load the day model and then load the textures of the 
thermal model (without loading the geometry of the thermal model). This can 
easily be done by using a filename convention such as adding the suffix "_tml" 
at the end of every thermal texture filename. 

This is all well in theory, but how do I implement it (I am still a rookie). 
Can anyone help me on this?

BTW: I know that there are several techniques to produce good looking thermal 
signatures using shaders, but that's too fancy for me right now. I just need 
something simple that won't consume all my memory.

------------------
Read this topic online here:
http://osgforum.tevs.eu/viewtopic.php?p=6732#6732





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

This email has been scanned for all known viruses by the MessageLabs Email 
Security System.

Please help out the environment by only printing this e-mail if absolutely 
necessary - Thank You.

This email has been scanned for all known viruses by the MessageLabs Email 
Security System.

Systems Engineering & Assessment Ltd - Beckington Castle, 17 Castle Corner, 
Beckington, Frome, Somerset, BA11 6TA, UK 
is registered in England and Wales with the company number 2430846.

The contents of this email (including any attachments) are confidential and may 
be legally privileged. 

If you are not the intended recipient of this email any disclosure, copying, 
distribution or use of its contents is strictly prohibited.  You should notify 
the sender immediately and then delete it (including any attachments) from your 
system.

Please help out the environment by only printing this e-mail if absolutely 
necessary - Thank You.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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

Reply via email to