!slKuyYpimCmkHYfbLe:matrix.org

OpenMW Example Suite

1243 Members
Discussion related to OpenMW Example Suite and Template || https://openmw.org/ || Rules: https://rentry.co/omw_rules || Other rooms related to OpenMW: #openmw-space:matrix.org3 Servers

Load older messages


SenderMessageTime
11 Jan 2024
@_discord_656242784050741248:t2bot.ioS3ctor One thing I would personally like to get into soon is doing groundcover records natively. 09:53:31
@_discord_656242784050741248:t2bot.ioS3ctor I spoke very briefly with hrnchamd about it, and they were supportive of adding the capability of MGE as well 09:53:56
12 Jan 2024
@_discord_223500022422044672:t2bot.ioanyoldname3 The MGE XE groundcover was only accepted on the grounds that it was purely for legacy mod support (and a little bit because some people misunderstood and thought you might have a chicken before an egg even though you can't change species after being born, so the first chicken came from a chicken egg laid by an asain jungle fowl or something between one of those and a chicken, so thought that there would be usable data in exising MGE XE grass mods that we could feed into a modern groundcover system). 01:46:06
@_discord_223500022422044672:t2bot.ioanyoldname3 I wouldn't necessarily object to supporting a common better-way-of-representing-MGE-XE-groundcover-mods system with MGE XE, but if we copy the system from Skyrim (which we'll have to for Skyrim support) or Horizon: Zero Dawn etc. (which should allow lots and lots of pretty groundcover and be relatively cheap to render), then that won't be something MGE XE can do, too. 01:48:52
@_discord_127678330722844672:t2bot.iozackhasacat I want to get this mod working in OpenMW(lua): https://www.nexusmods.com/morrowind/mods/46680

Got a working way to do it in c++, but it is the hackiest code ever:

objectT["nodeTest"] = [lua = context.mLua](const GObject& object) {
    SceneUtil::PositionAttitudeTransform* pat = object.ptr().getRefData().getBaseNode();
    if (pat)
    {
        osg::Node* node = dynamic_cast<osg::Node*>(pat);
        if (node)
        {
            // Function to recursively search for the node named "BookSwitch"
            std::function<osg::Switch*(osg::Node*)> findSwitchNode
                = [&](osg::Node* currentNode) -> osg::Switch* {
                if (!currentNode)
                    return nullptr;

                // Check if the current node is the "BookSwitch" switch node
                if (currentNode->getName() == "BookSwitch")
                {
                    return dynamic_cast<osg::Switch*>(currentNode);
                }

                osg::Group* group = currentNode->asGroup();
                if (group)
                {
                    for (unsigned int i = 0; i < group->getNumChildren(); ++i)
                    {
                        osg::Switch* foundNode = findSwitchNode(group->getChild(i));
                        if (foundNode)
                            return foundNode;
                    }
                }
                return nullptr;
            };

            osg::Switch* switchNode = findSwitchNode(node);
            if (switchNode)
            {
                // Toggle switch index or perform other operations
                if (switchNode->getValue(0))
                {
                    switchNode->setSingleChildOn(1);
                }
                else
                {
                    switchNode->setSingleChildOn(0);
                }
            }
        }
    }
};

I'm guessing this pretty much needs to wait for wazabear 's scenegraph API?
04:15:40
@_discord_127678330722844672:t2bot.iozackhasacat * I want to get this mod working in OpenMW(lua): https://www.nexusmods.com/morrowind/mods/46680

Got a working way to do it in c++, but it is the hackiest code ever:

objectT["nodeTest"] = [lua = context.mLua](const GObject& object) {
    SceneUtil::PositionAttitudeTransform* pat = object.ptr().getRefData().getBaseNode();
    if (pat)
    {
        osg::Node* node = dynamic_cast<osg::Node*>(pat);
        if (node)
        {
            // Function to recursively search for the node named "BookSwitch"
            std::function<osg::Switch*(osg::Node*)> findSwitchNode
                = [&](osg::Node* currentNode) -> osg::Switch* {
                if (!currentNode)
                    return nullptr;

                // Check if the current node is the "BookSwitch" switch node
                if (currentNode->getName() == "BookSwitch")
                {
                    return dynamic_cast<osg::Switch*>(currentNode);
                }

                osg::Group* group = currentNode->asGroup();
                if (group)
                {
                    for (unsigned int i = 0; i < group->getNumChildren(); ++i)
                    {
                        osg::Switch* foundNode = findSwitchNode(group->getChild(i));
                        if (foundNode)
                            return foundNode;
                    }
                }
                return nullptr;
            };

            osg::Switch* switchNode = findSwitchNode(node);
            if (switchNode)
            {
                if (switchNode->getValue(0))
                {
                    switchNode->setSingleChildOn(1);
                }
                else
                {
                    switchNode->setSingleChildOn(0);
                }
            }
        }
    }
};

I'm guessing this pretty much needs to wait for wazabear 's scenegraph API?
04:15:57
@_discord_127678330722844672:t2bot.iozackhasacat Actual function could be something like "findSwitchNode("BookSwitch")" or nodes["bookSwitch"] = 0 04:17:07
@_discord_414058251299192832:t2bot.iowazabear ya you could do this with my MR 04:18:37
@_discord_414058251299192832:t2bot.iowazabear sorry I've not had time to finish it up 04:19:05
@_discord_127678330722844672:t2bot.iozackhasacat Take your time, as long as you can get it merged by the end of 2023 I'll be happy 04:19:25
@_discord_414058251299192832:t2bot.iowazabear Oh for sure 04:19:32
@_discord_414058251299192832:t2bot.iowazabear The original goal was 0.49 04:19:41
@_discord_127678330722844672:t2bot.iozackhasacat I still believe it can be there for it 04:19:56
@_discord_127678330722844672:t2bot.iozackhasacat Maybe break it up and add smaller bits of it? 04:20:04
@_discord_414058251299192832:t2bot.iowazabear wait 04:20:05
@_discord_414058251299192832:t2bot.iowazabear it's 2024 04:20:11
@_discord_127678330722844672:t2bot.iozackhasacat Yes 04:20:26
@_discord_414058251299192832:t2bot.iowazabear I don't know I'm afraid if I do it the functionality will remain useless. I'd rather make it somewhat powerful otherwise I doubt I extend 04:20:56
@_discord_127678330722844672:t2bot.iozackhasacat There are only 3 unresolved threads 04:20:59
@_discord_127678330722844672:t2bot.iozackhasacat I can write the docs for you 04:21:10
@_discord_414058251299192832:t2bot.iowazabear let me catch up on where I left off, lol 04:22:58
@_discord_414058251299192832:t2bot.iowazabear okkk, so I rebased on master. fixed some bugs with inserting/removing... 04:23:37
@_discord_127678330722844672:t2bot.iozackhasacat uhhhhhh 04:24:21
@_discord_127678330722844672:t2bot.iozackhasacat I thought this was the #development channel 04:24:28
@_discord_127678330722844672:t2bot.iozackhasacat oops 04:24:28
@_discord_414058251299192832:t2bot.iowazabear what's left is to add the bindings for mesh internals.

of course there's the docs, but that honestly is no big deal, will take 20 minutes even with examples
04:25:10
@_discord_414058251299192832:t2bot.iowazabear mesh internals being able to access things like switch nodes --- maybe I just add switch nodes only for now 04:25:39
@_discord_414058251299192832:t2bot.iowazabear that could be good compromise 04:25:43
@_discord_127678330722844672:t2bot.iozackhasacat It would be nice 04:31:55
@_discord_127678330722844672:t2bot.iozackhasacat If not, I'll have to make new items for all these books, and that'd be a pain 04:32:08

Show newer messages


Back to Room ListRoom Version: 6