About Store Forum Documentation Contact



Post Reply 
Transparent Walls problem
Author Message
Pherael Offline
Source Licensee

Post: #1
Transparent Walls problem
I'm trying to make vanishing wall depending on camera view. But this happens:





I'm using Test Blend Light Technique in RM_BLEND render, also I'm sure that precise_sort_blend_objects and blend_objects_affect_depth_based_effects are enabled.

How can I fix that? Do I have additionaly sort meshes manually (aren't they already sort by engine?).

Also walls in blend mode are not affected by additionals light, plus there is no specular?
06-16-2017 11:35 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Transparent Walls problem
If you call Mesh.drawBlend in RM_BLEND then as stated in the comments, it's drawn immediately, so you have to do sorting manually.
Or use 'BlendObject' that will do automatic sorting for you in RM_BLEND mode.

You could call Mesh.draw in RM_PREPARE, then sorting will be done for you.

However the meshes overlap each other (they are very close), perhaps built-in sorting will not be good enough in your case - needs testing.

Blend Light support only the main (biggest) directional light.

If you need all lights, then I recommend using Alpha-Testing, with alpha channel that resembles noise mask. And then dynamically adjust material alpha color.
06-20-2017 06:30 AM
Find all posts by this user Quote this message in a reply
Pherael Offline
Source Licensee

Post: #3
RE: Transparent Walls problem
Thanks for your support.
Since I need all lights, I'm trying use Alpha-Testing and noise mask, and it's looks ok. But is there any possibility to adjust alpha for specified object only? I can workaround this with doubling all walls materials, but maybe there is better way.
06-20-2017 02:08 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Transparent Walls problem
Please take a look at a new tutorial "Apps\12 - Rendering\16 - Shader Param Changes" once the next update becomes live (within a few days)
06-22-2017 09:30 AM
Find all posts by this user Quote this message in a reply
Pherael Offline
Source Licensee

Post: #5
RE: Transparent Walls problem
Great, I didn't have time to implement it yet, but this should work smile
06-23-2017 12:19 PM
Find all posts by this user Quote this message in a reply
Post Reply