1
0
forked from cgvr/DeltaVR

shape checker nice materials, generated object grabbable

This commit is contained in:
2026-01-13 17:17:59 +02:00
parent 3097c404ba
commit 1cd97e4d0a
14 changed files with 773 additions and 29 deletions

View File

@@ -11,7 +11,6 @@ public class ImageGenerationBox : MonoBehaviour
public VoiceTranscriptionBox voiceTranscriptionBox;
public Image imageDisplay;
public Texture2D LastTexture { get; private set; }
public string promptSuffix = ", single object, front and side fully visible, realistic style, plain neutral background, clear details, soft studio lighting, true-to-scale";
private MeshRenderer meshRenderer;
private bool isLoading;
@@ -37,13 +36,11 @@ void Start()
XROrigin playerOrigin = other.GetComponent<XROrigin>();
if (controller != null || playerOrigin != null)
{
string inputPrompt = voiceTranscriptionBox.GetTextOutput();
string refinedPrompt = inputPrompt + promptSuffix;
isLoading = true;
meshRenderer.material = loadingMaterial;
byte[] imageBytes = await InvokeAiClient.Instance.GenerateImage(refinedPrompt);
string inputPrompt = voiceTranscriptionBox.GetTextOutput();
byte[] imageBytes = await InvokeAiClient.Instance.GenerateImage(inputPrompt);
LastTexture = ModelGenerationUtils.CreateTexture(imageBytes);
Sprite sprite = ModelGenerationUtils.CreateSprite(LastTexture);
imageDisplay.sprite = sprite;