Jump to content


Photo

DarkRadiant 2.2.0 pre-release testing


  • Please log in to reply
106 replies to this topic

#26 Dunedain19

Dunedain19

    Member

  • Member
  • PipPip
  • 211 posts

Posted 23 January 2017 - 03:10 PM

So I made a backup copy and then deleted all the layers. Deleting all the layers fixed the problem.

 

Should I still send over the original files for evaluation?


Edited by Dunedain19, 23 January 2017 - 03:10 PM.


#27 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 19031 posts

Posted 23 January 2017 - 03:13 PM

Only if you still have a  copy of the maps with the problematic layer..



#28 Dunedain19

Dunedain19

    Member

  • Member
  • PipPip
  • 211 posts

Posted 23 January 2017 - 03:52 PM

I do. I'll send it to you and greebo in PM



#29 greebo

greebo

    Heroic Coder

  • Root
  • 15987 posts

Posted 25 January 2017 - 12:49 PM

A new pre-release build (2.2.0pre2) is available in the first thread.

 

There's a new feature in there which needs some explanation: next to the QE/Translate/Rotate/Clip manipulator modes accessible in the toolbar on the left, there's a new button called "Model Scaler". It can be activated anytime, but it will only work when entities with models (static meshes, i.e. ASE or LWO models) are selected. Once activated, you can drag any of the corner points of that bounding box to resize the model. The changes will be written to disk the next time you save the map, when the resized model will be saved in ASE format to the models/map_specific/scaled/ folder.

 

Attached File  scaler1.jpg   117.71KB   1 downloads Attached File  scaler2.jpg   123.65KB   1 downloads

 

Notes about this:

- the model is fully functional, even in lighting mode, as the normals are scaled correctly using the inverse transpose matrix. You will still need to dmap for any changes to take effect, of course.

- the scaled folder is likely to collect some amounts of unused .ASE files when this feature is used excessively. I was thinking about a script to clean that up, but this is future talk.

- Vertex colours are preserved, at least that's what I coded in (haven't actually checked).

- the scaled ASE file is likely to be different than the original .ASE file as DarkRadiant is rearranging the model surfaces by shader during load.

 

A couple of other things have been added to this pre-release build as well, check the first post or the bugtracker for details.



#30 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 8179 posts

Posted 25 January 2017 - 01:05 PM

LIKE BUTTON PUNCHED!!! :) !
  • HMart and Aosys like this
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#31 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 19031 posts

Posted 25 January 2017 - 03:54 PM

Oh man this is bloody AWESOME Greebo!

 

@Taaaki, what was the reason that Admins don't have a like button....



#32 Xarg

Xarg

    Advanced Member

  • Member
  • PipPipPip
  • 1319 posts

Posted 26 January 2017 - 07:33 AM

To save the forum software the overhead of processing 53,000 likes everytime the developers announce something cool like this, I guess


  • HMart and nbohr1more like this

Intel Sandy Bridge i7 2600K @ 3.4ghz stock clocks
8gb Kingston 1600mhz CL8 XMP RAM stock frequency
Sapphire Radeon HD7870 2GB FLeX GHz Edition @ stock @ 1920x1080

 


#33 HMart

HMart

    Advanced Member

  • Member
  • PipPipPip
  • 568 posts

Posted 26 January 2017 - 06:00 PM

Fantastic job greebo!  This and grouping were fantastic additions to DarkRadiant, now there's few things we can't do with it compared to other editors! 

 

Can you explain the process you went to doing this? Would be really cool topic IMO. 



#34 greebo

greebo

    Heroic Coder

  • Root
  • 15987 posts

Posted 27 January 2017 - 02:33 AM

Glad I found something helpful.

 

Can you explain the process you went to doing this? Would be really cool topic IMO. 

 

What do you mean by process? The coding or what?



#35 HMart

HMart

    Advanced Member

  • Member
  • PipPipPip
  • 568 posts

Posted 27 January 2017 - 01:29 PM

Is just a request if you don't have time don't bother with it, i don't want to take you from other important tasks, Yes the coding but no need to go deep, is more why was it not implemented before and what did you do to make this happen and if some shortcuts were need, etc,  i'm learning coding and i just love to know how other coders do to solve problems, and model scaling was something that even id didn't implemented on their editor. 


Edited by HMart, 27 January 2017 - 01:34 PM.


#36 greebo

greebo

    Heroic Coder

  • Root
  • 15987 posts

Posted 27 January 2017 - 01:59 PM

I think the idea has been there before, I believe the feature request to be able to scale models is something that has been mentioned a few times in the past. I don't remember exactly, but I was discussing DarkRadiant stuff with angua when she asked me whether this would be a possible approach (scaling stuff and saving the resized model as ASE). The years before I probably would have said that this is way too clumsy or I didn't want to mess with that parts of the code, but this time I thought why not have a go at it.

 

It required changing a few different areas in DR's codebase, I had to get the scaling itself right (the proof of concept for this was done pretty quickly, it's just matrix text book stuff), then I had to figure out how to write ASE files (which I knew was possible, especially since we already have a working Python exporter script) plus create a framework for exporting models, and lastly I had to figure out how the mouse-to-scene algorithms were working. That last thing was the hardest part for me. I haven't had my fingers in that area of the code (and it was pretty much undocumented, as all the legacy GtkRadiant stuff), and the calculations were somewhat obscure. I had to wrap my head around this, which took me a few days of research, discussions with angua, code reading and lots of pen and paper math. There's easy, standard stuff on the web, but there's virtually nothing to read about that specific case I needed to implement. Once I had that figured out, I could go ahead and refactor the selection code, such that I could add that new manipulator. Looking back at it, it just took a few hundred lines and it doesn't look hard anymore, but I guess that's what experience is about.

 

Nevertheless, the feature still has to prove itself in actual mapping. Maybe it isn't practical or maybe it has bugs or is causing trouble in the engine, let's wait and see.



#37 HMart

HMart

    Advanced Member

  • Member
  • PipPipPip
  • 568 posts

Posted 27 January 2017 - 05:39 PM

Admins really need a like button...

 

Thank you for the explanation, that is how i'm trying to learn as well, looking at code and trying to decifer it, but being a autodidact is not easy, and yes i assume tool making specially game editors is not something you can easely find in game literature but i'm not certain, i personally never saw a "make your own level editor for dummies" in any book store :P .

Btw is funny that the way you made scaling, is more or less how i imagined it could be implemented, i even talked about it here, i'm not trying to say you robed my idea or something, just happy my reasoning was correct. :)

 

By your last sentence may i assume you still didn't worked on the engine side? I still didn't try it but does it still messes up the collision model and shadow model?

 

p.s - IMO shadow model could become obsolete if shadow mapping was implemented so no problem if it gets messed up.  


Edited by HMart, 27 January 2017 - 05:43 PM.


#38 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12091 posts

Posted 27 January 2017 - 06:56 PM

Upgraded.

 

Used the model scaler for the first time. WOW! Thank you!


  • Bikerdude and HMart like this

#39 greebo

greebo

    Heroic Coder

  • Root
  • 15987 posts

Posted 27 January 2017 - 11:03 PM

By your last sentence may i assume you still didn't worked on the engine side? I still didn't try it but does it still messes up the collision model and shadow model?

There's no need to change anything on the engine side, since each size goes into its own, freshly generated ASE file. There's no rotation matrix hack involved which is known to screw up collision and normals (for lighting).

Disk and memory consumption are bound to increase the more models are scaled all around the place, so it has to be used with that in mind.

#40 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 773 posts

Posted 28 January 2017 - 04:06 AM

I don't mean to sound ungrateful, but if a scaled mesh is saved as another mesh, that kind of contradicts its purpose (i.e. being loaded to memory once, but used multiple times, in many configurations).



#41 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 19031 posts

Posted 28 January 2017 - 04:30 AM

The ability scale a model comes in very usefull for re-purposing existing models



#42 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12091 posts

Posted 28 January 2017 - 11:03 AM

Is there a way to scale a model in only one direction at a time?

 

For example, I want to scale a fencing section to fit between two walls, but I don't want the fence to become taller or shorter.



#43 greebo

greebo

    Heroic Coder

  • Root
  • 15987 posts

Posted 28 January 2017 - 12:02 PM

Yes, hold down the SHIFT key during resize to lift the proportional restriction.



#44 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 19031 posts

Posted 28 January 2017 - 01:26 PM

Sweet



#45 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12091 posts

Posted 28 January 2017 - 02:01 PM

I just noticed that if I scale a model, and then copy and paste it, the pasted model reverts to its original size.



#46 greebo

greebo

    Heroic Coder

  • Root
  • 15987 posts

Posted 28 January 2017 - 02:08 PM

I just noticed that if I scale a model, and then copy and paste it, the pasted model reverts to its original size.

Yes, cloned models are reverting to their originals (unless the map has been saved already). Fixing that behaviour is not quite as easy as it may sound, that's why I skipped it for the moment being.



#47 greebo

greebo

    Heroic Coder

  • Root
  • 15987 posts

Posted 31 January 2017 - 02:15 PM

Next pre-release (pre3) build is up in the first post, with a couple of improvements over the previous one. The first post contains more details about what has changed.

 

I'd like to make this pre build the last one before the actual 2.2.0 release, so I'd appreciate it if people could confirm this version to be sane enough.



#48 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 19031 posts

Posted 31 January 2017 - 02:16 PM

Downloading..



#49 NightStalker

NightStalker

    Linux hero

  • Development Role
  • PipPip
  • 159 posts

Posted 31 January 2017 - 04:50 PM

Build from latest git fails under 32-bit Slackware 14.2, with wxWidgets 3.1.0:
Spoiler
AFAICT, that's the only build error.

#50 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12091 posts

Posted 31 January 2017 - 05:16 PM

Downloading now.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users