Archive 17/01/2023.

Maximum Draw Distance?

codexhound

There seems to be a maximum drawable distance in the engine since if I have objects that are more than 650 in game units away, the engine wont draw them. I set everything to 3000 draw distance just to test. Is there a way to get past this limit? Or is it a camera mask I don’t know about

Modanung

Could it be the size of your Octree?

Also, scale is an illusion. :wink:

Modanung

If there’s no space walks, space could be a different scene that is rendered seperately from what happens inside a craft or on a planet.

codexhound

Yeah, that’s true. I could do it that way but I don’t think it should be necessary to render a different scene. Tried changing the bounding box of the scene octree but it didn’t do anything. On a side note, because of my OCD, I have to say space is definitely not an illusion. I always need more, especially when dealing with floats and quantum zoom levels. It just doesn’t work :). Pixel 1 keeps rounding up.

Leith

Did you change the size of your Zone to suit?

Leith

I’m just thinking inside the box - what else has a bounding volume and affects rendering?
@Modanung, Scale is the root of all evil. I hate you, scale. You make my life hard. Why do you need to be the difficult child?

codexhound

SetScale really annoys me too (I never am completely sure what it’s relative too, but life is hard:). I wish there was a set size function. Maybe ill just make one internally. Leith, what zone do I need to change the size of? Could you explain.

Leith

Your game scene probably has an Octree attached to its root, and likely, there is (also) a Zone attached to it, or to another node, since zones can move…
Zone is an AABB, it provides ambient lighting and fog, and I think that’s all.
Zones can overlap… if something is inside a zone, it gets ambient light from the zone. If its in more than one zone, theres I think some rules about which zone gets to be in charge… Not sure, not really needed multiple zones so far.
Since it provides ambient lighting, Zones could help show up objects that are not receiving other sources of light, just a thought. If objects are outside of all zones, then they get no ambient lighting.
To be clear - an object does not need to be a child of a zone, it just has to be inside the zone’s volume, inside the box, to receive ambient lighting and fog.

Leith

As for SetSize, well, in some cases, I would attach extra nodes to my armature, and use SetWorldScale on them, so that my attachments were scaled in world terms, messy, but it works

Modanung

If no Zone is actively define, the default zone is used. It can be accessed through:
GetSubsystem<Renderer>()->GetDefaultZone()

Ah yes, the scales

@codexhound What puzzles you about node scales?
When splitting your scene up you’d simply store a scale factor somewhere to use for intermediating.

Leith

I was not aware there was a default zone - what size is it? :wink:

Modanung

@Leith You have much to learn, young padawan. :wink:

static const Vector3 DEFAULT_BOUNDING_BOX_MIN(-10.0f, -10.0f, -10.0f);
static const Vector3 DEFAULT_BOUNDING_BOX_MAX(10.0f, 10.0f, 10.0f);
codexhound

I get what the scales do, I just prefer more absolute measurements! The Scales! It’s like someone writing an engineering document and never once mentioning what the units are. It’s bothersome. I am using a kind of system like you were mentioning though for different scales.

codexhound

So attemping to change the defaults zones bounding box gave the the dreaded nullptr segfault.

           /// Return world space transform matrix.
const Matrix3x4& GetWorldTransform() const
{
    if (dirty_) <<<<<<<------
        UpdateWorldTransform();

    return worldTransform_;
}

I’m gonna take a break now:)

JTippetts

Don’t change the default zone, just create your own zone. If you have a zone, it won’t fall back to the default.

lezak

My guess would be that Your objects are covered by a fog (fog is set up through zone), try changing fog start and end to some high values.

Modanung

@codexhound And just to be sure. Did you check the Octree size?

codexhound

Yes, it was smaller than wanted, but I changed it to no effect.

codexhound

Finally got stuff to show up with lezaks suggestion.