-
Posts
516 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Dreikblack
-
In the editor seems so, waiting for full update to be sure.
-
You need to do SetTessellation(2) for camera. Not sure if it's exposed to lua yet
-
Right, forgot about that. Probably easier would be just load any map from the game - same error. To open it in the Editor you need to put pak0.pak (rerelase pak) to the project root folder and copy EditorScripts/QuakeTacticsExt.lua to Ultra Engine Pro\Scripts\Start\Extensions
-
"Assert Failed" when i'm trying to open any map of my game in the Editor after last update (beta, 4th October). Can't reproduce it yet in test project, so probably it's related to Quake models. @Joshyou can just update shaders on latest master branch of Quake Tactics and open any QT map to reproduce it.
-
565.90 NVIDIA divers fixed this issue.
-
If flowgraph button selected an asset view button looks selected. When Asset Library selected both this and flowgraph buttons looks selected
-
Same with prefabs https://www.ultraengine.com/community/topic/66033-prefab-save-broken-if-it-was-loaded-from-asset-browser/
-
Try to delete or rename your %programdata%\Ultra Engine\settings.json.
-
-
And what if want to change z without changing horizontal and vertical offset?
-
X and Y vectors calculates in usual way (127 as 0 offset)? And Z is bigger if x & y vectors are closer to 127?
-
But how Z vector is determinated then? Also normal maps were blue everywhere where i read about them
-
-
Modified to make it get drag&dropped textures on .exe, added FITextureLoader support for .png and commented "pix.red = 128;" because it seems to just removing x offset #include "UltraEngine.h" using namespace UltraEngine; typedef struct _pixel { uint8_t red; uint8_t blue; uint8_t green; uint8_t alpha; } pixel; inline void TGAReadPixel(uint8_t* image, int width, int off, pixel* pix, int x, int y) { #ifdef _DEBUG if ((image == NULL) || (pix == NULL)) { //NmPrint("ERROR: NULL pointer passed to Readpixel!\n"); exit(-1); } #endif int idx = y * width * off + x * off; if (off > 0) { pix->red = image[idx]; } if (off > 1) { pix->blue = image[idx + 1]; } if (off > 2) { pix->green = image[idx + 2]; } } int gWidth, gHeight; void WritePixel(uint8_t* image, int bpp, const pixel* pix, int x, int y) { const int idx = (x + y * gWidth) * (bpp / 8); if (bpp >= 8) { image[idx + 0] = pix->blue; } if (bpp >= 16) { image[idx + 1] = pix->green; } if (bpp >= 24) { image[idx + 2] = pix->red; } if (bpp >= 32) { image[idx + 3] = pix->alpha; } } uint8_t PackFloatInByte(float in) { return (uint8_t)((in + 1.0f) / 2.0f * 255.0f); } void SobelFilter(uint8_t* dstImage, uint8_t* srcImage, int width, int height, int bpp) { gWidth = width; gHeight = height; pixel pix; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { // Do Y Sobel filter TGAReadPixel(srcImage, width, bpp / 8, &pix, (x - 1 + width) % width, (y + 1) % height); float dY = ((float)pix.red) / 255.0f * -1.0f; TGAReadPixel(srcImage, width, bpp / 8, &pix, x % width, (y + 1) % height); dY += ((float)pix.red) / 255.0f * -2.0f; TGAReadPixel(srcImage, width, bpp / 8, &pix, (x + 1) % width, (y + 1) % height); dY += ((float)pix.red) / 255.0f * -1.0f; TGAReadPixel( srcImage, width, bpp / 8, &pix, (x - 1 + width) % width, (y - 1 + height) % height); dY += ((float)pix.red) / 255.0f * 1.0f; TGAReadPixel(srcImage, width, bpp / 8, &pix, x % width, (y - 1 + height) % height); dY += ((float)pix.red) / 255.0f * 2.0f; TGAReadPixel( srcImage, width, bpp / 8, &pix, (x + 1) % width, (y - 1 + height) % height); dY += ((float)pix.red) / 255.0f * 1.0f; // Do X Sobel filter TGAReadPixel( srcImage, width, bpp / 8, &pix, (x - 1 + width) % width, (y - 1 + height) % height); float dX = ((float)pix.red) / 255.0f * -1.0f; TGAReadPixel(srcImage, width, bpp / 8, &pix, (x - 1 + width) % width, y % height); dX += ((float)pix.red) / 255.0f * -2.0f; TGAReadPixel(srcImage, width, bpp / 8, &pix, (x - 1 + width) % width, (y + 1) % height); dX += ((float)pix.red) / 255.0f * -1.0f; TGAReadPixel( srcImage, width, bpp / 8, &pix, (x + 1) % width, (y - 1 + height) % height); dX += ((float)pix.red) / 255.0f * 1.0f; TGAReadPixel(srcImage, width, bpp / 8, &pix, (x + 1) % width, y % height); dX += ((float)pix.red) / 255.0f * 2.0f; TGAReadPixel(srcImage, width, bpp / 8, &pix, (x + 1) % width, (y + 1) % height); dX += ((float)pix.red) / 255.0f * 1.0f; // Cross Product of components of gradient reduces to float nX = -dX; float nY = -dY; float nZ = 1; // Normalize float oolen = 1.0f / ((float)sqrt(nX * nX + nY * nY + nZ * nZ)); nX *= oolen; nY *= oolen; nZ *= oolen; pix.red = (uint8_t)PackFloatInByte(nX); pix.green = (uint8_t)PackFloatInByte(nY); pix.blue = (uint8_t)PackFloatInByte(nZ); pix.alpha = 255; //pix.red = 128; WritePixel(dstImage, bpp, &pix, x, y); } } } int main(int argc, const char* argv[]) { auto textureLoaderPlugin = LoadPlugin("Plugins/FITextureLoader"); for (int i = 1; i < argc; ++i) { Print(argv[i]); WString filePath = argv[i]; auto src = LoadPixmap(filePath); if (!src) { continue; } if (src->format != TEXTURE_BGRA) { src = src->Convert(TEXTURE_BGRA); } auto dest = CreatePixmap(src->size.x, src->size.y, src->format); SobelFilter((uint8_t*)dest->pixels->Data(), (uint8_t*)src->pixels->Data(), src->size.x, src->size.y, 32); dest->Save(StripExt(filePath) + "_normal.dds"); } return 0; } Diffuse2Normal.zip
-
In my game just in wrong place at all, when i reproducing it with new prefabs, children are being copied Maps.zip 1. Create prefab with children 2. Add to map 3. Reload map
-
Turbulence is also not saving
-
Enhancements to the Particle Emitter
Dreikblack replied to Thirsty Panther's topic in Suggestion Box
So what exactly is particle count then? For example i need particles for shotgun in specific cone without moving particles beside this cone borders and i'm not sure how to achieve this result. -
Enhancements to the Particle Emitter
Dreikblack replied to Thirsty Panther's topic in Suggestion Box
What about particle life time / limits how far particle can fly? -
1. Create particle in the editor 2. Change size to anything from default. 3. Save and reload map - size reset to 0.5
-
What will happen if these entities will be saved with Map::Save for saving game state? Also second thing is that i create another class instance that tied to specific component instance (ai for unit in this case). I do it in Load to restore its state from Editor or save file. And this component member have a weak_ptr to component instance. In some cases Load results may depends on entity position and rotation (not sure if it's a case in my game atm). Probably it would be better not to skip Load(). I will try to handle my case manually in Copy(), even tho i have many unit based classes and calling parent class Copy is not an option because it seems to return Parent class from child *this