Jump to content


Photo

Newbie DarkRadiant Questions


8267 replies to this topic

#8251 demagogue

demagogue

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 5382 posts

Posted 24 July 2018 - 10:16 AM

Newbie here! Was just wondering how you merge different brushes into a single brush(?) or model or what it's called? I've tried using CSG Merge but all it says is "CSG Merge: Failed - result would not be convex." 

 

Brushes must be rectangular boxes, or anyway n-sided closed polygons (like cylinders or D&D Dice), where nothing is sticking out. That's what the "convex" part means. All the angles are "inward" (less than 180 deg measuring the inner side) and an angle "outwards" (more than 180 deg) is forbidden. So if there's any part of it that looks like an "L" shape, with some part sticking out, that's concave and it can't be a brush. You have to use two brushes for that, one for the | part and one for the _ part. Long story short, if you can merge two brushes, you can just make one brush the same size & shape as the merged one, so just make that.* 

 

It depends on why you want to do this, but one thing you might be thinking about is linking brushes together with the "group selection", then you can easily select them simultaneously and work with them as a group, or something like that. That may be what you're actually after.

 

*Edit: You can imagine cases where you really need brush merge to make a shape, like the 8 sided D&D dice. You can make two 5-sided pyramids/prisms (4 triangle sides & a square base), and then stick the bases together top-to-bottom and merge them to make the 8-sided dice shape. It's convex so still a valid brush, but you couldn't make it naturally as a single brush any other way (I think). That's an example of what it's really for, which is really a kind of special case.


Posted Image

#8252 Ataire

Ataire

    Newbie

  • Member
  • Pip
  • 4 posts

Posted 24 July 2018 - 10:22 AM

 

Brushes must be rectangular boxes, or anyway n-sided closed polygons (like cylinders or D&D Dice), where nothing is sticking out. That's what the "convex" part means. So if there's any part of it that looks like an "L" shape, with some part sticking out, that's concave and it can't be a brush. You have to use two brushes for that, one for the | part and one for the _ part. Long story short, if you can merge two brushes, you can just make one brush the same size & shape as the merged one, so just make that.

 

It depends on why you want to do this, but one thing you might be thinking about is linking brushes together with the "group selection", then you can easily select them simultaneously and work with them as a group, or something like that. That may be what you're actually after.

 

 

 

Ahh alright thanks! I was making a simple custom door. Nothing too bad just a rectangle with a couple rectangles attached to it.


Edited by Ataire, 24 July 2018 - 10:23 AM.


#8253 Ataire

Ataire

    Newbie

  • Member
  • Pip
  • 4 posts

Posted 24 July 2018 - 10:42 AM

Though messing with the CSG tool I don't think using it really helps me cause I still don't know how to use it @-@. I was thinking more of how I could merged brushes into a single entity or model that I could apply properties to. And grouping things don't really help cause I can't add them (unless there is a way?).



#8254 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1520 posts

Posted 24 July 2018 - 11:03 AM

If you want to create a door, just draw a brush, right-click on it and select "Create entity". There you can go to movers and find the door entity. If you want to attach stuff to the door (like handles), you can do this with the "link" spawnarg. You can find everything you need for that on the Doors Wiki page, but if oyu are just starting, I would recommend to start off with existing assets, as this is much easier to get into than creating your own ones. I would also recommend the A-Z tutorial. It is a bit dated at times, but it is a great start to get inot mapping. Or try to watch and follow Springheel's video tutorials in the New Mapper Workshop. They are also great to get a first grip on everything.



#8255 Ataire

Ataire

    Newbie

  • Member
  • Pip
  • 4 posts

Posted 24 July 2018 - 11:13 AM

If you want to create a door, just draw a brush, right-click on it and select "Create entity". There you can go to movers and find the door entity. If you want to attach stuff to the door (like handles), you can do this with the "link" spawnarg. You can find everything you need for that on the Doors Wiki page, but if oyu are just starting, I would recommend to start off with existing assets, as this is much easier to get into than creating your own ones. I would also recommend the A-Z tutorial. It is a bit dated at times, but it is a great start to get inot mapping. Or try to watch and follow Springheel's video tutorials in the New Mapper Workshop. They are also great to get a first grip on everything.

 

 

Ahh thanks ^^ no worries I've got the A-Z tutorial and the door guide open. The problem was just the Door wiki mentioned merging using CSG tool or the clipping tool (but never specified how to use them) right before how to add atdm:movers_door so I though you had to merge them first before you could add the movers. 



#8256 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5609 posts

Posted 24 July 2018 - 04:22 PM

Newbie here! Was just wondering how you merge different brushes into a single brush(?) or model or what it's called? I've tried using CSG Merge but all it says is "CSG Merge: Failed - result would not be convex." 

The warning expresses the issue here pretty clearly. idTech 4 relies on brushwork to be convex because the algorithms used requiere the data to be in that. In a convex set the straight line connecting two randomly choosen points inside is always inside the set. This is an important and powerful mathematical property that can be and is used to create more effective algorithms.

 

But as stated above the default way to achieve what you wanted to is a different one anyways. Merging brushes is something that one normally doesn't use all to often during mapping.

 

The clipper tool does the exact oppossite. It is intented to cut brushwork via a plane by either specifying two points of the plane which will then extent into the direction you are currently looking at in 2D view or by specifying three points of said plane, which allows you to cut a brush via a plane that isn't orthogonal to any of the three coordinate axes. The latter usage is often confusing for many mappers from what I've read here over the years, although it is hard to tell why. You have to test it on your own to see if you can handle it.


FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#8257 stumpy

stumpy

    Advanced Member

  • Member
  • PipPipPip
  • 1798 posts

Posted 26 July 2018 - 03:11 AM

I never use the csg tool it can cause very bad problems for the map, like creating lots of bad brushes. very thin slivers of brushes less than 2/1 doom 3 units thick, that don't render but are still in the map file.



#8258 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1330 posts

Posted 27 July 2018 - 03:15 AM

I'm back learning camera stuff, studying Grayman's tutorial. While he did stationary and moving cameras, and also stationary cameras following a moving target, I can't find a case where a moving camera follows stationary object. It seems like using target_null doesn't work, i.e. it sets the initial orientation, but the camera doesn't stick to it, as it moves along the spline.
 
I tried using Grayman's method of following the guard with stationary camera, i.e. using the target_setkeyval to update the camera to use target_null every frame, but I get an error at the line where the thread for camera update is used, the error says "unknown value update_cam1":

void cs_cam1()
{
    sys.println("Roll1 running"); // debug
    $player1.bind($mover1);
    $cam1.activate($player1);   // Switch view
    thread update_cam1();         // Call the function update_cam1() as a thread so it can run in parallel
    $mover1.time(15);              // How many seconds it will take to move along the spline
    $mover1.accelTime(1);        // How long it takes to accelerate
    $mover1.decelTime(1);        // How long it takes to slow down
    // $mover1.disableSplineAngles(); // Allow the camera to point in different directions as it follows the spline
    $mover1.startSpline($spline1); // Start the func_mover $mover1 moving
    sys.waitFor($mover1);          // Wait for $mover1 to finish its movement
    $player1.unbind();
    sys.killthread("aim_loop1");     // Kill the thread "aim_loop1"
    $cam1.activate($player1);   // Return control to the player
}

void update_cam1()
{
   sys.threadname("aim_loop1");         // Gives this thread the name "aim_loop1" so it can be killed later.
   while (1)
   {
      sys.trigger($target_setkeyval_1); // keep cam1 pointed at target_null_1
      sys.waitFrame();                  // wait a frame before continuing
   }
}


Edited by Judith, 27 July 2018 - 06:38 AM.


#8259 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12564 posts

Posted 27 July 2018 - 07:22 AM

Try moving the update_cam1() routine above the os_cam1() routine.


  • Judith likes this

#8260 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5609 posts

Posted 27 July 2018 - 01:45 PM

Yeah, you can only refer to variables and functions that are already defined. Or in other words: before you tell the code what to do with the hammer, you need to tell it what a hammer is ;)


  • Judith likes this
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#8261 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1330 posts

Posted 29 July 2018 - 01:55 AM

It works, thank you! Now I can make gifs or short clips showing models and materials.



#8262 JackFarmer

JackFarmer

    Member

  • Member
  • PipPip
  • 75 posts

Posted 02 August 2018 - 12:38 PM

Signs

 

 

I want to include some signs:

 

Signs_O_Times.jpg

 

How can I center the text?

 

 

Objectives

 

In the meantime, I have added three critical objects (steel xyz) for mission success. After completion of two objects in any order, the third cannot be finished. The console reports "Item xxx cannot be picked" (or something like that). What can I do to fix this?

 

 

Custom Sound

 

How can I add my own ambient sound files (stuff written and performed exclusively by myself) to the mission?

 

If I add my own files to the relevant pk4 files of the Mod, the entire folder is not recognized anymore. If I add a new folder to my mission map folder I cannot select the file via DR.

 

I want to replace the main menu music as well (although the original theme is great) with my own file. How can I do that?

 

 

Diving into water creates display errors

 

As always, you can't reproduce the problem when you want to show it:

 

If the player dives into water, sometimes the screen freezes, but shows a small window in the lower left corner where "the action" takes place. If one returns to the water surface, everything reverts to normal. How can I fix this?

 

 

Ambient Light does not work

 

After adding the relevant parameters to the info entities as per graymans suggestion (ambient light dynamic_000) everything worked well, but now, sometimes the ambient does not work.

 

For example:

 

Try #1: dmap and map xxx: ambient light off

Try #2: dmap and map xxx: ambient light on

 

Is there something I can do about this?

 

Many thanks for your help in advance,

JF


Edited by JackFarmer, 02 August 2018 - 12:40 PM.


#8263 ERH+

ERH+

    Advanced Member

  • Member
  • PipPipPip
  • 704 posts

Posted 02 August 2018 - 01:30 PM

Objectives: make all objectives from the start - it is tedious but can help.

 

sound: I assuming you have text file with your_sounds.sndshd extension

 

jf_ambient
{
  editor_displayFolder  jf_sounds

  minDistance  20
  maxDistance  24
  volume  20

  sound/ambient/jf_ambient1.ogg
}

 

in sound folder

 

ambient light: it by default adjusts its colour to visible lights, I don't remember well but maybe in info_location entity you have to change ambient_light_dynamic values.


S2wtMNl.gif


#8264 JackFarmer

JackFarmer

    Member

  • Member
  • PipPip
  • 75 posts

Posted 02 August 2018 - 01:54 PM

Objectives: make all objectives from the start - it is tedious but can help.

 

sound: I assuming you have text file with your_sounds.sndshd extension

 

jf_ambient
{
  editor_displayFolder  jf_sounds

  minDistance  20
  maxDistance  24
  volume  20

  sound/ambient/jf_ambient1.ogg
}

 

in sound folder

 

ambient light: it by default adjusts its colour to visible lights, I don't remember well but maybe in info_location entity you have to change ambient_light_dynamic values.

 

Hello ERH+,

 

Thanks for your prompt response.

 

What do you mean with "from the start"? I can only find "Satisfied at start". I have tried that, but it does not work.

 

---------------

 

"sound: I assuming you have text file with your_sounds.sndshd extension"

 

 

Errr..no, I do not have. What does that mean in detail?

 

Many thanks for your help,

JF



#8265 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1330 posts

Posted 02 August 2018 - 02:15 PM

It's the same as with textures and materials; textures don't work by themselves, you need material file with definitions to tell the engine how to make a surface out of them. Same with sounds.

 

If you want to replace anything there is in TDM, you need to mimic TDM folder structure and file names in your fm folder. You can see how paths look like either in editor or inside p4k packages. Or, you can unpack them all to have direct access to all assets and directories (remember to delete pk4s afterwards).


  • JackFarmer likes this

#8266 ERH+

ERH+

    Advanced Member

  • Member
  • PipPipPip
  • 704 posts

Posted 02 August 2018 - 02:34 PM

 

What do you mean with "from the start"? I can only find "Satisfied at start". I have tried that, but it does not work.

 

Do whole objectives list again.

Save map under new name, delete atdm:target_addobjectives, and start writing objectives from clear start.

You can open second darkradiant and look at previous build, and even edit/copy edit/paste selected elements between two open darkradiants (upper menu).


Edited by ERH+, 02 August 2018 - 02:37 PM.

  • JackFarmer likes this

S2wtMNl.gif


#8267 stumpy

stumpy

    Advanced Member

  • Member
  • PipPipPip
  • 1798 posts

Posted 02 August 2018 - 04:32 PM

to center text in a gui add

 

textalign 1

 

directly to the gui, I don't know how to do it in the editor

//            textalign 0 = left 1 = middle 2 = right

 

eg

windowDef Desktop
{
    rect 0, 0, 640, 480

    windowDef PigSignFour
    {
        rect 20, 40, 600, 440
        textalign 1
        textscale 2
        text "#str_21363"
        font "fonts/stone"
        forecolor 0.2, 0.2, 0.2, 1
        visible 1
    }
}


  • JackFarmer likes this

#8268 JackFarmer

JackFarmer

    Member

  • Member
  • PipPip
  • 75 posts

Posted 03 August 2018 - 10:10 AM

Hello Judith & ERH+,

 

That worked! For the first time I am able to include custom sounds to my map and the sounds are now also visible in DR. Thanks a lot for that! *greatpersonalvictory* :)

 

Stumpy, I will give your suggestion a try as well and will revert to you.





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users