[osg-users] OSG-based excavator simulator
jean-sebastien.guay at cm-labs.com
Thu Apr 28 20:41:59 PDT 2011
> Maybe what Paul was asking about (and what I always like to learn from other people's
> setups) is:
> are the different textures (normals/specular maps) and shader assignments all set up when
> you get them from your modeller? Or do you have to do additional tweaking from within
> your program?
We currently don't use a 3D file format that allows for specifying
normal maps and other types. Actually it does, but OSG doesn't read it
so we'd need to do lots of work to extract the information anyways.
So no, we have our artists make models with diffuse textures, and make
normal and specular maps and whatever else we want to make separately.
We have config files that make the link between the nodes in the graph
of the loaded 3D model, additional textures to load (the diffuse texture
is already loaded as part of the original model) and shaders to apply.
Most of the time a normal map / specular map is linked to a diffuse map
(you'll have a diffuse map called "stone_wall.jpg" and a normal map
called "stone_wall_normal.jpg" and both will use the same texture
coordinates) so we also have a mode to do the association that way
instead of explicitly by node name - we search through statesets to find
the diffuse texture and do the association then.
This is very flexible, but unfortunately not artist-friendly, which I'll
be working on improving soon. Our pipeline currently involves both
artists and programmers to get those nice "advanced" effects (only ten
years old or so in real time use ;-) ).
Given that shader effects are not standardized in OSG I think it would
be hard to have it another way for now. OSG would really need to have
its own shaders for all these effects, as well as an official tool or
plugin to save the data in the right format out of the 3D content
creation tool. Or specify that if you want these effects you need to use
formats that support them, which I think for now is Collada and FBX
only? Valve mdl too? They're not many anyways.
So essentially, if that were the case, OSG would be dictating how you
use shaders in your app, and what your content creation pipeline is. I
don't think that's OSG's place - at least not currently. An OSG-based
engine can do that (which is basically what we're making for our
simulators), but not OSG itself.
It's good that we get to do these demos as they give us ideas on what to
improve in our process instead of just doing the same old thing over and
Jean-Sebastien Guay jean-sebastien.guay at cm-labs.com
More information about the osg-users