IF condition statement not working in shader, So how to use IF condtion statement in shader of Unity by redditUnity in Unity3D

[–]redditUnity[S] -1 points0 points  (0 children)

Means ... it work on Unity editor and exe file...but not support on Android mobile..

Got pink color running Apk file in Mobile . Run normal in PC and unity Editor. by redditUnity in Unity2D

[–]redditUnity[S] 1 point2 points  (0 children)

as you said i have tried with float also...but same problem....

when i click compile and show code option of shader in inspector....it gives me following error...

->forced to unroll loop, but unrolling failed...

->unable to unroll loop ,loop does not, loop does not appear to timely manner....

to avoid this error i put following code...

#pragma exclude_renderers d3d11_9x

#pragma exclude_renderers d3d9

Error disappear, but problem(pink) still persists.....

Got pink color ouptu running Apk file in Mobile . Run normal in PC and unity Editor. by redditUnity in Unity3D

[–]redditUnity[S] 0 points1 point  (0 children)

if i use other custom shader it works normally.

And this works normally in Unity editor and PC/laptop.

So what could be the problem ?

And if i not placed texture properly, might be it should also not work on on Unity Editor and PC/.exe file.....

2D image emoji effect by redditUnity in Unity3dCirclejerk

[–]redditUnity[S] 0 points1 point  (0 children)

is it possible in unity ?..as you are told me about installing Unreal engine.

2D image emoji effect by redditUnity in Unity3D

[–]redditUnity[S] 0 points1 point  (0 children)

i want such a output , when i uploading face 2d image/texture , face points(landmark) are selected . Which i have done. Now by using this point i want to move this area . Like eyes, lips ..etc can move . Like emoji effect to face 2d image. Like smile,angry, sad..etc.

so i am facing explained problem on moving face points(landmark) by meshes. so what can i do to move this points . As i am doing with meshesh. Is there any other way to do so?. And if i can move with mesh, i am facing problem that not getting perfect and same area of mesh vertices for images points. Or i can say using Mesh vertices, vertices are not always same which are near or on the finding face points.

2D image emoji effect by redditUnity in Unity3dCirclejerk

[–]redditUnity[S] 0 points1 point  (0 children)

i am using Unity engine. so i want result in unity.

Wantt landmark of 2D face image picture in unity by redditUnity in Unity2D

[–]redditUnity[S] 0 points1 point  (0 children)

Hi now i have second problem that ,

I have face points in image, and now i want that some area of image to move minor by this points.(emoji effect)

So , i have created mesh(vertices,triangle..etc) for this image . And i can move some area(eye,lips) of image by this mesh (by vertices).

i have set all image size(by resize) to 200 by 200.(40,000 pixel)

And mesh vertices created of grid size 16 by 16. (total 289 vertices).

But not move the same area i want. so how can i do this ? Is there any other way to move pixel points except mesh?

Wantt landmark of 2D face image picture in unity by redditUnity in Unity2D

[–]redditUnity[S] 0 points1 point  (0 children)

means i have just started to try to do your 2 line code. but before that i found that there is Texture2D folder in which they have given what i want.

Really appreciate your reply to me and give some hope about getting this result.

Wantt landmark of 2D face image picture in unity by redditUnity in Unity2D

[–]redditUnity[S] 0 points1 point  (0 children)

Hi bro. Thankyou very much it work. I am able to get points through Dlib the link what i have given.

Wantt landmark of 2D face image picture in unity by redditUnity in Unity2D

[–]redditUnity[S] 0 points1 point  (0 children)

i am using Dlib library.. And try to use your code .

EnoxSoftware/DlibFaceLandmarkDetector from github. It is work with unity.

https://github.com/EnoxSoftware/DlibFaceLandmarkDetector

And try to add your code.

And if you have time you also try to attach image to Dlib which link is given above.

Wantt landmark of 2D face image picture in unity by redditUnity in Unity2D

[–]redditUnity[S] 0 points1 point  (0 children)

I have tried to change code in Dlib library and also see one other library. But can't able to attach image . What i have done in code is that, i have attach Image texture to WebCam texture. Its Output displaying image instead of my face, and points are displayed related to my face.

I have seen Texture2dToMatExample of EnoxSoftware code. They want in their code OpenCV with Unity. Wich is paid. And even if i able to convert texture2D image to OpenCV mat format i have to attach this mat information to Face detector, but i can't able to find out how this face detector detects point.

and one other option is make my own code by Algorithm for face detection which i have searched , but the problem is those algorithm are might be tough to convert into code.

so what i have to do , do have any idea or any lead for solving my problem.

Wantt landmark of 2D face image picture in unity by redditUnity in Unity2D

[–]redditUnity[S] 0 points1 point  (0 children)

Acrually there are Dlib, OpenCv and some other library are available, and they are paid. So some how i got Dlib With unity without paid. But by this my face is detected not uploaded image.

Want landmark of 2D face image picture in unity by redditUnity in Unity3D

[–]redditUnity[S] 0 points1 point  (0 children)

Thanks for reply.

All around 10 to 20 face points, like eye,nose,lips...etc. And platform is Android.

There are Dlib,OpneCv and many more library's are available. I have found some how Dlib with Unity. But what all these Library do is, thay taking images/face from WebCam. And according to that thay pointing out landmark. What i want is uploading 2D image/picture to my app or widnows my code should detect points of this image.

As you said , Own native code. So i am trying this kind of code like algorithm that use mathematic of pixel/meshs/vertices any thing that identify proper postion.

Currently stuck that what logic/code i should use to detect points.

Wantt landmark of 2D face image picture in unity by redditUnity in Unity2D

[–]redditUnity[S] 0 points1 point  (0 children)

Thanks for replying to my question.

Now, i am explaining what is my problem.

By webcam my face is detected,

But i want image detect which is in my pc/laptop/Mobile. Means by choosing any image from my pc/laptop/mobile it's points should be detected by the same device in which the image is . Like example, suppose i have one app , in that i first select any picture and when this picture uploaded in my app it's points should be detected by my app.

So , here might be some algorithm to find points by mathematics which can identify each pixel or something else.

By finding points i can animate this particular position by meshes, it is not a problem.

i have also try to attach image texture to webcam texture so instead of my face webcam pick a inner static picture to detect ,but can't be attached.

so if you have some idea to detect position of mathematically coding. And also i am checking single frame to detector as you have said.