View Single Post
  #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