Results 1 to 10 of 32

Thread: Planet texture generation code

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    PGDCE Developer Carver413's Avatar
    Join Date
    Jun 2010
    Location
    Spokane,WA,Usa
    Posts
    206
    I am working on some texture generating stuff as part of my framework.in the lower right is a typical noise fuction. all of these were created with a script which to me makes more since because of the tweaking involved to get the look right.the other advantage is that scripts are much smaller the actual bitmaps so they can be generated when needed rather then stored. in the future I hope to have a full array of noise functions and a real time editor to aid with script creation.
    Code:
    BITMAP4:TestMap = {400,400} []
    VECBYTE4:Blue = [0,0,200,255]
    VECINT4:Frame = [10,10,80,32]
    VECBYTE4:LiteBlue = [100,100,255,255]
    VECBYTE4:Red = [150,50,100,255]
    ARRINT:Weaved = {8}
      [%11110000,
       %10010000,
       %10010000,
       %11110000,
       %00001111,
       %00001001,
       %00001001,
       %00001111]
    ARRINT:Diamond = {8}
      [%10000001
       %01000010,
       %00100100,
       %00011000,
       %00011000,
       %00100100,
       %01000010,
       %10000001]
    ARRINT:Block = {8}
      [%00011000,
       %00011000,
       %01111110,
       %11100111,
       %11100111,
       %01111110,
       %00011000,
       %00011000]
    
    Map(TestMap,LiteBlue,Blue)
    Clear()
    SetMapTags(PenMode,Alpha)
    SetInk(Pattern,Weaved,GradSlot,Color1,Frame,100,10)
    Fill(Frame)
    SetInk()
    Smooth(Frame,1)
    Rectangle(Frame)
    
    MoveFrame(Frame,2,0)
    SetInk(Pattern,Block)
    Fill(Frame)
    SetInk()
    Smooth(Frame,1)
    Rectangle(Frame)
    
    Frame = [10,44,80,32]
    SetInk(Pattern,Block)
    Fill(Frame)
    SetInk()
    Smooth(Frame,2)
    Map(TestMap,Red,Blue)
    SetInk(Pattern,Diamond)
    Fill(Frame)
    SetInk()
    Map(TestMap,Blue,Blue)
    SetInk(GradSlot,Color1,Frame,40,12)
    Fill(Frame)
    Map(TestMap,LiteBlue,Blue)
    Rectangle(Frame)
    SizeFrame(Frame,-2,-2)
    Rectangle(Frame)
    
    Frame = [92,44,80,32]
    Map(TestMap,Red)
    SetInk()
    Fill(Frame)
    Map(TestMap,LiteBlue,Red)
    SetInk(Cloud,Color2,4)
    Fill(Frame)
    SetInk(Cloud,Color2,2)
    Fill(Frame)
    SetInk(Cloud,Alpha,1)
    Fill(Frame)
    SetInk(GradSlot,Alpha,Frame,40,12)
    Map(TestMap,Blue)
    Fill(Frame)
    Map(TestMap,LiteBlue)
    Rectangle(Frame)
    SizeFrame(Frame,-2,-2)
    Rectangle(Frame)
    http://www.dreamincode.net/forums/to...-perlin-noise/
    Attached Images Attached Images

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •