Jump to content

MuzzleFlash not working properly in 2.42


 Share

Recommended Posts

This was working properly in 2.31 but since moving to 2.42 now appears not to be. I get the same result whether using Framewerk or Framework. The muzzleflash texture does not appear to be masked correctly against the main world although works correctly against the background world. It almost looks like the plane is getting lit although lighting is set to off in the mat file.

 

example mat file:

 

texture0="abstract::muzzleflash.dds"
zsort=1
blend=LIGHT
depthmask=0
castshadows=0
lighting=0

shader="abstract::mesh_diffuse.vert","abstract::mesh_diffuse.frag"

 

 

Rendered against Background:

 

post-51-0-69773700-1307287582_thumb.jpg

 

 

Rendered against Foreground:

 

post-51-0-84008600-1307287623_thumb.jpg

 

Do I need to do something different in the mat file now or is this a bug?

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

I had the same problem, turned out to be a parenting issue, parenting worked for me in 2.31 but from 2.32 on did not. In the end I had to add an MF bone to the weapon and then continually reposition the MF plane to the bones pos/rot values to remove the parenting (pain in the "sitting muscle") to allow the MF to be rendered in the correct world with proper blending.

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

Thanks MG, I'll look into this (I'm pretty sure I have it parented to a bone in the weapon currently).

 

A pain in the "sitting muscle" is exactly what this is and another classic example of why I hate upgrading to any newer version of Leadwerks Engine as something like this always happens and we are forced to spend time we really can't afford reworking code that worked perfectly well beforehand for seemingly no gain at all.

 

[EDIT]I have confirmed (as you suggested MG) that if I simply position the plane in the right position rather than have it parented to the weapon then it renders correctly.

 

This is clearly a bug and I'll log it now.

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

I updated all my muzzleFlash code last night both for the player and NPCs to cut the parenting out. It's all working fine now so many thanks MG for the pointer on this :)

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...