Game Development Community

Particles white out RefractionMaterial

by Eric McQuiggan · in Torque X 3D · 08/18/2009 (1:47 pm) · 7 replies

Hey Crew,

I'm trying to create a nifty light bending bubble effect, but when ever a particle is on the screen, the refracted bubble seemingly stops clearing and just keeps adding colours every update until it is completely white. When the particles are no longer on the screen, it returns to its previous refracted self. I've tried turning on different flags but it didn't seem to solve it.

#1
08/18/2009 (5:55 pm)
If I have particle effects, will that prevent post process effects? I can't seem to get post process effects in my main project, but I can in an older version of the project, pre-particles.
#2
08/19/2009 (4:46 pm)
Can you post a quick screen capture? Also, is there a normal map for the bubble. Adding particles to the scene should not clear out a refraction effect, but there might be something unexpected going on in the rendering engine.

John K.
#3
08/19/2009 (5:13 pm)
Before particles
ericmcquiggan.com/pics/RefractionBubbleWithOutParticle.png
After Particles
ericmcquiggan.com/pics/RefractionBubbleWithParticle.png
And the bubble has a normal map, though not one created for it. I borrowed one from the buildings.
#4
08/23/2009 (6:55 pm)
Thank you, Eric. This is a bug in the rendering code. The translucency is being masked out. I'll take a closer look at the engine code and see that it makes it into the next release. Do you have the engine source code? If so, I can post the lines of code to change here, too.

John K.
www.envygames.com
#5
08/26/2009 (12:12 pm)
I do have access to it, Thanks!
#6
08/29/2009 (4:14 pm)
Eric, quick question... For the object rendering white, can you check the material definition and see if the following flag is set in the XML?

<IsTranslucent>true</IsTranslucent>

John K.
www.envygames.com
#7
09/03/2009 (11:41 am)
Yeah, I had set it through code as true, before setting the object's material.

How the Material is created:

RefractionMaterial material = new RefractionMaterial();
            material.NormalMapFilename = "data/shapes/House/house_spec.png";
            //material.IsAdditive = true;
            material.RefractionAmount = 0.005f;
            //material.IsWireframe = true;
            //material.IsRefractive = true;
            material.IsTranslucent = true;