Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / [SOLVED] How to put texture on 3d object animated

Author
Message
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 9th Jun 2021 09:58
Good morning . I am trying to put a texture onto my 3d animation . It is a .dae Collada object. It will not let me change the color of it either .

The author of this post has marked a post as an answer.

Go to answer

fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 9th Jun 2021 11:27
you usually uv map it with a program before you animate but thats ok its still possible
ii now use ultimate unwrap that can uv wrap animations but costs for obj objects only i
used to use the free version lith unwrap.

If you have a model thats just coloured in blender blinks got a tool easily found on the forums
called kenney converter which will create a tiny texture where colours were used but can only work
with obj non animated models and not all models work but a great program nonetheless
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 9th Jun 2021 13:19
Decided to put some code on here to show you my problem. I can unwrap the file and texture it. The problem is it will not apply the texture to the model .

texture25=loadimage("Cube.png")
Loadobjectwithchildren(18,"cuberotate.dae")

//loadobject(18,"cuberotate.dae")
setobjectimage(18,texture25,1)
setobjectcolor(18,10,10,250,180)


It will not even let me change the color. If I run it with loadobject instead of loadobjectwithchildren it works fine but I need the animation. Any insight would be appreciated .
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 9th Jun 2021 14:49
Not sure if you can pre texture a model in Blender or not . Really pleased I got the thing to animate though was getting a bit frustrated with the whole thing . onwards and upwards happy coding .
hendron
8
Years of Service
User Offline
Joined: 20th Dec 2015
Location:
Posted: 9th Jun 2021 14:52
This post has been marked by the post author as the answer.
It may be that you need to texture each child object. Just a guess... AGK's 3D animation support seems like a bit of a mess to me, to put it lightly.

Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 9th Jun 2021 18:56
Thanks for that hendron . A nice bit of code .I managed to put a texture on it and it worked (in blender) but I cannot remember exactly how I did it . I can put the paint on but don't know how to save it . If anybody knows please let me know.
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 9th Jun 2021 19:04
Well hendron it worked . excellent . Thankyou. I did get it working in blender by putting a texture on before putting it into my program and it worked but I cannot repeat what I did . I think your method is how it is intended to work .
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 9th Jun 2021 19:11
I can get on with my programing tomorrow after playing with blender for a few days . I'm gonna spend a bit more time on it tonight and see if I can work out how I did it before or it will eat away at me .

Login to post a reply

Server time is: 2024-03-28 14:30:01
Your offset time is: 2024-03-28 14:30:01