Product Chat (Early Access) / [SOLVED] poly count and file size

Author
Message
pixelpusher
9
Years of Service
User Offline
Joined: 26th Mar 2015
Location:
Posted: 15th Aug 2023 18:42
i downloaded a clock gltf from sketchfab and it's 5kb in size and the bin is 239kb, its poly count is 5000 and its textures are 4k pngs.
i reduce it down to 2000 polys and save it out to these files to see which is best in ggmax model importer-
fbx2013 which is 8mb
obj which is 109k
gltf which is 187k
x file which is 178k

i reduce the 4k png textures down to 512 dds files and import the obj (smallest of the file sizes) into ggmax's model importer and the new dbo model weighs in at 150k. (the original higher poly gltf was only 5kb with 4k textures (?)

is it better to use the original smaller gltf with higher poly count and 4k pngs or a reduced poly count but somehow a larger file size with reduced textures? thanks

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

Go to answer
PM
Monkey Frog
4
Years of Service
User Offline
Joined: 5th Feb 2020
Location:
Posted: 16th Aug 2023 03:52
File sizes, as far as how much space they take up on a hard drive, make no real difference to game play (i.e. a texture that takes up 1MB of hard drive space is not more efficient in-game than a texture that takes up 10MB of hard drive space). It's all about texture size in pixels (1024 x 1024 vs 2048 x 2048, etc.) and bit depth (8bit vs. 16bit, etc.). DDS is best because it allows for actual texture compression while PNG and JPG do not. What you need to determine is does your model require a 4k texture? Or would a 2K or 1K texture be enough? How important is the model (i.e. will it be examined up close by the player, etc.)? 512 is a bit low for today's games, but can still be used, depending on the size of the model and how it's to be viewed by the player. For example, a simple salt shaker on a table certainly won't need a 4k texture.

When it comes to models, again, it's not going to matter which file format you used to get it into MAX. MAX uses it's own file format for models - .dbo (which you referenced). So, whether you import an OBJ or an FBX or a GLB, it will get converted over to .dbo for use in MAX. When it comes to models, it's best to keep the polygon counts as low as you can without compromising your model's shape. MAX uses a modern game engine (The Wicked Engine) and can handle a good number of polygons, so you really don't have to go crazy reducing polys. MAX can handle a 5000 poly model just fine (though, yes, that may be a bit much for a clock ... depending on the clock and it's importance in your game).

So, you really don't have to worry about file sizes (how much hard drive space they use), when it comes to how the models and textures perform in the game.

I hope this helps.
Intel i9-10900K 5.10GHz, 64 GB RAM, Nvidia RTX 3090 ti 24GB, Windows 11 64-bit, dual monitor display
pixelpusher
9
Years of Service
User Offline
Joined: 26th Mar 2015
Location:
Posted: 16th Aug 2023 12:08
thanks for your insight, monkey frog. i'm from the old days when you had to count polygons and textures were best limited to 512 and below. i appreciate how smoothly a gltf goes from sketchfab into ggmax but 4k pngs seem excessive for anything that isn't a building so i still reduce the pngs down to 512 dds for small props, 1024 for car-sized items and 2k for house-sized items. i don't know how to make surface maps though. it made sense to shave off half the polys for small props but i couldn't understand why the sizes got bigger after reducing but if ggmax has no problem with higher polycounts and larger textures, i'm happy to stop poly-pinching and enjoy the new technology.
PM
Monkey Frog
4
Years of Service
User Offline
Joined: 5th Feb 2020
Location:
Posted: 16th Aug 2023 12:41
You're most welcome.

I have an (old) tutorial explaining PBR materials. In it, I talk about what makes up a surface map. Here's the link (it should start right at the part that talks about surface maps):

https://youtu.be/5g5OVw4dngY?t=425

4K maps can be a bit much ... depending. But in modern games 2K maps are quite common. I would definitely use a 2K texture for a car-sized object. Now, for houses and things like that, I wouldn't use a single texture. Instead, I'd have several materials for various things - a floor material, a wall material, etc. - each with their own texture resolution. You're not limited to one texture set/material per object. You can have as many or as few as you want/need.
Intel i9-10900K 5.10GHz, 64 GB RAM, Nvidia RTX 3090 ti 24GB, Windows 11 64-bit, dual monitor display
pixelpusher
9
Years of Service
User Offline
Joined: 26th Mar 2015
Location:
Posted: 16th Aug 2023 18:15
great video and easy to follow but i don't use blender, but photoshop for textures. i can make normals and the other maps but don't know how to blend them into one colorful surface map like in your video...unless i'm supposed to take those individual desaturated images into max's material editor and assign them to their respective rgb channels. what if i just used _color and _normal, wouldn't that take less processing than five 2k maps?
PM
Monkey Frog
4
Years of Service
User Offline
Joined: 5th Feb 2020
Location:
Posted: 16th Aug 2023 18:25 Edited at: 16th Aug 2023 18:27
This post has been marked by the post author as the answer.
The surface map in that video was not made in Blender. It tells how to make it, in a way, in the video, though. Each type of map (AO, metallic, and roughness) gets put in a color channel. So, in Photoshop, you would combine all three types into one, single image, placing each one in a particular "channel" (R, G, and B).

GraPhix also has a tool on the TGC store that will create the surface map for you from the individual textures.

Lastly, you can just import the three textures (AO, metallic, and roughness) into the appropriate RGB channels when you import the model and MAX will make the surface texture for you.

You can just use color and normal, but then you would not get a PBR material. You need the Ambient Occlusion, Metallic, and Roughness to get the materials to react to light correctly. Also, the reason you use a surface map is so you DON'T end up with 5 textures. Since AO, metallic, and roughness are all greyscale images, once combined into ONE surface map, they end up as one, single texture.
Intel i9-10900K 5.10GHz, 64 GB RAM, Nvidia RTX 3090 ti 24GB, Windows 11 64-bit, dual monitor display
bond1
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location: Knoxville, TN
Posted: 17th Aug 2023 00:44 Edited at: 17th Aug 2023 00:45
@pixelpusher Sorry to jump in, but I see you use Photoshop. I've attached a Photoshop action that will make the surface map for you in one click. Just select 3 layers that are arranged in the order of AO, Roughness, and Metalness, then run the action. It will output the surface map in a new layer.

Attachments

Login to view attachments
pixelpusher
9
Years of Service
User Offline
Joined: 26th Mar 2015
Location:
Posted: 17th Aug 2023 15:03
thanks bond1, greetings from a native tennesseean. that's a handy atn but your jsx script points to a different photoshop version and i cannot change it to point to mine. i joined the ggmax discord a few days ago and have found some good information. now if someone could direct me to a tut for importing a character from daz3d and the animation fbx's so max knows what to play for simply idle, walk, run, shoot, die i'd have a nice looking start for a ww2 rescue in a jungle prison camp. i need a japanese soldier and a prisoner script where he follows the player and not run away when freed.
PM
bond1
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location: Knoxville, TN
Posted: 17th Aug 2023 18:55 Edited at: 17th Aug 2023 21:58
Hello fellow Tennesseean! Huh, can you install and run the "CombineRGB" jsx script directly from the scripting menu? The ATN file just binds this to an action button. I've used this in Photoshop 2018-2023 and also an old verison of CS6 as well. Anyhow, I rarely use Photoshop these days for texturing, mostly use it for making fine adjustments to finished textures.



Sorry, I've never used Daz3D, but I think others have imported characters from it and used the NPC control behavior. I think the behavior will do everything except allow the character to hold a gun and shoot.
pixelpusher
9
Years of Service
User Offline
Joined: 26th Mar 2015
Location:
Posted: 18th Aug 2023 12:27
running the script made it work. i made the individual black n white images, stacked them as layers and saved it as _surface.dds using dxt1.
PM
mikeven
12
Years of Service
User Offline
Joined: 31st Dec 2011
Location:
Posted: 21st Aug 2023 14:18 Edited at: 21st Aug 2023 14:44
@pixelpusher : you wrote this : " ... now if someone could direct me to a tut for importing a character from daz3d ...".
As commented by the artist bond1 it is indeed possible to import Daz3d animated characters that could interact with GG MAX logic and AI thanks to the powerful script 'npc_control' developed by Necrym (a skilled programmer of the TGC community).

GG MAX importer doesn't import correctly the Daz3d animated characters in FBX format.
But there is a workaround : Open that FBX file with the tool '3D Viewer' of Microsoft (included in Windows 10 or upper) and saved it as a .GLB (GlTF binary format).
Then GG MAX can import that .GLB file.
But you'll have to manually set the textures to your character.
The scale has to be modified : (default is 100%, set it to 40%).

Synchromesh published a particularly useful and well made tutorial relative to that script 'npc_control'. You can find it in the folder 'Guides/NPC'. As mentioned in that tutorial, it is important to select the collision mode 'Polygon'.

I uploaded 4 files on my free account on WeTransfer (see screen capture). It stays there for 7 days.
Here is the link : https://we.tl/t-lxTDsELxu0 (for anonymous download).
Those files may be freely shared and distributed : it is very basic and there are no textures included.

PM
pixelpusher
9
Years of Service
User Offline
Joined: 26th Mar 2015
Location:
Posted: 21st Aug 2023 15:31
appreciated, mikeven. i can create and export fbx models and i have many fbx animation clips, its that i don't know how to tell ggmax to play my custom idle, walk, run, shoot, die anims.
i'll take a look at microsoft's 3d viewer and i'll go through the npc control guide slowly and see if i can get one of my models to stand, walk, attack and die. i just need basic enemy motions, especially for a robot enemy.
thanks to your tip as well as bond1 and monkeyfrog's input, i've learned a little about ggmax in the month or two that i've owned it. still stumbling with the pbr stuff since i'm accustomed to dns. as a sidenote, i really like this version over gg classic. from the premade terrains to the node-based level setups and many new scripts that can be simply applied to an object, it looks better and easier to use than before. the new model importer is far greater than classic's which is the main reason i wanted to get this version. i'm not a gamer or even a serious developer so i prefer simple gamemaking without stress and confusion and it looks great when playing.
PM
mikeven
12
Years of Service
User Offline
Joined: 31st Dec 2011
Location:
Posted: 22nd Aug 2023 13:21
@pixelpusher, thank you for your reply.
As you wrote it, the model importer of GG MAX is far greater than the GG Classic's one : 10 x faster, more import formats and no more that tedious process to define the collision shapes.

About my experiment with the script 'npc_control.lua', I want to say that it was my first test with that script that I discovered yesterday thanks to the comment posted by the artist 'bond1'.
Usually I create my own scripts to play my animated assets in GG MAX but they cannot interact with its AI system. However they are useful to add 'extras' populating the scene or to animate other assets.

my conclusions after having tested the settings available in the 'object tools' relative to the 'npc_control' of the imported asset :

1. the selection of the 'polygon' as collision mode automatically generates a 'capsule' around the animated asset (a character) .
2. however if that animated asset is rescaled in the settings of the asset importer, then the size of that 'capsule' is wrong and it doesn't move with the character during the game.
3. I made a big mistake with the set of animations included in that figure exported from Daz Studio and it happened because I didn't want to spend too much time for that demo. I explain : In Daz Studio > tab Animate2 you can instantly create blocks with some animations found in Daz Content. However to work properly in GG MAX you have to delete the X and Z displacements of those animations. Furthermore to obtain a very good cyclic animation you have to find a good synchronization between the first and the last frame, especially for the walk and run animation. These tasks could be very time consuming.
4. I noticed that the parameters in the .fpe file could be simplified. For that purpose, I copied some of the settings found in the .fpe file relative to one of the characters found in GG MAX library.
5. Having a mesh textured with a single map ( plugin 'TextureAtlas' required in Daz Studio) would make the texturing process much easier in GG MAX importer.
6. If you made a mistake in the fragmentation process of the animation in the Asset Importer, then there is a solution : Import again the 'wrong' .DBO file in the Asset Importer and then you can adjust the start and end values of the wrong fragments and eventually rename them. Don't forget to give a new name to that modified asset if you don't want to erase the original one. You can do the test with my uploaded .DBO file.

Some screen captures :







PM
pixelpusher
9
Years of Service
User Offline
Joined: 26th Mar 2015
Location:
Posted: 22nd Aug 2023 14:38
i was able to import an fbx character with idle, walk, attack, death anims via microsoft's 3d viewer but it didn't work as i'd hoped.
i exported the animated character as fbx. i imported it into 3d viewer and saved it as a gltf. i imported the gltf into ggmax's model importer and rescaled it down 40%. i made new animation slots for each of the motions contained within the character and added the frame numbers for each motion. i untick the box for static, i tick the box for polygon collision and export it into my folder.
in ggmax, i import the character and give it the npc_controller action, fill in the animation boxes with the corresponding names of my anims and run the game.
he stands idle and doesn't move when i approach or even when i shoot at him. if i shoot him, he spins wildly around in a wide arc and returns to a loop of all his anims. of course he doesn't shoot back.
this is farther than i've ever got so i know i'm on the right path. i sorta understand how a model with a simple animation works such as a spinning fan prop so i may try some background characters say, standing and talking or sitting and drinking which seems easier, and wait until creating a custom attacking/shooting enemy is perfected...or i hire someone to do it. i still have lots to learn about texturing and how the new scripts work.
PM
mikeven
12
Years of Service
User Offline
Joined: 31st Dec 2011
Location:
Posted: 22nd Aug 2023 21:26 Edited at: 22nd Aug 2023 21:27
@pixelpusher, I think that you are very near from your goal. It is simply a matter of some wrong or missing setting(s) in the .fpe file. This one is not fully completed by the Asset Importer, then you need to edit it after the import process.
It is also important to delete the tested animated asset from your level if it doesn't work as expected. Then you close and restart GG MAX (to clear any buffer where the current settings of the assets are temporarily stored).
After that you can test again your animated character after the required adjustments in its .fpe file.



Yes, experimenting with new methods and prototypes is often frustrating and requires a lot of patience and of tenacity.

PM

Login to post a reply

Server time is: 2024-05-02 19:22:03
Your offset time is: 2024-05-02 19:22:03