AssetGen addon (old thread)

cgstrive and maraCZ: i have tested it with Fraps the frame rate stay the same with Double. A good option right now is to disable “Outline Selected” you will increase the performances by almost 50 %. I wanted to disable it by default, but un-selected objects aren’t recognizable. ZBrush applies a darker matcap to unselected meshes. But still a developper should check the suggestion of cgstrive a low res + upscale could increase the performances.

Cancer: i have added your new script. I thought of a combination of input with U for unwrap but it’s hard to press, alt + x will be better without pop-up but maybe the margin setting in the “t” tab in the Operator field the problem is that each time you change the margin the script must be relaunched because it applies a modifier.

Changelog:

  • SimplePBR node setup for Cycles, available in the material menu but also by doing Shift + a > Group
    Made by tynaud


  • Quick Game UVs works in Edit Mode
  • GLSL rendering enabled for Blender Render
  • Background image smaller, i moved it a bit to the right

Little performances tweak:

  • SSAO samples at 10 instead of 20

I do not think it’s virtual pixel mode. To reiterate idea: Just as in ZB that has half-res viewport or ANY GAME that you play in fullscreen, you could downgrade resolution by 25%-50% and upscale it for fullscreen. This needs to be done in source?* It might give good performance for users with lower end cards. For others with fast GPUs, it will not make a difference as i think actual sculpting operations will be the bottleneck. It’s just something that could be tested for benefit of many :slight_smile:

cgstrive: 100% it is worth testing.

Little update:

  • handPaintFakeBake renamed baseTextureBake
  • added contrastedTextureBake (ideal for cartoon base texture)


Theme fix:

  • the active object in the 3D view has a different color
  • default Unwrap margin at 0.02 instead of 0.07

Looks great! Maybe you should separate some of the UI Panels into different Layouts (e.g Sculpt, Bake, Render*) ? You do not need node editor when you sculpt as users with low res would struggle

cgstrove: Dark Blender support full screen sculpting because you can display a reference behind your model.


Update:

  • Skin and Grey matcaps added
  • Grey matcap is the default viewport matcap
  • Fake PBR setup
  • Maximized 3D view by default
  • Quick Decimation script added, each time you click it it applies a 0.8 decimation.
  • Quick Mirror, add a Mirror modifier with clipping


Cancer can you edit your script to make it create seams automatically:

  • edit mode

  • select all in edit mode

  • remove doubles

  • object mode

  • apply edge split 30.1 angle

  • edit mode

  • select boundary loop

  • mark seam

  • select all

  • unwrap 0.02 margin

  • remove doubles

  • unselect all

I think we can bind it to a shortcut if we edit the t menu and add a button to launch the script, then by doing a right click > Add Shortcut.

Tiny update for Dark Blender:

  • Eraser and Decal brushes for texture painting added

Ok it’s done. This one is install-able, please test it. After you do pref>addons>install from file > check box (save pref)

after that, just select your object(s) (in either Edit or Object mode) and press ‘u’ and Quick Game Unwrap will be in the pop-up menu. ‘u’ pop-up menu should work for both edit and object mode, it’s been added to both.

quickGameUV08.zip (1.06 KB)

Thank you there is just one little tweak to do: it doesn’t work if we add a shortcut and use it in Edit Mode.

Update:

  • Quick Game UVs in the U menu after importing the addon quickGameUV.py (you can apply a shortcut like Alt + x)
    Unfold your game model in One-Click!

I have “stress tested it” on a Game Environement scene, the result is perfect, takken 5-6 seconds to mark all my seams and unfold:


  • Hard Surface kit bashing elements takken from ZBrush in layer 5, i will add more
  • Alt + g to use Fill Grid (use it to close a high poly cylinder)
  • Alt + F12 to bake

Linko, over here if you are in edit mode, and just press ‘u’ then you should see “quick game uvs” on the bottom of the pop-up list if the add-on is installed.

(don’t forget to select all in edit mode to actually see the UV’s)

If you want to add a different hot-key the command to call is object.quick_uv

Wow this looks awesome! Shame I just completed a bunch of game objects before finding out about this but I’ve downloaded it now. Thankyou

Linko. Yes, if you use the right-click trick on the menu item it will not create a good shortcut.

Create your shortcut like this and it should work.

After it is installed go to the input tab in prefs > 3D view > 3D view (global) > open that list, scroll to the very bottom and add a new entry. Set your hotkey (alt+x) or whatever and in the text box just paste object.quick_uv

Should be good to go in both edit/object mode now!

Ok Cancer i’ll test it and add it in the “How to install” file. :slight_smile:
Edit: yes i have tried and it works in edit and object mode. It’s saved in the “key_config.py” file with Alt + x.

I have other suggestions to make the life of game artists easier. For now we can do 80 % of an hard surface UV Mapping with Quick Game UVs, but we can do more and build new tools:

Scripts request (they have to be in a menu to add shortcuts):

Cut half of a model (Alt + k):

  • Apply rotation
  • Apply bisect
  • Plane Point at 0
  • Plane normal X at 1
  • Clear Inner enabled


Incremental Decimation:

  • Apply a 0.8 decimation
  • apply triangulate

Apply a mirror modifier (will use the shortcut ctrl + m):

  • Apply rotation
  • X mirror modifier
  • clipping enabled

Introducting the Stylized Game Creation Update

This week end (edit: during the following days) i want to focus on tools to help artists to create stylized MOBA/RPG/Mobile games. They are very popular especially with the release of Overwatch beta.
Here is the list of the features that will be implemented in Dark Blender (can evolve based on your suggestions)

- SSAO twea
A tweak to preview your greyscale by contrasting the cavities of your models

- Greyscale texture generator
This tool will ask for an Ambient Occlusion Map, Bent Normal and a Tangent Space Normal, you will have to set them in Linear colors instead of sRGB and that’s all, Blender will generate a greyscale texture that will be used as a base for your hand painting. You’ll can import it in 3D Coat or stay in Blender to paint over it in Multiply mode. With this feature you don’t need any knowledge or waste time in Photoshop setting up your layers.


- Maximum UV Texel
This script split your low poly by half, applies seams, unwrap it, then applies a mirror modifier. With it you will unwrap one half of the model to double the texel resolution for your game model.

- Cut your model by half
For your MOBA/RPG/Mobile game you’ll probably use low texture resolution such as 256256 or 512512. This tool will allow you to split a model and remove half of it while preserving his seams to unfold the model and double the texel density. You will be able to split several object at the same time. It will be bind to the shortcut Alt + k.

- Normal map to curvature
A group of nodes in the compositor to generate a curvature map from a normal map. Though the Greyscale Texture Generator will generate a curvature to make the greyscale texture.

- Ready to paint
A layout will be probably added to optimize painting, with layer, the first for your Greyscale and the second for your hand paint set in Multiply.

- Brush alpha for painting and sculpting
Good alpha to create specials effects and details while painting or sculpting

- Gradients collection to pick colors
Good gradient to help you to paint your hand painted model.

- Quick Mirror
This tool apply a mirror modifiers to several selection at once, on the X axis with Clipping. Shortcut Ctrl + m. It will apply the Rotation to reset it before the modifier.

- Incremental Decimation
A quick decimation tool to optimize your sculpture without leaving the full screen mode. Can be useful to optimize a low poly model. Each time you will press the shortcut a 0.8 decimation with Triangulate will be applied. Can work on multiple objects.

- Crack Brush
A crack brush based on the Orb_crack brush to add details to your stylized sculpts and get a result close to the Blizzard games.

- Female Base mesh
I need a free to use female base mesh (good quality).

- Shortcut for Extract mesh from mask and Grease Pencil cut
I will add a shortcut for this two tools of the Sculpting Addon in key_config.py

Features removed:

  • Bake Base paint removed
  • Bake Contrasted paint removed-Bake Cavity removed
  • Faked PBR removed
  • Dota Grass color removed
  • meltdown-master addon removed
  • Sun and Sky removed

Ok i am learning to create my own python scripts. :wink:

I’ll try this feature, it can be useful for sci-fi panels or military / blocky designs.

Script that will be added in Dark Blender with a shortcut today or tomorrow.

Max UV Texel / Resymetrize (double the texel density in one click, he cuts the model at the center and unwrap one side)

import bpy

bpy.ops.object.mode_set(mode = 'OBJECT')

for obj in bpy.context.selected_objects:

    bpy.context.scene.objects.active = obj

    bpy.ops.object.convert(target='MESH')

    bpy.context.object.location[0] = 0

    bpy.ops.object.transform_apply(location=False, rotation=True, scale=False)
    bpy.ops.object.mode_set(mode = 'EDIT')
    bpy.ops.mesh.select_all(action = 'SELECT')
    bpy.ops.mesh.bisect(plane_co=(0, 0, 0), plane_no=(1, 0, 0), clear_inner=True, clear_outer=False, xstart=376, xend=381, ystart=133, yend=62)

    bpy.ops.mesh.mark_seam(clear=False)
    bpy.ops.mesh.select_all(action = 'SELECT')
    bpy.ops.uv.unwrap(method='ANGLE_BASED', margin=0.02)
    bpy.ops.mesh.select_all(action = 'DESELECT')

    bpy.ops.object.mode_set(mode = 'OBJECT')
    bpy.ops.object.modifier_add(type='MIRROR')
    bpy.context.object.modifiers["Mirror"].use_clip = True
    bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Mirror")

Auto seams

import bpy

bpy.ops.object.mode_set(mode = 'OBJECT')


for obj in bpy.context.selected_objects:


    bpy.context.scene.objects.active = obj
    
    bpy.ops.object.mode_set(mode = 'EDIT')
    bpy.ops.mesh.select_mode(type="EDGE")
    bpy.ops.mesh.select_all(action = 'DESELECT')
    bpy.ops.mesh.edges_select_sharp(sharpness=0.525344)
    bpy.ops.mesh.mark_seam(clear=False)
    bpy.ops.mesh.select_all(action = 'SELECT')
    
    bpy.ops.mesh.remove_doubles()


    bpy.ops.uv.unwrap(method='ANGLE_BASED', margin=0.02)
    bpy.ops.mesh.select_all(action = 'DESELECT')
    bpy.ops.object.mode_set(mode = 'OBJECT')

Cut half

import bpy

bpy.ops.object.mode_set(mode = 'OBJECT')

for obj in bpy.context.selected_objects:

    bpy.context.scene.objects.active = obj

    bpy.context.object.location[0] = 0
    
    bpy.ops.object.transform_apply(location=False, rotation=True, scale=False)
    bpy.ops.object.mode_set(mode = 'EDIT')
    bpy.ops.mesh.select_all(action = 'SELECT')
    bpy.ops.mesh.bisect(plane_co=(0, 0, 0), plane_no=(1, 0, 0), clear_inner=True, clear_outer=False, xstart=376, xend=381, ystart=133, yend=62)
    
    bpy.ops.object.mode_set(mode = 'OBJECT')

Auto Mirror

import bpy

bpy.ops.object.mode_set(mode = 'OBJECT')

for obj in bpy.context.selected_objects:

    bpy.context.scene.objects.active = obj
    
    bpy.ops.object.transform_apply(location=True, rotation=True, scale=False)

    bpy.ops.object.modifier_add(type='MIRROR')
    bpy.context.object.modifiers["Mirror"].use_clip = True



Incremental Decimation

import bpy

bpy.ops.object.mode_set(mode = 'OBJECT')

for obj in bpy.context.selected_objects:

    bpy.context.scene.objects.active = obj
    
    bpy.ops.object.modifier_add(type='DECIMATE')
    bpy.context.object.modifiers["Decimate"].ratio = 0.8
    bpy.context.object.modifiers["Decimate"].use_collapse_triangulate = True
    bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Decimate")

Generate High Poly

import bpy

bpy.ops.object.mode_set(mode = 'OBJECT')


for obj in bpy.context.selected_objects:
    
    bpy.context.scene.objects.active = obj
    
    bpy.ops.object.mode_set(mode = 'EDIT')
    bpy.ops.mesh.select_all(action = 'DESELECT')
    bpy.ops.mesh.edges_select_sharp(sharpness=0.525344)
    bpy.ops.mesh.bevel(offset=0.05, segments=2, profile=1, vertex_only=False)
    bpy.ops.mesh.select_all(action = 'DESELECT')
    bpy.ops.object.mode_set(mode = 'OBJECT')
    bpy.ops.object.subdivision_set(level=3)
    bpy.ops.object.shade_smooth()
    bpy.ops.object.mode_set(mode = 'OBJECT')

Quick Remesh (use it to merge polygons and to fix bugs)

import bpy

bpy.ops.object.mode_set(mode = 'OBJECT')


for obj in bpy.context.selected_objects:


    bpy.context.scene.objects.active = obj
    
    bpy.ops.object.modifier_remove(modifier="Remesh")
    bpy.ops.object.modifier_add(type='REMESH')
    bpy.context.object.modifiers["Remesh"].mode = 'SMOOTH'
    bpy.context.object.modifiers["Remesh"].octree_depth = 6
    bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Remesh")

Stylized Game Creation Update:

  • Crack Brush added (shortcut 3) in Dark Blender you just have to download the latest version.
    The brush is based on the orb_crack brush of ZBrush, it is the most used brush to make crack for stylized assets.

Some tests i did to imitate the orb_crack brush with the Blender crack brush, you need the maximum strength and high radius with pressure sensitivity to make it works correctly


I am currently searching how to apply an Emboss Filter like in Photoshop with an Angle in the compositing window of Blender.

  • The scripts above will be integrated tomorrow

Fix:
Little theme color fix

Stylized Game Creation Update:

  • Tons of scripts added, the Texel scripts must be used on every symmetrical game assets and it works very well combined with the Auto Seam for LP hard surface
    List of the new scripts (tell me if you find any bug and make sure that you have downloaded the latest version before reporting it)
    > Generate High Poly
    > Quick Decimation (works well with remesh)
    > Quick Remesh
    > Cut Half (works well with Auto Mirror)
    > Auto Mirror
    > Texel/Resym (works well with Auto Seam)
    > Auto Seam

  • Preview your greyscale with the new SSAO settings that you will later use as a texture base for your hand paint

  • Grey matcap as default


[Character from Cubebrush’s tutorial](https://Character from CubeBrush’s tutorial)

Shortcuts (reimport key_config.py)

  • Ctrl + Tab enters in Sculpt Mode instead of Weight Paint by default
  • O enter in Proportional Editing Connected it’s better to edit your sculpts, open the mouth of your model, move the fingers
  • Shift + left click apply a smooth vertex

Fix:

  • _2k bake shader added
  • Quick Game UVs addon removed (Auto Seams is faster it uses Select > Sharp Edges instead of using an Edge Split modifier)
  • Access your Vertex Group beside your modifiers, more space for the shaders

Download

A demonstration of an hard surface model made in 20 seconds with the lastest Dark Blender’s update

I have opened the Kit Bashing layer and duplicated some screws and used the snap to place two in the right. I have edited the cube by modeling one side, i have resymetrized it with the Texel/Resym button. I used it to add an edge in the middle to speed up my modeling. I have added a kit bashing piece at the top, then i have selected everything, Ctrl + j to join all the pieces, i have used the Auto Seam tool then the Texel/Resym tool to get half of the model unfolded and the resym.
Modeling + complete UV Mapping + texel optimization = 20 seconds, but the model weren’t too complex (the UV Checker is preapplied on the model, i just have to switch the viewport in Texture mode).


Lookin good Linko, keep it up!

Why not make an addon for the scripts you can run?

Albertofx: i plan to do that, i’ll make one script that gather every scripts in the t panel. I will watch the tutorial from Blender Cookie.

Update:

  • base mesh with modifiers attached to make sci-fi panels, ground tiles, brick texture, i will add floating meshes kit bash, plane ready to bake added. Use Ctrl + E > Mark Sharp to make a seperation


From the technique of Jason Clarke on Youtube: https://www.youtube.com/watch?v=dzlRNjsJS6g

  • Manipulator in Normal mode instead of Global
  • Auto Merge enabled when vertices are in the same coordinates
  • Clean Model script added: quadrangulates as much faces as possible and remove the ngons and clean the normales (use Quick Decimation before if you want to clean a dyntopo model)
  • New theme added

Shortcut:
Ctrl + Shift + left click: Bisect tool (same shortcut than ZBrush’s clip curves)

- Download Dark Blender

Do you know the python script to apply Constraints? I want to create a script to match the position and rotation of another object in one click but i can’t delete the constraints.