Giter VIP home page Giter VIP logo

godot_bsp_importer's Introduction

godot_bsp_importer

An importer addon to import Quake BSP files. Vanilla Quake1 BSP and the the extended Quake 1 BSP2 formats are supported.

Simply put the addons/bsp_importer into your Godot project (include the addons directory), enable it in Project->Project Settings...->Plugins, and when you drag a Quake BSP file into your godot project directory, it will automatically convert it to a scene.

The materials assigned to the faces use the format "materials/{texture_name}_material.tres" by default, where texture_name is taken from the textures in the BSP file. You can change the behavior by clicking on the bsp file in godot, then going to the "Import" tab and change the "Material Path Pattern". You can also rename specific textures using the dictionary list below that.

Full guide on how to use the addon here: https://www.youtube.com/watch?v=RvCyg_lm_7w

A minor change since the video was made:

If you add a set_import_value() function, it should return true if the value was handled, otherwise it will call the default set() function.

For example, if you have something with speed and want to convert the units on import, you could do this:

@tool
@export var speed : float

func set_import_value(key : String, value : String) -> bool:
	if (key == "speed"):
		speed = value.to_float() / 32.0
		return true
	return false

Also, if any nodes have a post_import() function, this will be called after everything has been imported.

Note that any properties that need to be set via import need to have @export before them, and functions called by the import script need to have @tool set.

godot_bsp_importer's People

Contributors

jitspoe avatar yagich avatar syntaxxor avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.