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 Classic Chat / Icosahedron primitive

Author
Message
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 9th Dec 2018 12:38
Hi there . I'v been the last couple of hours fiddling with this code . I come up here with an icosahedron . What I can't figure out is how on h... can we set object normals. when we rotate the main object (100), the object colours nearly disapears
I hope you like it .

I'm not a grumpy grandpa
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 9th Dec 2018 13:09 Edited at: 9th Dec 2018 15:35
Hi guys. In this new update, we can save our icosahedron to .OBJ file ....just single colour no textures at the moment.


Last update . Now in Obj file I just save three vertex per triangle ( 0 , 1 , 2 ) reducing the final file .
I'm not a grumpy grandpa
puzzler2018
User Banned
Posted: 9th Dec 2018 13:43
Wow - thanks looks cool too, i was trying to do an ICO but no success.

Well done
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 9th Dec 2018 14:01
Looks great chafari I had to remove the raw part of path to just leave media
but works really well
fubar
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 9th Dec 2018 14:35
Thank you guys for your comments.

Quote: "I had to remove the raw part of path to just leave media"


Yeah ! I know....I use to put the path to not get lost myself looking for saved file

Cheers.
I'm not a grumpy grandpa
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 9th Dec 2018 19:19
New update

Now we can save the OBJ with UV so we can load the object and apply our texture . We could save in the Obj files orders to take the texture automatically in other programs (Not Appgamekit) just unrem line // Writeline ( 1, "mtllib texture.mtl" ) and line //Writeline ( 1,"usemtl Material1") .

I didn't save the .mtl file automatically but we can just make one in Notepad with just two lines . Where map_Kd xxxxxx wlill be the image to load.
Quote: "
newmtl Material1
map_Kd my_image.jpg
"




I hope you can find it useful .

Cheers.
I'm not a grumpy grandpa
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 9th Dec 2018 22:13
You could make a simple .png palette so you could use setobjectimage() to load the colours in AGK
puzzler2018
User Banned
Posted: 9th Dec 2018 22:20
UVs all over again

They are vital in 3D object construction

But ill keep quiet
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 10th Dec 2018 09:07 Edited at: 10th Dec 2018 09:08
@blink0k
Yeah....I know what you mean...we have to setobjectimage() in all cases... other programms asign automatically all textures when we load the object.

Quote: "UVs all over again"


If we use just colours we don't even need them.
I'm not a grumpy grandpa

Login to post a reply

Server time is: 2024-04-25 05:40:23
Your offset time is: 2024-04-25 05:40:23