Jump to content

how to change the logo of splash window


photo

Recommended Posts

Hi Lukas,

Please, take a look at this forum topics (probably, they will answer all your questions):

  1. https://developer.unigine.com/forum/topic/4207-hide-unigine-splash/
  2. https://developer.unigine.com/forum/topic/3781-solved-does-splash-still-work-in-22/

Also, there are couple of script samples available at <SDK>/data/samples/widgets/splash_*.

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment
  • 5 months later...

@silent Can you confirm that using these samples allows you to REPLACE the initial Unigine Splash screen.  The samples I see are PRESS ME buttons that bring up a video or image splash.  But during the initial load of the world it still shows for a moment the Unigine.

Really need to replace the logo of Unigine with our clients for custom look.  Thank you.

Link to comment
16 hours ago, fox said:

Hi Trey,

You can also check out an example in the Splash Class article. Yes it does replace the UNIGINE splash screen, but don't forget to set both splashes: for application and world loading (seems like this is the problem in your case).

Please, also check the article on Skin Layout.

Thank you!

@fox That looks promising.  However I've copied and pasted the code into my AppSystemLogic::init() method and changed teh name of the image file and nothing seems to change.  I've tried adding different "paths" so Unigine knows where to find the images...but still nothing changes.

What am I missing?

My entire AppsystemLogic.cpp file below...

#include "AppSystemLogic.h"
#include <UnigineConsole.h>

#include <UnigineSplash.h>

 

#include "Framework/ComponentSystem.h"
#include "Components/VRPlayerSpawner.h"
#include "Components/Objects/ObjSwitch.h"
#include "Components/Objects/ObjHandle.h"
#include "Components/Objects/ObjMovable.h"
 
#include "Components/Objects/ObjButton.h"
#include "Components/Objects/ObjLaserPointer.h"
#include "Components/Gui/GuiSample.h"
 
#include "Framework/SoundManager.h"
 
int AppSystemLogic::init()
{
 
    Unigine::Math::vec4 transform = Unigine::Math::vec4(1.0f, 1.0f, 0.0f, 0.0f);
 
    // get the splash and app instances (as they're designed as singletons)
    Unigine::Splash* splash = Unigine::Splash::get();
    Unigine::App* app = Unigine::App::get();
 
    // set transform to the system and world splash screens
    splash->setSystemTransform(transform);
    splash->setWorldTransform(transform);
 
    // compute the aspect ratio to show corresponding texture
    float aspect_ratio = (float)app->getWidth() / (float)app->getHeight();
 
    // if the aspect ratio is 4:3 show these splash screens
    // during application and world load
    if (aspect_ratio < 1.5f) {
        splash->setSystem("StudentCheckIn_1.png");
        splash->setWorld("StudentCheckIn_1.png");
    }
    else {
        // if the aspect ratio is 16:9 show these splash screens
        // during application and world load
        splash->setSystem("StudentCheckIn_1.png");
        splash->setWorld("StudentCheckIn_1.png");
    }
 
    // configure the ComponentSystem
    ComponentSystem::get()->registerComponent<VRPlayerSpawner>();   // basic components
    ComponentSystem::get()->registerComponent<ObjSwitch>();
    ComponentSystem::get()->registerComponent<ObjHandle>();
    ComponentSystem::get()->registerComponent<ObjMovable>();
 
    ComponentSystem::get()->registerComponent<ObjButton>();         // project-related components
    ComponentSystem::get()->registerComponent<ObjLaserPointer>();
    ComponentSystem::get()->registerComponent<GuiSample>();
 
    // show all warning/error messages to the log
    ComponentSystem::get()->setWarningLevel(ComponentSystem::WARNING_LEVEL::HIGH);
 
    // load world
    Unigine::Console::get()->run("world_load vr_template/vr_template");
 
    return 1;
}
Edited by t.coursey
Link to comment
4 hours ago, morbid said:

Hi @t.coursey,

the code itself seems to be fine. We can load a custom image using the exact code. May I ask you to check it with another image?

Thanks!

Ok then I must not be doing something that you guys are.  Here is a complete walk through of what I've done and how I do it.  Thanks for your help.

PS:  This is with a different image, just created and imported into the proj.

https://youtu.be/YA_6g5PcKGQ

Link to comment

Hi Trey,

Guess I've just found the problem - there is one important part missing in your video - code compilation and building binaries. As I can see, you used Assemble Project, but maybe you've got the idea wrong - Assemble Project does not compile your code it simply packs the resourses and adds existing(already built) release binaries (which are  old in your case and use the default splash, as you didn't compile and build new version).

So, make sure you've compiled your code in your IDE or using other tools, and check which binaries you build and use (debug or release).To launch your application you can use Run button for your project in the SDK Browser. You can learn how to customize run options here. Please make sure, versions of binaries, that you've built (debug or release) match the ones you're running via the Run button.

Hope this helps, thank you!

Link to comment

Perfect, sounds like I'm close.  I don't think Visual Studio Code "compiles" it's more of an editor.  I'll install the full Visual Studio IDE, is there any resources on Unigines side that can help show me how to compile or setup my IDE for Unigine?

Thanks so much!  Glad I caught you today before the weekend.

Link to comment

@fox or @morbid I have a splash screen working, sort of.  We have Visual Studio setup to compile code (did not know we had to do that, thought it was using an interpreter).  

The images below show the actual png file (with black on bottom) and the other is what is shown in Unigine as splash.  It seems that it's only using the top portion of the image and then streches that portion to the correct aspect ratio of 1.77 on my screen (16x9).  I don't see anywhere in the code that this would be happening.  The transform vec4 doesn't seem to have any relation to this bug/symptom.

Thoughts?

unigine-splash.jpg

SplashScreen.png

Link to comment

Hi Trey,

Glad you made it!

This is surely not a bug, it's the way the thing works, that's why I recommended you to check info on the layout in one of my previous messages:

Quote

Please, also check the article on Skin Layout.

The texture is divided into 2 parts:initial picture (upper) is gradually replaced with the final one (lower).

Hope this helps!

Thank you!

Link to comment
On 8/25/2018 at 2:58 AM, fox said:

Hi Trey,

Glad you made it!

This is surely not a bug, it's the way the thing works, that's why I recommended you to check info on the layout in one of my previous messages:

The texture is divided into 2 parts:initial picture (upper) is gradually replaced with the final one (lower).

Hope this helps!

Thank you!

So I have created a splash screen that is 1080 x 2160 tall.  The top portion is the same as the bottom portion except there is no progress bar.  I have added a bar to the bottom image and an alpha gradient that goes horizontal on the image.  From what I read this should allow the progress bar to move from left to right as the world loads.  However all I ever see in the splash screen is the top portion of the splash screen, no change to the bottom image, fading or not...

What am I missing?

Link to comment

If you look at the <SDK>/data/samples/widgets/splash_* samples mentioned earlier, you'll see that they keep calling renderSplash() with an increasing progress value - I presume that's what progresses the animation. I don't see a renderSplash() (or renderSystem or renderWorld, I don't know which applies to you) in your AppSystemLogic.cpp above, so maybe that's the culprit.

Link to comment
  • 1 year later...

Resuming this topic since I'm tying to achieve exactly the same, setup a dev environment to change the splash screen logo and window title.

Just a question since development it's not my job I normally just use Visual Studio Code for small configuration file changes, does make sense to maintain VSC also for this job or better switch to Visual Studio? Also the 2017 release is mandatory or also the latest 2019 will work?

Edited by davide445
Link to comment

Ok all is working also with VS 2019, thanks.

Can only just point out will be better if no Unigine Engine title will be visible in the initial application startup, future release are supposed to be product for customers.

Link to comment
×
×
  • Create New...