NetRadiant = Radiant 1.5 with useful q3map2 patches...

For now: Everything about NetRadiant

Moderator: Moderators

Tue Feb 10, 2009 4:54 pm

  • So could you make a package for other Mac users like clueless newbie?
    Alien
    Forum addon
     
    Posts: 1212
    Joined: Tue Apr 22, 2008 7:12 am

Tue Feb 10, 2009 4:56 pm

  • Hello. I have been using netRadiant for a while now and love it, but today I ran into a problem which I think should have a walkaround or fix done for it.

    A map I was building on suddenly started failing at one point during the BSP building. I found out that was because of a hard coded limit in q3map2 which limits the maximum number of brushes to 32768 (MAX_MAP_BRUSHES). I asked why it couldn't be bigger and was told it could crash or block the compiler on computers with lower resources if increased too much. I currently need to use a hacked q3map2 to keep building my map otherwise it won't work.

    So my question is, could the limit for MAX_MAP_BRUSHES in the compiler be made a preference in the Preferences menu from netRadiant (if there is a way to get netRadiant to "talk" to q3map2.exe about such things). Or if not some q3map2.ini file for such settings or any other way just not a hard-coded number. That would be very useful for larger maps with many brushes or brush-based terrain so they can be built without a hacked compiler. Hope something can be done to fix this.
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

Tue Feb 10, 2009 7:27 pm

  • I looked at the code, and could make this specific limit dynamic (so it automatically expands while q3map2 runs).

    q3map2 in NetRadiant now is able to compile RedStarRepublic.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Sun Feb 22, 2009 6:21 am

  • Image
    I didnt really like the splash image so i did that in a couple of minutes =P
    You are free to use this in any way you want =)
    actual file is a .bmp, you can get it here:
    http://kimi.kieru.net/433029
    seeeker
    Newbie
     
    Posts: 2
    Joined: Sun Feb 22, 2009 6:14 am

Sun Feb 22, 2009 10:31 am

  • Great, can I have an editable source of this (xcf, psd, for example)?
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Sun Feb 22, 2009 6:43 pm

Mon Feb 23, 2009 7:26 am

  • Committed, but not yet tested - thanks :)

    hope the window size of the splash image will automatically adjust to the bmp.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Tue Feb 24, 2009 9:06 pm

  • Suggestion for q3map2: Allow -export to accept an argument, which would be a directory. There is a patch for ioquake3 to load external lightmaps, and it loads from maps/MAPNAME/lightmaps, rather than maps/MAPNAME(to prevent lightstyles from screwing up). Would be cool to have it like this:
    Code: Select all
    q3map2 -light -export <directory>

    Where "directory" is the directory name inside of maps/MAPNAME.
    }MG{Odin
    User avatar
    Odin
    Advanced member
     
    Posts: 52
    Joined: Wed Mar 01, 2006 5:31 pm

Tue Feb 24, 2009 9:27 pm

Tue Feb 24, 2009 9:36 pm

  • Also, q3map2 -export has no gain. It is only there so you can edit the lightmaps, and import them later.

    Real external lightmaps work completely differently (and also use different file names), and offer the advantage of having a different allowed size (while -export only exports internal lightmaps).
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Wed Feb 25, 2009 3:55 am

  • divVerent wrote:Also, q3map2 -export has no gain. It is only there so you can edit the lightmaps, and import them later.

    Real external lightmaps work completely differently (and also use different file names), and offer the advantage of having a different allowed size (while -export only exports internal lightmaps).

    http://www.ioquake.org/forums/viewtopic.php?f=2&t=100

    ^ External lightmap patch. Loads external lightmaps exported with -export. They have to be moved to maps/mapname/lightmaps to work so it does not conflict with lightstyles. It works great, I've already tested it. The amount of detail from a lightmap at _lightmapscale 0.15, -samplesize 1 -filter -super -lightmapsize 2048, is incredible.
    q3map2 should support an arbitrary export directory because nexuiz might look inside a different directory for external lightmaps. It also lets mod devs choose where external lightmaps should be stored. Basically, for inter-operability purposes. If -export weren't given an argument, then just make it maps/mapname by default(which is already the default).
    }MG{Odin
    User avatar
    Odin
    Advanced member
     
    Posts: 52
    Joined: Wed Mar 01, 2006 5:31 pm

Wed Feb 25, 2009 1:48 pm

  • This has nothing to do with -export, but with external lightmap writing with -lightmapsize. Entirely different subject. The correct solution would then NOT changing how -export works, but adding a -lightmapdir option that specifies where the external lightmaps created using -lightmapsize are written to.

    Also, why did the ioq3 guys make it like that? How does it interfere with lightstyles? Note that DP isn't the first engine to use maps/mapname. Why can't ioq3 follow the standard set by that other engine (wasn't it ETQW?)?

    After having read the thread of the ioq3 guys, wouldn't it be the better solution to change q3map2 so lightstyles images get saved in a non-conflicting space, and keep the place for lightmaps as is? That way it wouldn't break compatibility to other engines.

    One way to do this would be:

    Add to q3map2.h:

    #define EXTERNAL_LIGHTMAP_FOR_LIGHTSTYLE "style_%04d.tga"

    and in lightmaps_ydnar.c, change:

    /* generate stages for styled lightmaps */
    ...
    sprintf( lightmapName, "maps/%s/" EXTERNAL_LIGHTMAP, mapName, olm->extLightmapNum );

    to

    sprintf( lightmapName, "maps/%s/" EXTERNAL_LIGHTMAP_FOR_LIGHTSTYLE, mapName, olm->extLightmapNum );

    That should need no engine changes for lightstyle support, as the names of the lightstyle images come from the .shader file.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Wed Feb 25, 2009 2:38 pm

  • Anyway, I added a -lightmapdir option, to be used together with -lightmapsize. Like this:

    q3map2 foo.map -light ... -lightmapsize 1024 -lightmapdir foo/lightmaps

    you may have to create the directory first, didn't test that.

    Still, consider changing q3map2 and possibly ioq3 to NOT need this.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Thu Feb 26, 2009 4:30 am

  • The patch was not written by an ioq3 dev. But rather ported from XreaL by a fan. I figured its use would take off pretty quickly if it worked flawlessly(which is seems to do). Anyway, you are right about lightstyles needing a different name.

    The issue with lightstyles is that they would be written with the same names as regular exported lightmaps, so any map with them would cause the loader to load the lightstyle lightmaps as regular lightmaps and screw everything up.
    }MG{Odin
    User avatar
    Odin
    Advanced member
     
    Posts: 52
    Joined: Wed Mar 01, 2006 5:31 pm

Thu Feb 26, 2009 6:17 am

  • Actually, all this isn't a solution. Existing external lightmaps-supporting engines will for example misdetect existing maps with lightstyles as ones with external LMs.

    Using a different path for lightstyles would solve the problem - but only in the future. Someone at id simply didn't think about this...

    Does XreaL use the same path name convention (mapname/lightstyles/lm_0000.tga)? In that case, I could add the same support to DP.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Wed Mar 04, 2009 9:11 am

  • http://emptyset.endoftheinternet.org/~r ... nt-205.dmg

    First NetRadiant build for OS X (sorry, PPC only for now, universal isn't possible with fink libraries). I got the model loading crash finally sorted out.

    It is built on OS X 10.5, so it might not run on anything earlier.
    The only dependency should be X11 (is on the OS X DVD).

    Can anyone test it?

    Intel version (not well tested yet):
    http://www.icculus.org/netradiant/files ... xintel.zip
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Wed Mar 04, 2009 3:58 pm

  • divVerent wrote:First NetRadiant build for OS X (sorry, PPC only for now, universal isn't possible with fink libraries). I got the model loading crash finally sorted out.

    It is built on OS X 10.5, so it might not run on anything earlier.
    The only dependency should be X11 (is on the OS X DVD).

    Can anyone test it?


    Fantastic. Successfully tried the binary and did a new compile against the MacPorts tools and libraries, not Fink. The build runs fine, but only if the executable is manually launched from the from the command line– I assume a path to something in the (nonexistent) SW folder is now hard coded? Not a big deal.

    Unfortunately, having the MD3 model import working now has brought something else to light. At least for me, it turns out you can import MD3s and OBJs, but they are mostly invisible in Radiant. They compile properly into BSPs, show up in the entity list and can have adjustments made in the entities window, but they can't be seen, selected and thus moved or otherwise modified in the the 2D or 3D windows. :(

    I apologize for not catching it earlier, since I gave up on models after the initial import crash issue became apparent. I just now went back and tried an older build and it's probably always been there, even with OBJs.

    Regardless, great progress,
    Andy
    Image
    airscout
    Member
     
    Posts: 11
    Joined: Thu Jan 15, 2009 3:40 am

Wed Mar 04, 2009 7:17 pm

  • divVerent wrote:Actually, all this isn't a solution. Existing external lightmaps-supporting engines will for example misdetect existing maps with lightstyles as ones with external LMs.

    Using a different path for lightstyles would solve the problem - but only in the future. Someone at id simply didn't think about this...

    Does XreaL use the same path name convention (mapname/lightstyles/lm_0000.tga)? In that case, I could add the same support to DP.
    Yes, it uses the same paths. However, lightstyles are "not supported" as they are simply obsolete in XreaL.
    }MG{Odin
    User avatar
    Odin
    Advanced member
     
    Posts: 52
    Joined: Wed Mar 01, 2006 5:31 pm

Wed Mar 04, 2009 7:42 pm

  • So in XreaL, it is always mapname/lightmaps/lm_????.tga, and mapname is empty other than the lightmaps subdirectory?
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Wed Mar 04, 2009 7:44 pm

  • airscout wrote:Successfully tried the binary and did a new compile against the MacPorts tools and libraries, not Fink. The build runs fine, but only if the executable is manually launched from the from the command line– I assume a path to something in the (nonexistent) SW folder is now hard coded? Not a big deal.


    Yes. It is in the "install-dylibs.sh" script you'll have to change to use another source folder to get the libraries into the .app. What folder does MacPorts use? I might be able to support both in the same script.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Wed Mar 04, 2009 10:00 pm

  • divVerent wrote:
    airscout wrote:Successfully tried the binary and did a new compile against the MacPorts tools and libraries, not Fink. The build runs fine, but only if the executable is manually launched from the from the command line– I assume a path to something in the (nonexistent) SW folder is now hard coded? Not a big deal.


    Yes. It is in the "install-dylibs.sh" script you'll have to change to use another source folder to get the libraries into the .app. What folder does MacPorts use? I might be able to support both in the same script.


    The MacPorts path equivalent of sw/ is opt/local/
    Image
    airscout
    Member
     
    Posts: 11
    Joined: Thu Jan 15, 2009 3:40 am

Wed Mar 04, 2009 10:14 pm

  • Does it work if you change every occurrence of /sw to /opt/local in install-dylibs.sh, and then run make again?
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Thu Mar 05, 2009 7:19 pm

  • divVerent wrote:So in XreaL, it is always mapname/lightmaps/lm_????.tga, and mapname is empty other than the lightmaps subdirectory?
    No, it's mapname/lm_????.hdr(hdr lightmap) + mapname/lm_????.png(deluxemap).
    }MG{Odin
    User avatar
    Odin
    Advanced member
     
    Posts: 52
    Joined: Wed Mar 01, 2006 5:31 pm

Fri Mar 06, 2009 5:59 am

  • divVerent wrote:Does it work if you change every occurrence of /sw to /opt/local in install-dylibs.sh, and then run make again?

    Tried the path changes– worked mostly. Led to the discovery that MacPorts doesn't install gdk-pixbuf with gtk2. So, at least for the time being, that one path seems to need to be: /opt/local/lib/gdk-pixbuf/loaders/libpixbufloader-bmp.so

    However, I have a query in on a MP mailing list since at one point that wasn't the case and the loaders were in that same location in the path tree as with Fink. Otherwise the executable gets put together and launches properly but something is now out of whack with the application text. The complaint:

    Code: Select all
    3/5/09 9:53:36 PM [0x0-0x106106].NetRadiant (radiant.ppc:47821): Pango-WARNING **: failed to find shape engine, expect ugly output. engine-type='PangoRenderATSUI', script='latin'
    3/5/09 9:53:36 PM [0x0-0x106106].NetRadiant (radiant.ppc:47821): Pango-WARNING **: failed to find shape engine, expect ugly output. engine-type='PangoRenderATSUI', script='common'


    Ugly output indeed :), check it out:

    http://img135.imageshack.us/img135/1607/71134227.png
    Image
    airscout
    Member
     
    Posts: 11
    Joined: Thu Jan 15, 2009 3:40 am

Sat Mar 07, 2009 5:51 pm

  • I wrote:Led to the discovery that MacPorts doesn't install gdk-pixbuf with gtk2. So, at least for the time being, that one path seems to need to be: /opt/local/lib/gdk-pixbuf/loaders/libpixbufloader-bmp.so


    Hopefully you'll be able to just ignore my erroneous blathering above :shock:. Here's the lowdown regarding gdk-pixbuf loaders and MP from Dave Evans at MacPorts:

    "The gdk_pixbuf library is now included as part of gtk2 ... the loaders for the formats I mentioned in the last email are not loadable modules but are built into the gdk_pixbuf library directly. If the app is built against the current gtk2 port, libpixbufloader-bmp.so is unnecessary and will never be called by the program because the built in loader code will be used instead for loading a bmp."


    andy
    Image
    airscout
    Member
     
    Posts: 11
    Joined: Thu Jan 15, 2009 3:40 am

Sat Mar 07, 2009 7:02 pm

  • In that case, you probably should remove the gdk pixbuf configuration file that comes with netradiant.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Sun Mar 15, 2009 1:57 am

  • Is it Windows Vista Ultimate Ready?

    I tried several times and still no dice, Under Run "Administrator" Priveledges Also.
    Image
    User avatar
    NightRage
    Member
     
    Posts: 47
    Joined: Wed May 07, 2008 8:54 pm
    Location: Chicago, selling homemade MadDog 20/20

Fri Mar 20, 2009 2:18 am

  • Is it any way possible to create a distributed q3map2 for compilation on multiple machines at once? Kind of like how distcc works, it sends each client jobs to do and they send back the compiled results. Exept with q3map2 there's no architecture specific issues or header issues.

    Could be done like the thread code, send each thread a raytracing job(for -light) or other such job to complete, except in this case it's send each client machine.
    }MG{Odin
    User avatar
    Odin
    Advanced member
     
    Posts: 52
    Joined: Wed Mar 01, 2006 5:31 pm

Fri Mar 20, 2009 9:00 am

  • This would require a full rewrite of q3map2. Not even the threading is working right, there are cases where you get little splotches on the maps depending on the number of threads.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Sun Mar 22, 2009 2:36 am

  • -lightmapdir doesn't seem to work:
    Code: Select all
    --- StoreSurfaceLightmaps ---
    Subsampling...collapsing...sorting...allocating...storing...************ ERROR ************
    mkdir mymap/lightmaps: No such file or directory

    It's not creating the directory.
    }MG{Odin
    User avatar
    Odin
    Advanced member
     
    Posts: 52
    Joined: Wed Mar 01, 2006 5:31 pm

PreviousNext


Return to NetRadiant - General Discussion




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest