Jump to content

Recommended Posts

On 9/29/2016 at 2:15 PM, gossamersolid said:

I'm going to be a pain in the ass and keep bringing this up until something is implemented - give us the ability to set brushes for the drawPolygon command so we can have solid fills and crosshatches and such. The command is not going to hit its potential until this is implemented.

Also we should be able to draw polygons as marker shapes rather than having to manually draw each frame!


Would drawTriangle be sufficient? https://community.bistudio.com/wiki/drawTriangle
 

 

  • Like 3

Share this post


Link to post
Share on other sites


drawTriangle

drawTriangle

drawTriangle

 

 

Can you see it?

 

Illuminati exposed

 

  • Like 1

Share this post


Link to post
Share on other sites
7 hours ago, killzone_kid said:


Would drawTriangle be sufficient? https://community.bistudio.com/wiki/drawTriangle
 

 

 

This is definitely a step in the right direction, but I would prefer if drawPolygon had the ability to set a fill texture much like drawTriangle does. I'm basically splitting the map up into zones that are polygons (some are simple, some are more complex in shape).

 

To workaround, I've currently filled the map using little 100x100m square markers to have the illusion that it's a more complex shape.

  • Like 2

Share this post


Link to post
Share on other sites

Do the markers behave when the player zooms the map in and out?

Share this post


Link to post
Share on other sites
8 hours ago, Tankbuster said:

Do the markers behave when the player zooms the map in and out?

 

Yes. They're 100x100 rectangles touching each other. Appears to be completely seamless at any zoom level (as far as I can see).

I'll get a picture (or even a video) when I can.

Share this post


Link to post
Share on other sites
On 7/17/2017 at 3:01 PM, Tankbuster said:

Yes please!

 

As promised, here's the video: 

 

 

If you want to run the script or take a look at it, here that is: https://pastebin.com/Rjugu1nC

 

It builds "zones" based around flag objects (classname: Flag_Green_F - so you'll need at least one of those, bare minimum).

  • Like 1

Share this post


Link to post
Share on other sites

That's really cool @gossamersolid. 'Zones' and real military style front lines was something I always wanted for my pet mission, but there was never anything that looked just right, until now. :) It might be too late to integrate it into the mission as I eventually went with a town-target type thing rather than zones. But that does look SO nice!

Share this post


Link to post
Share on other sites
2 hours ago, Tankbuster said:

That's really cool @gossamersolid. 'Zones' and real military style front lines was something I always wanted for my pet mission, but there was never anything that looked just right, until now. :) It might be too late to integrate it into the mission as I eventually went with a town-target type thing rather than zones. But that does look SO nice!

 

Thanks. I've been wanting to do something like this for a while (hence the reason I think being able to draw a fill on those polygons I mentioned earlier would make this more possible - cleaner).

 

I tried doing smaller squares at first so that it looked nicer, but I seemingly hit the max size of an array when trying to store the marker information for later (so I can manipulate the colours and such).

  • Like 2

Share this post


Link to post
Share on other sites

Damn you! Another thing on my todo list! :)

Share this post


Link to post
Share on other sites
On 21.7.2017 at 1:57 PM, gossamersolid said:

but I seemingly hit the max size of an array

That's pretty impressive considering that the array size limit is like 10 million elements or something :icon14:

Share this post


Link to post
Share on other sites
5 hours ago, h - said:

That's pretty impressive considering that the array size limit is like 10 million elements or something :icon14:

 

See I read the element count was very high and you should basically never hit it, but after outputting 25mx25m markers all over Malden and putting them into arrays (so I can reference them later), the variable was always appearing to have a value of nil - no errors in the RPT. So I started deleting elements and all of the sudden it got the value assigned as expected.

 

You could most likely replicate it if you use my code posted earlier on a larger map like Altis and make 5mx5m squares. Keep in mind you'll probably be waiting a long time for it to finish processing.

Share this post


Link to post
Share on other sites

Why would you fill the map with millions of markers? That will kill performance when looking at the map ingame.

  • Like 1

Share this post


Link to post
Share on other sites
6 hours ago, commy2 said:

Why would you fill the map with millions of markers? That will kill performance when looking at the map ingame.

 

Look above at the video I posted. It was a discussion on finding the balance between looks and performance.

My current implementation does not appear to cause performance issues from what I can see.

 

As mentioned much earlier, if drawPolygon had the ability to render fills and not just a "border" style, I wouldn't have to resort to markers.

Share this post


Link to post
Share on other sites
20 hours ago, commy2 said:

Why would you fill the map with millions of markers? That will kill performance when looking at the map ingame.

Are you suggesting a dynamic version of marker spawning depending on user view focus on the map in terms of coordinates and rendering the part to of the screen's boundaries only? I mean, you zoom out, you recalculate the screen's boundaries relative to the map, you render the new rectangles that became visible, etc.

Share this post


Link to post
Share on other sites

You actually thought this update to the debug console was a good idea, didn't you?

Share this post


Link to post
Share on other sites
Guest

If Altis is a square with side size of 30000 meters, you can have square marks with the minimum size of 10 meters to not reach the array elements limit.

Share this post


Link to post
Share on other sites
6 minutes ago, commy2 said:

The very strangely named command https://community.bistudio.com/wiki/sunOrMoon is broken. It only reports 0 and 1 now, nothing in between anymore.

Oh no... this is bad news.

 

While on the subject, I have tried to use this command in order to mock up something like a dynamic AI-viewdistance that will somewhat match with what a player would perceive in game (unassisted by NVs etc that is). 

 

It did not correlate at all with perceived levels of light back then (Feedback Tracker Report), was this command even intended to be used this way? What I was trying to do was using sunOrMoon, moonIntensity, fogArray and Overcast to calculate some sort of perceived viewdistance.

 

Sorry for the plug, i could not resist and always had this command in the back of my head. 

 

Share this post


Link to post
Share on other sites
2 hours ago, commy2 said:

The very strangely named command https://community.bistudio.com/wiki/sunOrMoon is broken. It only reports 0 and 1 now, nothing in between anymore.

 

Why broken? This command is still efficient for night or day situations. The old one was not so cool with a very small slots for dawn or dusk.

Share this post


Link to post
Share on other sites
18 minutes ago, pierremgi said:

 

Why broken? This command is still efficient for night or day situations. The old one was not so cool with a very small slots for dawn or dusk.

It returned a number between 0 and 1.

It no longer does that.

Hence why it is broken.

 

Cheers

  • Like 1

Share this post


Link to post
Share on other sites
24 minutes ago, Grumpy Old Man said:

It returned a number between 0 and 1.

It no longer does that.

Hence why it is broken.

 

Cheers

 

I know that. I'm using this command every day for automatic own HUD color. So, I tested it in its previous version. The 0-1 range was useless for most of usage. As I said the dawn / dusk slots ( >0 &&  <1) were very narrow (few minutes).

I can imagine some people writing some ppeffects code with that. And yes, it's broken in a strict term, but I'm not sure it's not a wanted BI "simplification".

It's still fine for day / night situations without other condition on Bis_fnc_SunriseSunsetTime . Not tested but the "new" command should work faster.

Share this post


Link to post
Share on other sites
2 hours ago, fn_Quiksilver said:

use BIS_fnc_sunriseSunsetTime to evaluate when it gets dark.

I don't want to know when it becomes day/night. I used the command as approximation of know how bright it is. Now it's useless and I have to hack something together. It broke ACE maps being darker at dusk / dawn. Now it's either bright or very dark.

  • Like 1

Share this post


Link to post
Share on other sites

TerrainIntersectASL seems broken.

 

Put a boat called p1 in deep water then put this in the debug console:

 

hint str (terrainIntersectASL[getPosASL p1,AGLtoASL (p1 modelToWorld [0,0,-4])])

 

returns true

 

(going by what's on the wiki that modelToWorld returns translated world position, format PositionAGL)

 

edit:  I used "B_G_Boat_Transport_01_F"

 

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×