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 model viewer app (Has anyone written one)

Author
Message
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 22nd Sep 2017 02:27
Wondering if anyone has a model viewing app. Where i can select the model from, drag the camera around and zoom. Maybe add lights and apply colours.
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 22nd Sep 2017 03:16
Sorry, no help but I'm looking for the same thing.
Characters. You build them a world and what do they do? They moonwalk, get stuck in the walls and fall through the floors!
Westa
12
Years of Service
User Offline
Joined: 28th Oct 2011
Location:
Posted: 23rd Sep 2017 03:19
Been doing a lot of work in that area recently. It is possible for some sorts of model setups - but it depends a whole lot on the model. Some notes and thoughts on my experience.

1. Only models with separate texture maps will look correct - AppGameKit does not handle vertex level color or embedded textures - so the texture map will also need to be loaded and mapped correctly.
Same would go for bump/normal mapping
2. You will need to manually control the UV Mapping wrap settings
2. Only certain versions of fbx seem to be supported - specifically the latest version seems best - have a look at the autodesk fbx converter for more details.
3. Models load in different orientations depending on which format they are saved - and in blender for example if you save an fbx without camera or lighting you get different orientation and other mapping issues.
4. AppGameKit defaults to single sided normals on faces - this can result in models that look wrong - missing faces etc - turning on double-sided faces can fix this - but adds a bit performance hit.
5. The model load can be somewhat slow - but there is no way to show the user what is happening (load percentages etc) since AppGameKit just hangs until the model is fully loaded. There is no background loading as such - this can be an issue with a large object - so need to keep objects relatively small to avoid the appearance of hangs.

Westa
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 23rd Sep 2017 14:07
Not trying to sound negative or anything, but I am confused as to why you would want/need this kind of app.

If you just want to view the models, then why wouldn't you just use a modeling program?

Is this just to see how it would look in AppGameKit and if it will load properly?

Would this just be for X files or all of the 3d formats supported by AppGameKit? (I have only been using the X files)

If it is just for viewing, then that should not be that difficult to do.

I have been experimenting with the 3d commands in AppGameKit recently, and have gotten the basic camera controls sorted out pretty well.

However, if you want to make changes etc. then that would be out of my scope at the moment.

I have not experimented with the lights, colors, etc as you mentioned, so that would also be out of my scope at the moment.

Just getting a model in and moving the camera around is easy, so I'll see what I can do in the next couple of days with my free time.

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 23rd Sep 2017 16:25
I made a model viewer/importer for my 3D editor, its not standalone but I could make a version of it that produces AppGameKit code.

Attachments

Login to view attachments
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 23rd Sep 2017 17:17
Hi conjured,
Quote: "Not trying to sound negative or anything, but I am confused as to why you would want/need this kind of app."

Yes, if you just want to view your models there are many programs that will serve.
As for me, I need a viewer that can accept command line arguments of mesh (.x) and texture (.dds or other/multiple formats) and display the textured model with rotation. I'm trying to update/improve some FPSC apps and a viewer would be a great help to give the user visual verification of a resource. It doesn't need to do anything but accept the arguments and display the results. All else will be handled by my program.
Hope all is well.
Characters. You build them a world and what do they do? They moonwalk, get stuck in the walls and fall through the floors!
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 23rd Sep 2017 23:28 Edited at: 23rd Sep 2017 23:29
Quote: "Is this just to see how it would look in AppGameKit and if it will load properly?"

yes

Here are a few things i think would be good;
1. load any model
2. load multiple models
3. adjust for different co-ordinate spaces (My 3d proggy has the x axis rotated 90 degrees and the z axis flipped)
4. move the camera around the model
5. load texture sheet
6. adjust ambient
7. add/move lighting
8. adjust shadow parameters
9. move/rotate the model
10. the app could check the date/time on the model/texture and if it changes automatically reload the model and texture (This way i could get instant feedback from changes i make in my modelling program)
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 24th Sep 2017 00:31
@ PartTimeCoder
That editor looks nice.
It looks like you are leaps and bounds ahead of me.

@BlinkOK
From the looks of your list, I think PartTimeCoder would be much more prepared to tackle it than I would at this point.
I'll see what I can do, but I am sure he could easily beat me to the punch from the looks of his 3d editor.

@Xplosys
All is well here my friend, and I hope things are going well for you too.
I am in my same old self induced rut. lol Living my dreams regardless of financial gains/losses.
I was thinking of banging something out simple, more along the lines of what you had in mind, because I am not as savvy in AppGameKit as I should be.






Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 24th Sep 2017 00:58
I didn't notice PTC's app. It looks great!
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 24th Sep 2017 01:50
Quote: "I was thinking of banging something out simple"

Anything would be appreciated, the simpler the better.
Hang in there.
Characters. You build them a world and what do they do? They moonwalk, get stuck in the walls and fall through the floors!
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 24th Sep 2017 08:46 Edited at: 24th Sep 2017 08:49
Here is what I have so far... (see attached ZIP)

KEYS...

Up ARROW = Move camera forward
Down ARROW = Move camera backwards
Left ARROW = Move camera left
Right ARROW = Move camera right

ENTER = Move camera up
Right SHIFT = Move Camera Down

Q = Rotate Model Left
E = Rotate Model right

W = Tilt Camera Up
S = Tilt Camera Down
A = Pan camera left
D = Pan Camera Right

P= Reset Camera (in case it goes out of sight or is difficult to get back straight)

The folder at top left opens the X file
The Big Buttons to right open the textures

I need to learn how to use the shaders to get a bump map working, so I will have to add that later.
This is just an sample of what I had in mind, so tell me what you think...


Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1

Attachments

Login to view attachments
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 24th Sep 2017 08:53
Looks really good CE. I tried loading a .3ds file and it worked so i think you can allow just about any format supported by AGK
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 24th Sep 2017 09:03
Quote: "Looks really good CE. I tried loading a .3ds file and it worked so i think you can allow just about any format supported by AGK"

Cool
It's a wonder that it let you even see that format, because I only included the *.X so far.
I'll add the other formats to that command in the next compile once I get the shaders figured out.
I tried a depth of field from the forums and I tried the internal shader. but nothing noticeable happened, so I am doing something wrong.
I'll try again later but I need some sleep right now..it is 4am here, but I was wide awake once I started coding.
I guess this is far enough for now so I will take a break.

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 24th Sep 2017 11:44 Edited at: 24th Sep 2017 11:45
Very nice. Had something like that for Blitz3D before. Also nice to incorporate: show animations with selectable playback speed and display the frame number.
That would be great to see where the different sequences of the animation start/end.
Perhaps also a display bones mode and size of the model.
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 24th Sep 2017 14:04
@CE,
It works fine with .x files and has/will have what most people here need.
I'm afraid that my needs are a little strange, which is why I still search. In the end, I may have to learn enough DBPro or AppGameKit to build my own. I understand that no one wants to write an app for one person. Unfortunately, the only language I'm well versed in is VB, but it won't do for the 3d part of what I want to write. (old dog - new trick?)

If... you'd be interested in writing an even more basic viewer, please PM me.
Thanks.
Characters. You build them a world and what do they do? They moonwalk, get stuck in the walls and fall through the floors!
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 24th Sep 2017 14:59 Edited at: 24th Sep 2017 15:05
@ Rick Nasher
Thanks
Yes, this is very basic at the moment, since I am just getting started. (will keep playing with this project until my ADD kicks in)
My 3d skills for AppGameKit need much improvement though so this task was helpful, and I learned a little about the file handling with this too.
I hope to keep adding to this, and I also hope that others (like PTC) will join in the fun as well too.
We cannot have too many tools to use, and diversity is a good thing because different perspectives and solutions appeal to different people.
I started out using MilkShape3d and then I found FragMotion, so I used both of them for awhile. (I never could get all used to all the windows and buttons in Blender)
My preference was MilkShape starting out, but then I learned more about FragMotion and got used to its interface, and now I use it primarily.
Anyway, this isn't a race, and a lot of us here are hobbyists or PartTimeCoders so I am sure we can all benefit from multiple viewers.
I am sure my learning curve on the shaders will slow me down enough for others to make more feature rich viewers than mine.

@ Xplosys
PM sent

Quote: " Unfortunately, the only language I'm well versed in is VB, but it won't do for the 3d part of what I want to write. (old dog - new trick?)"

I know the feeling, and I could not learn fast enough to keep up with the dozen or so languages that I learned back in the day.
Paul has updated AppGameKit constantly, and my extended break has made me fall way behind in AGK.
But, I love AppGameKit and I have abandoned the other languages for this one, so now I only have to try and keep up with one language, my favorite!

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
spaceName
6
Years of Service
User Offline
Joined: 27th May 2017
Location:
Posted: 26th Sep 2017 04:53
I've been working on tools of various types for many many years.
I like these types of tools/viewers and have built a few for clients in various game engines over the last 16+ years. I understand them and their purposes all too well.. in fact, any engine without an easy to use tool or easy to run-checks on 3d models/art/arttech ... needs one IMHO. Else anyone working in that area of tech, will loooooooose alot of time "fiddling".

I am new to AGK2..so I think this would be a good chance to help me learn AGK2 while having a purpose to the time as opposed to fiddling to learn.

What I mean is: if anyone would like help, honest-private-genuine-and-skilled help... message me for a chat. I'm in NewYork.
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 8th Oct 2017 21:51 Edited at: 9th Oct 2017 10:15
Okay,

So, in the manual under SetObjectMeshImage( objID, meshIndex, imageID, textureStage ) , it says that ...

"Texture stages can be used to assign multiple images to a mesh, for example you might put the base (diffuse) texture in stage 0, a normal map in stage 1, and a light map in stage 2. "

And, when trying to set the Normal map as stage 1 and the light map as stage 2 as per the instructions, I could not get it to work right.

Then, when looking at the manual under SetObjectNormalMap( objID, imageID ) , it says ...

" The normal map will be placed in texture stage 2, overwriting anything that is already there and will have a shader generated that combines it with any dynamic lighting, to correctly light the object."

So, i used that command and actually got a bump happening with the built in shader!

So, I changed my SetObjectMeshImage stages to Diffuse to 0, Normal to 2 (using the other command), and Specular to 1, and got better results.

If you just want to see the bump, then don't use the specular, because I may still be using it wrong.

I had a couple requests for the code to this simple model viewer, so here is the revised code if anyone want to play around with modifying it...



You can ignore that object_num because I had plans to be able to load multiple objects at the same time, but haven't gotten that far yet.

Anyway, I hope this helps, and have fun.

EDIT
I had some old comments and code that was commented out that did not apply which I accidentally left in the first post of the code.
So, I just edited the post to remove those unnecessary sections of code to make it a bit cleaner. (sorry about that sloppy code/post)

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 9th Oct 2017 10:49
To set the spec use SetObjectLightMap() and SetObjectMeshLightMap()
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 10th Oct 2017 13:23
Quote: "To set the spec use SetObjectLightMap() and SetObjectMeshLightMap() "


lol

I completely overlooked those when scanning through the commands.

Since the Normal one says Normal, I was scanning for Specular, not LightMap and did not see it.

I only scanned through the Objects list too and didn't even notice the separate section for Mesh commands at the bottom of the 3D page.

Thanks PTC

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1

Login to post a reply

Server time is: 2024-04-25 09:29:48
Your offset time is: 2024-04-25 09:29:48