Jump to content

build walk with shader without rigs


NasimiAsl
 Share

Recommended Posts

hi ozRocker

 

after painting you can get this color in the vertex shader and you can define function for move that

 

like this : 

 

vec3 color = texture2D(ref,uv).rgb;

 

// rotate_x function for rotate in shader  new pos = rotate_x(old pos , deg , center );

position = rotate_x( position , 30.  * color.g, vec3(0.,3.,0.));

Link to comment
Share on other sites

i try work to   scan  points ( test ) and generated paint function  

 

that like rig but in the rig you paint vertex in maya or max in 3d area

 

but here you paint in texture ( thats good easy change and we can make multi rig with multi texture and you can use the z brush )

and in this way we have restriction like only 8 color you have to manage  

Link to comment
Share on other sites

deltakosh i started eash.js (easy shader )you can add this after babylonjs and you can use all tools 

 

i think this way is good and independed way for shader

 

sample :

 

1: mesh.material = eash.Shader( eash.solid(0xff0000)+eash.fresnel() , scene);

 

2: mesh.material = eash.Shader( eash.outline() , scene);

 

3: mesh.material = eash.Shader( eash.walk('texture.jpg') , scene);

 

 

and work for tools for generated and preview  :) and add in the github

Link to comment
Share on other sites

Hey this is really awesome because in theory, it should be possible to make a single mesh that is sent to the GPU, and then change the clothing textures and do all the animations on the GPU to create different characters in different animation states without using too much time in JS, which is usually the bottleneck  in WebGL due to the single thread :)

 

The tricky bit though is, how do you convert animations from a tool like Blender into shader instructions? I guess you'd need to write a script for that. Coding every animation step by hand will never produce nice looking results unless you are willing to spend weeks tweaking a single walk cycle :D

 

p.s. I don't think collisions will be a problem... in most games a bounding box is used for collisions anyway for performance. Just make sure the box is big enough to cover the maximum dimensions and it should be reasonable. It's only going to be an issue for something like a FPS where you need very accurate collision shapes.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...