From time to time we will inform the community of certain areas of Skyline Development. If we have decided to add a new features or new demos in development etc we will try to make a post in this topic.Feel free to leave your comments to help encourage out development team ; )

Speedometer with Rotating needle (Gen2)

Speedometer with Rotating needle (Gen2)

Postby SolarPortal » 23 Apr 2017, 22:03

Hey,
Well, the GUI editor can finally rotate gfx with custom pivot points allowing some pretty cool things like this:



oh yes! we have wanted to make a proper speedo for ages but have finally done it in Gen2. The Visual GUI Editor made it a breeze compared to coding it and the whole demo was done in less than 30 mins including the script inclusion on the vehicle:
Note: We know the needle is not completely accurate, but it was close enough for a video :)

Here is all the script needed:
Code: Select all
speedo_GuiID = -1;
speedo_minangle = -136;
speedo_maxangle = 136;
function loadSpeedoGUI(  )
   gui.workSpace("Game Mechanics/Speedometer/");
   speedo_GuiID = gui.load("Speedometer_RotateTest.rml", 0, 0);
   gui.setAttribute(speedo_GuiID,"Speedo_Needle", "rotate", speedo_minangle);
end

function updateSpeedoGUI( currentmph )
   gui.workSpace("Game Mechanics/Speedometer/");
   speedo_GuiID = gui.load("Speedometer_RotateTest.rml", 0, 0);
   gui.setAttribute(speedo_GuiID,"Speedo_Needle", "rotate", speedo_minangle + currentmph);
   absMath = math.floor(currentmph)
   gui.setText(speedo_GuiID,"Speedo_Speed", absMath.." mph");
end


Nice and simple :) Pretty excited about this one!

Note: The speedo images are placeholders only for testing, but we will be making some skyline gfx unless one of our community want to make them instead ;)
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Speedometer with Rotating needle (Gen2)

Postby epsilonion » 24 Apr 2017, 12:15

Looking good there...
User avatar
epsilonion
Skyline Lead Moderator
Skyline Lead Moderator
 
Posts: 874
Joined: 26 Feb 2015, 11:51
Location: Hull, East Yorkshire, England
Skill: Business Manager
Skill: Great creative

Re: Speedometer with Rotating needle (Gen2)

Postby SolarPortal » 24 Apr 2017, 14:03

Thanks :)
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Speedometer with Rotating needle (Gen2)

Postby planetX » 24 Apr 2017, 19:02

Cool... :D

Haven't tried the new GUI system yet, but I've heard that is gonna be awesome... I have to say that the old one is still great, as I'm web designer and feel really comfortable with html/css, but I'm looking forward to test the new one. Is there any documentation about it? what's the difference? I was peeking a couple of weeks ago but could not see anything.

Not sure if you were asking for a design, if so, I can try something... the thing is that you don't need to show both digital and analogic speedometers in one, but you could try with a tachometer instead, that's how I did it in my old racing project, here you can see it in action: https://vimeo.com/106731293

Or maybe you need the whole dashboard?... ^^

My specs: Windows 10 - Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz - 16 Gb ram DDR4 - NVIDIA GeForce GTX 960M 4 Gb

planetX
Skyline Contributor
Skyline Contributor
 
Posts: 210
Joined: 28 Nov 2016, 18:27
Skill: 3D Modeller
Skill: Level Designer
Skill: Concept artist
Skill: Great creative
Skill: Programmer

Re: Speedometer with Rotating needle (Gen2)

Postby SolarPortal » 25 Apr 2017, 18:17

Thats good to hear that there are users still comfortable with the scripted html/css system which still exists in the GUI Editor. It is split into 2 different workflows with different layouts so older gui files can still be edited and new coded ones created.
The Visual GUI does not have all the features of the coded system yet, but it is moving forward and has much still to do on it before i would say its completed.

Yes, the tachometer is a good idea if having a digital speed readout. In the video, it was done that way just to check if it matched up :P

We would be happy if someone would have a go at an analogue speedo, but it would also be good to have a few different designs on one sheet for different styles e.g. analogue speedo, tachometer with digital readout etc... :P

Not sure how a whole dashboard would fit, i personally havent seen a game with a full dashboard lol :P
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Speedometer with Rotating needle (Gen2)

Postby planetX » 27 Apr 2017, 18:10

SolarPortal wrote:Not sure how a whole dashboard would fit, i personally havent seen a game with a full dashboard lol :P


I meant with fuel, gears and that kind of stuff... but anyway, I don't think that's suitable for a demo. Forget it. :D

What do you think about this style? https://drive.google.com/file/d/0BxcBtl ... sp=sharing

(I've seen some games with both analog and digital speedometers, my bad :D )

My specs: Windows 10 - Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz - 16 Gb ram DDR4 - NVIDIA GeForce GTX 960M 4 Gb

planetX
Skyline Contributor
Skyline Contributor
 
Posts: 210
Joined: 28 Nov 2016, 18:27
Skill: 3D Modeller
Skill: Level Designer
Skill: Concept artist
Skill: Great creative
Skill: Programmer

Re: Speedometer with Rotating needle (Gen2)

Postby StarFire » 27 Apr 2017, 20:44

Skylines cars can have gears / manual transmission so that could be easily added, now car stats that could be interesting ;)

That speedo image looks nice :)
Would be nice to have a few for different types of vehicles both realistic and sci-fi. :)
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Speedometer with Rotating needle (Gen2)

Postby SolarPortal » 27 Apr 2017, 20:47

That speedo looks really good. :)
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Speedometer with Rotating needle (Gen2)

Postby planetX » 27 Apr 2017, 21:41

Thanks, glad you like it... ;) It still needs some tweaking to make it work, but it's a start.

StarFire wrote:Would be nice to have a few for different types of vehicles both realistic and sci-fi. :)


So maybe we can make 2 versions, one analogic in this style and the digital one, more futuristic... I was thinking on some sort of LCD screen, but these boards don't work with rotating needles... Is it possible to have frame-by-frame animated sprites? I'm thinking on something like this:

https://s-media-cache-ak0.pinimg.com/or ... 6065b4.jpg

And what about adding a 3d effect? Is that possible?... I'm also thinking on my game, maybe I change everything... ^^

My specs: Windows 10 - Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz - 16 Gb ram DDR4 - NVIDIA GeForce GTX 960M 4 Gb

planetX
Skyline Contributor
Skyline Contributor
 
Posts: 210
Joined: 28 Nov 2016, 18:27
Skill: 3D Modeller
Skill: Level Designer
Skill: Concept artist
Skill: Great creative
Skill: Programmer

Re: Speedometer with Rotating needle (Gen2)

Postby StarFire » 27 Apr 2017, 21:56

That futuristic design looks very interesting, sure we can get it to do it someway ;)
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Speedometer with Rotating needle (Gen2)

Postby SolarPortal » 27 Apr 2017, 22:00

Sounds good!

As for the lcd display, i have been thinking on the best way of doing this and having an image for each stage would be possible without any performance loss only Video memory loss for the images to be loaded, not that they are big though.. :P
I will have a look at an animated texture set for GUI after the current core upgrade which should only take a couple weeks.. lots of shader changes lol :P

For 3D effect, if the textures are setup with the perspective, then it should look possible. But i will have to try the rotations again as for the needle rotate, we are rotating on the z axis and when i tried 45 degrees on the x, i only saw 1 line, but perhaps it was the backface i was looking through. So tilting into the screen might not be that hard lol :P We will have to see haha :P

First though is the core rendering upgrade to latest source which is making a few changes to Gen2.

Look forward to seeing some speedometers.


Edit: Not sure if it would be quicker to add the animated texture to be seperate textures or atlased. Which would you prefer to use. An atlas would not use any more memory, but the shaders would have to be tweaked to use the new uv coords of certain size gaps.

e.g. particles use a set of textures atm instead of an atlas so the controller already exists.
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Speedometer with Rotating needle (Gen2)

Postby planetX » 28 Apr 2017, 08:05

SolarPortal wrote:Edit: Not sure if it would be quicker to add the animated texture to be seperate textures or atlased. Which would you prefer to use. An atlas would not use any more memory, but the shaders would have to be tweaked to use the new uv coords of certain size gaps.


I would prefer to use separate textures, as they are easier to manage, I guess... they will not be many, you can make a cool animation with less than 10 frames.

The 3d effect is not so important, just a nice touch. I think other engines just project the GUI in an invisible plane mesh, or they just use a second camera, not really sure. Making the texture with the perspective was a clever idea ^^ but is not what I'm looking for, as 3d HUDs usually have a slight parallax tilt.

I'll try more designs as soon I have time, stay tuned! ;)

My specs: Windows 10 - Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz - 16 Gb ram DDR4 - NVIDIA GeForce GTX 960M 4 Gb

planetX
Skyline Contributor
Skyline Contributor
 
Posts: 210
Joined: 28 Nov 2016, 18:27
Skill: 3D Modeller
Skill: Level Designer
Skill: Concept artist
Skill: Great creative
Skill: Programmer

Re: Speedometer with Rotating needle (Gen2)

Postby epsilonion » 28 Apr 2017, 10:22

Cool...

While your working on the GUI editor do you think you will be working on the RTT (render to texture) so you can render say game stats or power grid usage on a monitor in game?

I.e. walking into a bathroom and a mirror above the sink, a camera captures you infront of the sink and sends the image to the mirror on the wall..

been able to display a GUI in mid space would be useful for VR as well as you do not want GUI's to close or it strains the eyes (nor to far away) so you can do a GUI in say not foreground and not background, this usually provides the best results in VR.
User avatar
epsilonion
Skyline Lead Moderator
Skyline Lead Moderator
 
Posts: 874
Joined: 26 Feb 2015, 11:51
Location: Hull, East Yorkshire, England
Skill: Business Manager
Skill: Great creative

Re: Speedometer with Rotating needle (Gen2)

Postby SolarPortal » 28 Apr 2017, 12:03

@planetX, yes, it would be simpler to add individual textures in to do the task, but if there is time - then i will add the atlas version also, so there is a choice of both as the GUI system can already use the atlas texture which can contain all the components of the HUD but it is not animated. Plenty to expand on, but the first to be added will be individual textures so its like the animated particles :)

@epsilonion, RTT's for the GUI are planned for minimaps for example using orthographic camera that can attach to player and be in the sky looking down, it could also render using lower lods for more performance, or use visibility masks to not display the world and use a texture of the world instead. Then there will be Rtts for standard meshes. e.g. computer screen showing a security camera footage with post fx. All this is still to be done in Gen2, but it will be added. Just need to create an easy way of creating RenderTextures for end users because they can be complex at times :P

We do have Local Cubemaps coming in the next few versions of skyline which allow reflections based on cubemaps warped to camera views to look like good reflections taken from inside the room as mirroring is always slow. Then there is just rendering a cubemap from a point in the scene like what existed in Gen1.
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Speedometer with Rotating needle (Gen2)

Postby planetX » 29 Apr 2017, 11:48

Ok, so I've made some variations, hope you like them.

Simple speedo, both analogic and digital:

Image

Digital speedo + tachometer:

Image

The "full dashboard"... :lol:

Image

Gauges are standalone components, so the combinations are endless... :D

Image

Cheers!

My specs: Windows 10 - Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz - 16 Gb ram DDR4 - NVIDIA GeForce GTX 960M 4 Gb

planetX
Skyline Contributor
Skyline Contributor
 
Posts: 210
Joined: 28 Nov 2016, 18:27
Skill: 3D Modeller
Skill: Level Designer
Skill: Concept artist
Skill: Great creative
Skill: Programmer

Re: Speedometer with Rotating needle (Gen2)

Postby StarFire » 29 Apr 2017, 18:24

They look great :D
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Speedometer with Rotating needle (Gen2)

Postby SolarPortal » 29 Apr 2017, 18:25

Awesome.. Great looking defaults for skyline :)
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Speedometer with Rotating needle (Gen2)

Postby planetX » 21 Oct 2017, 08:15

Hi, I'm trying to rotate a needle but this command doesn't work:

Code: Select all
gui.setAttribute(speedo_GuiID,"Speedo_Needle", "rotate", speedo_minangle)


Does it work only with the Visual GUI Editor elements? Is there any way to rotate a standard GUI element? Do I have to define the attributes? And which attributes are available?

Thanks :)

My specs: Windows 10 - Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz - 16 Gb ram DDR4 - NVIDIA GeForce GTX 960M 4 Gb

planetX
Skyline Contributor
Skyline Contributor
 
Posts: 210
Joined: 28 Nov 2016, 18:27
Skill: 3D Modeller
Skill: Level Designer
Skill: Concept artist
Skill: Great creative
Skill: Programmer

Re: Speedometer with Rotating needle (Gen2)

Postby SolarPortal » 21 Oct 2017, 19:21

it shouldnt, its an event, so should just work... will have to pull my demo up to see how i did it again lol :P

Edit: Have you tried the tonumber() or tostring() approach... in the lua.
Edit: The rotate is still working in the editor, so i imagine something is wrong with the lua script.

the set attribute just passes the property through like id, name etc...
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Speedometer with Rotating needle (Gen2)

Postby planetX » 21 Oct 2017, 20:35

Hi, SP,

I've just checked the lua script and I was just pointing to a wrong id, sorry... :oops: now it's working. :?

But still it's not clear for me what I can do with the setAttribute() function...

SolarPortal wrote:the set attribute just passes the property through like id, name etc...


But where the "rotate" comes from?

My specs: Windows 10 - Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz - 16 Gb ram DDR4 - NVIDIA GeForce GTX 960M 4 Gb

planetX
Skyline Contributor
Skyline Contributor
 
Posts: 210
Joined: 28 Nov 2016, 18:27
Skill: 3D Modeller
Skill: Level Designer
Skill: Concept artist
Skill: Great creative
Skill: Programmer

Re: Speedometer with Rotating needle (Gen2)

Postby SolarPortal » 21 Oct 2017, 20:44

the rotate was a custom command we wrote into the GUI core so we could take that rotation value and multiply that by the transform matrix on which the GUI is rendered, basically, rotate the quad on screen rather than rotating texture.

So, it was a custom attribute that we added manually. Its the only one though other than the "pivotx" and "pivoty" that have been added. the pivots are used to affect the point at which the image is rotated around, so you can get it bottom center etc...
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Speedometer with Rotating needle (Gen2)

Postby planetX » 21 Oct 2017, 21:02

Got it, thanks for the info! ;)

My specs: Windows 10 - Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz - 16 Gb ram DDR4 - NVIDIA GeForce GTX 960M 4 Gb

planetX
Skyline Contributor
Skyline Contributor
 
Posts: 210
Joined: 28 Nov 2016, 18:27
Skill: 3D Modeller
Skill: Level Designer
Skill: Concept artist
Skill: Great creative
Skill: Programmer


Return to Skyline Development

Who is online

Users browsing this forum: No registered users and 7 guests

cron