Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Petr Ohlídal
    @only-a-ptr
    I ran into it when upgrading: RigsOfRods/rigs-of-rods#2858
    Petr Ohlídal
    @only-a-ptr

    I'm afraid I need advice how to deal with pre-existing material manipulation code.
    In Rigs of Rods, we allow content creators to just specify texture files and we fill them in pre-made materials.
    doc: https://docs.rigsofrods.org/vehicle-creation/fileformat-truck/#managedmaterials
    materials: https://github.com/RigsOfRods/rigs-of-rods/tree/master/resources/managed_materials
    code (snippet to illustrate): https://github.com/RigsOfRods/rigs-of-rods/blob/master/source/main/physics/ActorSpawner.cpp#L2238-L2241

    It completely relied on texture_unit names which are gone in OGRE13 - the name is now set to texture_alias and even that is deprecated.
    The logged warning suggests using variables, but I can't find any API to define them in code - is there such option?
    I realize I have resarch of RTSS to do, but if I can get some beginner tips it would be great.

    1 reply
    tritonas00
    @tritonas00
    yep, all good now, thanks for the info
    OGRECave/ogre-caelum master is a bit broken it seems -> the moon material is misplaced (close to the sun) and causes lighting issues
    disabling the moon material fixes it, so must be something with the moon position
    tritonas00
    @tritonas00

    it was

        Ogre::Vector3 lightsrc = m_caelum_system->getSun()->getMainLight()->getDirection();
        m_caelum_system->getSun()->getMainLight()->setDirection(lightsrc.normalisedCopy());

    for ogre 1.11.6

    before:
    screenshot_2022-03-03_23-56-40_1.png
    after:
    tritonas00
    @tritonas00
    screenshot_2022-03-03_23-56-22_1.png
    tritonas00
    @tritonas00
    yes, we fetch latest OGRECave/ogre-caelum master branch
    i will try without that commit
    ok it doesn't compile without that, lol, makes sense, API changes
    9 replies
    tritonas00
    @tritonas00
    this https://github.com/OGRECave/ogre/blob/master/Docs/1.12-Notes.md#automatic-plugin-discovery-for-windows-debug-builds is only for Windows? meaning Linux Debug builds still need the _d suffix?
    2 replies
    tritonas00
    @tritonas00
    @paroj on ogre 13 addResourceLocation() is very slow and massively leaks memory, to the point our cache generation stopped and program killed
    is it maybe because of the Assimp plugin?
    tritonas00
    @tritonas00
    hmm probably, i see ZipArchive::load() changed, replace zzip & libz with zip
    zzip_dir_open_ext_io vs zip_open_stream
    tritonas00
    @tritonas00
    thing is we need Assimp because it fixes problems with special characters in username under Windows.
    Pavel Rojtberg
    @paroj
    yes, I also suspect the change from zzip to zip to be the culprit. There were no bug reports related to this so far, but maybe you have a special usage pattern
    (should work with both clang and gcc)
    11 replies
    tritonas00
    @tritonas00

    another issue came around while loading a terrain

    InvalidParametersException: Closer detail levels must be added before farther ones in _addDetailLevel at /home/babis/Downloads/ogre13/ror-dependencies/Source/paged-geometry/source/PagedGeometry.cpp (line 376)

    but we do it that way no? https://github.com/RigsOfRods/rigs-of-rods/blob/master/source/main/terrain/TerrainObjectManager.cpp#L306-L313

    if i comment one of two geom->addDetailLevel (doesn't matter which) it works
    tritonas00
    @tritonas00

    i can check

    if (max / 10 > min / 2)
    {
        geom->addDetailLevel<ImpostorPage>(max, max / 10);
    }

    and it works, (min was 40 and max 41 which makes the error valid) don't know if its the correct approach though

    tomluchowski
    @tomluchowski
    Hello, I tried to port opendungeons-plus to ogre 13 3 and get such errors like : Error: ScriptCompiler - base object not found in WorkshopMachine1.material(3): RTSS/NormalMapping_MultiPass
    Error: ScriptCompiler - reference to a non existing object in T3SwordGood.material(3): RTShaderSystem.material
    The file RTShaderSystem.material , path FileSystem=/usr/local/share/OGRE/Media/materials is included in resource.cfg of course. I don't know what to do ....
    example material used in OD : https://pastebin.com/LAnaeBHA
    tomluchowski
    @tomluchowski
    #0  0x00007ffff409d894 in Ogre::GL3PlusSampler::bind (this=0x0, unit=0) at /home/tom/Downloads/ogre-13.3.1/RenderSystems/GL3Plus/src/OgreGL3PlusTextureManager.cpp:109
    #1  0x00007ffff7388984 in Ogre::RenderSystem::_setTextureUnitSettings (this=0xcef650, texUnit=0, tl=...) at /usr/include/c++/11/bits/shared_ptr_base.h:1295
    #2  0x00007ffff73cbb5b in Ogre::SceneManager::_setPass (this=0x4e9b4a0, pass=0x6063b80, evenIfSuppressed=<optimized out>, shadowDerivation=<optimized out>)
        at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreSceneManager.cpp:1065
    #3  0x00007ffff73d6273 in Ogre::SceneManager::SceneMgrQueuedRenderableVisitor::visit (rs=std::vector of length 1, capacity 1 = {...}, p=0x6063b80, this=0x4e9bc00)
        at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreSceneManager.cpp:1562
    #4  Ogre::SceneManager::SceneMgrQueuedRenderableVisitor::visit (this=0x4e9bc00, p=0x6063b80, rs=std::vector of length 1, capacity 1 = {...})
        at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreSceneManager.cpp:1554
    #5  0x00007ffff7383593 in Ogre::QueuedRenderableCollection::acceptVisitorGrouped (this=0x4f5f0a0, visitor=0x4e9bc00)
        at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreRenderQueueSortingGrouping.cpp:474
    #6  0x00007ffff7383642 in Ogre::QueuedRenderableCollection::acceptVisitor (this=this@entry=0x4f5f0a0, visitor=visitor@entry=0x4e9bc00, om=<optimized out>, 
        om@entry=Ogre::QueuedRenderableCollection::OM_PASS_GROUP) at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreRenderQueueSortingGrouping.cpp:452
    #7  0x00007ffff73c88c1 in Ogre::SceneManager::SceneMgrQueuedRenderableVisitor::renderObjects (this=this@entry=0x4e9bc00, objs=..., 
        om=om@entry=Ogre::QueuedRenderableCollection::OM_PASS_GROUP, lightScissoringClipping=lightScissoringClipping@entry=true, doLightIteration=doLightIteration@entry=true, 
        _manualLightList=_manualLightList@entry=0x0, _transparentShadowCastersMode=false) at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreSceneManager.cpp:1607
    #8  0x00007ffff73c8a56 in Ogre::SceneManager::renderBasicQueueGroupObjects (this=0x4e9b4a0, pGroup=0x5dad480, om=Ogre::QueuedRenderableCollection::OM_PASS_GROUP)
        at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreSceneManager.cpp:1707
    #9  0x00007ffff73c90a0 in Ogre::SceneManager::renderVisibleObjectsDefaultSequence (this=this@entry=0x4e9b4a0) at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreSceneManager.cpp:1533
    #10 0x00007ffff73cd0a6 in Ogre::SceneManager::_renderVisibleObjects (this=0x4e9b4a0) at /home/tom/Downloads/ogre-13.3.1/OgreMain/include/OgreSceneManager.h:1852
    #11 Ogre::SceneManager::_renderScene (this=0x4e9b4a0, camera=0x4f7f490, vp=<optimized out>, includeOverlays=<optimized out>)
        at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreSceneManager.cpp:1305
    #12 0x00007ffff7278a98 in Ogre::Camera::_renderScene (this=0x4f7f490, vp=0x4eb91c0) at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreCamera.cpp:496
    #13 0x00007ffff74726a1 in Ogre::Viewport::update (this=<optimized out>) at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreViewport.cpp:217
    #14 0x00007ffff73a1de8 in Ogre::RenderTarget::_updateViewport (this=0xd1e4e0, viewport=0x4eb91c0, updateStatistics=<optimized out>)
        at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreRenderTarget.cpp:198
    #15 0x00007ffff73a13fa in Ogre::RenderTarget::_updateAutoUpdatedViewports (this=0xd1e4e0, updateStatistics=true) at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreRenderTarget.cpp:176
    #16 0x00007ffff73a1f78 in Ogre::RenderTarget::updateImpl (this=0xd1e4e0) at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreRenderTarget.cpp:153
    #17 0x00007ffff73a19e4 in Ogre::RenderTarget::update (this=0xd1e4e0, swap=<optimized out>) at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreRenderTarget.cpp:555
    #18 0x00007ffff7385d5f in Ogre::RenderSystem::_updateAllRenderTargets (this=0xcef650, swapBuffers=false) at /home/tom/Downloads/ogre-13.3.1/OgreMain/src/OgreRenderSystem.cpp:264
    #19 0x00007ffff73c2f26 in Ogre::Root::_updateAllRenderTargets (this=this@entry=0x7fffffffcca0) at /home/tom/Downloads/ogre-13.3.1/
    tomluchowski
    @tomluchowski
    Hmmm after putting RTShaderSystem.material into my local materials/scripts folder the errors with RTSS/NormalMapping_MultiPass are gone , however the segfault at bind function remains ...
    15 replies
    Nigel Morse
    @mrpurplestreak_gitlab
    Hi, trying to setup Ogre3D - 13.3.2, using CMake and MS VS 2019. Is there a recommended way to build both a Debug and Release SDK? Or does it need two build directories one for each (mainly as think the dependencies need to built with Debug as well)
    4 replies
    tomluchowski
    @tomluchowski
    (gdb) bt
    #0  __memcmp_avx2_movbe () at ../sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S:413
    #1  0x00007ffff7e41e24 in std::char_traits<char>::compare (__n=<optimized out>, __s2=<optimized out>, __s1=<optimized out>) at /usr/include/c++/11/bits/char_traits.h:361
    #2  std::operator==<char> (__lhs=<error: Cannot access memory at address 0x100000000>, __rhs="ArrowProjectile", __lhs=<error: Cannot access memory at address 0x100000000>, 
        __rhs="ArrowProjectile") at /usr/include/c++/11/bits/basic_string.h:6235
    #3  Ogre::RTShader::ShaderGenerator::SGScheme::invalidateIlluminationPasses (this=0xf0ef20, materialName="ArrowProjectile", groupName="Graphics")
        at /home/tom/Downloads/ogre-13.3.2/Components/RTShaderSystem/src/OgreShaderGenerator.cpp:1941
    #4  0x00007ffff7e43838 in Ogre::RTShader::ShaderGenerator::invalidateMaterialIlluminationPasses (this=this@entry=0xcc45d0, schemeName=..., materialName="ArrowProjectile", 
        groupName="Graphics") at /home/tom/Downloads/ogre-13.3.2/Components/RTShaderSystem/src/OgreShaderGenerator.cpp:1127
    #5  0x00007ffff7ea7743 in OgreBites::SGTechniqueResolverListener::beforeIlluminationPassesCleared (tech=0x63504a0, this=0xf0eff0)
        at /home/tom/Downloads/ogre-13.3.2/Components/Bites/src/OgreSGTechniqueResolverListener.cpp:66
    #6  OgreBites::SGTechniqueResolverListener::beforeIlluminationPassesCleared (this=0xf0eff0, tech=0x63504a0)
        at /home/tom/Downloads/ogre-13.3.2/Components/Bites/src/OgreSGTechniqueResolverListener.cpp:61
    #7  0x00007ffff7316bad in Ogre::MaterialManager::_notifyBeforeIlluminationPassesCleared (this=<optimized out>, tech=0x63504a0)
        at /home/tom/Downloads/ogre-13.3.2/OgreMain/src/OgreMaterialManager.cpp:293
    #8  0x00007ffff745b9a5 in Ogre::Technique::clearIlluminationPasses (this=this@entry=0x63504a0) at /home/tom/Downloads/ogre-13.3.2/OgreMain/src/OgreTechnique.cpp:972
    #9  0x00007ffff745ba24 in Ogre::Technique::~Technique (this=0x63504a0, __in_chrg=<optimized out>) at /home/tom/Downloads/ogre-13.3.2/OgreMain/src/OgreTechnique.cpp:50
    #10 0x00007ffff7313447 in Ogre::Material::removeTechnique (this=0x14c39b0, index=index@entry=1) at /home/tom/Downloads/ogre-13.3.2/OgreMain/src/OgreMaterial.cpp:370
    #11 0x00007ffff7e46303 in Ogre::RTShader::ShaderGenerator::SGTechnique::~SGTechnique (this=0x14c3fa0, __in_chrg=<optimized out>) at /usr/include/c++/11/bits/shared_ptr_base.h:1295
    #12 0x00007ffff7e464b1 in Ogre::RTShader::ShaderGenerator::_destroy (this=0xcc45d0) at /home/tom/Downloads/ogre-13.3.2/Components/RTShaderSystem/src/OgreShaderGenerator.cpp:322
    #13 0x00007ffff7e467d2 in Ogre::RTShader::ShaderGenerator::destroy () at /home/tom/Downloads/ogre-13.3.2/Components/RTShaderSystem/src/OgreShaderGenerator.cpp:305
    #14 0x0000000000a3abfc in ODApplication::startClient (this=0x7fffffffdb27) at /home/tom/Opendungeons_github/OpenDungeonstomluchowski/source/ODApplication.cpp:280
    #15 0x0000000000a39cc1 in ODApplication::startGame (this=0x7fffffffdb27, options=...) at /home/tom/Opendungeons_github/OpenDungeonstomluchowski/source/ODApplication.cpp:80
    #16 0x0000000000a3c1aa in main (argc=1, argv=0x7fffffffddd8) at /home/tom/Opendungeons_github/OpenDungeonstomluchowski/source/main.cpp:87
    On quit I get wird error like that, is the fault on the ogre3d or mine shaders side ?
    tritonas00
    @tritonas00
    3 replies
    ignacioib1695
    @ignacioib1695
    I built opencv with opencv contrib from source, but when I try to use cv::ovis::AddResourceLocations to replicate the example from https://www.ogre3d.org/2020/12/24 I get the following error in Visual Studio . Can anybody help me please?
    Build started...
    1>------ Build started: Project: OvisEnCPP, Configuration: Debug x64 ------
    1>Source.cpp
    1>Source.obj : error LNK2019: unresolved external symbol "void __cdecl cv::ovis::addResourceLocation(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?addResourceLocation@ovis@cv@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function main
    1>C:\Users\OvisEnCPP\x64\Debug\OvisEnCPP.exe : fatal error LNK1120: 1 unresolved externals
    1>Done building project "OvisEnCPP.vcxproj" -- FAILED.
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    ignacioib1695
    @ignacioib1695
    I just solved the previous problem, It was just a linking matter. However, I have been struggling with this (while trying to replicate the example from https://www.ogre3d.org/2020/12/24). Can you help me? I think that's mostly a opencv problem, but I don't know how to solve it
    Build started...
    1>------ Build started: Project: OvisEnCPP, Configuration: Debug x64 ------
    1>Source.cpp
    1>C:\Users\ignac\OneDrive\Escritorio\TengoQueTerminar\OvisEnCPP\Source.cpp(34,60): warning C4305: 'argument': truncation from 'double' to '_Tp'
    1>        with
    1>        [
    1>            _Tp=float
    1>        ]
    1>C:\Users\ignac\OneDrive\Escritorio\TengoQueTerminar\OvisEnCPP\Source.cpp(36,92): warning C4305: 'argument': truncation from 'double' to '_Tp'
    1>        with
    1>        [
    1>            _Tp=float
    1>        ]
    1>C:\Users\ignac\OneDrive\Escritorio\TengoQueTerminar\OvisEnCPP\Source.cpp(46,87): warning C4305: 'argument': truncation from 'double' to '_Tp'
    1>        with
    1>        [
    1>            _Tp=float
    1>        ]
    1>Source.obj : error LNK2019: unresolved external symbol "class cv::debug_build_guard::_InputOutputArray const & __cdecl cv::noArray(void)" (?noArray@cv@@YAAEBV_InputOutputArray@debug_build_guard@1@XZ) referenced in function main
    1>C:\Users\ignac\OneDrive\Escritorio\TengoQueTerminar\OvisEnCPP\x64\Debug\OvisEnCPP.exe : fatal error LNK1120: 1 unresolved externals
    1>Done building project "OvisEnCPP.vcxproj" -- FAILED.
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    8 replies
    tritonas00
    @tritonas00
    Any idea how to deal with depth fighting issues?
    RigsOfRods/rigs-of-rods#2884
    I tried depth_bias but that causes texture disappearing issues over long distances
    take a close look on the shadows and also the top screen in the terrain
    tritonas00
    @tritonas00
    the mystery is a VS 2017 build (deps and ror) doesn't have the issue, VS 2019 does
    on linux side, it happens with some gpus (same OS/everything on my desktop (intel 4600 hd graphics) and laptop (intel 5500 hd graphics), desktop doesn't have the issue, laptop does)
    19 replies
    Benjamin Stanley
    @HeadClot
    Hey got a question - Are there any JavaScript or typescript bindings for Ogre3D?
    2 replies