http://www.youtube.com/watch?feature=player_embedded&v=EcOP3gosbAM

Brad is a machine with a soul.
If you are at least this good, contact me! I'll hire you!
Posted on 2011-11-27 09:19:31 by Homer
Am I sufficient?
I dont have any good mocap but this has the same concept.

http://ompldr.org/vNWE5eA/GE.zip

If blender enabling the Cal3D again, I'll show you a more cool motion.
Anyway, Im a programmer not an artist.
Posted on 2011-12-04 03:05:13 by Farabi
Your demo is shaded black and white?
Lucky you since I am a coder, not an artist.
Define the main uses for dot and cross products and I'll slot you in.
Posted on 2011-12-05 02:19:34 by Homer

Your demo is shaded black and white?
Lucky you since I am a coder, not an artist.
Define the main uses for dot and cross products and I'll slot you in.


You only saw black and white? I guess my demo did not work on your system. Buggy, as ussual.
You mean you want me to handle the basic geometry function? I'll do it, as long as on C or assembler.

Well, if you want me to explain about cross product, Im still unable to catch the logic, and what it was used for. But I know some basic logic of 3D and 2D. Maybe you want to take a look at function I created.



fCam struct
Position VERTEX <0.0>
Rotation VERTEX <0.0>
fCam ends


.code

fCameraLook proc uses esi lpcamera:dword

mov esi,lpcamera
invoke glRotatef,.fCam.Rotation.X,FP4(1.0),FP4(0.0),FP4(0.0)
invoke glRotatef,.fCam.Rotation.Y,FP4(0.0),FP4(1.0),FP4(0.0)
invoke glRotatef,.fCam.Rotation.Z,FP4(0.0),FP4(0.0),FP4(1.0)
invoke glTranslatef,.fCam.Position.X,.fCam.Position.Y,.fCam.Position.Z

ret
fCameraLook endp

fCameraMove proc uses esi edi lpcamera:dword,fp4distance:dword
LOCAL x[16]:real4
LOCAL buff[256]:dword
LOCAL q:qword
LOCAL py,px:dword

mov esi,lpcamera

invoke glPushMatrix
invoke glMatrixMode,GL_MODELVIEW
invoke glLoadIdentity

invoke glRotatef,.fCam.Rotation.X,FP4(1.0),FP4(0.0),FP4(0.0)
invoke glRotatef,.fCam.Rotation.Y,FP4(0.0),FP4(1.0),FP4(0.0)
invoke glRotatef,.fCam.Rotation.Z,FP4(0.0),FP4(0.0),FP4(1.0)
invoke glGetFloatv,GL_MODELVIEW_MATRIX,addr x
lea edi,x
invoke glPopMatrix

fld dword ptr
fmul fp4distance
fstp dword ptr
fld dword ptr
fmul fp4distance
fstp dword ptr
fld dword ptr
fmul fp4distance
fstp dword ptr

fld  .fCam.Position.X
fadd dword ptr
fstp .fCam.Position.X

fld .fCam.Position.Y
fadd dword ptr
fstp .fCam.Position.Y

fld .fCam.Position.Z
fadd dword ptr
fstp .fCam.Position.Z
ret
fCameraMove endp


Simple one, but it very usefull, I used GPU to calculate the Camera Movement. After 5 years, I only able to understand that, Okay, Im stupid, I know. ;D

Well, Im afraid I will not be able to meet your demand.
Well, I dont know what people used to call about cross product, but if you asked about how can I determine to which side a face is, and that is what you mean by a cross product, well, what you need is far beyond my knowledge. I only know how to plot a pixel on 3D coordinate, fill it in, and texturing it. That is all.
Posted on 2011-12-07 01:01:20 by Farabi
I think what he wanted to hear was something like this:
Main uses for dotproduct are:
- Calculating the distance between two points
- Calculating the angle between two (normalized/unit length) vectors (mostly for lighting)
Main use for crossproduct is:
- Calculating the normal vector of a plane that is spanned by two vectors (which can be constructed from three points on the plane). The normal vector can be used for things such as lighting or determining whether the plane is frontfacing or backfacing.
Posted on 2011-12-07 08:05:15 by Scali
In laymans terms, the dotproduct tells you if you are pointing in a similar direction, or not - much more than lighting stuff, its a general tool for "am i remotely pointing in the right direction or not" - and crossproduct yeah, correct, we use it to completely define an orthogonal set of axes.

You show me how you applied this now, if you want to make games and get paid.
Posted on 2011-12-08 10:51:15 by Homer
I am into lighting stuff, but generally, in games, we use dots and crosses for generic stuff that has to do with what users expect in games - i deliberately did not talk about matrices as i see them as more or less redundant thanks to the dual quaternion, so I was not asking about how lighting works, but how we might use these operators in a game ;)
Posted on 2011-12-08 10:54:50 by Homer
I know how to create a ligting on a scene, but It need layer bufer.
Posted on 2011-12-28 11:02:40 by Farabi
There are basically, three major lighting models which define your shader programs.
Everything else is subsidiary to the major lighting model for that material...
Posted on 2011-12-30 05:07:46 by Homer
When you say it like that, it sounds so simple, nothing can go wrong - right? ;)
Posted on 2011-12-30 05:09:02 by Homer
Lighting in one pass is achieved the same way as gpu skinning, you pass in an array of junk to the shader. There's a few ways to do that. When you have implemented that, yell out again!
Posted on 2012-01-14 03:04:47 by Homer
Vec_CrossProduct proc uses ebx esi DestVec:LPVERTEX, A:LPVERTEX, B:LPVERTEX
mov eax, DestVec
mov ebx, A
mov esi, B
fld
fmul
fld
fmul
fsubp st(1), st(0)
fstp

fld
fmul
fld
fmul
fsubp st(1), st(0)
fstp

fld
fmul
fld
fmul
fsubp st(1), st(0)
fstp
ret
Vec_CrossProduct endp
Posted on 2012-01-14 09:30:28 by Farabi

When you say it like that, it sounds so simple, nothing can go wrong - right? ;)


Thanks for the correction, I think I need to studying more. Im so dumb on math and physic, but thanks anyway.
Posted on 2012-01-14 09:40:09 by Farabi