You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wish to "draw" various street textures (tarmac, cobblestone, ...)
and on top some different direction arrows.
Or windows on different wall plasters.
At the moment, I take a mesh for the "Ground" texture and another for the transparent "Top" texture.
Al the vertices have to be the same, the VU values may differ, the texture does differ.
This did work with ThreeJS or BabylonJS. See picture or try it here
But it does not work with Bevy. 😟
In a minimal test it is ok. I have to spawn the PbrBundle of the Top texture first!
But with my quite complex "OpenStreetMap 3D Renderer", it does not work. 😟
I even can see the arrows/windows for a short time.
But I assume, when the Ground texture gets loaded and added later,
the render order changes and the Ground is rendered after/above the Top texture.
Changing the spawn order did not help.
I checked the Bevy GitHub repository and found out about depth_bias.
But it did not change anything firstly!
By guessing, I not only set the Top material to AlphaMode::Blend but also the Ground.
Now depth_bias was relevant! WHAT ???
Again, this was only useful for a small test.
The full program showed mad effects:
Windows form buildings in thee background were rendered above other objects. See picture
I have to clarify, my meshes are quite complex:
Example: Large groups of different buildings
are merged in one mesh, by adding the walls of all buildings together.
Otherwise, it would be very much meshes and draw calls.
Of course: windows of buildings "behind" other buildings must not be visible.
In BabylonJS, I had to activate a special render mode to archive this.
What about Bevy?
There is another idea in my mind:
An extra Bevy::Mesh2 (..Two) with an additional UV2
and a PbrBundle2 with an additional material2: for the top_handle.
The shader of Bevy could be copied and extended for the 2nd "layer"
to handle the two (or even more) textures in one render-run.
I am sure, that would be possible, bout not by that limited me.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I wish to "draw" various street textures (tarmac, cobblestone, ...)
and on top some different direction arrows.
Or windows on different wall plasters.
At the moment, I take a mesh for the "Ground" texture and another for the transparent "Top" texture.
Al the vertices have to be the same, the VU values may differ, the texture does differ.
This did work with ThreeJS or BabylonJS.
See picture or try it here
But it does not work with Bevy. 😟
In a minimal test it is ok. I have to spawn the PbrBundle of the Top texture first!
But with my quite complex "OpenStreetMap 3D Renderer", it does not work. 😟
I even can see the arrows/windows for a short time.
But I assume, when the Ground texture gets loaded and added later,
the render order changes and the Ground is rendered after/above the Top texture.
Changing the spawn order did not help.
I checked the Bevy GitHub repository and found out about depth_bias.
But it did not change anything firstly!
By guessing, I not only set the Top material to AlphaMode::Blend but also the Ground.
Now depth_bias was relevant! WHAT ???
Again, this was only useful for a small test.
The full program showed mad effects:
Windows form buildings in thee background were rendered above other objects. See picture
I have to clarify, my meshes are quite complex:
Example: Large groups of different buildings
are merged in one mesh, by adding the walls of all buildings together.
Otherwise, it would be very much meshes and draw calls.
Of course: windows of buildings "behind" other buildings must not be visible.
In BabylonJS, I had to activate a special render mode to archive this.
What about Bevy?
My Source
There is another idea in my mind:
An extra Bevy::Mesh2 (..Two) with an additional UV2
and a PbrBundle2 with an additional material2: for the top_handle.
The shader of Bevy could be copied and extended for the 2nd "layer"
to handle the two (or even more) textures in one render-run.
I am sure, that would be possible, bout not by that limited me.
Beta Was this translation helpful? Give feedback.
All reactions