Jump to content

Gandi

Members
  • Posts

    295
  • Joined

  • Last visited

Posts posted by Gandi

  1. are you using clamp? or perhaps there is a material being used that has this as a default? dunno...

     

     

    i didnt change anything with the water shader, i just changed the texture im passing. i tried to workaround and just use texCoord-floor(texCoord), but i get ugly spaces between the patches..

  2. k.. here is a little update..

     

    wasser.jpg

     

    but im still not really happy with it..

     

    €: im just gonna post another question in right here..

     

    i tried rendering the waves heighttexture into a buffer (works fine)

    but when i then want to use the color-buffer of it in another shader i cant access the texture at UV-coordinates >0.. it works fine for UV from 0-1 but they cant get bigger.. do i have to do something to change it, or is it just not possible?

     

    (when i have U/V >1 it just takes 1 i think so it stretches the last pixel along the rest of the "plane")

  3. Ok.. i think i got something usefull now, but it still looks bad in my terrain..

    could maybe someone send me a testscene (something tropical) where i can test my ocean properly.

    i'd make one myself, but im really not good in handling the editor and i dont get good results.

     

    so if some1 got a little scene he could share with me for testing the ocean i'd be really grateful.

  4. Hi!

    i just saw the image of "Andy Gilbert".

    http://leadwerks.com/werkspace/index.php?app=gallery&module=images&section=viewimage&img=226

     

    There they discussed making an river editor like a part of the road editor.

    now my question: is there a way of creating something like a road editor in the editor, or does Josh have to do it and recompile the editor?

     

    I dont really have a clue of the editor, as i havent really worked with it yet.

     

    If there is a way, is there some way to get the code of the road editor?

     

    €: OK.. found the code.. seems like ill have to learn lua ^^

     

    Another question: is it possible to render a selfmade post process shader in the editor, as i think of creating the water as a post process

  5. ok.. ill try to explain it better ^^

     

    I have the heightmap (i know i could make a normalmap out of it, but the calculation kinda worked nicer)

    now i have the normals of the waves..

    if i now just add the detail normals the result doesnt look very nice, so i want to kinda adjust the detail normals to the waves.

     

    you can think of that like a blanket. you take the blanket and lay it above some rough underground. you will see, the blanket will fit the undeground and wont lie down flat.

    thats exactly what i want to do with my detail normals. lets say i got this raw undergrund by sampling the heightmap. now i want to take the detail normals and just put them above the waves.. then i dont have a "flat" normalmap anymore but the normals will fit the waves..

     

    if i just add the detail normals they will always point into the same direction..

    i hope you understand now what i want to do (if not i think a picture is my last chance of eyplaning it ^^)

     

    €: Ok.. i made an image right away ^^

     

    Red: The normal from the heightmap.

    Green: The normal from the detail map.

    Grey: is just a helper to see what ive donw

    probleml.jpg

     

    in the top half of the picture you see the way (i think) that you explained..

    in the bottom half you see it the way i mean it. as you can see the detail normal aligns to the wave normal..

    the gray line should now pe normal to the wave-normal

  6. y.. i render it like a post process...

    i need to compute the right normals, thats the problem.. atm i only got the normals computed from the height, but i wanna add some detail normals from a normalmap to them (just like bumpmaps on the terrain), so i have to align the deatil normals to the computed ones.. thats where im stuck..

     

    i need the normals for calculating refraction/reflection and for the specular from the sun

  7. at the terrain shader there is the T B N matrix for the transformation from the vertex stage

     

    normal = T * bumpnormal.x + B * bumpnormal.y + N * bumpnormal.z;

     

    i tried to create this matrix, but i failed :-/

  8. Got 70 frames with or without the ocean... (guess vsync is on)

     

    €: If anyone got an idea how i could add the normals from the normalmap, just tell me :)

     

    I compute the main normal from the heightmap, and i got a normalmap with the finer normals which don't really affect the "geometry"

  9. ok.. i made some changes on it..

     

    oceanw.jpg

    ocean1.jpg

     

    now i just got the problem.. i wanna transform the normals into tangent space..

    therefor i have to compute the tangentspace from: Normal, View-vector, UV

     

    i got this formula:

     

    float3x3 compute_tangent_frame(float3 Normal, float3 View, float2 UV)
    {
     float3 dp1 = ddx(View);
     float3 dp2 = ddy(View);
     float2 duv1 = ddx(UV);
     float2 duv2 = ddy(UV);
    
     float3x3 M = float3x3(dp1, dp2, cross(dp1, dp2));
     float2x3 inverseM = float2x3(cross(M[1], M[2]), cross(M[2], M[0]));
     float3 Tangent = mul(float2(duv1.x, duv2.x), inverseM);
     float3 Binormal = mul(float2(duv1.y, duv2.y), inverseM);
    
     return float3x3(normalize(Tangent), normalize(Binormal), Normal);
    }
    

    (this is hlsl :-/

     

    but i just dont get it to run properly..

    • Upvote 1
  10. its looking realy nice Gandi, Did you write a new shader for this? How high do you think you can make the waves?

    Y.. i wrote a new shader for it..

    atm it works this way:

    render world/reflection

    render lights

    render ocean

    render postprocess

     

    theoretically i guess you can make them any height, but atm it just works if you stand above watersurface+waveheight.

     

    looks very beautiful,will you give it free or just for private use,but great work mate

     

    dont know that yet, but im creating this mainly for a game im working on

     

    It does look promising! What's the heightmap actually used to manipulate then if there are no vertices?

     

    well i somehow have to create the waves ^^ its just a rgba image which holds the normals and the height of the waves.

    I'd prefere the wave generation with FFT but 1) i think im too stupid for it ^^ 2) i think its to much maths to do for every pixel which could be under the watersurface...

  11. I just created an ocean which doesnt need any vertices.. it's all computed as a post process..

     

    for the wave generation i use a heightmap (which still needs some work)

     

    Here you can see my first attemts to rendering some kind of specular color from the sun ( needs a lot of tweaking)

    water4.jpg

    If you directly look down the water you can see the refracted part + some caustics

    water3c.jpg

    The shore gets some foam and some blending. furthermore the parts very close to the water get some highlighting ( i dont know if i maybe should remove that)

    water2p.jpg

    Also high waves get some foam on top of them

    water1j.jpg

     

    For reflection i currently only use the sky, but it shouldnt be a problem to reflect the whole scene ( i just dont think its worth it)

     

    I'm still working on it and its far from being perfect..

  12. Hi!

    I'm at the moment trying to create a model with the gmfsdk.

    now i have several questions:

     

    1)

    BlitzMax: GMFSurfaceAddVertex:Int(surface:TGMFSurface,x#,y#,z#,nx#=0.0,ny#=0.0,nz#=0.0,u0#=0.0,v0#=0.0,u1#=0.0,v1#=0.0,r:Int=255,g:Int=255,b:Int=255)

     

    what is nx,ny,nz / u1,v1

     

     

    2) Is it possible to parent more then one bone to another bone with the sdk?

     

     

    hmm i think thats it for the moment.

×
×
  • Create New...