Results 1 to 8 of 8

Thread: Using MentalMill Shaders (.fx files) with VRML?

  1. #1
    Join Date
    Aug 2009
    Posts
    4

    Default Using MentalMill Shaders (.fx files) with VRML?

    Hey there,

    I'm Philipp Kratzer, Bachelor-Student for Film and Animation at the SAE-Institute of Vienna. I'm currently doing my bachelor exams on "Augmented Reality - Advanced Presentation Methods".

    I was wondering if it is possible to get Shaders produced with MentalMill (artist edtion) to run within a VRML-File.

    I read about integrating .fx files into the VRML code.
    Can anyone here tell me if this is really possible and if yes how it is done?

    In fact, i want to integrate the "Reflective Car Paint" shader shown in the video tutorial series on the mental images homepage (subcategory mental mill of course) into a VRML-file to enhance the quality of a augmented reality car presentation.

    I've got:
    * a car model (Golf VI, obj from turbosquid) exported as a VRML2 file with a standard
    vrml shader setup (phong or blinn only)
    * a mental mill (artist edition) shader setup for the mentioned reflective car paint shader

    I'm using this realtime renderer from Bitmanagement Software as Engine: BS-Contact
    Some information related to DX9 Shadersupport within this renderer can be found on their homepage, but for me as a absolute beginner it's hard to understand. But maybe it's helping you guys:
    http://www.bitmanagement.com/develop...er/shader.html

    Since i definitely know that i'm going to need a .fx file to get this up and running (and also knowing that i'm not able to export with the artist edition) i wanted to ask if it is possible tbably export mehat one of you could pro this specific shader for once. I'm a student and can't afford buying the mill just because of one single export. I would apreachiate it very much if you could give me a hand here.

    My last and biggest problem is, that i have to get this running til 4th of september. I know this is very very on short notice, but the least i want to do is try

    Thx alot for your help in advance! I'm looking forward to your answers!

    best regards
    Philipp Kratzer

  2. #2
    Join Date
    Mar 2009
    Location
    Frankfurt Germany
    Posts
    103

    Default

    Hi there,
    use fxcomposer:
    http://developer.nvidia.com/object/f...oser_home.html

    there is also a library of shaders:
    http://developer.nvidia.com/object/f..._projects.html

    greetings from frankfurt

    Olaf

  3. #3
    Join Date
    Aug 2009
    Posts
    4

    Default

    Thx for your reply!

    I know fx-composer and i also already know the library of nvidia. But noone of this shaders provided by them fits my needs...

    My programming skills aren't that good that i'm able to code within fx-composer. This is the reason why i choose MentalMill to get me the shader-result i want. Achiving the same with pure text - code - there isn't even a chance that i can do this with my knowledge right now. *G*

    I figured out how to integrate an FX file with some help, so now...the only thing missing is the FX-File it self - meaning - i'm still seraching for someone who would be so kind to export me my shadernetwork for once so that i don't have to buy the standard version of the mill because of one single export.

    I hope we can find a solution together!
    Thx again!

  4. #4
    Join Date
    Jun 2007
    Location
    Berlin
    Posts
    447

    Default

    Hi Scratch,

    I hope everything worked out fine. If you got nice results, it would be great if you could share them in the forum here. I guess there are a few people who are interested in what results you were able to achieve.

    Best Regards,
    Ruediger

  5. #5
    Join Date
    Aug 2009
    Posts
    4

    Default Results :)

    Hey Rüdiger

    Of course! It was just amazing how easy it has been to work with the mill. I never used it before...and it worked out just well!

    Here is a Screenshot of what the Shader looked like in the end. I integrated the exported .fx file into a VRML-file and opened it in a realtime-renderer called BS-Contact. You can find detailed information on how to integrate the .fx file if you follow the link posted before in my thread.

    It doesn't look very fancy at the first glance, but when you remember that it is integrated in a vrml-file which is normally limited to standard phong shading, it's (for me) quite amazing what is possible with this .fx integration and DX9 rendering - even in vrml!

    http://www.bitmanagement.com/develop...er/shader.html

    There is also a Video-Interview done by Vorarlberg Online News where you can watch the shader in action, included in my last Project called AUGMENTED REALITY CAR PRESENTATION. It is a project that was realised for the Dornbirner Herbstmesse 2009, a local exhibition of all diffrent kinds of companies. I did this for Autohaus Pirker, a VW- reselling partner. He is now able to present his cars to the customers in realtime and "hands on" Take a look:

    http://www.vol.at/news/tp:vol:messe/...90910-06495409
    (I'm sorry that it is only in german, but what i'm saying isn't that important anyway *G*)

    Hope you like it! Thx again to Rüdiger and MentalImages for their great support!


    Enjoy!
    Philipp
    Attached Images Attached Images
    Last edited by Scratch; September 12th, 2009 at 09:01.

  6. #6
    Join Date
    Oct 2009
    Posts
    1

    Default 3ds max 2010

    I understand it has mental mill in it; but I have not tried it so I dont know if it exports as you wish but I would assume it does.

  7. #7
    Join Date
    Jul 2010
    Location
    Russia, Moscow
    Posts
    1

    Default

    Any clues on how to manually integrate mental mill shader into a vrml file? Trying to do the same, but results is quite weird atm.

  8. #8
    Join Date
    Aug 2009
    Posts
    4

    Default manually integrate .fx shader into VRML

    Hey there,

    i was asked to give a little introduction on how to integrate .fx shaders (exported out of mental mill) into a VRML 2.0 file, and of course I'm happy to do so.

    Here we go:

    BS-Contact Support page - how to integrate .fx shaders to VRML
    http://www.bitmanagement.de/develope...er/shader.html

    Detailed Documentation for VRML:
    http://www.web3d.org/x3d/specificati.../nodesRef.html



    HOW TO INTEGRATE .fx SHADERS:


    STANDARD MATERIAL DEFINITION (example!)
    Shape
    {
    appearance Appearance
    {
    material DEF Glas_weiss_vorne_0 Material
    {
    diffuseColor 0.000000 0.000000 0.000000
    specularColor 0.500000 0.500000 0.500000
    emissiveColor 0.000000 0.000000 0.000000
    shininess 1.000000
    transparency 0.322320
    }
    }
    }


    must be changed/replaced with:



    DEFINITION OF THE .fx SHADER (example-code that you see the things which
    need to be changed. The code is NOT in relation with the standard material
    example above! )
    Shape
    {
    appearance DEF Lack_15 ShaderAppearance
    {
    vertexShader DEF VertexShader1 VertexShader
    {

    #this shader also needs a environment map which is defined here. (Note that
    this is specific to this shader and not necessary in general!)

    field SFNode __msl_Environment_map_spherical_1_env_tex DEF IT ImageTexture
    {
    url [
    "uffizi_probe.dds"
    ]
    }

    # Exposed Fields are Shader - Attributes which can (once defined) be
    modified by other programms -> more information about exposedFields:
    http://www.lighthouse3d.com/vrml/tut...ex.shtml?event
    #Light-Color
    exposedField SFColor msl_key_point_light_color 1 1 1
    #Light-Intensity
    exposedField SFFloat msl_key_point_light_intensity 3
    #Light-Falloff-Exponent
    exposedField SFFloat msl_key_point_light_distance_falloff_exponent 0

    #Car Base-Color
    exposedField SFColor msl_reflective_car_paint_phenomenon_color1 0.86 0.86
    0.92
    #Car Fallof-Color
    exposedField SFColor msl_reflective_car_paint_phenomenon_color2 0.63 0.63
    0.7
    #Car Falloff-Amount
    exposedField SFFloat msl_reflective_car_paint_phenomenon_amount 0.934010

    #Glossy Color
    exposedField SFColor msl_reflective_car_paint_phenomenon_specular_color
    0.93 0.85 0.75
    #Glossy Intensity
    exposedField SFFloat msl_reflective_car_paint_phenomenon_specular_scala r
    0.10

    #Glossy Intensity
    exposedField SFFloat msl_reflective_car_paint_phenomenon_specular_shini ness
    8.629440
    #Specular Shininess
    exposedField SFFloat
    msl_reflective_car_paint_phenomenon_specular_shini ness_2 400

    #Reflection Falloff
    exposedField SFFloat msl_reflective_car_paint_phenomenon_amount_2 3
    #Reflection Surface Color
    exposedField SFColor msl_reflective_car_paint_phenomenon_color1_2 0 0 0
    #Reflection Edge Color
    exposedField SFColor msl_reflective_car_paint_phenomenon_color2_2 0.8 0.8
    0.8

    url "carpaint.fx"
    }

    }
    }


    make sure that you excange material USE with appearance USE for all objects
    using the .fx shader!

    EXAMPLES:

    OBJECT WTIH .FX-Shader on it:
    DEF carbody3 Transform
    {
    translation 0.000000 0.000000 0.000000
    rotation 0.000000 0.000000 0.000000 0.000000
    scale 1.000000 1.000000 1.000000
    scaleOrientation 0.0 0.0 1.0 0.0
    children Shape
    {
    appearance USE Lack_15
    geometry USE carbody3_0Geo
    }
    }

    OBJECT WITH STANDARD MATERIAL on it:
    DEF glossy_bl0 Transform
    {
    translation 0.000000 0.000000 0.000000
    rotation 0.000000 0.000000 0.000000 0.000000
    scale 1.000000 1.000000 1.000000
    scaleOrientation 0.0 0.0 1.0 0.0
    children Shape
    {
    appearance Appearance
    {
    material USE Plastik_11
    }
    geometry USE glossy_bl0_0Geo
    }
    }


    Hope that helps!

    all the best!
    Philipp

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •