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 / [SOLVED] Textured object.

Author
Message
pavel_sv_1982
11
Years of Service
User Offline
Joined: 9th Apr 2013
Location: Russia
Posted: 23rd Jul 2022 21:22 Edited at: 3rd Aug 2022 20:23
Hello. I use CANVAS program for modeling. Darkbasicpro sees textures but AppGameKit doesn't see what to do?
He does not want to apply textures in any way.

programming is a hobby, not a job.
P.S. in google and youtube - nikename pavelman- it is not me!

Attachments

Login to view attachments

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

Go to answer

Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 23rd Jul 2022 23:04
that's such a non-distinct texture but SetObjectImage( 2, 2, 1 ) should be SetObjectImage( 2, 2, 0 ) ?

i moved the camera a bit closer and it's applying the image when setting it to 0 but there may be an issue with the UV mapping?
pavel_sv_1982
11
Years of Service
User Offline
Joined: 9th Apr 2013
Location: Russia
Posted: 23rd Jul 2022 23:26 Edited at: 23rd Jul 2022 23:32
The fact is that the plate without texture.
The plate is made in a graphic editor.
So the program does not want to apply the texture to the plate.



I need to try a normal texture.
programming is a hobby, not a job.
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 24th Jul 2022 09:09
should upload a obj file or stl most 3d applications will not open or import a.x

pavel_sv_1982
11
Years of Service
User Offline
Joined: 9th Apr 2013
Location: Russia
Posted: 24th Jul 2022 10:27
The problem is that it accepts a different texture. and ufo.png is not. the plate just turns gray.
Why is it not clear. I'll have to look for another texture.
programming is a hobby, not a job.
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 25th Jul 2022 07:48 Edited at: 25th Jul 2022 07:51
Soo.. Let me break it down to you real fast. a 3d object has uv data . If u can imagine ur object split in half and spread flat on an image. the parts of the image the object is on will be what is mapped to the object. The object can be unwrapped aka uv mapped to the image in anyway you wish. If u do not have uv data it is possible the object will not be mapped at all in some rare circumstances. There are also normals. if a normal is facing inside the object instead of outside the object the texture will be applied to the inside of the object and all you will see is a gray model. also if you are using setimagetexture(stage0) it does not matter that the file image name is at all. file name has nothing to do with the ability to texture an object. If you want it to automatically load and texture the object using a specific file name im not sure agk will actually do that other then on some fbx objects. It is possible it might work on .x files but i think the file has to be exported a very specific way and the exporter has to be 100% compatible. there is always the option to open the .x file in notepad and change the file name and see if it works. .x files can be manipulated greatly inside of notepad. If u would upload the .x as an obj or mtl id be happy to look at the mtl for you but in the mean times u should try to texture ur object in stage zero. Additionally if u set culling to on and your object disappears ull know ur normals are broken

pavel_sv_1982
11
Years of Service
User Offline
Joined: 9th Apr 2013
Location: Russia
Posted: 25th Jul 2022 12:58 Edited at: 25th Jul 2022 14:22
the model is made in 3DCrafter 10



The object has no map. the object was drawn without textures. what is most interesting in darkbasicpro everything works, but the app game kit does not want to texture.

and the app game kit is buggy.


this is what the model looks like in the editor.


where to send a bug report?
programming is a hobby, not a job.

Attachments

Login to view attachments
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 26th Jul 2022 05:53 Edited at: 26th Jul 2022 05:55
Your models uv map looks like this;


In order for that to map you need to make your texture wrap by add these lines after you load the texture.


Attachments

Login to view attachments
pavel_sv_1982
11
Years of Service
User Offline
Joined: 9th Apr 2013
Location: Russia
Posted: 26th Jul 2022 09:49
This post has been marked by the post author as the answer.
Yes thank you. This is exactly what I found when I dug into the settings of another editor. Already a blender. We'll have to draw all the models in a 3D blender. Now it is clear why all the models were painted in gray.
Thanks for the help.
programming is a hobby, not a job.

Login to post a reply

Server time is: 2024-04-26 02:19:32
Your offset time is: 2024-04-26 02:19:32