Discussion:
[osg-users] DirectX Texture Stage Sets to OSG
sam
2018-12-04 20:46:37 UTC
Permalink
Hi All,

I have a file format that is laid out as follows:

[t:tsd,n:b_t_grs01_rvr_fall-bottom-08-static]
{
b dither = false;
b hasalpha = false;
layer1alphaarg1 = texture;
layer1alphaarg2 = diffuse;
layer1alphaop = modulate;
layer1colorarg1 = texture;
layer1colorarg2 = diffuse;
layer1colorop = modulate2x;
i layer1numframes = 1;
f layer1secondsperframe = 0.0;
layer1texture1 = texture_filename1;
f layer1ushiftpersecond = 0.0;
b layer1uwrap = true;
f layer1vshiftpersecond = 0.0;
b layer1vwrap = true;
layer2alphaarg1 = texture;
layer2alphaarg2 = current;
layer2alphaop = arg2;
layer2colorarg1 = texture;
layer2colorarg2 = current;
layer2colorop = modulate;
i layer2numframes = 1;
f layer2secondsperframe = 0.0;
layer2texture1 = texture_filename2;
f layer2ushiftpersecond = 0.0;
b layer2uwrap = true;
f layer2vshiftpersecond = 0.5;
b layer2vwrap = true;
i numlayers = 2;
i texturedetail = 2;
b timesyncanimation = true;
}

I want to create a layer between this and osg StateSet commands. Has
anybody attempted to do this? Is there an easy way to do the mapping? Or
will it be parse -> set settings -> and then parse.

Ideas are welcome.

Thanks, Sam
michael kapelko
2018-12-05 10:16:00 UTC
Permalink
Hi.

It would be good to know what that format is all about, never seen it before.
Post by sam
Hi All,
[t:tsd,n:b_t_grs01_rvr_fall-bottom-08-static]
{
b dither = false;
b hasalpha = false;
layer1alphaarg1 = texture;
layer1alphaarg2 = diffuse;
layer1alphaop = modulate;
layer1colorarg1 = texture;
layer1colorarg2 = diffuse;
layer1colorop = modulate2x;
i layer1numframes = 1;
f layer1secondsperframe = 0.0;
layer1texture1 = texture_filename1;
f layer1ushiftpersecond = 0.0;
b layer1uwrap = true;
f layer1vshiftpersecond = 0.0;
b layer1vwrap = true;
layer2alphaarg1 = texture;
layer2alphaarg2 = current;
layer2alphaop = arg2;
layer2colorarg1 = texture;
layer2colorarg2 = current;
layer2colorop = modulate;
i layer2numframes = 1;
f layer2secondsperframe = 0.0;
layer2texture1 = texture_filename2;
f layer2ushiftpersecond = 0.0;
b layer2uwrap = true;
f layer2vshiftpersecond = 0.5;
b layer2vwrap = true;
i numlayers = 2;
i texturedetail = 2;
b timesyncanimation = true;
}
I want to create a layer between this and osg StateSet commands. Has anybody attempted to do this? Is there an easy way to do the mapping? Or will it be parse -> set settings -> and then parse.
Ideas are welcome.
Thanks, Sam
_______________________________________________
osg-users mailing list
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
sam
2018-12-05 16:49:21 UTC
Permalink
Hey Michael,

It's a format used in the game Dungeon Siege. When the game goes to load up
its texturing information, it uses those "TSD" files in order to setup the
texture state sets for DirectX. I did proof of concept up here:
https://pastebin.com/FwaYd1S9. If you have anymore questions or feedback,
I'd love to hear it.

Thanks, Sam
Post by michael kapelko
Hi.
It would be good to know what that format is all about, never seen it before.
Post by sam
Hi All,
[t:tsd,n:b_t_grs01_rvr_fall-bottom-08-static]
{
b dither = false;
b hasalpha = false;
layer1alphaarg1 = texture;
layer1alphaarg2 = diffuse;
layer1alphaop = modulate;
layer1colorarg1 = texture;
layer1colorarg2 = diffuse;
layer1colorop = modulate2x;
i layer1numframes = 1;
f layer1secondsperframe = 0.0;
layer1texture1 = texture_filename1;
f layer1ushiftpersecond = 0.0;
b layer1uwrap = true;
f layer1vshiftpersecond = 0.0;
b layer1vwrap = true;
layer2alphaarg1 = texture;
layer2alphaarg2 = current;
layer2alphaop = arg2;
layer2colorarg1 = texture;
layer2colorarg2 = current;
layer2colorop = modulate;
i layer2numframes = 1;
f layer2secondsperframe = 0.0;
layer2texture1 = texture_filename2;
f layer2ushiftpersecond = 0.0;
b layer2uwrap = true;
f layer2vshiftpersecond = 0.5;
b layer2vwrap = true;
i numlayers = 2;
i texturedetail = 2;
b timesyncanimation = true;
}
I want to create a layer between this and osg StateSet commands. Has
anybody attempted to do this? Is there an easy way to do the mapping? Or
will it be parse -> set settings -> and then parse.
Post by sam
Ideas are welcome.
Thanks, Sam
_______________________________________________
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
Loading...