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 / Repeating a texture across a 3D-object

Author
Message
Zwarteziel
13
Years of Service
User Offline
Joined: 22nd Jan 2011
Location: Netherlands
Posted: 8th Jun 2013 09:33
Hi all,

I'm trying to apply a small texture to a 3D-Object and have it repeat along it's width and length. I would have thought that the SetImageWrapU- and SetImageWrapV-commands could be used for this purpose, as long as a 2^n image is used. The code below and the attached image don't work however. (It's a 128x128 image, applied to a 256x256 plane). Can someone tell me where I'm amiss?

Attachments

Login to view attachments
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 8th Jun 2013 10:41 Edited at: 8th Jun 2013 10:42
i can't found a uv scale command for 3d objects.
SetImageWrap it only on/off repeating but on is correct.
you need a 3d editor (blender or something) and save as .obj.
or you look at .obj file description and make a file manual with
notepad.
or you double your image self, 4 in one.
or wait until 3d part in agk is "finished"
Zwarteziel
13
Years of Service
User Offline
Joined: 22nd Jan 2011
Location: Netherlands
Posted: 8th Jun 2013 11:45
Quote: "you need a 3d editor (blender or something) and save as .obj."


Ah, I see Markus. Thank you for your clarification!
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 8th Jun 2013 12:06 Edited at: 8th Jun 2013 12:07
ok, i attached a ground plane .obj i used for testing 3d.
maybe you can use it.

Attachments

Login to view attachments
Zwarteziel
13
Years of Service
User Offline
Joined: 22nd Jan 2011
Location: Netherlands
Posted: 8th Jun 2013 15:15
Thanks Markus, I've just tried adding the image file to the .OBJ-file you created and it works like a charm. Very kind of you to provide the file.

Login to post a reply

Server time is: 2024-05-07 02:51:11
Your offset time is: 2024-05-07 02:51:11