Jump to content

TylerH

Members
  • Posts

    525
  • Joined

  • Last visited

Everything posted by TylerH

  1. We need an updated version for 3ds Max 10.
  2. For the windows that are transparent in the shots from Jeklynn Heights I just used a blend=1 in the material: texture0="abstract::barborshop_windows_d.dds" clamp0=0,0,0 texture1="abstract::barborshop_windows_n.dds" clamp1=0,0,0 texture2="abstract::barborshop_windows_s.dds" clamp2=0,0,0 texture3="abstract::barborshop_windows_selfillum.dds" clamp3=0,0,0 blend=1 depthmask=1 depthtest=1 overlay=0 zsort=1 cullface=0 castshadows=1 specular=2.50000000 bumpscale=1.00000000 gloss=0.100000001 bakeaomap=1 raytraced=1 shader="abstract::mesh_diffuse_bumpmap.vert","abstract::mesh_diffuse_bumpmap_specularmap_glow.frag" shadowshader="abstract::refraction.vert","" Ignore bakeaomap and raytraced and the selfillum stuff, that is all some custom shader work we did that isn't related to the transparency.
  3. Havok Animation is something I have been wanting to try out in Leadwerks, but it seems like it will be a pain to get it working.
  4. For anyone unsure: http://en.wikipedia.org/wiki/Inverse_kinematics Explains it well in terms of the physics terms.
  5. The maths for those rotations are in fact what an Inverse Kinematics Solver would do. What is does, is determine how much you have to rotate and move the parents of a given bone in order to move it to where you are trying to, and give it proper influence.
  6. TylerH

    CameraPick

    So did that work, or no?
  7. No, it doesn't. It has forward kinematics (higher bones influence lower bones), but not IK. I am just getting to this now too, as we have an animated main character who has floating feet as well.
  8. Directed directly at Josh. Not entirely sure under what non-disclosure this is under, but for the obvious use. We need something similar to GetWorldGroup(TWorld world) exposed via the DLL that provides access that TWorld.Current.root does in Blitzmax. Either that, or it would be cool to know if a simple CreateGroup(NULL) will work fine as the "root" group.
  9. Even then, if we could have non-instanced materials across instanced models, we still wouldn't need atlases. We could just paint with different materials accordingly.
  10. I will do some comparison shots in a moment here, assuming I don't get sidetracked.
  11. Interesting, not sure why our artist's tree won't work in the veggie layer system
  12. Just out of curiosity, couldn't you, at runtime, swap out the texture atlas in the material, in say the case of the 256 shirt textures in the 4096x4096 atlas, giving you an infinite number? Or does that succumb to the same flaw that the material file is shared globally across all instances?
  13. It does use conditional compiling. I just tend to not like having that extra code there if I am never going to be compiling on a platform that uses it. To be honest, my implementation is the same as boost's for Windows, but my implementation is also the same as the implementation all PC Games use, for example Crysis, since you can openly check out their source code in the Mod SDK.
  14. I do/did use Boost, but I prefer my own implementation, because it removes the overhead boost has from implementing for multiple platforms where I am using Windows exclusively. If you check out the boost hpp headers, you will see it uses Win32 critical sections for its mutex class on Windows. EDIT: Actually, better than anything are the Intel Threaded Building Blocks, especially if you are on an Intel architecture CPU. Not sure if AMD has an equivalent.
  15. I am going to be implementing a job queue and thread pool system to handle game logic, so it would be great if we could expand that to atleast calling engine commands. This doesn't require the engine to be compiled in Blitzmax multithreaded mode or anything, just some basic checks on commands to make sure the memory they are accessing (models, etc.) are truely accessible and not in use. This is done by simply using semaphores, more specifically the mutex semaphore, which is quite easy to implement. If I or someone else were to write an example of such an implementation in Blitzmax, do you (Josh) think this may be viable?
  16. Will the user data safely hold a pointer t a C++ structure and cast back?
  17. I got our artist's models to appear in the list, but I also have the same problem. When I distribute a layer, nothing is visible...I have tried playing with every possible setting I could...
  18. Just out of curiosity, what is the procedure / naming convention to get your own models to appear in the vegetation layer menu?
  19. Wonderful! Finally something I can be overly ecstatic about Quick question, though I don't know how far ahead you have this idea setup, but will it be usable the way mental mill is? I would love to have the versatility that it does.
  20. I never said a shader-based solution wouldn't work, I am just saying that all the responses to people who post feature requests are always a different way to implement the feature request by someone else in the community as opposed to making the change in the engine as the request would most efficiently be handled.
  21. Who can deny it? The current saturation, brightness, and contrast post effects just are lacking. They seem to basically play with the brightness, period. So I searched online, and found an existing S.B.C. function written in GLSL. I went ahead and replaced the setup in postfilter.frag to utilize this function, and I now get much better results when using the Saturation, Brightness, and Contrast sliders. They just seem to give me the right "feel" of appearance for the values. Brightness of 2.0 looks twice as bright, not twice as gray/washed out, etc. Below is a drop in replacement for postfilter.frag: varying vec4 fragcolor; varying vec4 fragcoord; //========================================== //Textures //========================================== uniform sampler2D texture0; //color uniform sampler2D texture1; //depth uniform sampler2D texture2; //normal uniform sampler2D texture3; //blurred bloom buffer uniform sampler2D texture4; //unblurred bloom buffer uniform sampler2D texture5; //caustics frame 1 uniform sampler2D texture6; //blurred DOF texture uniform sampler2D texture7; //wobble texture / caustics frame 2 uniform sampler2D texture10; //noise texture for effects uniform sampler2D texture11; //ssao texture uniform float contrast = 1.0; uniform float brightness = 1.0; uniform float saturation = 1.0; //========================================== //Automatic uniforms //========================================== uniform float apptime; uniform vec2 buffersize; uniform vec2 camerarange; uniform float camerazoom; include "depthtozposition.frag" //========================================== //HDR uniforms //========================================== uniform float hdrexposure; //========================================== // Fog variables //========================================== uniform vec4 fogcolor = vec4(1.0); uniform vec2 fogrange = vec2(0.1,1000.0); //========================================== // DOF variables //========================================== uniform vec2 dofnearrange; uniform vec2 doffarrange; uniform float dofstrength=1.0; //========================================== // Caustics variables //========================================== uniform vec4 causticsmappingaxes[4]; uniform float causticsframeinterpolation; uniform vec4 causticscolor; //========================================== // Volumetric light scattering variables //========================================== #ifdef LW_GODRAYS uniform vec3 screenlightpos; uniform vec3 lightvector; uniform vec4 raycolor = vec4(1.0); //uniform float exposure = 0.35; #define exposure 1.0 #define RAYSAMPLES 64 #define MAXRAYLENGTH 1.0 #endif //========================================== // Motion blur variables //========================================== uniform vec2 motionblurvector; uniform float motionblurstrength = 1.0; uniform float motionblurdistance; //========================================== // SSAO Functions //========================================== #ifdef LW_SSAO float ao=0; #define aointensitybias -0.55 #define ssaostrength 1.0 float readDepth( in vec2 coord ) { //#ifndef __GLSL_CG_DATA_TYPES // coord.y = 1.0 - coord.y; //#endif return (2.0 * camerarange.x) / (camerarange.y + camerarange.x - texture2D( texture1, coord ).x * (camerarange.y - camerarange.x)) * camerarange.y; } float compareDepths( in float depth1, in float depth2 ) { float aoCap = 1.0; float aoMultiplier=10.0; float depthTolerance=0.000; float aorange = 100.0;///(camerarange.y-camerarange.x);// units in space the AO effect extends to (this gets divided by the camera far range float diff = ( clamp(1.0-(depth1-depth2) / aorange,0.0,1.0) ); float ao = min(aoCap,max(0.0,depth1-depth2-depthTolerance)) * diff; ao *= aoMultiplier; ao=clamp(ao,0.0,1.0); return ao; } #endif vec3 ContrastSaturationBrightness(vec3 color, float brt, float sat, float con) { // Increase or decrease theese values to adjust r, g and b color channels seperately const float AvgLumR = 0.5; const float AvgLumG = 0.5; const float AvgLumB = 0.5; const vec3 LumCoeff = vec3(0.2125, 0.7154, 0.0721); vec3 AvgLumin = vec3(AvgLumR, AvgLumG, AvgLumB); vec3 brtColor = color * brt; vec3 intensity = vec3(dot(brtColor, LumCoeff)); vec3 satColor = mix(intensity, brtColor, sat); vec3 conColor = mix(AvgLumin, satColor, con); return conColor; } //========================================== // Main //========================================== void main( void ) { //========================================== //General variables //========================================== vec2 texcoord = gl_FragCoord.xy/buffersize; vec4 color; float depth; float lineardepth; vec3 normal; vec4 cnormal; vec4 outputcolor; vec2 pixelsize = 1.0/buffersize; float irisadjustment=1.0; float bloomstrength = 1.0; float bloomirisadjustment=2.0; #ifdef LW_WOBBLE Include "wobble.frag" #endif color = texture2D( texture0, texcoord ) * fragcolor; depth = texture2D( texture1, texcoord ).x; cnormal=texture2D( texture2, texcoord ); normal = cnormal.xyz * 2.0 - 1.0; lineardepth = DepthToZPosition( depth ); outputcolor = color; float pixelbrightness = outputcolor.r * 0.3 + outputcolor.g * 0.59 + outputcolor.b * 0.11; //========================================== // Now include the effects we want //========================================== #ifdef LW_HDR include "hdr.frag" #endif #ifdef LW_CAUSTICS include "caustics.frag" #endif #ifdef LW_MOTIONBLUR include "MotionBlur.frag" #endif #ifdef LW_BRIGHTEN outputcolor = max( outputcolor, texture2D(texture4,texcoord).w * texture2D(texture5,texcoord) ); #endif #ifdef LW_NEARDOF Include "neardof.frag" #endif #ifdef LW_FARDOF Include "fardof.frag" #endif #ifdef LW_GODRAYS Include "godrays.frag" #endif #ifdef LW_SSAO float gray = outputcolor.r * 0.3 + outputcolor.g * 0.59 + outputcolor.b * 0.11; vec4 ssaocolor = texture2D(texture11,texcoord); ao = ssaocolor.x; outputcolor.rgb = mix(outputcolor.rgb*ao,outputcolor.rgb,gray+aointensitybias); //outputcolor.x = outputcolor.rgb*0.5; //outputcolor.x += ssaocolor.x * 0.75; //outputcolor.y += ssaocolor.y * 0.75; //outputcolor.z += ssaocolor.z * 0.75; //outputcolor = vec4(ao); //outputcolor=ssaocolor; #endif #ifdef LW_DISTANCEFOG Include "fog.frag" #endif #ifdef LW_BLOOM Include "bloom.frag" #endif #ifdef LW_GAUSSIAN Include "gaussian.frag" #endif //#ifdef LW_BRIGHTNESS //Include "brightness.frag" //#endif //#ifdef LW_CONTRAST //Include "contrast.frag" //#endif //#ifdef LW_SATURATION //Include "saturation.frag" //#endif outputcolor.rgb = ContrastSaturationBrightness(outputcolor.rgb,brightness,saturation,contrast); //========================================== // Set the fragment color to the output variable //========================================== gl_FragColor = outputcolor; gl_FragDepth = depth; }
  22. You don't need to pass in a parallax map I don't think? Doesn't it use a heightmap in the alpha of the diffuse?
  23. That Null Framewerk error occurs because you forgot to call SetGlobalObject("fw",m_framework); or whatever your variable name happens to be.
  24. Why should we have to use a shader? Why can't you just add support for non-instanced entities? Or atleast describe whether or not it is viable. I am sick and tired of these hacky and backwards solutions to things that have a clear and concise way to be solved, it is just a bit irritating, and is a sign of ignorance and laziness in my honest opinion. If you want to know why people *cough* want source code, it is so they can fix things like this that you simply dodge in your response. EDIT: Since I know people can't tell my tone properly from my posts, I just want to clarify this is in no way intended to be hostile. It is to be taken lightly, with a slight humorous undertone, but with a stern point about some general flaws that are causing many of the disagreements and quarrels around here.
×
×
  • Create New...