FX Shaders in 3DSMAX

125 views
Skip to first unread message

kris...@gmail.com

unread,
May 19, 2009, 7:19:50 AM5/19/09
to O3D-discuss
Love O3D from what I've seen so far! Great job.

Ok, so I've managed to export .dae-files from both Max and Blender and
converted it, and brought into the Simple Scene Viewer; All fine. But
I want to use some of the cool .FX-shaders that ships with 3DSMAX. Is
it possible just by selecting a FX-shader in the MAX Material Editor
and export it as .dae? I know it says so here:
http://code.google.com/apis/o3d/docs/artdesignerguide.html
- But when I export it and try to convert it to o3dtgz it just says:
"Couldn't find compatible technique in effect file "C:\Program Files
(x86)\Autodesk\3ds Max 9\maps\fx\DiffuseBump.fx". Unable to import:
teapot.dae. FAILED to convert 'teapot.dae' to 'teapot.o3dtgz'."
I use 3DS MAX 9 (is this the problem)?

I also tried to unpack the sample "samples\assets\teapot.o3dtgz", and
took out the FX-shader included there and imported into MAX, but then
MAX just prompt:
"shader0.fx Parameters - Error loading file: ID3DXEffectCompiler:
There were no techniques. ID3DXEffectCompiler: Compilation failed" in
the Material Editor.

I know o3d is in the early stages, but from what I've seen you've
already accomplished great things! If only there were some more
"tutorials" around for the non-programmer... :) I'd love to make some,
but my skills are limited and I have to start learning both javascript
and the FX -shader codes from scratch.

Could somebody please elaborate for us non-programmers?

PS: Anyone know if there's a way to use FX-shaders in Blender?

kris...@gmail.com

unread,
May 23, 2009, 9:57:51 PM5/23/09
to O3D-discuss
Nobody knows? :)

Would be great if someone could shed some light on this. Cheers!

Gregg Tavares

unread,
May 23, 2009, 10:54:01 PM5/23/09
to o3d-d...@googlegroups.com
On Sat, May 23, 2009 at 6:57 PM, <kris...@gmail.com> wrote:

Nobody knows? :)

Would be great if someone could shed some light on this. Cheers!

Unfortunately the short answer is "no, you can not take the .fx shaders that ship with 3dsmax and use them on O3D"

On this page it mentions

http://code.google.com/apis/o3d/docs/artdesignerguide.html

"There must be a single ShaderModel2 technique, containing a single pass, comprised of a vs 2.0 vertex shader, and a ps 2.0 pixel shader."

Which I suspect is not true of the .fx files that come with 3dsmax.

On top of that, the shaders must use standard semantics which the 3dsmax files do not.

In other words, a matrix parameter in the shader that is suppose to hold the world-view-projection matrix must have a semantic of "worldViewProjection" which is the standard but 3dsmax .fx files have non-standard ones like worldViewProj or "ViewI"(not-standard) instead of "ViewInverse"(standard)

The longer answer is O3D supports shader 2.0 and so it is possible someone could write a better exporter for Max that supports this better and converts the shaders automatically. Hopefully someone will step up to the plate.


 

kris...@gmail.com

unread,
May 25, 2009, 7:36:43 AM5/25/09
to O3D-discuss
Ah! Ok, thanks for the answer Gregg.
- Let's hope someone's up for the challenge of make a better exporter
for MAX then :)

Cheers!



On May 24, 4:54 am, Gregg Tavares <g...@google.com> wrote:

kaj...@gmail.com

unread,
May 25, 2009, 10:55:38 AM5/25/09
to O3D-discuss
I'm actually working on a custom 3dsmax exporter for O3D. It will be
based on my http://www.multirender.com project, which I've been using
in some custom development rendering/3D-visualization related
projects. The exporter will not be based on the Collada/O3D format,
though, since that way I can support any feature 3dsmax does (at least
in theory), and I don't need to make any dirty hacks to force 3dsmax
info into Collada file.


Cheers,
Jani
Reply all
Reply to author
Forward
0 new messages