diff --git a/3d-generation-pipeline/generate_model_local.py b/3d-generation-pipeline/generate_model_local.py index 12a0c3a8..49b03c17 100644 --- a/3d-generation-pipeline/generate_model_local.py +++ b/3d-generation-pipeline/generate_model_local.py @@ -87,6 +87,9 @@ def image_to_3d_api(image_path, output_path): base64_encoded = base64.b64encode(image_data).decode('utf-8') model_binary = generate_no_preview(base64_encoded) - with open(output_path, 'wb') as f: + output_file = f"{output_path}.glb" + with open(output_file, 'wb') as f: f.write(model_binary) + + return output_file \ No newline at end of file diff --git a/3d-generation-pipeline/start_pipeline.py b/3d-generation-pipeline/start_pipeline.py index bbac6521..e436a0a6 100644 --- a/3d-generation-pipeline/start_pipeline.py +++ b/3d-generation-pipeline/start_pipeline.py @@ -38,9 +38,9 @@ def main(): text_to_image(image_generation_prompt, image_path) print(f"Generated image file: {image_path}") model_path = pipeline_folder / "models" / timestamp - image_to_3d_api(image_path, model_path) + model_file = image_to_3d_api(image_path, model_path) #model_file_path = model_path / "0" / "mesh.glb" - print(f"Generated 3D model file: {model_path}") + print(f"Generated 3D model file: {model_file}") if __name__ == "__main__": diff --git a/Assets/_PROJECT/Components/Guardian/Guardian Barriers/Barrier sign yellow Variant 3.mat b/Assets/_PROJECT/Components/Guardian/Guardian Barriers/Barrier sign yellow Variant 3.mat index b28136c5..1119195a 100644 --- a/Assets/_PROJECT/Components/Guardian/Guardian Barriers/Barrier sign yellow Variant 3.mat +++ b/Assets/_PROJECT/Components/Guardian/Guardian Barriers/Barrier sign yellow Variant 3.mat @@ -41,5 +41,5 @@ Material: m_Ints: [] m_Floats: [] m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0.27382442, g: 0.27382442, b: 0.27382442, a: 1} m_BuildTextureStacks: [] diff --git a/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity b/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity index 22a8f8e7..9357cb38 100644 --- a/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity +++ b/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0878408a4e3abd69b58fa18dd05b63d5f77c475267ac4694667468e1a53f0e95 -size 63212682 +oid sha256:6c4b9052863d6b6d99035c9570983fc7dc582ff3573c4b2f3b749239fe3e30ac +size 63212086 diff --git a/Assets/_PROJECT/Scripts/3DModeGeneration/ModelGenerationPipelineStarter.cs b/Assets/_PROJECT/Scripts/3DModeGeneration/ModelGenerationPipelineStarter.cs index a2d26e0f..9d41e5a1 100644 --- a/Assets/_PROJECT/Scripts/3DModeGeneration/ModelGenerationPipelineStarter.cs +++ b/Assets/_PROJECT/Scripts/3DModeGeneration/ModelGenerationPipelineStarter.cs @@ -48,13 +48,13 @@ public class ModelGenerationPipelineStarter : MonoBehaviour { return await Task.Run(() => { - string inputPrompt = "Uhm I want I think an epic broadsword with a fancy golden pommel"; + string inputPrompt = "tasty golden apple, photorealistic, smooth background"; // Path to your virtual environment's python.exe - string pythonExe = @"D:\henrisel\DeltaVR3DModelGeneration\3d-generation-pipeline\.venv\Scripts\python.exe"; + string pythonExe = @"D:\users\henrisel\DeltaVR3DModelGeneration\3d-generation-pipeline\.venv\Scripts\python.exe"; // Path to your Python script - string scriptPath = @"D:\henrisel\DeltaVR3DModelGeneration\3d-generation-pipeline\start_pipeline.py"; + string scriptPath = @"D:\users\henrisel\DeltaVR3DModelGeneration\3d-generation-pipeline\start_pipeline.py"; // Arguments to pass to the script string arguments = $"{scriptPath} --prompt \"{inputPrompt}\"";