Debug Renderers

Modders Resources

This is used to help visualize 3D problems



This allows you to show basic 3D visuals on screen

Functions are:

  • Dot

  • Line

  • Circle

  • Arc

  • Triangle (filled)

  • Square (filled)

  • Text (renders at a 3D point)

  • Text2D (simple overlay label.  x,y are screen %, not world)

  • Play alert sounds

NOTE: If you reload mods (cet), you’ll need to load a save for the controller’s initialize event to fire (this has the function that converts world 3D points to screen 2D points)



There are two parts to this:

  • lua class

  • c# viewer app

The class just needs to be copied into your project.  Instantiate it and call the add functions.  Save when you’d like (each time save is called, the class resets itself so you can add more, save that, repeat)

The current add 3D functions are:

  • Dot

  • Line

  • Circle
  • Filled Square

If you have another primitive you’d like me to add, just let me know

There are also functions to add text (3D or 2D)

And a few alert sounds


The mod includes some code in hotkeys that demonstrate how to use the various methods


Version 4:

NOTE: interface change – added an extra param into function calls (single frame)

Added Arc

Added Text2D (x and y are percents of the screen – 0 to 1)

Added a few tones that can be played.  Useful if you want an audio cue when something you happens

Added option for single frame lifetime.  Useful for things you redraw each frame

Version 3:

Added the screen renderer

Version 2:

I don’t know if anything changed in the cet code, just figured I’d post the last copy that I was using (I doubt it, but didn’t bother doing a file compare)

The viewer has proven to be useful for my other stuff (unity), so I copied it into another solution that is my dumping ground for code/testers.  I know I’ve made a few fixes here and there.  Also unity is left handed coord, compared to cyberpunk and wpf being right handed, so there’s some extra logic to be able to handle that

(Published on: 2023-04-05 04:04:00)

Related Game Mods

Attached Files:

File Name Download Count Download Button
debug_renderers 0 Download
DebugRenderViewer src 0 Download
DebugRenderViewer 0 Download

Leave a Reply

Your email address will not be published. Required fields are marked *