YOUR ACCOUNT

Login or Register to post new topics or replies
TBH-1138
Posts: 95
Filters: 53
Multisource Planet Maps by TBH-1138
http://www.filterforge.com/filters/12302.html

  Details E-Mail
TBH-1138
Posts: 95
Filters: 53
  Details E-Mail
emenac
Posts: 5
Hi, thank you so much for looking into this for me!

I've had a bit of a play with this filter, and I'm getting some promising results. See attached for a texture mapped onto a sphere in Unity3D (with normal + specular map).

I must admit that I don't really understand how the input images are supposed to be used. Are the color and bump sources meant to be matched? (ie. is bump1 supposed to be a bump map for color1?) I'm guessing not, since your example sources don't seem to be matched like that.

Sorry if that's a naive question - I pretty new to all of this.

Any other pointers also appreciated.

Thanks again! smile:)

  Details E-Mail
TBH-1138
Posts: 95
Filters: 53
Quote
Are the color and bump sources meant to be matched? (ie. is bump1 supposed to be a bump map for color1?)

Some of them are (Moon/Mars textures) and some of them aren't (everything else for the most part). Bump 1 will go where Color 1 goes, and so on. They don't have to match, except for moonlike planets where the craters should match up in the diffuse and bump maps.

I've tried making planets in Unity and have a specialized planet shader somewhere that supports atmospheres and diffuse, normal, and emissive textures.

EDIT: Here it is.
Code

  Shader "Planet" {
    Properties {
      _MainTex ("Texture", 2D) = "white" {}
      _BumpMap ("Bumpmap", 2D) = "bump" {}
      _RimColor ("Rim Color", Color) = (0.3,0.5,0.7,0.0)
      _MainColor ("Main Color", Color) = (1,1,1,0.0)
      _RimPower ("Rim Power", Range(0.5,8.0)) = 3.0
     _Emission ("Emission", 2D) = "black" {}
    }
    SubShader {
      Tags { "RenderType" = "Opaque" }
      CGPROGRAM
      #pragma surface surf Lambert
      struct Input {
          float2 uv_MainTex;
          float2 uv_BumpMap;
          float2 uv_Emission;
          float3 viewDir;
      };
      sampler2D _MainTex;
      sampler2D _BumpMap;
      sampler2D _Emission;
      float4 _RimColor;
      float4 _MainColor;
      float _RimPower;
      void surf (Input IN, inout SurfaceOutput o) {
                o.Normal = UnpackNormal (tex2D (_BumpMap, IN.uv_BumpMap));
          half rim = 1.0 - saturate(dot (normalize(IN.viewDir), o.Normal));
          
          o.Albedo = ((tex2D (_MainTex, IN.uv_MainTex).rgb)*_MainColor)+(_RimColor.rgb * pow (rim, _RimPower));
          o.Emission = (tex2D (_Emission, IN.uv_Emission).rgb);
      }
      ENDCG
    }
    Fallback "Diffuse"
  }



Also it doesn't support specular textures. I thought it did, but it's been a while since I put this shader together.
  Details E-Mail
emenac
Posts: 5
Great, thanks again.
  Details E-Mail

Join Our Community!

Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!

33,711 Registered Users
+18 new in 30 days!

153,533 Posts
+38 new in 30 days!

15,348 Topics
+73 new in year!

Create an Account

Online Users Last minute:

16 unregistered users.