-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement API to change model colors #6
Comments
Hi ritup. Are you trying to load ToyPlane.obj from external SD card? If so, please attach the log to see what error you have. KR |
No I am not having error |
Hey. The mtl file is configured with 3 colors: red green and gray.
Please change the colors in mtl, recompile the app and install it.
It the ToyModel changes, then the app is working OK. If you have a
different result, then please submit your updated mtl file and I will check
as soon as I can.
Regards
…On Feb 22, 2017 05:38, "ritup22" ***@***.***> wrote:
No I am not having error
It shows green color in app & in online site it shows orange color
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB5YdQ89c2n4JJKuvven4U5VgxV91x9zks5re7vDgaJpZM4MHQSo>
.
|
Thank you.
It worked, I have changed .mtl file
But still I have one doubt.. How will I indetify which Kd color to change
as model will come from api & I will not know which color it has, at that
time how will I handle?
I have changed last Kd in .mtl file of toyPlane to 1.0,1.0,1.0 & it worked
*Thanks & Regards,**ritu Patel*
Software Developer - Android
*Credencys Solutions Pvt Ltd13th Fl, Landmark, Opp Seema Hall, Anandnagar
Rd, Ahmedabad, GJ 380015*
D: (+91) 26934331 x 303
ritu.patel@credencys.com
www.credencys.com
On Wed, Feb 22, 2017 at 10:48 PM, Andres Oviedo <notifications@github.com>
wrote:
… Hey. The mtl file is configured with 3 colors: red green and gray.
Please change the colors in mtl, recompile the app and install it.
It the ToyModel changes, then the app is working OK. If you have a
different result, then please submit your updated mtl file and I will check
as soon as I can.
Regards
On Feb 22, 2017 05:38, "ritup22" ***@***.***> wrote:
> No I am not having error
> It shows green color in app & in online site it shows orange color
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/andresoviedo/android-3D-model-
viewer/issues/6#issuecomment-281567043>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
AB5YdQ89c2n4JJKuvven4U5VgxV91x9zks5re7vDgaJpZM4MHQSo>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ATHIo9s5tcXFjna52MhzbzvzBh9Kthw0ks5rfG38gaJpZM4MHQSo>
.
|
Hey. Not sure to understand your last question. What API? The different Kd colors are linked to the different parts of the 3d obj file. In the ToyModel example you have 3 colors only and a texture. |
Ok I meant to say that my obj model with come runtime as per user demand it.
Yes I understand .mtl file structure, my question is that how will I
correct .mtl file format so that every model loads correctly?
*Thanks & Regards,**ritu Patel*
Software Developer - Android
*Credencys Solutions Pvt Ltd13th Fl, Landmark, Opp Seema Hall, Anandnagar
Rd, Ahmedabad, GJ 380015*
D: (+91) 26934331 x 303
ritu.patel@credencys.com
www.credencys.com
…On Thu, Feb 23, 2017 at 12:57 PM, Andres Oviedo ***@***.***> wrote:
Hey. Not sure to understand your last question. What API? The different Kd
colors are linked to the different parts of the 3d obj file.
In the ToyModel example you have 3 colors only and a texture.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ATHIo52cvljsX7YPZls71KGHI_KGtt5cks5rfTT6gaJpZM4MHQSo>
.
|
hi @ritup22 not sure to understand. are you trying to change the colors of the loaded model in your app? |
Yes color in .mtl file
*Thanks & Regards,**ritu Patel*
Software Developer - Android
*Credencys Solutions Pvt Ltd13th Fl, Landmark, Opp Seema Hall, Anandnagar
Rd, Ahmedabad, GJ 380015*
D: (+91) 26934331 x 303
ritu.patel@credencys.com
www.credencys.com
…On Tue, Feb 28, 2017 at 2:23 AM, Andres Oviedo ***@***.***> wrote:
hi @ritup22 <https://github.com/ritup22> not sure to understand. are you
trying to change the colors of the loaded model in your app?
regards
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ATHIo8JoGm34F-grDRBjemx7cL0crX6nks5rgzfCgaJpZM4MHQSo>
.
|
Hey. The change colors feature is not implemented. |
Hi, |
Hi @andresoviedo, I am also trying to implement this feature. I founded where can we change the material (in my case) attached to the obj but this is not showing when the object is already created and showing, i guess i need to refresh the scene or something... How can i re-build or re-read the object to showing the changes? Regards |
Hi, Replace the setColor function in Object3DData.java like this:
Then call
|
Thanks for the answer. It works fine but this code paint all the object to the specified color. Is there any way to set the color to specified material? This is the code what i've works on
obtaining the material and set the color to it. -> |
Hi. If you want to paint yourself the model programmatically, you would have to parse the groups of the model and save it on the Object3DData. Then you will be able to paint them independently, with material or any color. So, in order to save the groups for later processing, you need at least a structure like this:
With that structure you can populate arrayVertexColorBuffer object. |
Hi. Ok, so that means i need to modify the WavefrontLoader class in the readModel method for parse the group over 'o' rigth? |
@sk8dar yes. You would need to:
Regards |
API has the method |
Hello you this group of different color inside implements, please can you help me, I need your demo |
Not able to load correct .obj & .mtl
Please check here http://3dviewer.net/ ToyPlane.obj
It shows orange
Can you please help me with this?
The text was updated successfully, but these errors were encountered: