Jump to content
The Dark Mod Forums

motorsep

Member
  • Posts

    913
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by motorsep

  1. It doesn't help that the latest release version has some new bugs on certain systems, but like Melan said, it's complete and earlier versions are available for those who need them. It can also be extended by python scripts.

     

    The one thing I'd like to fix if ever I get my head round the DR code would be rotating prefabs that are made of several objects that start off on different rotations. They end up moving in crazy directions.

     

    It would be nice to make it run on Windows 10 properly (I saw something about DR messing up gamma).

     

    Yeah, it would be nice to fix the rotations (allow all selected objects to be rotated around its axis; or around median, or around last selected object).

     

    It would be also nice to allow grouping of func_statics and brushes using func_group! :) Or something internal to DR, like layers are implemented. Very useful for modular level design.

  2. Alright, tested. It no longer created "modelscale" spawn arg, and even if I add it manually, it doesn't update it. Immediately after I press Ok, I get the following error (model is being scaled though):

    Error while executing file: commands\scale.py: 
    Traceback (most recent call last):
      File "G:/games/DarkRadiant203pre5/scripts/commands\scale.py", line 79, in <module>
        execute()
      File "G:/games/DarkRadiant203pre5/scripts/commands\scale.py", line 75, in execute
        selectedEntity.setKeyValue('modelscale', scale)
    Boost.Python.ArgumentError: Python argument types in
        EntityNode.setKeyValue(EntityNode, str, float)
    did not match C++ signature:
        setKeyValue(class script::ScriptEntityNode {lvalue}, class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >, class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)
    
  3. Thanks! I'll test it after work.

     

    I did some tests on the subject of kitbashing and draw calls. If func_statics are inlined, there will be same number of draw calls as if there is only one func_static in the view. Unfortunately if entities are not inlined, there is no batching happens. That's another thing on our to-do list (or rather it needs to be investigated and determined whether it worth the effort to batch static models in the run time; it would definitely require running batching on a separate thread to maintain performance)

  4. Thanks again rich!

     

    I thought it's a bit more advanced (the API that is). Widget is the goal, but it'll take time for us to implement.

     

    If I hit Cancel without entering any value, I get the following error:

    Error while executing file: commands\scale.py: 
    Traceback (most recent call last):
      File "G:/games/DarkRadiant203pre5/scripts/commands\scale.py", line 74, in <module>
        execute()
      File "G:/games/DarkRadiant203pre5/scripts/commands\scale.py", line 59, in execute
        if scale > 0:
    UnboundLocalError: local variable 'scale' referenced before assignment
    

    Also, how to I turn on a checkbox by default? (so it's always on)

     

    Thanks beforehand!

  5. Thanks rich! Crazy awesome stuff!

     

    I tested it and I got a few suggestions/questions about workflow.

     

    When scale is set to 0, it should do nothing. Currently model disappears.

     

    Is it possible to keep dialog always visible and always on top ? It's too much of console > dialog > type scale > Enter. I am thinking either have dialog always up, or binding scaleModel cmd to a hot key (not sure if it's possible at all) or simply typing in the console (this is the quickest IMO) are optimal workflows.

     

    Also wondering if it's possible to add "scaleModel reset", which would reset transformation matrix to original state ("1 0 0 0 1 0 0 0 1" as I recall).

     

    Is it also possible to add "modelscale" "<scaleModel value>" spawnarg to the respective entity (or update it if the spawnarg already exists). "modelscale" spawnarg would be for Quake 3 compatibility, since DR can now be used for Quake 3 mapping.

     

    Thanks beforehand!

  6. Thanks for the tips.

     

    Now that I think about it more, I think the easiest would be making Python plugin where designer could type something like scale 1.5 in the console, and selected model would scale up. Basically Python script would get scale value, multiply matrix by it, and set updated spawnarg on the selected entity. Plus add scale spawnarg (for Quake 3).

     

    Can someone savvy in DR and Python create such plugin please?

  7. NPC's textures use addnormals, for example:

     

     

            bumpmap		addnormals( models/md5/chars/guards/citywatch/cityguard5_local, heightmap( models/md5/chars/guards/citywatch/cityguard_h, 2 ) )
    

     

     

     

    Question is whether you can scale the heightmap or the second normalmap. I suspect it's not possible.

     

    What is number "2" for in that line ?

  8. Here is an example made in Blender:

     

     

    Top node tree is normal map #1, that is baked from high poly. That one doesn't tile.

     

    Bottom node tree is normal map #2, aka "details" normal map. That one needs to tile.

     

    When I set mapping to 1, 1, 1 in the video, it shows what Doom 3 engine does by default. It stretches normal map #2 to fit UV space of the model. And the goal is to have it tiling, like I show further in the video.

  9. Tested - all numbers in the matrix have to be multiplied by the scale factor. Before or after rotations - doesn't matter. So for uniform scaling it's easy. For non-uniform scaling it doesn't work.

     

    Although no collisions on scaled models.

     

    Now we just need to figure out how to add either "scale" field to entity inspector and multiply matrix or enable scaling in Arbitrary Transforms window.

  10. Sorry, I didn't read your question carefully. Greyscale images weight less than normalmaps and the effect is essentially the same.

     

    It has nothing to do with weighting less. It's about tiling over the model vs stretching. I am gonna have to make an example since people get confused with this.

  11.  

    I've been told we shouldn't be using addnormals because if/when we get normalmap compression it won't be compatible.

     

    Doom 3 BFG uses compression for normal maps and works with addnormals. What it does it adds normal maps, and saves it into a new image, which gets compressed. All done automatically.

  12. Yes, except those have to occupy the same UV space.

     

    Imagine a model. Bake out normal map for it that represents major detail on the model. The image is 2048 x 2048. Then take a "detail" normal map, tileable, 512 x 512 size. If you do addnormals with those two, the first one will fit fine, but the second one will be stretch to fit UV space. I need for second one to be tiled over UV space and I should be able to set tiling parameters.

×
×
  • Create New...