Made an asset I think I will sell on the asset store.

I had to atlas a bunch of stuff anyway for the performance..AND HOLLY HECK DOES IT PERFROM!

Check these stats out…
This scene first not combined and then combined.


Stats not combined… 500+ draw calls…


With the press of the combine (Which I will have a realtime mode for me also….


The rest are unity items rendering…. Freaking indredible..

The code takes the heiarchy it is on and then takes all the children meshes and their materials. It then atlases the UVS and then the color texture. Then it copies and sizes all the other textures (Specular, Height, Occlusion, Normal, Emissive, etc) into the locations to match the color map which the UVs are tied to. Wow… I need to clean this up and offer it to others so hopefully I can recoup some of the billions I have spent in the asset store lol…

Pretty cool! I would have bought this in a heart beat to save all the time….

Time to optimize!

So far optimized from 11 seconds compress to 0.9 second compress.. Not bad..

Well made it past one hurdle

I spent a few evenings wrestling with a Lightmapping problem that should never have been happening… but a plugin switched a lighting mode flag that broke everything the way I wanted to do it. For those that might encounter this blog lighting was set to linear not Gamma… that broke all lightmaps in RGB… HARD TO FIND….andI still don’t know why … The shaders do not read the format just the colors. Thus feeding an RGB should work. Now linear lightapping must hit a different pipeline in the standard shader.

See these posts to see more:

After a LOT of frustration I tried Unreal for a day. I like a few things. However, the compiling of c++ code would slow me down several hundreds of percent. Along with debugging c# code is FAR easier. Keeping up with c# code through engine upgrades is a TON easier. Not managing a header .h and a implementation file .cpp for every code segment saves a ton of time. The blue print system is not strong enough to not use c++ code all over the place. It also seems you have to use a blueprint to interface to the c++ so another level of complexity. The speed gains of c++ over c# can be managed very well and in some cases c# may even win from my research. Thus the only item perceived as better is graphical power. (Not on mobile devices at all Unity kills there for speed and memory footprint) However, one real reason Unreal always looks better in demos is Epic has the VERY best artists in the world creating them. That is the big difference. Any scene in Unreal can be created in Unity and faster.. at least all the scenes I have scene. I have not seen anything graphically Unity cannot do that Unreal can. Also I must mention Unity supports 3-4 times the devices Unreal does last check. Unreal also has difficulties in dynamically generated worlds, items, etc. Unity does also but you can get around the hurdles with lots of research. It seems Unreal suffers from lightmapping issues that Unity used to as far as loading dynamic levels and storing lightmaps in the .map file as unity did in the lighting assets file (I did not research this fully so take it with a grain of salt. I did find work arounds in unity).

I got a simple scene running with blueprints testing dynamically loading in Unreal.. and made my decision to stick with unity. I am glad I took the time as it has bothered me since Unreal became free that I might be in the wrong engine with all those pretty demos. Also another added issue is the tax Unreal charged for any game over 3000.00 is 5% GROSS…not net.. thats about a 8-10% tax going to Epic. Add in what apple charges last check was 20%. So add them up with the governement and close to 50% of your hard work is gone. Unity’s charges are far better. All in all a good exercies and I am very happy to be sticking with unity…

Where I am now is I have the Characters generating from pieces. Their texture map is correct and atlased using Unity’s texture packer. However, the issue is it packs your colors great. Then you go to pack your normal maps and you have to use the same function again. Thus your UVs do not match up now to the normal map! Argh! I want as few hand coded shaders as usual so as to work across all the engine and plugins expecting the standard shader. Thus I do not want a seperate channel for Normal map UVs. So now I have to take the rectangles given back to me and do my own atlasing to fit the textures… again argh… Should not be to hard without filtering..What I will do is copy the texture by hand into the new normal map texture and scale it by the rectangles size to fit inside the recatangle.

Off to do another thing Unity should really do for you.. what good is a model without a normal map…..

Wow I wrote a book =) More later…..

And it is later…..
And Fixed. I may publish this code on the asset store I know I would buy it.. it does not scale up a normal map but it will scale down the normal map from the packed texture rects unity can do. Why we cannot provide multiple textures of multiple resolutions to pack I do not know. That would be best. And who needs a normal map greater size then a texture color map? Really who =)

Bah … Unreal engine is nice

However… I see about 2-3x the work to do what I want to do. I will just have to work around this issue… =).. Back to unity!..

I did have a lot working in unreal and I did miss the speed of c++ but not the extra coding time.

Back at it…


Got the first part done.. That was not to bad I may sell that tool. Now I have to be sure it scales the texture down if the normal map is a different size from the color texture. weeeeeeeeee…… Finally sucess after a few days of misery.

And that is just test art… so don’t mind the uglyness….

Checking out unreal engine

I actually implented the first real time in game shadow mapper way back when in the unreal engine with Jon Olick. (Major credit to him) And I am running into issues as seen in the link above so today I am going to spend exploring Unreal 4. It is a different animal now so we shall see. In any case it will quell some fears I am in the wrong engine with the lack of acccess to deep calls Unity gives. BUT unreal maybe the same way. It will be nice either way to be sure I am starting again on the right foot.

Plus they support c++!!! Weeeeeee good old days!


Fully combined skinned meshes..And atlased textures… I just pass GameObjects into a script and it combines them. Creates one texture for all the parts and one normal map. I can auto scale resolution for less capable devices!… Time to get some other assets moved over…Three out of 5 of the hardest code sections complete =-).. AND WAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY better and more robust!

Those are the pieces.
I keep all the humanoid figures in one blender file and export individually. I have one base skeleton and all the parts broken off. I keep the intact model so I can transfer skin weights at anytime…. More later this is getting GOOD!


Working on the item database..

ALl objects have the ability to add to states / take away / change the percentage of stats and many many more things. They combine to form the model, icon, and stats for your character. Your level is your character and that is what opens the ability to gain abilities and use armor and weapons… exciting!
I would love to make this multiplayer VR also.. I will have to look into that though.. What this allows is one guy like me to have millions of items.

So a sword:
Describing word x Pummel x Handle x Sword x level x added effect for pummel x added effect for handle x added effect for sword x final word = X

So say I make just 10 of each…..with 30 start words and 30 end words..
10 x 10 x 10 x 10 x 50 x 10 x 10 x 10 x 10 = 5,000,000,000 possible swords… yes 5 billion =)… all which look different in some way. For example words add a decal over certain parts.. start word is the base and handle end words are the blades. Anyway best get some work done!

(stats will change when testing… this is temporary)
All names are not final and there will be far more.

More later!

Words from DB:

word decrepit -90
word ruined -80
word ravaged -70
word wrecked -60
word ruined -50
word flimsy -40
word rickety -35
word shabby -30
word ragged -25
word rusted -20
word drained -15
word jaded -10
word worn -5
word regular 0
word strong 5
word agile 10
word enhanced 15
word augmented 20
word butressed 25
word radiant 30
word saintly 35
word ripping 40
word fabled 50
word unyeailding 60
word ethereal 70
word celestial 80
word legendary 90
word epic 100
word angelic 150
word godly 200

End words which will be preceded by OF _____

wordEnd agony
wordEnd misery
wordEnd burning
wordEnd torment
wordEnd destruction
wordEnd the tick
wordEnd the leach
wordEnd the hungry
wordEnd the voracious
wordEnd the vampire
wordEnd practice
wordEnd guidance
wordEnd training
wordEnd cultivation
wordEnd attainment
wordEnd wit
wordEnd intensity
wordEnd spirit
wordEnd mana
wordEnd understanding
wordEnd strength
wordEnd vitality
wordEnd the robust
wordEnd the flourishing
wordEnd aptitude
wordEnd the mind
wordEnd comprehension
wordEnd brilliance
wordEnd disorder
wordEnd poison
wordEnd infirmity
wordEnd affliction
wordEnd the reaper
wordEnd defense
wordEnd fortress
wordEnd bastion
wordEnd the juggernaught
wordEnd the dreadnaught
wordEnd saftey
wordEnd protection
wordEnd shelter
wordEnd aegis
wordEnd salvation