Re: [osg-users] OSG-based excavator simulator

2011-04-28 Thread Jean-Sébastien Guay

Hi Torben,

Sorry I couldn't reply sooner, I was on vacation.


That looks great! What sky framework did you use? It looks a little bit like 
Simul trueSky...


We used a slightly modified osgEphemeris, along with a simple cloud 
plane (a plane with circular blending around the edges, with a good 
cloud texture, is simple but works well enough for most ground-based 
simulators).


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG-based excavator simulator

2011-04-28 Thread Jean-Sébastien Guay

Hi Paul,


Hi J-S -- It looks great. But I do have a couple questions.


No problem, I'll answer as best I can. :-)


How flexible is your art pipeline / rendering process for loading
arbitrary models? Could you replace that excavator with some arbitrary
CAD machinery, such as a tractor, and get the same visual fidelity? Or
is there quite a bit of per-model hands-on modeling time in the art
pipeline to create the necessary specular and normal maps, dirt, scuff
marks, etc?


I'm surprised you're asking me this type of question...

An artist is really needed in order to get any good looking models, 
IMHO. Doing too much procedurally just becomes incredibly complex and 
gives so-so results most of the time, but you end up handling lots of 
corner cases and skirting around visual artifacts.


You also mention CAD models, which are another pet peeve of mine. CAD is 
just not made for real-time use, you get lots of geometry where you need 
very little and vice versa. A human modeler who knows about making 
models for real-time can really make good use of textures when possible 
and put polygons where needed.


In our case, we have an in-house modeler who makes models especially for 
real-time use. When we need a new vehicle for a simulator, he will 
typically start gathering as many reference photos as possible and then 
make the model. He'll then figure out what sections will most benefit 
from having normal and specular maps (where there's not much fine 
detail, they're not needed, and a simpler shader can be used).



Also, how are you doing the transparency (e.g., the excavator cab
windows)? Is that simple RenderBin back-to-front rendering, or are you
using an order-independent technique? If the latter, how are you
implementing it?


Simple render bin technique. The windows are two polygons with opposing 
normals (with backface culling enabled so they don't fight with each 
other, only one will be visible from any angle). All the windows are in 
separate geometry objects so they sort correctly (which is bad for draw 
time, I know, but used sparingly it's ok). And the windows on the inside 
have a different shader than the ones on the outside, so they have a 
double-sided mirror kind of effect (look darker from outside than from 
inside the cab).



Are the trees in the background simple billboards, or truly 3D so that
the viewpoint can be placed inside them?


No, just billboards, and in fact we had to choose our shots carefully to 
make the video so we didn't see any sorting artifacts 'cause I didn't 
want to take the time to separate them all :-)



Is the atmospheric scattering simple OpenGL fog, or something more complex?


It's nothing as sophisticated as atmospheric scattering - we called it 
atmospheric dust. :-) It's just large particle billboards, with a few 
classic smoke rendering techniques:


- depth buffer test to avoid artifacts where a billboard gets clipped by 
opaque scene geometry (lower the alpha where the billboard is close to 
the ground - search the nvidia samples for a paper on that)

- the billboards rotate slowly to make the dust seem like it's billowing
- they also fade in and out for the same reason.

All three things are done in the vertex / fragment shaders.


I didn't notice any screen-space post-rendering effects (such as depth
of field), is that correct? If I'm wrong, what screen-space effects are
you doing, and did you encounter any difficulties with generalizing them
into your rendering system?


We didn't do depth of field, but HDR is a screen-space post-rendering 
effect. It gives a nice light bloom.


We used osgPPU to do it, and osgPPU comes with an HDR example, which we 
modified slightly so that the light adaptation effect was less 
pronounced. In retrospect, the way osgPPU does its post-rendering 
effects limits us in other things we want to do with our pipeline, so 
we'll probably do the HDR ourselves sometime in the near future (or try 
to find ways to work around the limitations). But it was a great way to 
get the effect going quickly.



I'm always looking for more general ways to make stuff like this work,
so I'm just trying to figure out how much of this demo was
general-purpose, and how much was non-general, suitable only for demos.


Because of the time constraints, we did a lot of quick-and-dirty coding. 
In the weeks after the demo was done and shown to the client, we did a 
lot of clean up work, and we still have some left to do (for me, mostly 
the osgPPU limitations I mentioned above).


But since we did the demo, everyone in the company wants to use similar 
effects in their projects (clients always want the best-looking 
simulator they can get, at least when taking the purchasing decision - 
after that it becomes less important) so I'm making sure what we did is 
as general as it can be.


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   

Re: [osg-users] OSG-based excavator simulator

2011-04-28 Thread Ulrich Hertlein
Hi J-S, hi Paul,

On 29/04/11 5:15 , Jean-Sébastien Guay wrote:
 How flexible is your art pipeline / rendering process for loading
 arbitrary models? Could you replace that excavator with some arbitrary
...
 
 I'm surprised you're asking me this type of question...
 
 An artist is really needed in order to get any good looking models, IMHO. 
 Doing too much
 procedurally just becomes incredibly complex and gives so-so results most of 
 the time, but
 you end up handling lots of corner cases and skirting around visual artifacts.
... 
 
 In our case, we have an in-house modeler who makes models especially for 
 real-time use.
 When we need a new vehicle for a simulator, he will typically start gathering 
 as many
 reference photos as possible and then make the model. He'll then figure out 
 what sections
 will most benefit from having normal and specular maps (where there's not 
 much fine
 detail, they're not needed, and a simpler shader can be used).

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?

Cheers,
/uli
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG-based excavator simulator

2011-04-28 Thread Jean-Sébastien Guay

Hi Ulrich,


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 
over...


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG-based excavator simulator

2011-04-20 Thread Ulrich Hertlein
Hi J-S,

On 20/04/11 1:41 , Jean-Sébastien Guay wrote:
 I just wanted to give you guys a heads up about a prototype project we worked 
 on lately,
 and which I think looks great. There's a video of it on our YouTube channel:
 
 http://www.youtube.com/user/vortexsim#p/u/1/RhJR0qQJfAQ
 
 (set it to 1080p if you can)
 
 We did that demo in 3 weeks (2 people for graphics and physics programming, 
 one modeler
 for the excavator model).

That just looks absolutely gorgeous! (And all the more so for the timeframe 
that you've
been able to pull that off in!)

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


Re: [osg-users] OSG-based excavator simulator

2011-04-20 Thread Paul Martz

Hi J-S -- It looks great. But I do have a couple questions.

How flexible is your art pipeline / rendering process for loading arbitrary 
models? Could you replace that excavator with some arbitrary CAD machinery, such 
as a tractor, and get the same visual fidelity? Or is there quite a bit of 
per-model hands-on modeling time in the art pipeline to create the necessary 
specular and normal maps, dirt, scuff marks, etc?


Also, how are you doing the transparency (e.g., the excavator cab windows)? Is 
that simple RenderBin back-to-front rendering, or are you using an 
order-independent technique? If the latter, how are you implementing it?


Are the trees in the background simple billboards, or truly 3D so that the 
viewpoint can be placed inside them?


Is the atmospheric scattering simple OpenGL fog, or something more complex?

I didn't notice any screen-space post-rendering effects (such as depth of 
field), is that correct? If I'm wrong, what screen-space effects are you doing, 
and did you encounter any difficulties with generalizing them into your 
rendering system?


I'm always looking for more general ways to make stuff like this work, so I'm 
just trying to figure out how much of this demo was general-purpose, and how 
much was non-general, suitable only for demos.


Thanks,
   -Paul



On 4/19/2011 9:41 AM, Jean-Sébastien Guay wrote:

Hi all,

I just wanted to give you guys a heads up about a prototype project we worked on
lately, and which I think looks great. There's a video of it on our YouTube
channel:

http://www.youtube.com/user/vortexsim#p/u/1/RhJR0qQJfAQ

(set it to 1080p if you can)

We did that demo in 3 weeks (2 people for graphics and physics programming, one
modeler for the excavator model).

Quick list of effects specific to this project:
- Normal mapping
- Specular mapping
- Reflection mapping
- HDR (using osgPPU)
- Soil uses hardware instancing for the many small rocks
- Mound of earth uses vertex texture fetch to render the height field (displace
vertices, calculate normals in vertex shader)
- Dust particles rendered with soft particle technique (depth buffer test) to
avoid hard edges

It's the most GPU-intensive simulator we've ever done, and it looks great, and
it's OSG-based, so I thought I'd show it to anyone who's interested. :-)

While you're on our YouTube page you can have a look at the other cool things
we've done in the past, the offshore and port crane simulators are recent
projects and are very nice as well (and they use osgOcean :-) ).

http://www.youtube.com/user/vortexsim#p/u/9/KBGr74TMTrU
http://www.youtube.com/user/vortexsim#p/u/0/dZeQ-eBrBDk

Thanks,

J-S



--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG-based excavator simulator

2011-04-20 Thread Maxim Gammer
Great project!

We also create simulators.
You can watch this video:
www.youtube.com/watch?v=jLRHiklQFv8
(starting at 4 minutes 30 seconds)

What do you think about the publication of such projects on the page
http://www.openscenegraph.org/projects/osg/wiki/Screenshots/
?


2011/4/20 Paul Martz pma...@skew-matrix.com:
 Hi J-S -- It looks great. But I do have a couple questions.

 How flexible is your art pipeline / rendering process for loading arbitrary
 models? Could you replace that excavator with some arbitrary CAD machinery,
 such as a tractor, and get the same visual fidelity? Or is there quite a bit
 of per-model hands-on modeling time in the art pipeline to create the
 necessary specular and normal maps, dirt, scuff marks, etc?

 Also, how are you doing the transparency (e.g., the excavator cab windows)?
 Is that simple RenderBin back-to-front rendering, or are you using an
 order-independent technique? If the latter, how are you implementing it?

 Are the trees in the background simple billboards, or truly 3D so that the
 viewpoint can be placed inside them?

 Is the atmospheric scattering simple OpenGL fog, or something more complex?

 I didn't notice any screen-space post-rendering effects (such as depth of
 field), is that correct? If I'm wrong, what screen-space effects are you
 doing, and did you encounter any difficulties with generalizing them into
 your rendering system?

 I'm always looking for more general ways to make stuff like this work, so
 I'm just trying to figure out how much of this demo was general-purpose, and
 how much was non-general, suitable only for demos.

 Thanks,
   -Paul



 On 4/19/2011 9:41 AM, Jean-Sébastien Guay wrote:

 Hi all,

 I just wanted to give you guys a heads up about a prototype project we
 worked on
 lately, and which I think looks great. There's a video of it on our
 YouTube
 channel:

 http://www.youtube.com/user/vortexsim#p/u/1/RhJR0qQJfAQ

 (set it to 1080p if you can)

 We did that demo in 3 weeks (2 people for graphics and physics
 programming, one
 modeler for the excavator model).

 Quick list of effects specific to this project:
 - Normal mapping
 - Specular mapping
 - Reflection mapping
 - HDR (using osgPPU)
 - Soil uses hardware instancing for the many small rocks
 - Mound of earth uses vertex texture fetch to render the height field
 (displace
 vertices, calculate normals in vertex shader)
 - Dust particles rendered with soft particle technique (depth buffer test)
 to
 avoid hard edges

 It's the most GPU-intensive simulator we've ever done, and it looks great,
 and
 it's OSG-based, so I thought I'd show it to anyone who's interested. :-)

 While you're on our YouTube page you can have a look at the other cool
 things
 we've done in the past, the offshore and port crane simulators are recent
 projects and are very nice as well (and they use osgOcean :-) ).

 http://www.youtube.com/user/vortexsim#p/u/9/KBGr74TMTrU
 http://www.youtube.com/user/vortexsim#p/u/0/dZeQ-eBrBDk

 Thanks,

 J-S


 --
  -Paul Martz      Skew Matrix Software
                   http://www.skew-matrix.com/
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




-- 
Maxim Gammer
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OSG-based excavator simulator

2011-04-19 Thread Jean-Sébastien Guay

Hi all,

I just wanted to give you guys a heads up about a prototype project we 
worked on lately, and which I think looks great. There's a video of it 
on our YouTube channel:


http://www.youtube.com/user/vortexsim#p/u/1/RhJR0qQJfAQ

(set it to 1080p if you can)

We did that demo in 3 weeks (2 people for graphics and physics 
programming, one modeler for the excavator model).


Quick list of effects specific to this project:
- Normal mapping
- Specular mapping
- Reflection mapping
- HDR (using osgPPU)
- Soil uses hardware instancing for the many small rocks
- Mound of earth uses vertex texture fetch to render the height field 
(displace vertices, calculate normals in vertex shader)
- Dust particles rendered with soft particle technique (depth buffer 
test) to avoid hard edges


It's the most GPU-intensive simulator we've ever done, and it looks 
great, and it's OSG-based, so I thought I'd show it to anyone who's 
interested. :-)


While you're on our YouTube page you can have a look at the other cool 
things we've done in the past, the offshore and port crane simulators 
are recent projects and are very nice as well (and they use osgOcean :-) ).


http://www.youtube.com/user/vortexsim#p/u/9/KBGr74TMTrU
http://www.youtube.com/user/vortexsim#p/u/0/dZeQ-eBrBDk

Thanks,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG-based excavator simulator

2011-04-19 Thread Greg Myers
Hi J-S,

3 weeks with 2 developers!!!  Now I really feel like a rookie!

Cheers,
Greg

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=38612#38612





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


Re: [osg-users] OSG-based excavator simulator

2011-04-19 Thread Jean-Sébastien Guay

Hi Greg,


3 weeks with 2 developers!!!  Now I really feel like a rookie!


Out of pure modesty, I have to admit we already had a lot of framework 
in place for heavy equipment simulation. Nevertheless, this vehicle and 
the graphical effects I listed were new and were done in that time span.


I won't tell you how many hours a day we worked though! :-) It was a 
crazy project but we pulled it off.


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG-based excavator simulator

2011-04-19 Thread Eduardo Poyart
Hello Jean-Sebastien,

Congratulations on the visual quality, it's really good. I'm curious about
the shadows, did you use OSG's shadow system for them?

Cheers
Eduardo


On Tue, Apr 19, 2011 at 12:41 PM, Jean-Sébastien Guay 
jean-sebastien.g...@cm-labs.com wrote:

 Hi all,

 I just wanted to give you guys a heads up about a prototype project we
 worked on lately, and which I think looks great. There's a video of it on
 our YouTube channel:

 http://www.youtube.com/user/vortexsim#p/u/1/RhJR0qQJfAQ

 (set it to 1080p if you can)

 We did that demo in 3 weeks (2 people for graphics and physics programming,
 one modeler for the excavator model).

 Quick list of effects specific to this project:
 - Normal mapping
 - Specular mapping
 - Reflection mapping
 - HDR (using osgPPU)
 - Soil uses hardware instancing for the many small rocks
 - Mound of earth uses vertex texture fetch to render the height field
 (displace vertices, calculate normals in vertex shader)
 - Dust particles rendered with soft particle technique (depth buffer test)
 to avoid hard edges

 It's the most GPU-intensive simulator we've ever done, and it looks great,
 and it's OSG-based, so I thought I'd show it to anyone who's interested. :-)

 While you're on our YouTube page you can have a look at the other cool
 things we've done in the past, the offshore and port crane simulators are
 recent projects and are very nice as well (and they use osgOcean :-) ).

 http://www.youtube.com/user/vortexsim#p/u/9/KBGr74TMTrU
 http://www.youtube.com/user/vortexsim#p/u/0/dZeQ-eBrBDk

 Thanks,

 J-S
 --
 __
 Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/
 ___
 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


Re: [osg-users] OSG-based excavator simulator

2011-04-19 Thread Jean-Sébastien Guay

Hello Eduardo,


Congratulations on the visual quality, it's really good. I'm curious
about the shadows, did you use OSG's shadow system for them?


Yep, that's osgShadow::LightSpacePerspectiveShadowMapDB in action. There 
were some recent improvements to help with stability of the shadows, 
it's not perfect but it helped.

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG-based excavator simulator

2011-04-19 Thread Torben Dannhauer
Hi,

That looks great! What sky framework did you use? It looks a little bit like 
Simul trueSky...

Cheers,
Torben

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=38617#38617





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