WorldViz User Forum

WorldViz User Forum (
-   Vizard (
-   -   Cannot get to export Opacity map (

tokola 09-23-2016 04:01 PM

Cannot get to export Opacity map
1 Attachment(s)
I'm struggling to export the opacity of a map, following the instructions here. I am not sure why it gives me such a hard time, but no matter what I've tried, I cannot get the alpha in Vizard (or the Inspector). I am not sure if I need to use the vizfx.addChild(), but in the past I've used texture alpha exported from Max with no problem (simply with viz.add()).

Am I missing something very simple? (please, see attached files). Weirdly enough the map (Map0.tga) does not have any alpha information. But even when I added it with Photoshop, it still is ignored by Vizard.

Veleno 09-23-2016 05:26 PM

1 Attachment(s)
Hi Tokola,

I found the cause of your issue - your checker map was set to "VW" in the map coordinates. VW and WU are not currently supported.

tokola 09-25-2016 09:24 AM

1 Attachment(s)
thank you; I din't know about this (you might want to add it in the article about shaders). I changed the setting to UV and get different results in Max viewport, render, Worldviz Inspector, and Vizard runtime! You can check the image and see for yourself that one issue is tiling, while the other one is that Vizard does not recognize full transparency of the map (in neither Inspector or run-time). The Inspector seems to maintain the checker shape (ignoring U tiling: 0) with gradient (I'm not sure where it reads this from) but not the diffuse map color. Vizard run-time is closer (no tiling issue) but still draws the 100% transparent part of the object (top).

I guess you can understand what I'm trying to do. I want to simulate the level of a liquid inside a tank and then use UV animation to animate it. Your help is greatly appreciated!

tokola 09-25-2016 09:42 AM

Let me add, that exporting this type of animation (either by V offset or U angle) does not show up in either Inspector or Vizard run-time ('Animations' checked in OSG exporter).

Veleno 09-26-2016 11:31 AM

Hi Tokola,

I'm a little pressed for time with projects so I can't give detailed answers on everything right now, but the short answer is I'd switch to a Gradient Ramp or a static texture instead of Checker, and I'd make sure you have keyframes for the UV animation because that for sure should be showing up in Inspector.

The most likely reason the texture is showing gray when tiling is set to 0 would be from sampling from the edge between black and white.

I'll give you some details of how the exporter deals with parametric textures (checker, stucco, marble, etc.):
Parametric textures are rendered down to static images at a fixed resolution of 256 x 256. It works using the same method as Max's "Render Map" utility in the material editor, with the same limitations.

Things like a 1.0 x 1.0 checker map work normally, while non tiling ones based off things like perlin noise like Marble and Cellular can have unintended results. It's better to manually render the textures to get more control.

Changing the tiling on a parametric texture affects the region that is rendered, so a 1.0 x 1.0 texture looks like this:

while a checker texture with modified tiling, a W angle, and a U offset looks like this:

These are both rendered from Max but the result in Vizard is pretty much identical, minus the anti aliasing.

Veleno 09-26-2016 11:58 AM

1 Attachment(s)
And here's an upload of a version of the tank with the UV animation fixed. I also added in an example of a disc that scales and moves down with the UV animation to act as the top of the fluid.

I'd recommend disabling backface culling on the fluid by checking the "2-sided" option in its material. I'd also disable blend and enable multisampled alpha on the geometry either through Inspector or through the script.

tokola 09-27-2016 08:38 AM


thanks a lot for the explanation and example animation. It works perfectly! I haven't actually uploaded the file with the animation; I just reported it didn't work.

Let me ask a quick (and possible naive) question. How come I cannot change the material of the object? Neither the diffuse color or bitmap affect the objects (oil animated or disc) in the scene. Can it be related to this error I get about using MassFX plugin not supported in Max 2015, when opening the file?

Thanks again for your invaluable help!

Veleno 09-27-2016 04:46 PM

2 Attachment(s)
Hi Tokola,

It's unlikely. I'm not sure why you wouldn't be able to modify the materials - it works for me in my copy of 2015 so I'm not sure what would be causing the problem unless there's some kind of issue between commercial and student versions of Max. You could try seeing if you have a "dead" copy of a material by clearing the editor and using the eyedropper tool to regrab the material. You could also try merging the geometry into a fresh Max file to see if that clears it up.

MassFX is Max's physics sim plugin, and in this case you're getting the error because I saved the file out of Max 2016 into 2015 format. It can be used to calculate physics simulations and bake them into keyframes. Those can then be used as a canned animation in Vizard for things like rockslides, earthquakes, explosions, etc. See the attached zip file for a sample.

tokola 09-28-2016 08:58 AM


I'm not sure why I get this, but will look into it a bit further when I get the chance.

Thanks for sharing the info about MassFX. It seems like a very useful plugin to have. I might consider upgrading to Max 2016, if I need to use something like this in the future.

I hope this thread is useful for people working with Map and UV animation export from Max to Vizard.

Thanks again for your assistance!

Veleno 09-28-2016 12:21 PM

No problem and good luck! I hope it will too. :)

(by the way, no need to upgrade - Max 2015 has a version of it too, just a previous iteration)

All times are GMT -7. The time now is 06:30 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC