I’m using the portal sample. The material on the screen was pink. I changed that by creating a transparent material of my own. But I see there’s another problem with the tunnel. I am able to see the sides unlike the live example.
Hi Saad,
For the issues you’re facing with the portal sample, here are a couple of steps to consider:
-
Transparent Material: Ensure that the transparent material is set correctly within the script. If you are seeing a pink color, it might indicate a missing texture or an issue with transparency settings. Make sure your material’s
transparent
property is set totrue
and you’re using the correct blending modes.const material = new THREE.MeshBasicMaterial({ map: yourTexture, // Ensure this is correctly loaded transparent: true, opacity: 0.5, // Adjust as needed });
-
Tunnel Visibility: To prevent seeing the sides of the tunnel, make sure that the material’s
side
property is set toTHREE.DoubleSide
. If it’sTHREE.FrontSide
, you will only see the inside faces when looking from outside.const tunnelMaterial = new THREE.MeshBasicMaterial({ color: tunnelColor, side: THREE.DoubleSide, });
-
Culling Settings: You might also want to check your renderer settings related to backface culling. If you want to see the inner part of the tunnel only, ensure the
backface
is culled properly. -
Shader Adjustments: If you’re using custom shaders, check if they are set up to handle transparency and two-sided rendering the right way. Ensure blending is correctly configured.
If the issue persists after these adjustments, you may want to check the renderer settings in your environment. Additionally, double-check your texture loading and ensure that no errors occur during that process.
For more enhanced rendering, refer to the portal documentation and look into the related components (see the documentation).
Feel free to ask if you need further assistance!
2 replies left
thread_YM8WE43mSU9mg9WVbXKSxajb
Reply to this message to continue the conversation
Hi Saad,
The warning about the “last import” in your shader graph (Tunnel Unlit) may indicate compatibility or configuration issues with the shader or its properties. Here are some steps you can take to address the warning:
-
Review Shader Compatibility: Ensure that your Tunnel Unlit shader is compatible with your current project settings and rendering pipeline. If you’re using Unity’s Universal Render Pipeline (URP), it’s crucial that the shader is designed for that environment.
-
Check Shader Logs: Check the console for any specific messages related to the shader, which can provide insights into what the warning relates to. It might indicate missing properties, unsupported features, or incorrect configurations.
-
Shader Graph Settings: Make sure that you have set all required inputs and properties within the shader. Missing inputs or improperly connected nodes can lead to warnings during the import process.
-
Export Configuration: If you’re using custom shaders, ensure you’ve added the necessary export labels (like
ExportShader
) to the shader asset in Unity. This optimizes how the shader is exported to Needle Engine (see export). -
Testing the Shader: Create a simple test material using the Tunnel Unlit shader and assign it to a mesh to see if the shader works as expected without errors.
-
Documentation Reference: Refer to the shader documentation specific to Needle Engine, as this can provide detailed configuration steps for custom shaders as well as common pitfalls (see export).
If these suggestions do not resolve the issue, please provide the specific warning message related to the import which would help narrow down the problem.
Let me know if you need more assistance!
1 replies left
thread_YM8WE43mSU9mg9WVbXKSxajb
Reply to this message to continue the conversation
This sugguestion doesn’t work. @marcel can you help with this issue? is it from the needle package?
Hi Saad,
If the previous suggestions didn’t solve your issue, it may well be tied to the Needle Engine package itself. It’s best to verify if you’re using the latest version of Needle Engine, as updates often fix bugs and compatibility issues.
Please check the following:
-
Needle Engine Version: Ensure you’re using an up-to-date version. Check the changelog or documentation for any notes on the Tunnel Unlit shader or related components.
-
Dependencies: Confirm that other required packages or dependencies are correctly installed and updated in your project.
-
Community Support: If you have access to the Needle Engine community or support channels (like GitHub issues), reaching out there can provide specific insights related to known issues, especially if others have identified similar behaviors.
-
Needle Documentation: Review the official Needle Engine documentation for tips regarding shader setups or any known issues specific to your scenario.
If you wish to pursue further assistance or custom support, consider the links to access Needle Engine resources for commercial inquiries (see the documentation).
If you have additional details or specific warning messages, please share them, and I’ll do my best to assist you further!
3 replies left
thread_YM8WE43mSU9mg9WVbXKSxajb
Reply to this message to continue the conversation
I have URP installed in the project.
Hi Saad,
Since you have URP installed, ensure your Tunnel Unlit shader is compatible with URP. The warning you see may stem from configurations that don’t align with URP standards. Here’s what you can do:
-
Shader Type: The Tunnel Unlit shader needs to be designed for URP. If it’s not, consider switching to the
UnityGLTF/UnlitGraph
orUnityGLTF/PBRGraph
, which are specifically compatible with URP (see the documentation) (see the documentation). -
Material Compatibility: Check the materials used in your shader. For best performance and export compatibility, utilize the materials provided by UnityGLTF (like
PBRGraph
orUnlitGraph
). This ensures they are correctly processed for URP (see export) (see the documentation). -
Shader Graph Logs: If the shader graph continues to show warnings, click on the warning message to get more details. This can guide you on what might be wrong with the shader’s setup or any properties that are improperly configured.
-
Update the Shader: If you’re using custom shaders, make sure they properly implement the URP requirements for both unlit and lit materials. Custom shaders may need additional configuration to handle URP properties properly (see the documentation).
If problems persist, sharing the specific warning message can help analyze the issue more closely.
Let me know if you need more help!
2 replies left
thread_YM8WE43mSU9mg9WVbXKSxajb
Reply to this message to continue the conversation
Hello @saad_baig are you using the Stencil URP settings object? Does the stencil work /look in the Unity scene correctly?
It contains the URP renderer which has the stencil settings used in the sample:
Have you checked with the sample README if your scene is setup correctly?
Note: you can configure your own URP stencil layers differently if you need different layers. This is not hardcoded but your description suggests that your scene doesnt export any stencil information
this was my initial setting, I changed Scene render pipeline with Sampe stencil urp settings, but can’t assign it in project settings → Graphics
You need to assign the Stencil URP settings asset (or copy the relevant Renderer Features to your own profile). Make sure to either assign it in the Scene Render Pipeline component (your second screenshot) OR remove the Scene Render Pipeline from the scene, it will override your Graphics Settings otherwise.
Thank you marcel. It solved the problem.
This topic was automatically closed 13 days after the last reply. New replies are no longer allowed.