Rekindled Phoenix Posted January 27, 2013 Share Posted January 27, 2013 I have had the most difficulty creating transparency that doesn't cause a graphical glitch like the image below. Browsing through the tutorials, it seems that none of them reference using the FramewOrk methods. Do they automatically set the clearmode appropriately? Neither smoke (alpha) or fire (light) MAT settings work to fix this issue. I've also tried creating my own textures to replace the defaults, and have had no luck. Either way, this is my basic emitter setup in C#. //transparency refers to foreground World.Current = Framework.Layers.Transparency.World; Framework.Layers.Transparency.Camera.ClearMode = CameraClearMode.None; Emitter flames = new Emitter(new Vector3(-.5F, -.5F, 0),200); flames.Material = Material.Load("abstract::fire.mat"); flames.Area = new Vector3(.2F, 1, .2F); flames.Radii = new Radii(.5F, 0); flames.Waver = 1; World.Current = Framework.Layers.Main.World; In case you're wondering about the enum values public enum CameraClearMode : int //byte { Unique = -1, // suggested by Canardian, only godrays visible None = 0, Depth = 1, Color = 2, } I'm so frustrated, if this doesn't get fixed it's possible I may have to use another engine at this point. Please help, oh wise and knowledgeable forum users. So you have a secret transparency recipe? EDIT: Secondly, why does the vertical camera angle effect particle intensity? Quote Link to comment Share on other sites More sharing options...
ChrisMAN Posted January 27, 2013 Share Posted January 27, 2013 Does the material set the blend mode to transparency? Quote Link to comment Share on other sites More sharing options...
Rekindled Phoenix Posted January 27, 2013 Author Share Posted January 27, 2013 Yeah, tried different methods (as mentioned above) for both types. Here's an custom mat that's similar to the smoke.mat texture0="abstract::flame-blur2.dds" depthmask=0 blend=alpha zsort=1 shader="abstract::particles.vert","abstract::particles.frag" It's using blend=alpha. I assume that's the same as a 'transparency' setting. Quote Link to comment Share on other sites More sharing options...
DigitalHax Posted January 28, 2013 Share Posted January 28, 2013 Try this, instead of shader="abstract::particles.vert","abstract::particles.frag" this, shader="abstract::particles.vert","abstract::particles_alpha.frag" Quote Win7 64bit, Leadwerks SDK 2.5, Visual Studio 2012, 3DWS, 3ds Max, Photoshop CS5. Life is too short to remove USB safely. Link to comment Share on other sites More sharing options...
Pixel Perfect Posted January 28, 2013 Share Posted January 28, 2013 As DigitalHax has alluded to, the key thing here is the shader usage and definition. As a general rule: Use _alphatest versions of the frag shaders for full transparency (is either fully transparent or not) which can be used in the main world. So great for things like vegetation etc. This treats all transparency values above a threshold value as fully transparent and is more efficient to render. Use _alpha versions for all graduated transparency which needs to be in the transparency world. Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
DigitalHax Posted January 28, 2013 Share Posted January 28, 2013 Also to your other problem, it might be that the particles can appear blurry, as usually the particles are rendered in the foreground world, and so if it is being viewed over the skybox, and with DOF activated it will treat the particles as being far away. Just disable DOF if possible. 1 Quote Win7 64bit, Leadwerks SDK 2.5, Visual Studio 2012, 3DWS, 3ds Max, Photoshop CS5. Life is too short to remove USB safely. Link to comment Share on other sites More sharing options...
Josh Posted January 28, 2013 Share Posted January 28, 2013 Does the example in the underground scene work? Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Rekindled Phoenix Posted February 10, 2013 Author Share Posted February 10, 2013 Thanks guys for all of your answers Still stuggling, since the .frag file you mentioned is missing... Try this shader="abstract::particles.vert","abstract::particles_alpha.frag" I looked throughout the shaders.pak (version 2.5) and I didn't see anything labeled with particles and an alpha frag shader. When I try to use them anyway, since I assumed they were special labels at first, my application freezes. Does the example in the underground scene work? Yes, though nothing in that scene exposes particles to the skybox. I'm running a scene within a large open outdoors area, so the chances of particles overlapping the background are high. Could you please attach the appropriate frag shaders to this post? Quote Link to comment Share on other sites More sharing options...
Rekindled Phoenix Posted February 19, 2013 Author Share Posted February 19, 2013 Anyone got any suggestions? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.