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/AppGameKit Studio Showcase / [WIP] 3dsMax export script for 3d models

Author
Message
Jack
19
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 27th Feb 2016 05:32 Edited at: 28th Mar 2016 08:19
Sup guys!

I thought I could show you my progress in a Script for 3dsMax.

I used the FPSCtoAGK for quite a while now, but FPSC (the old version for the converter) is quite limited,
not so well supported and will steal your time. That's why I've created a script for 3dsMAX to export Levels or Single Objects to AGK.




* Footage of AGK2

What it does:

- Can create LOD Objects and Textures
- Can Cluster Objects by materials
- Creates a 2nd UV channel on every object
- Bakes a Lightmap on 2nd UV channel
- Converts 3dsMax model to a .DAE cluster
- Saves Object, Texture and Lightmap
- Saves each object with correct size, position and rotation.
- A shader can be applied to every material by using a prefix


Limitations:
- Only 3dsMax Standard materials are supported
- No SubMaterials UV1= texture in the diffuse channel, UV2,3,4,5,6... should be empty


Extras:
- Transparent Objects should get a "alpha_" prefix in their name, so they will get transparent in AppGameKit (old method)
- Can also export splines to AGK

(OLD


(NEW


I have to rewrite quite a bit, add a decent HUD for more settings like the lightmap-size or manual texture-gamma settings, but it does work pretty well right now. I hope it will be possible to convert any 3dsMAX model correctly to AppGameKit with only four clicks (2 flags, 1 path selection, 1 start button)
- Works now like it should

Is there any use for that? =)

Protip: You can jump from trial to trial by using a seperate partition for you trial software =)

[/url]
Survey
15
Years of Service
User Offline
Joined: 2nd Sep 2008
Location: WA Australia
Posted: 3rd Mar 2016 00:15
Wow, very nice... I wish I knew how to use 3dsMax and could afford it.
Great work on the export though.

Could you post your agk code for displaying the Object, Texture and Light map correctly?
Any chance of a zip of the whole project/media so I can see it run on my computer?

Cheers

Sean
Asus T100. Win 8.1 CPU Z3775. AppGameKit V2 2.0.16
HD Graphics (Bay Trail)
Jack
19
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 20th Mar 2016 17:10 Edited at: 21st Mar 2016 05:19
Hello Survey, sorry for the late reply, but I made some enormous changes to the exporter and the import code does also change.
The base for the Importer is the FPSCtoAGK import code, that you can find in your users/ example.
So you already have the code to display object, texture and lightmap!


Current State:



- You can now export instances from 3dsMax to AppGameKit! This will help to reduce the memory size for each map (Lightmaps and textures are still working correctly!)
- Objects are now positioned at 0,0,0, scaled at 1.0 and rotated to 0,0,0 before export. All this information will be saved in a XML file for later use in AGK. (Frustrum culling now works on each seperate model!)
- Global Unit variable (Now you can export models from 3dsMax in Inches, Meters, Centimeters, AppGameKit can convert everything into the regular world size)
- Mesh-Color will be used if no texture exists, if a texture exists, but has no diffuse map, the diffuse color will be used to color the objects in AppGameKit (So you actually do not need a texture for each model to have a lightmap)
- Bugs Fixed, if an error occurs, no export will take place, so there will be no bugs with broken 3d models if you try to import it to AppGameKit (checking for existence is not enough to load a model)
- direct material opacity support! - Can be even set to additive inside the "Extended Parameters" tab from the material.
- 3ds max will now export the volume of the objects to 3dsMax. I think this is more interesting, if you try to add physical elements from 3dsMAX through the importer-
Still to do:
Set lightmap size after the surface size of each mesh (Currently you can only set one lightmap size for all objects) If this is done, it will result in more performance and even smaller files. (If there is a tiny model in the map, it should not have a 512x512 lightmap, that is oversized)
If the UV Map on an instance is diffrent than the one in the reference (in 3dsMAX,) so its not an instance anymore and will be saved as an original. (Dunno if my code does this already, should but I have to try it) does work as far as I can get it. To generate an original from an instance, convert the instance to an editable poly

Known bugs:
When a new Standard material is made, and a diffuse texture is added the size of the texture is set to 100.0, it should be 1.0 in order to not to mess up the UV map on layer 1, some kind of strange behaviour of 3dsMax, because once I modify the size to 1, its exacly like in AppGameKit, maybe I have to scale the object UV after this size to get universal compatibily.

[/url]
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 23rd Mar 2016 21:27
Just wanted to say thanks, this looks pretty great! I haven't done much of anything with 3D in AppGameKit yet but have bookmarked this for future reference.
Jack
19
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 28th Mar 2016 07:23 Edited at: 28th Mar 2016 08:20
Hello xCept,
thank you for your bookmark! I hope I will handle the high expectations

Breaking news:
This Plugin can now create LOD objects, textures and lightmaps! The speeds are awesome now, even though the LOD system function is called every sync for each object and is not optimized.
I made a whole city out of the previous assets. The city had unoptimized and giant textures (some of them where 13MB) and a 512x512 Lightmap on each seperate model. The total verticles count was about 1.4 million, when the whole city was displayed. - It gave me awesome speeds of 1-2 FPS, that sucked.




After I created the LOD function set in 3dsMax, The FPS is stable at 60FPS++. I have only 500.000 verticles at each time, even though the city got more details and assets.
If I create a LOD system, that could load/delete objects and textures in realtime and manage the instances correctly the map size would be infinite!




There where also several bug fixes, but I have not written them down =)
Sometimes 3dsMax has no intention to export any 3d model. If that is the case, just restart 3dsMAX and it will work like it should. (whatever)

[/url]
Jack
19
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 13th May 2016 18:41 Edited at: 13th May 2016 18:54
All problems fixed,
if there are no errors in the mesh, the code will work! Now massive imports are possible.
It is even possible to overwrite texture layer or object settings by hand. Atttributes can
be set for every single object.
Also AppGameKit lights shader got improved.

The key is now a more user-friendly design, dynamic layouts for entities are still more intuitive than code. There won`t be new features, because it can already manage and manipulate 100% of the visualization in AppGameKit and even more. It does, everything it should. Even more, like spline support.




[/url]

Attachments

Login to view attachments
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 19th May 2016 09:00
Looks amazing Jack! ...but £145 a month for 3DsMax puts it out of my reach. Could you do a Blender version?
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Jack
19
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 20th May 2016 00:22
Hello CJB,

you are damn right about 3dsMax I got a licence based on a very, very old contract from the office, you won't belive it, but there was a time autodesk sold their whole suite for about $12 per month (based on a fee per year) including unlimited additional licences for workstations.
Currently I have not the time to write this in blender. This Max Script occured, because I have to learn Max coding for work. But a blender plugin would be a really great addition.


But before I got the licence I jumped trial :
http://international.autodesk.com/products/3ds-max/free-trial
- get a virtual machine
- install os
- (pro: add software installer to your system before installing the os)
- create image from installed os "raw image"
- Install software

Once trial is over:
- backup
- replace disk image with raw image
- repeat...

This method boosts your workflow


[/url]
Jack
19
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 3rd Jun 2016 07:18 Edited at: 3rd Jun 2016 09:14

Short Update:

I created a custom rendering pass to fix some major problems with transparency depth in OpenGL, now the rendering pass is dynamic!
No bugs anymore regarding the rendering row of transparent objects.



If anyone likes my skyboxes, I would love to create some for a skybox pack, if someone is interested.

[/url]

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-04-24 00:40:14
Your offset time is: 2024-04-24 00:40:14