Results 1 to 4 of 4

Thread: mental Mill and Mudbox 2009

  1. #1
    Join Date
    Oct 2008
    Posts
    6

    Default mental Mill and Mudbox 2009

    I have been going back and forth trying to figure out how to get Mental mill shaders to work in Mudbox 2009. In the Mudbox documentation, it states it uses a simular format as Maya's CGFX syntax. When I try the Maya export in mental Mill it doesnt work.

    Is there a difference between the formats, or am I exporting the shaders incorretly?

    Thanks,

    Here is the mubox documentation.
    http://download.autodesk.com/esd/mud...6901a-7957.htm

    A trial version of Mudbox is available here.
    http://usa.autodesk.com/adsk/servlet...&siteID=123112


    Mudbox supports the CgFX material specification on qualified graphics cards. CgFX is a shader specification that enables the creation of custom materials that use the power of your computer’s graphics card to produce many interesting materials and rendering effects in real time.

    The main advantage of developing and using CgFX materials is that they are portable across many hardware and software applications (for example, between Maya and Mudbox) as well as other hardware platforms that support the CgFx specification (for example, games consoles).

    For more information about the CgFX specification and how its structured, refer to the following resource: http://http.developer.nvidia.com/CgT...ppendix_c.html

    For an in depth tutorial for creating your own CgFX materials, please refer to the following resource: http://http.developer.nvidia.com/CgT...ppendix_c.html

    Notes on using CgFX files within Mudbox

    The CgFX file must contain at least one valid technique. A technique is a set of instructions that describe how to achieve a particular effect.
    If the CgFX material file contains annotations for the assigned variables they will be used to generate the properties items within the Properties window for the CgFX material when it gets compiled.
    If the CgFX file contains float3 vCameraLocalPosition, float3 vLightLocalPosition & float4x4 mModelViewProject variables, Mudbox will automatically assign the appropriate values to them.
    Mudbox supports the ability for users to specify textures in their CgFX file that can be painted on within Mudbox. Using our MetaSampler struct a user can define a sampler that contains a texture that a user can select as a paintable channel in Mudbox.
    Mudbox supports a subset of the SAS annotations and semantics. The following semantics are supported: World, WorldInverse, WorldTranspose, WorldInverseTranspose, WorldView, WorldViewInverse, WorldViewTranspose, WorldViewInverseTranspose, WorldViewProjection, WorldViewProjectionInverse, WorldViewProjectionTranspose, WorldViewProjectionInverseTranspose, View, ViewInverse, ViewTranspose, ViewProjection, ViewProjectionInverse, ViewProjectionTranspose, ViewProjectionInverseTranspose, Projection, ProjectionInverse, ProjectionTranspose, ProjectionInverseTranspose
    The following annotations are supported: UIWidget, UIName, UIMin, UIMax
    NoteThe definitions for the above semantics and annotations are found on nVidia's webpage.
    Loading CgFX files into Mudbox

    Mudbox automatically generates the materials user interface for a CgFX material in the CgFX Based Material properties window for any CgFX files that is specified from the effects directory (see above, Notes on using CgFx files within Mudbox).

    NoteThe Program Files/Autodesk/Mudbox/effects directory also contains a few example CgFX materials. Files placed in this directory can be in .cgfx format (unencrypted) or in .bin format (encrypted).
    CgFX materials are compiled each time Mudbox is launched. The more/complicated the CgFX materials in the effects directory, the longer the launch time for Mudbox.

  2. #2
    Join Date
    Oct 2008
    Posts
    6

    Default what I have learned

    I got some feedback in the Mudbox forum. Someone mentioned this shader has few issues that need to be corrected for it to work properly.

    This shader uses an unsized array of ILight interfaces for its lights. In addition there are no light implementation structs in the shader. Typically an unsized array needs to be sized from within the C code using the shader. Mudbox does not have the capability to size unsized arrays from arbitrary CGFX shaders. The Cg users manual shows examples of unsized array usage.

    It also looks like the normals are all zero.

    Are there any examples available that show how to make light implementation structs with sized arrays?

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

    Default

    Hi faust,

    without having worked with mudbox yet, I can recommend to compare the shader code of CgFX files that work with Mudbox with those that work in Maya. I assume that there are some examples along with Mudbox and Maya comes with a few

    If the shaders use pretty much the same parameter structuring, take a close look how semantics and annotations are defined:
    These usually point out, what variables receive which values. So this is a hint for the application which is implementing the shader so that it knows that a variable float3 position_L1 : POSITION receives a light position. It's up to the application, however, to interpret this in the right way or even to interpret it at all.

    Usually it's written in the application's documentation which annotations and semantics are recognized by the application. If these are different from the ones that are exported by mental mill for Maya, you can (as a preliminary solution) get around that issue by replacing the according lines in your CgFX file.

    Best Regards,
    Ruediger

  4. #4
    Join Date
    Dec 2008
    Posts
    9

    Default

    are there any news on mudbox export..?
    hoping for the mud SDK and shader import infos...

Posting Permissions

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