[HGE] Random texture flip rendering artifacts (RESOLVED)

All information about Magic Particles: news, question, comments, etc.

[HGE] Random texture flip rendering artifacts (RESOLVED)

Postby sonictk » Thu Feb 18, 2010 4:15 am

Hello again. I have another problem that I'm trying to work out with Magic Particles/HGE engine.

For background information, I am working on a project that uses the HGE engine and Magic Particles to handle special effects. My current issue is that certain effects that I did seemed to render fine in the Magic Particles render window, but when placed in the engine, began to give artifacting around the edges of the texture. This seems to only occur with particle types that employ random texture flipping of any sort.

When random texture flipping is turned off the effect renders perfectly but sometimes I would like to use texture flipping to achieve certain visual effects.

I have tried to save the emitter in API format using Save As...(API) manually as well just in case, but it failed to work either: the rendering artifacts still occur.

A screenshot of what I'm talking about (with blurred main character):

Image
(The edges of the textures have some weird artifacts. Like they are being overlaid with other textures or having less alpha than they should.)

For now, I am working around this by basically just using two identical textures except that one is flipped and bringing them in as two separate textures. However this wastes resources and I was hoping that there might have been something that I overlooked.

I would again appreciate any help that anyone can provide on resolving this matter.

As before, I am still on Magic Particles 1.61 (Dev) using the older version of the wrapper (The programmers are choosing to stick with this for now as we are already rushing and cannot afford the time to fix any compatibility issues that might occur if we do decide to switch to the latest version).
Last edited by sonictk on Mon Feb 22, 2010 2:02 am, edited 1 time in total.
sonictk
 
Posts: 28
Joined: Sun Feb 07, 2010 6:31 am

Re: [HGE Engine] Rendering artifacts during random texture flip

Postby Odin_KG » Thu Feb 18, 2010 2:07 pm

Hello

When random texture flipping is turned off the effect renders perfectly but sometimes I would like to use texture flipping to achieve certain visual effects.

I have checked this situation and I have not seen the error.
Did you see this bug in HGE-wrapper? (without your code).

When random texture flipping is turned on, other way of creating of texture atlas is used.

Can you send your special effect to me (support@astralax.com)?
User avatar
Odin_KG
Administrator
Administrator
 
Posts: 255
Joined: Sat May 09, 2009 10:53 pm

Re: [HGE Engine] Rendering artifacts during random texture flip

Postby sonictk » Thu Feb 18, 2010 2:19 pm

I have checked this situation and I have not seen the error.
Did you see this bug in HGE-wrapper? (without your code).

I know, it's most probably not the fault of Magic Particles or the wrapper itself. I'm not sure, but I think the programmers more or less just took the standard HGE/MP wrapper as it was (from the site) without modifying it. But this was the old version of the wrapper (when 1.61 was out), so I don't know if that would make a difference.

When random texture flipping is turned on, other way of creating of texture atlas is used.

This might have have something to do with it as I remember one of the programmers saying that they were planning on limiting the texture atlas that each spell effect would have. I'll pass this on and see if it means anything to him. Or maybe it doesn't and I'm being silly; I'm not much of a programmer. :(

Can you send your special effect to me (support@astralax.com)?

No problem. I'm at home right now though, I'll send you that particular one once I get back to the office. But basically any effect at all that I use with random texture flipping in any axis (x or y) will give this problem. I will also try and see if I can reproduce this problem with just the HGE wrapper instead of the full engine.

Also, thanks for the quick reply; your help is very much appreciated. :)
sonictk
 
Posts: 28
Joined: Sun Feb 07, 2010 6:31 am

Re: [HGE Engine] Rendering artifacts during random texture flip

Postby sonictk » Fri Feb 19, 2010 2:15 am

Update: I have tested the effect in the newer version of the wrapper and it seems to work fine.

I did try to use the old wrapper that we are currently using and it appears to render fine as well...but I only replaced the newer magic.lib with the old version. Is it necessary to replace hge_wrapper.exe as well? I am assuming it is just the HGE engine executable and thus not related to how the Magic Particles wrapper works but I am not sure.

Alternatively, could you explain a little more about how the method for texture atlas creation is changed when texture flipping is enabled? I may not be able to understand everything but it might mean something to the programmers.

Again, thanks. :)
sonictk
 
Posts: 28
Joined: Sun Feb 07, 2010 6:31 am

Re: [HGE Engine] Rendering artifacts during random texture flip

Postby Odin_KG » Fri Feb 19, 2010 2:53 am

I have tested the effect in the newer version of the wrapper and it seems to work fine.

Yes, I have tested too.

I did try to use the old wrapper that we are currently using and it appears to render fine as well...but I only replaced the newer magic.lib with the old version. Is it necessary to replace hge_wrapper.exe as well?

New and old versions use different magic.dll, magic.lib and magic.h (replace all files). But I think you can use new version of wrapper without combining with old version.

I think you can try to install "Magic Particles (Dev) Free 1.72". This version works with API the same as commercial version.

When random texture flipping is turned off the effect renders perfectly but sometimes I would like to use texture flipping to achieve certain visual effects.

1) You can try to turn on "Flip X" and "Flip Y" for all particles.
2) You can try to turn on "Flip X" only for all particles.
These situations are not the same for my wrapper and your programmer :-).
User avatar
Odin_KG
Administrator
Administrator
 
Posts: 255
Joined: Sat May 09, 2009 10:53 pm

Re: [HGE Engine] Rendering artifacts during random texture flip

Postby sonictk » Fri Feb 19, 2010 3:33 am

New and old versions use different magic.dll, magic.lib and magic.h (replace all files). But I think you can use new version of wrapper without combining with old version.
Hmm, ok. Then I suppose it has to do with the way we manage textures as it seems to be fine in both old and newer versions of the wrapper. =\

I think you can try to install "Magic Particles (Dev) Free 1.72". This version works with API the same as commercial version.

I would really prefer to use the newer version as well. However as I said we really cannot afford any major issues from switching between versions as the programmers have a lot to deal with apart from the visual effects so that's how it is. =\

1) You can try to turn on "Flip X" and "Flip Y" for all particles.
2) You can try to turn on "Flip X" only for all particles.
These situations are not the same for my wrapper and your programmer :-).

I just tried this. Even when all particles within the emitter are set to flip randomly, the rendering artifacts still occur.

However, I just noticed something: if I limit the maximal size of a texture map in the Program Options, the appearance of the rendering artifact is changed. (For example, when changing between 1024* and 512* texture size limits). Additionally, if I place the texture used in Texture Storage instead of utilizing it independently, the appearance of the rendering artifact changes as well. In both cases there appears to be a texture appearing which does not seem to be in the actual emitter at all.

Shown here:

Image

In any case, I will experiment more and try and see if I can find a better workaround than the current one I have. Thanks! :D
sonictk
 
Posts: 28
Joined: Sun Feb 07, 2010 6:31 am

Re: [HGE Engine] Rendering artifacts during random texture flip

Postby Odin_KG » Fri Feb 19, 2010 6:03 pm

Then I suppose it has to do with the way we manage textures

Yes

I would really prefer to use the newer version as well. However as I said we really cannot afford any major issues from switching between versions as the programmers have a lot to deal with apart from the visual effects so that's how it is.

OK.
But if "Magic Particles (Dev) Free 1.72" will be to work well then you can use this version everywhere.

I am sorry, but I think the problem with "Random Flip" is bug of your programmer :-).
User avatar
Odin_KG
Administrator
Administrator
 
Posts: 255
Joined: Sat May 09, 2009 10:53 pm

Re: [HGE Engine] Rendering artifacts during random texture flip

Postby sonictk » Mon Feb 22, 2010 2:01 am

Probably. :P Anyway, as before, thank you for the assistance.
sonictk
 
Posts: 28
Joined: Sun Feb 07, 2010 6:31 am

Re: [HGE] Random texture flip rendering artifacts (RESOLVED)

Postby Odin_KG » Mon Feb 22, 2010 2:08 am

You are welcome
User avatar
Odin_KG
Administrator
Administrator
 
Posts: 255
Joined: Sat May 09, 2009 10:53 pm

Re: [HGE] Random texture flip rendering artifacts (RESOLVED)

Postby Odin_KG » Thu Feb 25, 2010 1:18 am

I found the problem.

Please, download a new version of magic.dll: http://www.astralax.ru/hlam/magic1_73.zip
User avatar
Odin_KG
Administrator
Administrator
 
Posts: 255
Joined: Sat May 09, 2009 10:53 pm

Next

Return to Magic Particles

Who is online

Users browsing this forum: No registered users and 4 guests

cron