Showcase
Showcase your work that you have created in the Skyline Game Engine.

Procedural Space

Procedural Space

Postby planetX » 25 Feb 2018, 18:41

Hi there,

started last weekend to work on some space game concepts. Still trying to figure out the scope of the level and the player/camera movement, but I already managed to spawn some planets and asteroids by script.

I'm currently having problems trying to control the render settings, as you probably will notice. Not sure if it is because the scale but the sunlight makes weird things. The solution for the orbits is not the best one though, it's just a placeholder until ribbons are fully developed. Anyway, here's a shot of the system:



And here is a smaller scene full of asteroids. I've labelled each one and they return the asteroid position on click. ;)

The idea is to move the ship by clicking in the object, but right now it only rotates in the Y axis. I still have to figure out how to turn up and down (X axis) in order to reach all the objects. I got this movement from a template with a Dalek and it only has a function to perform the Yaw, I guess I have to do the same for the Pitch, right?



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: Procedural Space

Postby SolarPortal » 25 Feb 2018, 21:08

Yet again, you make another set of amazing work! It seems like you have really settled into skyline :P

As for the render settings. The blur Width and height allow you to control the glow effect.
You dont want to use a negative exposure.. :P
Is it the emissive of the sun that you are having problems with?

The camera was fixed in the update from yesterday, so you will be able to use the straight camera and set the orbit property.

As for the ship movement on the X, yes, it is pretty much the same. However, the order in which you rotate things matters.
I generally store a current pitch and current Yaw which is manipulate through mouse delta.. i know your using the click to move! :P
Then set the rotation of the ship back to its identity transform using entity.setRotation(obj, 0, 0, 0);
After apply the yaw first, followed by setting the pitch.

Have a look at the plane script found in the "Asset Library\Scripts\Example Scripts\Vehicle\FighterPlaneScript_00.lua"

Again great job! :D
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: Procedural Space

Postby StarFire » 25 Feb 2018, 21:12

I am again very impressed with your work, you are exploring some great ideas and getting some fun results. :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: Procedural Space

Postby planetX » 26 Feb 2018, 09:55

Thanks guys, glad you like it. :D

SolarPortal wrote:As for the render settings. The blur Width and height allow you to control the glow effect.
You dont want to use a negative exposure.. :P
Is it the emissive of the sun that you are having problems with?


I was wondering if there is a way to deactivate all the render fx, everything looks over exposed... I don't like either the fact that the skybox is affected by the global illumination. I've just added a point light and set the values to 100000 or so in order to cover the whole system. The light is inside the sun, but since the textures are one sided, I thought that should not be a problem.

I feel like I had more control over the old render settings from Gen1, now there are a lot of values which I'm not sure what they do, some of them not even sure if they are working or still in development. Is the emissive texture affecting the light?

SolarPortal wrote:The camera was fixed in the update from yesterday, so you will be able to use the straight camera and set the orbit property.


I saw the post. Now it doesn't crash, thanks for fixing that. The problem is that I can't use it, if I set the camera as Orbit, then it doesn't follow the ship. So I think I'll have to manually program the camera orbital movement. Not sure if I'm gonna be able to do that as I'm very bad at maths. :lol:

SolarPortal wrote:As for the ship movement on the X, yes, it is pretty much the same. However, the order in which you rotate things matters.
I generally store a current pitch and current Yaw which is manipulate through mouse delta.. i know your using the click to move! :P
Then set the rotation of the ship back to its identity transform using entity.setRotation(obj, 0, 0, 0);
After apply the yaw first, followed by setting the pitch.

Have a look at the plane script found in the "Asset Library\Scripts\Example Scripts\Vehicle\FighterPlaneScript_00.lua"


I will have a look at it asap. Actually I just need to head the ship in the right direction and move it forward, as I get the target location from the clicked label. The problem with the Dalek template is that it has more functionality than that and not sure which parts of the scripts are necessary, as I don't need the cylinder spawning nor physics.

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: Procedural Space

Postby StarFire » 26 Feb 2018, 17:17

Ok lighting:

This is more complex due to the way the industry wants illumination with adaptive HDR. With this type of lighting a huge range of lighting situations can be created, but this comes at the price of complexity.

The light is controlled for many aspects of the rendering and controls have been provided for max control. These main lighting options are located in the render settings.

Clipboard Image.jpg
Clipboard Image.jpg (23.62 KiB) Viewed 36973 times

Controls are:
Preset: these are a few premade settings, select the "Flat - One to one" option.
Exposure: This is the overall brightness/whiteness. The level of lighting exposure = 1 is good.
Min Auto Exposure: This is the lowest the auto adaption will drop the exposure when moving from dark to light areas.
Max Auto Exposure: This is the magic number for Eye adaption rate = 0.5 is the default, as it will lighten a dark scene and darken a light scene.
Thye auto adaption simulates how our eyes respond to changing lighting levels such as coming out of a cave into a sunny day will create a bloom of light until our eyes adjust to the new light level. These auto exposures are to help this simulation.

So to have flat lighting set these auto exposure values to zero and set the main exposure to the max lighting level you want 0.0 to 1.0.

Bloom.
Threshold: This is the level where the brightest pixel will bloom. Lower values mean more pixel bloom. Set to a high number such as 1000 to stop normal bloom.
H and V value: This is the horizontal and vertical stretch of the bloom.

Env Map Scale: All materials by default have IBL ambient light and this global level is set with this option. This value also affects all reflections in the scene, a value of 2 is the default. When using a value of 0.0 your scene may look incorrectly lit, if so gradually increase this value.


The lighting powers are to have global control of all the lights in your scene. This lets you change the lighting levels without affecting the individual lights brightness.
Sunlight Power: this is the main direction light's boost/Attenuation and affects all directional lights globally. This is a physical value based on real lighting.

MoonLight: Not available - for night time illumination
Light Power: This is the global light power for all spot and point lights in the scene
Skybox power: This changes the brightness of the skybox if your skybox is too bright lower this value.

Also, you still have individual light control on the light objects base properties and the hemispherical ambient control at the top of the render panel.

The Game Objects Light category has a simple light slider that can control your scenes light to darkness.

I would use the Flat preset and adjust the skybox and bloom to suit.

Hope this helps :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: Procedural Space

Postby planetX » 26 Feb 2018, 18:35

Thanks, it helps a lot! :D Now I'm not gonna set values in a crazy way anymore... :lol:

One more question: In the point light properties... what's the difference between Light Size and Light Range?
Attachments
Captura de pantalla (17).png
Captura de pantalla (17).png (20.23 KiB) Viewed 36971 times

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: Procedural Space

Postby planetX » 26 Feb 2018, 18:40

Another question: Is there any way to change the default reflection cubemap?

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: Procedural Space

Postby StarFire » 26 Feb 2018, 18:55

Light size is what could be seen as the Bulb size, light source typically a low number
Light Range is the area of effect, how far it projects. Try to keep this small so it doesn't overlap with other lights to keep performance.
These setting are physical values of light but they don't look real in a game so set them accordingly to get the desired results.

The global cubemap is what provides the IBL (Image based lighting) and can be changed by drag dropping in a new one from the asset manager. (Asset Library\Textures\Cubemaps). IBL uses a blured image where as a reflection uses a clean image. Material reflection set in the material editor over rides the global IBL.
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: Procedural Space

Postby planetX » 27 Feb 2018, 20:11

Thanks for the info! :D

I've managed to set up an orbit camera with a script, it was not so hard. :lol: It's not perfect, but will do the job. I've just attached a node to another node, then apply to the first node some yaw and pitch from the mouse delta. That moves the second node 360 degrees on all angles, with an offset. Afterwards, I've lerped the camera position to the second node and voilá. :D



Q) Is there any way to create a null entity by script? something I can get and set the position and attach to another entities?

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: Procedural Space

Postby SolarPortal » 27 Feb 2018, 20:44

Q) Is there any way to create a null entity by script? something I can get and set the position and attach to another entities?

You could spawn a preset of an empty node and then use this.

We are adding the ability to use custom nodes and attachments soon for the new grouping, attachement and submesh system.
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: Procedural Space

Postby planetX » 28 Feb 2018, 19:44

SolarPortal wrote:
Q) Is there any way to create a null entity by script? something I can get and set the position and attach to another entities?

You could spawn a preset of an empty node and then use this.

We are adding the ability to use custom nodes and attachments soon for the new grouping, attachement and submesh system.


Thanks m8, empty presets work like a charm. That system you're talking about sounds great, just don't forget to include the bones on it... ^^

Well, finally got my damn camera working, including the zoom. It may sound stupid, but for me is a big achievement. :D Surprised how easy it was though. I really love this engine.



And here's the scene script, in case someone finds it useful:

RMB: Orbit Camera
UP: Zoom In
DOWN: Zoom Out


Code: Select all
obj = 0

NODE1 = 0
NODE2 = 0
CAM1 = 0

node1_pos = newType.vec3(0,0,0)
node1_rot = newType.vec3(0,0,0)

node2_pos = newType.vec3(0,0,0)
node2_offset = newType.vec3(0,0,20)

cam1_pos = newType.vec3(0,0,0)
cam1_speed = 0.1

mouseDelta = 0
mouseMov = false
mouseDwn = false

pressed_key = 0

-- ==================================================================
function onInit(objID)
   obj = objID
end
-- ==================================================================
function postInit()
   AttachCam()
end
-- ==================================================================
function onUpdate(timeDelta)
   MoveCam()
end
-- ==================================================================
function AttachCam()
   NODE1 = entity.spawnPreset("SJ_Empty_node1",node1_pos.x, node1_pos.y, node1_pos.z)
   NODE2 = entity.spawnPreset("SJ_Empty_node2",node2_pos.x, node2_pos.y, node2_pos.z)
   CAM1 = entity.getIDFromTag("cam_1")
   entity.attach(NODE1, NODE2)
   entity.setPos(NODE2, node2_offset)
end
-- ==================================================================
function MoveCam()
   -- ORBIT
   if( input.mouseDown( 2 ) == 1) then
      mouseDwn = true
   else
      mouseDwn = false
   end
   if ( mouseMov and mouseDwn ) then
      entity.yaw( NODE1, -mouseDelta.x, 0 )
      entity.pitch( NODE1, -mouseDelta.y, 0 )   
   end
   -- ZOOM
   if ( pressed_key == "down" ) then
      node2_offset.z = node2_offset.z * 2
      entity.setPos( NODE2 , node2_offset )
      pressed_key = 0
   elseif ( pressed_key == "up" ) then
      node2_offset.z = node2_offset.z / 2
      entity.setPos( NODE2 , node2_offset )
      pressed_key = 0
   end
   -- LERP
   node2_pos.x, node2_pos.y, node2_pos.z = entity.getWorldPosition( NODE2 )
   cam1_pos.x, cam1_pos.y, cam1_pos.z = entity.getWorldPosition( CAM1 )
   TweenPos(CAM1, cam1_pos, node2_pos, cam1_speed)
end
-- ==================================================================
function onMouseMove()
   mouseDelta = newType.vec2(sky.getMouseDelta())
   local step = 2
   if ( (mouseDelta.x > step or mouseDelta.x < -step) or (mouseDelta.y > step or mouseDelta.y < -step) ) then
      mouseMov = true
   else
      mouseMov = false
   end
end
-- ==================================================================
function onKeyDown( key )
   pressed_key = key
end
-- ==================================================================
function TweenPos(objectID, currPos, finalPos, speed)
   currPos.x = ( finalPos.x - currPos.x ) * speed + currPos.x
   currPos.y = ( finalPos.y - currPos.y ) * speed + currPos.y
   currPos.z = ( finalPos.z - currPos.z ) * speed + currPos.z
    entity.setPos(objectID,currPos)
end
-- ==================================================================



Now I'm using the up-down key to zoom, but it would be great to use the mouse wheel instead. Since I got no response in the other post, I assume that it is an embarrasing feature request. :lol: Well, take your time, there's no rush with me. Should I open a ticket maybe?

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: Procedural Space

Postby SolarPortal » 28 Feb 2018, 20:14

Excellent, looking good!

Since I got no response in the other post, I assume that it is an embarrasing feature request.

Other post, i don't remember reading this one haha :P
It does appear to be a missing lua command after scanning through the list in code :oops: so yeah.. that's an embarrising one haha :P
Sure, open a ticket, that won't be a problem :)
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: Procedural Space

Postby planetX » 28 Feb 2018, 21:02

I've created the ticket, but I don't know how to add it to the "Feature Requests" category... :?

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: Procedural Space

Postby SolarPortal » 28 Feb 2018, 21:07

Thats ok.. we do that :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: Procedural Space

Postby planetX » 01 Mar 2018, 19:24

SolarPortal wrote:As for the ship movement on the X, yes, it is pretty much the same. However, the order in which you rotate things matters.
I generally store a current pitch and current Yaw which is manipulate through mouse delta.. i know your using the click to move! :P
Then set the rotation of the ship back to its identity transform using entity.setRotation(obj, 0, 0, 0);
After apply the yaw first, followed by setting the pitch.


There's no similar function to "entity.getHeading(obj,posID)" to get the Pitch angle, tried this but it didn't work:

Code: Select all
PitchDeg = entity.getDirection(obj,posID)
cPitch = getPitchLerp(cPitch, PitchDeg.dirX)


But not really sure if that function would even work after all. Instead of that, I think I can get more from the script you've suggested ("FighterPlaneScript_00.lua"). It's a lil bit complicated for me, but I'd try my best. However, there's something I don't understand: what is "timeDelta" and why you use it in all the calculations?

Code: Select all
entity.turn(obj, cVertTurn * vBoost * timeDelta, 0, cHorTurn * hBoost * timeDelta)


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: Procedural Space

Postby epsilonion » 02 Mar 2018, 10:33

its not complicated for you...
procedural programming is more complicated and something I have wanted to get into for a long time but I keep getting the cant be arsed bug thats going around lol...
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: Procedural Space

Postby SolarPortal » 02 Mar 2018, 15:26

@planetX, Timedelta is a very important variable. It allows movement and certain programmed actions to move at the same speed depending on whether your game runs at 200fps or 10fps.

For example, we have a ball that we apply some movement too. At 30fps, we move the ball and it moves at the correct speed, but if the game ran at 60fps, then it would move twice as quick due to double the amount of frames rendered.
If we apply timedelta to the ball, the ball would move at the same speed at 30fps as it would at 60 or even 120fps.

Without it, you will get strange speed up and slow down as the FPS changes.

As for the alternative to getHeading() have you tried getElevation(), its the same as the yaw but for pitch.

Hope this clears it up.
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: Procedural Space

Postby planetX » 02 Mar 2018, 18:43

Timedelta is a very important variable. It allows movement and certain programmed actions to move at the same speed depending on whether your game runs at 200fps or 10fps.


ah, that's totally new for me. Thanks for the explanation, now it makes sense.

Tried getElevation() and it works, just need some tweaking, but it's giving some rotation. Thanks for that too. ;)

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: Procedural Space

Postby planetX » 04 Mar 2018, 18:18

Ok, finally got it! ;)

I was struggling with the controller because it didn't move in the Y axis, but after deactivating it, the ship moves forward in the direction of the target. Still need to replace the current target position by the asteroid position given by the GUI, but that should not be a problem.

Now I can travel wherever I want, having full control of the view at any zoom:



BTW I was playing with Particle Universe and I think is awesome, but when I've tried to import a .pu file it crashed. I only could use the ones which are in the Assets Library. Do I have to copy all the PU files into my project folder?

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: Procedural Space

Postby SolarPortal » 04 Mar 2018, 19:38

great job!

As for particle universe, there is several reasons..

If you open up the .pu file, First make sure the particle name is the same as the file. PU tends to add Category/ParticleName. For skyline, the particle name inside the file should match the filename outside.

Give each technique a name. e.g. technique 0 { or technique myname {. This ensures that each technique is rendered correctly.
Currently meshes are not able to be spawned in the PU files, but most other things should work.

And last but not least, make sure it is added to the resources :)

Hope this helps and Keep up the great work! :D

Edit: If its a material error crash when skyline converts the material to .skymat, then could you send us the files to try and fix any faults that show up.
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: Procedural Space

Postby planetX » 05 Mar 2018, 18:26

Hi Solar, thanks for reply...

SolarPortal wrote:Edit: If its a material error crash when skyline converts the material to .skymat, then could you send us the files to try and fix any faults that show up.


Ok, I didn't do anything you suggested so probably that was the reason. :oops: If I have problems I'll send you the files.

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: Procedural Space

Postby planetX » 07 Mar 2018, 18:48

Hi, could not find anything related in the API...

Q) Is there any way to check if an entity is inside the viewport?
Q) If it is inside the viewport, is there any way to check if that entity is visible? (a mesh which is behind another mesh is not visible)

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: Procedural Space

Postby StarFire » 07 Mar 2018, 21:15

Hi, Objects outside the viewport are auto culled but of the top of my head there is no way to see if they exist. The other question can be done with a raycast from the ship to the object or from the object to the ship depending on what it is you are trying to achieve, and then check the ray results.
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: Procedural Space

Postby TattieBoJangle » 07 Mar 2018, 21:38

i tested this a while back and anything outside the V is auto culled like sf said but if say you have a wall and a model behind the wall that dosnt seem to get culled.
Case: CM Storm Trooper CPU: I7 5930k X99 Cooler: Noctua NH-D15 Graphics: Asus GTX 1080 Motherboard: Rampage Extreme V x99 Ram: RipJaws DDR4 3000mhz Storage: x2 SSD Crucial 500GB + x5 2TB Hdd PSU: Evga 1500w OS: Windows 10
User avatar
TattieBoJangle
Community Manager
Community Manager
 
Posts: 858
Joined: 26 Jan 2015, 00:15
Location: United Kingdom
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer
Skill: Great creative

Re: Procedural Space

Postby planetX » 07 Mar 2018, 22:18

I want to add a label to every object in the space. For that I'm using the screen.worldPosToAbsScreenPos() function. But the labels from the objects which are outside the viewport get stuck in the top left corner of the screen. That's why I need to check if the object is inside the viewport. I'd like also to hide the labels from the objects which get behind the ship.

You can see both issues in the video.



BTW for the first issue, I was thinking on some logic like this, where "pos" is the screen position of the object and "screen" is the screen size, which I think I can get.

Code: Select all
if ( pos.x < 0 or pos.x > screen.x or pos.y < 0 or pos.y > screen.y ) then
    outside = true
else
    outside = false
end


StarFire wrote:The other question can be done with a raycast from the ship to the object or from the object to the ship depending on what it is you are trying to achieve, and then check the ray results.


I think it's not about the ship but the camera... so maybe I could throw a ray from the camera to each object and check if the rays are interrupted by another object, but the problem is that I only must take in consideration those objects which are inside the viewport... hmmm, maybe I could combine the rays with the conditional above. I'll keep thinking on it, hope it works. :?

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

Next

Return to Showcase

Who is online

Users browsing this forum: No registered users and 2 guests

cron