I've been trying to use the material editor to get an axes model to draw in front of everything else (like the light axes helper in Ofusions viewport in max).
I can get it to work in ofusion viewports, but when I load the axes osm into my app, the other meshes that the axes is assigned to when mouse selected are still sorting with it and obstruct the axes mesh.
(I'm basicly trying to make a transform gizmo for my editor)
professor420
06-05-2007 06:10:19
I think add "depth_func always_pass" to the material pass, or edit into your oFusion Pass, or your actual .material file for the 'gizmo.'
Lioric
06-05-2007 19:16:56
Is the axes material loaded correctly?
Post the material used
Here's a pic,
top left is the regular max shaded viewport
top right is the gizmo in our app
main, is the ofusion rendering
And here's the material being used.
material Green
{
technique
{
pass
{
ambient 0 1 0 1
diffuse 0 1 0 1
specular 0 1 0 1 0
emissive 0 1 0 1
depth_func always_pass
}
}
}
The other materials are the same just with different color values.
depth_check off
Hmph, that didn't work either. I'm starting to think that there may be a problem on the coding side and how FLOW is the integrating scene loader and scene management.
Lioric
07-05-2007 16:30:19
Review that the axis in the same RenderQueueGroup as the rest of the objects, or in a higher render queue group (to render it after the other objects)
Our C++ coder is investigating it further and seems convinced that its an ofusion problem, but is trying to pinpoint the problem before asking any further questions.
One thing I just discovered is that the axes are drawing correctly when I enable shadows in one of our apps. At the moment they are additive stencil shadows.
Shadows turned off and it no longer gets drawn in front.
Lioric
08-05-2007 17:06:49
Then the issue probably is in your application
Are all the geometry in the same render queue group?
Do a test, load a portion of your geometry and the axis mesh in a simple application (load the objects and render with default scene settings) and see if the results are similar
Well, got it working finaly
We wrapped render queue controls into flow, and got it working with a little help there. depth_func always_pass then started working.
Here's a quick screenie from the OSM world editor app were working on.
It loads Multiple OSM and mesh files and saves out new .OSM scene files. Only been working on it the past week, basing it on how 3dsmax works with simple heirarchy linking, Shift clone/instancing. It's coming along nicely

Havent linked up the UI yet, incase your wondering.
We will release a free binary version for the ogre community on FLOW's release, and the FLOW ogre wrapper for Blitzmax will include the full .BMX source code for the editor. (not the C++ code)
Lioric
14-05-2007 16:55:22
That editor looks excellent, im sure it will be very useful. Great job