WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-23-2016, 04:01 PM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
Question Cannot get to export Opacity map

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.
Attached Files
File Type: zip tank_opacity.zip (100.7 KB, 1003 views)
Reply With Quote
  #2  
Old 09-23-2016, 05:26 PM
Veleno Veleno is offline
WorldViz Team Member
 
Join Date: Sep 2005
Posts: 148
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.
Attached Thumbnails
Click image for larger version

Name:	mapping.png
Views:	867
Size:	19.0 KB
ID:	836  
Reply With Quote
  #3  
Old 09-25-2016, 09:24 AM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
Michael,
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!
Attached Thumbnails
Click image for larger version

Name:	opacity_map.png
Views:	843
Size:	422.3 KB
ID:	837  
Reply With Quote
  #4  
Old 09-25-2016, 09:42 AM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
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).
Reply With Quote
  #5  
Old 09-26-2016, 11:31 AM
Veleno Veleno is offline
WorldViz Team Member
 
Join Date: Sep 2005
Posts: 148
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.
Reply With Quote
  #6  
Old 09-26-2016, 11:58 AM
Veleno Veleno is offline
WorldViz Team Member
 
Join Date: Sep 2005
Posts: 148
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.
Attached Files
File Type: zip tank_uv animation.zip (72.3 KB, 956 views)
Reply With Quote
  #7  
Old 09-27-2016, 08:38 AM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
Michael,

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!
Reply With Quote
  #8  
Old 09-27-2016, 04:46 PM
Veleno Veleno is offline
WorldViz Team Member
 
Join Date: Sep 2005
Posts: 148
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.

Attached Thumbnails
Click image for larger version

Name:	physics-sample.png
Views:	853
Size:	101.6 KB
ID:	840  
Attached Files
File Type: zip baked physics sample.zip (189.9 KB, 958 views)

Last edited by Veleno; 09-27-2016 at 04:51 PM.
Reply With Quote
  #9  
Old 09-28-2016, 08:58 AM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
Michael,

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!
Reply With Quote
  #10  
Old 09-28-2016, 12:21 PM
Veleno Veleno is offline
WorldViz Team Member
 
Join Date: Sep 2005
Posts: 148
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)
Reply With Quote
Reply

Tags
3ds max, export maps, opacity

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any working export? torbeng Vizard 7 01-30-2014 12:09 PM
Max export results rotated?? SifToN Vizard 1 03-30-2012 11:43 AM
Wrong textures with OSGexp export sleiN13 Vizard 2 09-27-2011 12:05 PM
OSG IVE export 3dmax with baked textures chris_user Vizard 2 04-12-2011 10:33 PM
Successful Cal3D Export But Texture Problems ezanih Plug-in development 2 01-26-2009 04:28 PM


All times are GMT -7. The time now is 04:40 PM.


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