seethrough model with entityorder -1

BlitzMax Forums/MiniB3D Module/seethrough model with entityorder -1

apamment(Posted 2013) [#1]
Hi there,

I've been having trouble with a new gun I am adding to my game, previously I have used EntityOrder -1 to make it so the gun doesn't clip into the walls when you go near them, and with my old gun model it works fine. With this one however the top is see through, but only when entityorder -1 is on. When it's not the gun works fine.

I searched the forums and all I could come up with is that it happens with alpha textures, but my gun doesn't have any, I even removed the alpha channel from the texture.

I've attached some screen shots so you can see.






ima747(Posted 2013) [#2]
ensure the entity's alpha is set to 1. you could also turn off backface culling with entityfx which might help. I have seen similar issues in the past but can't remember exactly how I resolved them. Double check your texture as well, maybe even convert it to a jpg to ensure there's no chance for alpha at all.


Kryzon(Posted 2013) [#3]
When you change an EntityOrder to a non-zero value the depth sorting for the mesh is compromised. It's what's causing this.

There's been a B3D thread about FPS guns and wall clipping.
You can solve it one of a few ways. Me (and Matty) recommend a quick 2-pass render: http://blitzbasic.com/Community/posts.php?topic=99810#1174005


apamment(Posted 2013) [#4]
thanks, the 2-pass render did the trick :)


Kippykip(Posted 2013) [#5]
You can do what I ended up doing, open the .b3d file in FragMotion and export it with hierarchy checked, it will order each part for you.
:D