Search Unity

Pahoehoe Lava Texturing

Discussion in 'Made With Unity' started by aaron-parr, Apr 22, 2008.

  1. aaron-parr

    aaron-parr

    Joined:
    Apr 22, 2007
    Posts:
    577
    I am working on a pahoehoe lava texture and I am attaching two of my first iteration. So far I am not happy with them. The ropy lava looks like it is under plastic wrap due to the terrain's geometry. The other looks too much like a photoshop experiment.

    Per usual I am open to suggestions for improvement. I am a nooB at this stuff.
     

    Attached Files:

  2. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Question, have you ever actually seen Pahoehoe lava? I lived on Big Island for a while (my wife's family lives there and Oahu) and all the lava I saw was much darker, almost black. Bright sunlight makes the minerals reflect a lot of light giving it a light grey specular color, but the lava itself is often jet black. Is this actively flowing or old? Active lava would be very interesting (and probably difficult) to recreate, the cracks vent steam or hot air and the hot lava underneath is very bright yellow.

    What reference photos are you working from?
     
  3. aaron-parr

    aaron-parr

    Joined:
    Apr 22, 2007
    Posts:
    577
    Actually, no, I have never seen it in person. I am working completely from photographs all of which give it variations of the color you see here. I assume the light gray with hotspots is due to its natural smoothness and reflectivity. These reference photos are from the internet. I googled Pahohoe and browsed images for awhile. I've got about 10 images I've been experimenting with. What you see in the shots I attached only used three of these.

    My intention was to create a newish looking flow that has yet to crack much, but is inactive. Creating steam vents and such is a bit beyond my abilities at the moment, and AngryAnt still wants me to make some characters. I'll have to leave active lava for the future. In the meantime I would like to improve upon what I have done.

    With that in mind: If I did make it black, how would I tell the terrain engine to give it the specularity I want?

    If that wouldn't work perhaps I could model a flow in Cheetah and then import it as an asset and give it the proper shaders.
     
  4. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Here's a whole bunch through Google:

    http://images.google.com/images?q=pahoehoe+lava+flow+photos

    Just taking a quick glance, this one best represents what I think of when I think of Pahoehoe lava.

    http://www.livingwilderness.com/hawaii/hawaii-pahoehoe-flow.html

    My wife would be a better person to ask (since she's grown up with this stuff) but she's not available at the moment.

    I think that doing this with the terrain system would be very difficult as there really isn't a repetitive
    surface to it. If it were me (and I'm no expert) I'd do a mesh model with bump map and perhaps two shaders, one specular the other self lit? Interesting and challenging project.
     
  5. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    I think a key component of the lava is the lighting and the per-pixel specular highlights. In your images the lighting of the lava doesn't match the lighting of the rest. You'll need to use a mesh on top of the terrain engine to be able to use whatever shader you want. I'd probably start with the built in Specular shader and a pixel light.

    Cheers,
    -Jon
     
  6. aaron-parr

    aaron-parr

    Joined:
    Apr 22, 2007
    Posts:
    577
    Kahuna-
    Thanks for the advice. I am leaning toward modeling a mesh for the pahoehoe flow, and you've helped push me further in that direction. One advantage to that is that it frees up two textures for the terrain.

    I think I'll make the stuff cool however and leave out the self-lit shader. I assume you mentioned the self-lit shader for the liquid lava shining through from underneath. That can be a project for a later date.

    Jonathan-
    I agree that the lighting is key. If I was to stick to the terrain system for this I was thinking of simply rotating my textures. They are both lit from one direction which happens to be the opposite direction of the sun in that scene.

    Still.. using a separate mesh for the flow makes a lot of sense, and will improve the options with shaders etc... Thanks.
     
  7. cherub

    cherub

    Joined:
    Apr 26, 2006
    Posts:
    493
    watch your scale. the sections/lumps in the photo feel larger than yours.

    The bigger issue, more than an expensive light, to make it way cooler is to use with it a glowing red material in the cracks.

    Think of what the player will actually be seeing in context of your game. The red lava may give them more of an impression than subtle specular preperty.

    ~C
     
  8. aaron-parr

    aaron-parr

    Joined:
    Apr 22, 2007
    Posts:
    577
    Cherub.
    Are you saying that the lumps in my first screen shot appear too small?

    That might be confused by the angle of the shot. Here's the actual test scene:
    http://www.rawbw.com/~theparrs/unity/TreeCrazy.html

    I have thought a bit about scale, and am not sure how the texture translates to Unity's terrain. It appears that you can set the number of tiles per unit of terrain resolution, but I have not tested the engine to see if this is actually what is happening. I also am not sure how big a terrain unit is. I assume it is one meter square.