WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-18-2008, 11:36 AM
shivanangel shivanangel is offline
Member
 
Join Date: Feb 2006
Location: New Jersey
Posts: 182
Max -> Vizard, Two Sided Textures

Hello,

I am trying to move textures from Max to Vizard using the IVE format.
In Max I have set up a series of planes with grass textures.
These textures are .tga files with an alpha channel.

My aim is to create a forest with a bunch of these grass textures at
perpendicular to one another.

My problem is that regardless of the settings I have so far put into Max
my planes come out in Vizard with only one side visible. If I move
to the opposite side the grass planes completely disappear.

Is there a simple flag I can set to enable 2-sided textures?

Thanks,
George
Reply With Quote
  #2  
Old 11-18-2008, 12:15 PM
shivanangel shivanangel is offline
Member
 
Join Date: Feb 2006
Location: New Jersey
Posts: 182
Quick Fix:

Disabled Backface Culling on the models.

Thanks,
George
Reply With Quote
  #3  
Old 11-18-2008, 12:51 PM
Veleno Veleno is offline
WorldViz Team Member
 
Join Date: Sep 2005
Posts: 148
Hi shivanangel,

To disable backface culling on all objects with a particular material, check "2-sided" in that material's "shader basic parameters" in max's Material Editor.

To disable it by object, go to the helpers part of the modify panel, select "openscenegraph" as the object type, and create a stateset modifier. Add the objects to stateset modifier and make sure the box that says "cull face" in the GL Mode rollout is unchecked.


Making grass they way you described is probably going to give you some transparency problems that cause the background color of the scene to show through. This happens whenever partially transparent objects intersect each other. This can be solved by applying the following code to your exported model:

Code:
import viz
viz.setMultiSample(4) #lower multisample = lower quality, higher framerate, and vice versa

viz.go()

trans = viz.add('00.ive')

GL_SAMPLE_ALPHA_TO_COVERAGE_ARB = 0x809E
trans.disable(viz.BLEND)
trans.enable(GL_SAMPLE_ALPHA_TO_COVERAGE_ARB)
trans.draworder(0)
I recommend exporting the grass and other similar objects as a separate export and applying only to that. In most cases glass should not need this unless you have all the glass in a scene as one object or are getting transparency problems. Glass should also have its own export since it may need a higher sampling rate to look good than the grass does.
Reply With Quote
  #4  
Old 11-18-2008, 03:28 PM
shivanangel shivanangel is offline
Member
 
Join Date: Feb 2006
Location: New Jersey
Posts: 182
Wow, awesome advice.

You answered the question I had yet to ask!

~George
Reply With Quote
  #5  
Old 12-02-2008, 10:11 PM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
Michael,

What do you mean by: "Glass should also have its own export since it may need a higher sampling rate to look good than the grass does."

What is sampling rate and why does a separate export increase this?
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
  #6  
Old 12-04-2008, 03:15 AM
Veleno Veleno is offline
WorldViz Team Member
 
Join Date: Sep 2005
Posts: 148
Rate wasn't the right word for me to use, but basically I was saying that something like grass or a leaf that just has alpha on it's edges and doesn't have any big obvious gradient alphas can get away with a lower multisample value than something like glass that is transparent all over. It needs to be even higher to look good the alpha is a gradient that needs to have a lot of different steps to its opacity.

Now that I think about it...i'm not sure if you're able to set different amounts for multisample for different models. If you only get to set one value, then I'd say avoid situations where you'd need to set it high for things to look good and try to stick to regular alpha blending for glass and similar objects.
Reply With Quote
Reply

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
Vizard and Augmented Reality realvision Vizard 4 04-04-2008 10:59 AM
Vizard won't run wouters Vizard 5 02-05-2008 11:12 AM
Fall 2007 release of Vizard R3 3 D Announcements 0 10-15-2007 04:50 PM
Matlab and Vizard brystewa Vizard 1 09-18-2006 03:11 PM
Exporting from Maya to Vizard jfreeman Vizard 2 06-30-2005 02:14 PM


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


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