Jump to content

  • Log In with Google      Sign In   
  • Create Account


gnomgrol

Member Since 16 Jun 2012
Offline Last Active Yesterday, 04:18 PM
-----

Posts I've Made

In Topic: [Optimising] Bone based Animation

25 July 2014 - 12:34 PM

Thanks a bunch Spiro, that is extremly helpfull! I'll rewrite everything using the model you mention in your other posts.

There is a good number of tutorials that use quaternions or suggest them.

That is not the first time something like that occurs. I have found a lot of tutorials that use the worst method possible. Really gotta be careful on who I listen to :/


In Topic: [Optimising] Bone based Animation

25 July 2014 - 11:22 AM

I suppose that would be a good idea. I never did that because I somehow assumed that pushing "all that stuff" to the GPU would create as much traffic as this eats away CPU.

 

So, how do I go about it. I update only the bones on the CPU, then I push those to the GPU (per model in a constant buffer) and just add weight-information to each vertex.

Can I do the computation on the Vertex-Shader or should I use a computation shader? 


In Topic: Specular Mapping on terrain

08 May 2014 - 01:04 AM

I tested the viewDirection, and from what I can tell it apprears to be fine.

WoW does have specular textures in their gamefolder, but none for normalmapping. Are you sure that what you are saying is true?

I am using a directional light, since it is supposed to be the sunlight, but I guess that was obvious. Lipsryme took down his screenshots, but I think what we was using was a pointlight. Do I need to calculate something differently from what I did when using it for a directional lightsource ? 


In Topic: Specular Mapping on terrain

05 May 2014 - 11:04 AM

Here are some screenshots on the values of those (look fine to me):

 

return float4(input.viewDirection, 1.0f);

2mpcw23n.png

 

 

 

return float4(input.normal, 1.0f);

wwavr5ka.png

 

 

specularIntensity = 1.0f; D = pow(NdotH,60.0f);

q5iz9ti4.png

 

 

 

 

When I move my camera around, nothing changes. That leads me to think that something with the viewDirection is wrong, but I can't seem to figure out what it is. The screenshot looks fine to me, exactly what I would expect to see ._.


In Topic: Specular Mapping on terrain

05 May 2014 - 06:55 AM

Yea, you are right. I messed those two up.

 

After fixing it,

pow(NdotH, 800);
does not display anything. Tuning it down to 100 or lower starts to show the first results - really small highlighting-edges, which also look very choppy. The further I turn it down, the closer it obviously gets to the last image. It does not change when I move my camera around, so I would suppose there is still something wrong.

(I tested all the values that the shader received, those appear to be correct). 

 

// Check in my first post on how the viewDirection etc are computed
float specularIntensity = specularMaps[0].Sample(SampleType, input.tex).r;
 
float3 H = normalize(lightDir + input.viewDirection);
float NdotH = saturate(dot(input.normal, lightDir));
float D = pow(NdotH,800.0f);
float3 specular = D * specularColor.xyz * specularIntensity * NdotL; 

PARTNERS