Search Unity

Question [Unity] Procedural Planets

Discussion in 'Scripting' started by DimaWorld07, Jun 5, 2023.

  1. DimaWorld07

    DimaWorld07

    Joined:
    May 23, 2023
    Posts:
    9
    Hello everyone, I'm trying to follow the lessons from


    Sebastian Lague
    but I got confused in the 2nd lesson, with the colors in the video, it normally displays the ball in gray standard color, instead it is purple for mine, I was looking for a possible problem, in some videos people have objects of the same purple color, the solution was Window > Rendering > Render Pipeline Converter but in my case it didn't help , I downloaded the project itself https://github.com/SebLague/Procedural-Planets I thought maybe I typed the code from the video wrong but everything is the same

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;

    [CreateAssetMenu()]
    public class ColourSettings : ScriptableObject {

    public Color planetColour;
    }


    even the matter may not be in the code itself, I did not add it to the sphere (Empty) at first, but it already turned purple when I added the Planet.cs script
     

    Attached Files:

  2. DimaWorld07

    DimaWorld07

    Joined:
    May 23, 2023
    Posts:
    9
    here is examples
     

    Attached Files:

  3. orionsyndrome

    orionsyndrome

    Joined:
    May 4, 2014
    Posts:
    3,108
    That color is an indicator that you've failed to assign a material to the object, or that the material shader fails to work properly. This is a standard "error" color in Unity and elsewhere. Do not interpret it as a color, it's an indication of failure.

    Retrace your steps, make sure you do everything as shown in the tutorial. There has to be something that you missed out on.
     
  4. Yoreki

    Yoreki

    Joined:
    Apr 10, 2019
    Posts:
    2,605
    He creates a file for color and shapes at the beginning. He drags them into the inspector at 6:20. Did you do that? If you did and the code is identical and you did not accidentally mess up the color settings, it should use those settings accordingly. He then proceeds to implement an editor for those files, so there may be more possible sources of mistakes in that part.

    When you do tutorials start at the beginning and follow it, doing exactly what is shown in the video. Test at every possible step and as soon as something seems different for you than it does for them, fix that. We dont know from which point on your problem existed, which makes it really hard to help in more detail. For all we know the ball may have been pink even before you started following the tutorial, making this a problem with the Unity installation and not the content at all. Unlikely, but possible. More information would help.
     
  5. orionsyndrome

    orionsyndrome

    Joined:
    May 4, 2014
    Posts:
    3,108
    Likewise you normally use this workflow to fix graphics issues when moving from built-in rendering to Universal Rendering Pipeline. I don't think this can help you, but could be actually relevant, because it highlights that you're using URP, and I believe that Sebastian does not. I don't have much time right now, maybe someone else can look at why this would fail in URP (and I'm not claiming it has to either).
     
    DimaWorld07 likes this.
  6. Bunny83

    Bunny83

    Joined:
    Oct 18, 2010
    Posts:
    3,992
    Right. Also note that even the used Unity version may play a role. This has gotten even a bigger issue since the scriptable render pipeline was introduced. Now we have two kinds of shaders which are not compatible with each other. So maybe the project was already setup wrongly, who knows.
     
    DimaWorld07 and Yoreki like this.
  7. DimaWorld07

    DimaWorld07

    Joined:
    May 23, 2023
    Posts:
    9

    yes i did but i think to try older version of unity engine maybe it works there for test , and i got a lot of "
    purple artifacts " from downloaded projects from the Unity store, despite the fact that the version there supports the one I have
     
  8. DimaWorld07

    DimaWorld07

    Joined:
    May 23, 2023
    Posts:
    9
    Here it loocks like