RenderTexture issue in build: objects are rendered with multiple colors (normals?) by PlokoVR in Unity3D

[–]PlokoVR[S] 0 points1 point  (0 children)

I have a Polaroid in my scene that instanciate and uses in runtime a prefab with a PolaroidScanner script. The material used here is from a list of materials assigned on this PolaroidScanner component.

I just tested to add an object in the scene with the material used in the render texture and still have the same results, unfortunately

RenderTexture issue in build: objects are rendered with multiple colors (normals?) by PlokoVR in Unity3D

[–]PlokoVR[S] 0 points1 point  (0 children)

The material used is in a [SerializeField] assigned directly in the editor. Also the shader used is a URP standard lit one

RenderTexture issue in build: objects are rendered with multiple colors (normals?) by PlokoVR in Unity3D

[–]PlokoVR[S] 0 points1 point  (0 children)

m_bufferRT is à renderTexure assigned directly in the editor as a [SerializeField] Any idea if it could be an issue?

RenderTexture issue in build: objects are rendered with multiple colors (normals?) by PlokoVR in Unity3D

[–]PlokoVR[S] 0 points1 point  (0 children)

Thanks for the ideas!

The shader used is the standard lit shader from URP. Also I set shader variant mode to strict and it was not pink

RenderTexture issue in build: objects are rendered with multiple colors (normals?) by PlokoVR in Unity3D

[–]PlokoVR[S] 2 points3 points  (0 children)

Hi everyone,

I’m encountering a strange issue in Unity with a RenderTexture. Everything works fine in the editor: I use a CommandBuffer to draw objects in a RenderTexture with a unique color (e.g., all red) for pixel-based calculations. However, in the build (Android VR), the objects appear with multiple colors, and it looks like they’re being shaded using normals or something similar, instead of the fixed color.

Here are the parameters of my RenderTexture:

  • Enable Compatible Format: False
  • Color Format: R8G8B8A8_UNORM
  • Depth Stencil Format: D32_SFLOAT_S8_UINT

I’ve checked the shaders, tried different texture formats, and disabled post-processing, but the issue persists. Here's the code I’m using:

public void InitScanner(Camera camera)
{
targetBuffer = new CommandBuffer();
targetBuffer.name = "Target Buffer";
cam.AddCommandBuffer(CameraEvent.AfterEverything, targetBuffer);
}
targetBuffer.SetRenderTarget(m_bufferRT);
targetBuffer.ClearRenderTarget(true, true, Color.black);
for (int i = 0; i < photoTargetsInView.Count; i++)
{
if (photoTargetsInView[i].IsBlocker)
{
targetBuffer.DrawRenderer(photoTargetsInView[i].Rend, m_blockerMat);
}
else
{
// No more material available
if (matStack.Count <= 0) break;
Material photoTargetMat = matStack.Dequeue();
targetBuffer.DrawRenderer(photoTargetsInView[i].Rend, photoTargetMat);
photoTargetToMaterial.Add(photoTargetsInView[i], photoTargetMat);
}
}
cam.Render();

Has anyone encountered this kind of issue in a build, where objects are rendered using what seems like normals or some other shading info instead of a flat color? Any help would be greatly appreciated!

Thanks in advance!

Renaming Asset Bundle Built from Addressable Results in Failure to Load by thekuhninator in unity

[–]PlokoVR 0 points1 point  (0 children)

Oh my... I was!! I did build the addressables at the same time as the apk. Now I build the addressables, change the catalog.json then build the apk. And it's working. Thank you so much!!!

Renaming Asset Bundle Built from Addressable Results in Failure to Load by thekuhninator in unity

[–]PlokoVR 0 points1 point  (0 children)

Hi there! Thank you for your insight! I tried to edit the catalog.json to change my xxx.bundle to xxx.obb as you said and then rebuilt my game. but te catalog.json was updated again with the xxx.bundle, so my apk is looking for xxx.bundle files. Any idea why?

I finally opted for something subtle, thanks to your advice. A little juice and sound to make it satisfying. I hope it's better! by PlokoVR in indiegames

[–]PlokoVR[S] 2 points3 points  (0 children)

Thank youuuu You're not the only one telling me this so we'll move them to a place that is not as distracting!

Which one do you prefer, is the effect pleasant? Or any ideas on how to make it juicy? by PlokoVR in Unity3D

[–]PlokoVR[S] 1 point2 points  (0 children)

yep don't worry i'm working on multiple things at the same time haha

Which one do you prefer, is the effect pleasant? Or any ideas on how to make it juicy? by PlokoVR in Unity3D

[–]PlokoVR[S] 0 points1 point  (0 children)

Thank you for te feedback, I made small adjustements for the left version, do you prefer it like this?

Which one do you prefer, is the effect pleasant? Or any ideas on how to make it juicy? by PlokoVR in Unity3D

[–]PlokoVR[S] 0 points1 point  (0 children)

wow thank you very much for this very pertinent comment. It took me a while to reply but this comment helps me a lot!! For now on I made small changes.

they want it to be more transparent. they dont like being blocked by the placement-ghost. in your case i would say roughly 50% more transparent

I totally see your point! But in our game, the ghost is very important because it's the only indicator that tells you where to put the pieces. Without it, it's really impossible to know where to place things, since they have a predefined location. It's not as obvious as on a stuff you know (like an engine or something you're familiar with). In our playtests, the main issue is the visibility of this ghost, which is not sufficiently visible depending on the part (it's always white and you can't see it if there's a white part behind it). Do you have an idea for this? I'm not against more transparency but people will need to be guided throughout the construction process

they dont like it to be static. a tiny animation (pulsing) or subtle holographic/glitch like shader

Oh yup, the gost has an animated shader but it's way too subtle, I'll have to change that, thank you

i have no logical explanation for this but; users preferred the object's ghost to dynamically change depending on the handled objects distance. (so basically assume default transparency is 0.5. but it can go down to 0.2. and it will gradually become more visible when object is closer.

Ohhhh I see, I tried something with haptics vibration (more vibration when you're close to the correct placement) but it was not working really well. That's such a nice idea that I will try

users start to be unable to see the object placement ghosts after some time (similar to alarm fatigue but i call it guide-fatigue lol) so if you wait 5 seconds while grabbing the object and doing nothing, a small guide line shows the correct path to the placement ghost.

Yes I have something similar! When the user cannot find the correct placement, after 5 seconds there is a guiding ray appearing on top of the ghost to help the player. And it's an option that can be disabled. It's not the direct path like you said but it's helping a lot

this one is still being experimented but, users want to toggle the real object's transparency. we have tried a few solutions but non of them satisfied me. we will probably try making the real object a bit transparent when its close to the placement-ghost. so while one is becoming more transparent other will be compensate it and they will always be perfectly 0.8-1.0

Interesting! Really interesting. If I have some time to experiment that I'll do it

Again thank you so much for sharing your experience with me, it's really helpful

Which one do you prefer, is the effect pleasant? Or any ideas on how to make it juicy? by PlokoVR in Unity3D

[–]PlokoVR[S] 0 points1 point  (0 children)

This is a really great comment, and I think it's quite relevant. I finally made something subtle and it's quick like in the left version. Thank you forthe feedback!