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 / 3D texturing in1082

Author
Message
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 15th Oct 2012 14:28 Edited at: 15th Oct 2012 14:36
I have been playing a little with the 3D commands, and seem to have an issue with texturing. I load the texture using loadimage, create a plane, or a box, it doesn't make any difference. Then I use set object image. I only see a white plane or box still. The 3D demo works ok as far as I can see, but apart from creating the objects rather than loading I can't see why my little test doesn't work. Anyone else had problems texturing objects made from with AppGameKit? Most of my 3D objects from my DB days are .x and I have no easy way to get oobj at the min.

Edit - Here's the code I have been playing with.


Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 15th Oct 2012 15:51
The command loadimage("light1.png",1) should be loadimage(1,"light1.png"), there are various versions of this command and the one currently being used is

int imageID = LoadImage( string filename, int blackToAlpha )
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 16th Oct 2012 01:31
That got it working. Lol, so busy looking at the 3D commands, texture stage and shaders, I didn't notice that. Thanks, for that Paul, a fresh set of eyes always helps!

DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 18th Oct 2012 17:09
Another question as it is semi related, I have tried using transparencies on a few planes. However they show up as black atm with either a setting of 0 or 1 in the loadimage command. Am I missing something? Or is that only for sprites and not 3D objects/planes?

Also a question about FE. I have tried this code on FE but it fails on making the plane. It appears that command and a few others seem to be unhighlighted. Is this AppGameKit update further along than FE? I have yet to have much success using it so far.

Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 18th Oct 2012 17:31
AGK is now ahead of FE in terms of 3D, I think FE only has the box primitive for now.

Transparency is not yet supported but will be soon.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 18th Oct 2012 17:33
Ah, that is good then, at least it isn't a silly mistake this time!

Login to post a reply

Server time is: 2024-11-23 23:51:32
Your offset time is: 2024-11-23 23:51:32