Jump to content
The Dark Mod Forums

motorsep

Member
  • Posts

    884
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by motorsep

  1. Can decals have normal/spec maps ? (decals as in patches manually placed on the level) Thanks.
  2. Fixed it! http://pastebin.com/YzVvPuaY q3 bool doesn't get updated I think. Once I checked it very first time to be true, no matter what I do to it now, modelscale always get added (which isn't a bad thing since Doom 3 games ignore that spawnarg anyway)
  3. 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> >)
  4. Seems to be working fine, except modelscale spawnarg doesn't get updated. It's always "modelscale" "1"
  5. 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)
  6. 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!
  7. 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!
  8. 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?
  9. Thanks for clarifying this, OrbWeaver. GitHub is Gitarded! Good thing I never gotten around to host anything there.
  10. SJW? (sounds familiar, but not sure what that means ) Maybe they did. It makes no difference though :/
  11. Pretty odd - orbweaver's account no longer exists on Github. Any idea what's happening?
  12. What is number "2" for in that line ?
  13. 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.
  14. 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.
  15. BFG uses same materials and images as Doom 3.
  16. 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.
  17. 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.
  18. Yes, it's a fact. But can you tile second map, whether it's normal map or bump map ?
  19. I recall when making masks, it can be scaled. I wonder if addnormals have scaling parameters too (for the second map).
  20. 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.
  21. Do you know if it's possible to have 2 normal maps per surface (material) ? For example, I want to have a large rock with one normal map defining general shape details (non-tiling, fits the model) and second normal map defining smaller details, tiling over the surface. I recall there was something like adding normal maps or adding normal and heightmap in Doom 3, but I am not sure how (if possible at all) to make one texture just fit the model as if it was just a regular func_static with regular material, and have "detail" normal map being added to the original one, but having it tiling, as if it was like a wall textures. Thanks.
  22. Widget is a must, since scaling/rotation is done in place where model is kitbashed. We'll haven to look into the matrix stuff. Not everyone feels comfortable working with matrices :-) As for collisions, it's the engine's thing. Should be easy to fix. EDIT: I am guessing it would be nice to simply do this [1 0 0 0 1 0 0 0 1]*2.5 in the transformations spawnarg to scale up model uniformly, until scaling widget becomes a reality (or have an extra field for scale). DR would do rotations first, then scaling. This way it's easy to position the model, then scale it up/down, reposition it, adjust scale.
  23. You save scale in the spawn argument on the entity. For example, if you scaled you model 2.5 times larger, you would get "scale" "2.5" spawnarg set on the entity. Next time DR load the map, it parses the spawnarg and scales up your model in the view.
  24. Proper way is, like I said, to have "scale" spawn arg (vector) that scales model internally in the DR, without messing with the file itself. On the engine side "scale" will let engine know that the model needs to be rendered in scale, and collision model would be generated accordingly. Again, source ASE/LWO file will remain as-is. I guess what I am asking is for OrbWeaver to point me to the code where scale spawn arg can be introduced (reading/writing/updating) and where render model can be updated, based on the scale spawn argument. Also would be interested to know where in the code we would be able to enable scaling (Rotate and Scale UI) and where in the code rotation widget is handled (would be nice to add scaling widget).
×
×
  • Create New...