Blender2Brush!

Tutorials and discussions about Mapping - Introduce your own ones!
Post Reply
User avatar
Gustavo6046
Inhuman
Posts: 877
Joined: Mon Jun 01, 2015 7:08 pm
Personal rank: Finite
Contact:

Blender2Brush!

Post by Gustavo6046 » Fri Aug 19, 2016 7:21 pm

B2B (Blender2Brush 1999) is an utility I just finished that works. Basically it converts the selected Blender mesh into a single UT99 brush.

To use the plugin in Blender, install, activate, press Space and type "Export Unreal" and locates "Export Unreal Brush to Clipboard (.t3d)" in between the operators, then you click it. PS: You can now set properties like scale (per Blender unit), solidity and CSG, and even a few of those Surface flags! The .t3d can be both exported and copied into your clipboard, or both, depending on the following settings:
Image

Install from the following file:

Code: Select all

bl_info = {
	"name": "Unreal Brush to Clipboard (.t3d)",
	"category": "Import-Export",
	"desctiption": "This is an exporter for Unreal Editor 2 (Unreal Engine 1).\n\nIt uses subprocess and Windows' clip command to paste the brush data\ninto the clipboard so it can be pasted directly into Unreal Editor.",
	"author": "Gustavo Ramos 'Gustavo6046' Rehermann"
}

import functools
import subprocess
import bpy

brush_template = """
Begin Map
Begin Actor Class=Brush Name=Brush0
	CsgOper=CSG_{}
	PolyFlags={}
	MainScale=(SheerAxis=SHEER_ZX)
	PostScale=(SheerAxis=SHEER_ZX)
	Level=LevelInfo'MyLevel.LevelInfo0'
	Tag=Brush
	Region=(Zone=LevelInfo'MyLevel.LevelInfo0',iLeaf=-1)
	bSelected=False
	Begin Brush Name=BlenderExportedBrush
		Begin PolyList
			{polygons}
		End PolyList
	End Brush
	Brush=Model'MyLevel.BlenderExportedBrush'
	Name=Brush1
End Actor
End Map
"""

polygon_template = """
			Begin Polygon Texture=BKGND Flags={flags}
				{vertices}
			End Polygon
"""

vertex_template = """
				Vertex {x},{y},{z}
"""

csg_kinds = {
	"add": "Add",
	"sub": "Subtract",
	"act": "Active",
}

solidity_kinds = {
	"solid": "0",
	"smsld": "20",
	"nonsd": "8",
}

flag_kinds = {
	"masked": "2",
	"modulated": "40", 
	"twosides": "100",
	"portal": "4000000",
	"translucent": "4",
	"mirror": "8000000",
	"unlit": "400000",
}

def get_flags(flags):
	return functools.reduce(lambda x, y: x | y, [int(flag_kinds[x], 16) for x in tuple(flags)])

def generate_brush(polygons, csg, flags, solidity):
	return brush_template.format(csg_kinds[csg], get_flags(flags) | int(solidity_kinds[solidity], 16), polygons="\n   ".join(polygons))

def generate_polygon(vertices, flags, solidity):
	return polygon_template.format(flags=get_flags(flags) | int(solidity_kinds[solidity], 16), vertices="\n ".join(vertices))

def generate_vertex(x, y, z):
	if x >= 0: x = "+" + str(x)
	if y >= 0: y = "+" + str(y)
	if z >= 0: z = "+" + str(z)
	
	return vertex_template.format(x=x, y=y, z=z)

def convert_mesh(object, scale=64, csg="add", solidity="solid", flags={"twosides"}):
	mesh = object.data
	
	vertices = [x.co for x in mesh.vertices]
	polygons = mesh.polygons
	
	result = ""
	
	polys = []
	
	for poly in polygons:
		polygon_vertices = []
		
		for vi in poly.vertices:
			polygon_vertices.append([x - y for x, y in zip(vertices[vi], vertices[0])])
			
		if csg == "sub":
			polygon_vertices.reverse()

		polys.append(generate_polygon([generate_vertex(*[x * scale for x in v]) for v in polygon_vertices], flags, solidity))
	
	return generate_brush(polys, csg, flags, solidity)

class ClipUnrealBrush(bpy.types.Operator):
	"""Blender to Unreal Brush to Clipboard (.t3d)"""
	bl_idname = "export.unreal_brush_clipboard"
	bl_label = "Export Unreal Brush to Clipboard (.t3d)"
	bl_options = {'REGISTER'}
	
	scale = bpy.props.FloatProperty(name="Scale", default=64, min=1, max=2048)
	
	filename = bpy.props.StringProperty(name="Filename", description="The file to save .t3d to.", default="", subtype='FILE_PATH')
	
	clipboard = bpy.props.BoolProperty(name="Clipboard", description="Whether should the data be copied in the clipboard.", default=True)
	export_file = bpy.props.BoolProperty(name="Save to File", description="Whether should the data be exported to a file.", default=False)
	
	csg = bpy.props.EnumProperty(name="CSG Type", items=(
		("add", "Additive", 			"This kind of brush will fill empty space previously subtracted in UnrealEd. The map's void is filled entirely with this for instance."),
		("sub", "Subtractive",  		"This kind of brush will attempt to add empty space where there isn't yet inside the brush's enclosing."),
		("act", "Red Builder Brush",	"This is the Red Builder Brush, which is useful in generating multiple brushes of it's kind, and of any CSG kind, including semisolid."),
	), description="The CSG of the brush exported to the clipboard.", default="add")
	
	solidity = bpy.props.EnumProperty(name="Solidity", items=(
		("solid",   "Solid",		"Solid brushes won't do BSP cuts in semisolids. All subtractive brushes are solid."),
		("smsld",   "Semisolid",	"Semisolid brushes won't do BSP cuts in solids, useful for avoiding BSP errors in solid brushes, but only available for Additive brushes."),
		("nonsd",   "Nonsolid", 	"Nonsolid brushes are a special kind of brush where instead of being a volume, the polygons determine each a different plane. Useful for complex zone separators, but cuts through both Solids and Semisolids as a plane. Some of the physics in Nonsolids are also present in non-manifold (in the sense of no volume) Solid and Semisolid polygons."),
	), description="The Solidity of the brush exported to the clipboard.", default="solid")
	
	flags = bpy.props.EnumProperty(name="Polygonal Flags", items=(
		("masked",  	"Masked",   		"Every pixel containing as color the 1st index of the bitmap's pallete will be transparent in the polygons."),
		("modulated",   "Modulated",		"A special kind of transparency. For more see: https://wiki.beyondunreal.com/Legacy:Color_Blending#Color_Blending_Modes"),
		("twosides",	"Two-Sided",		"Every polygon has two sides, no matter the normal. Useful for when you are unsure as for the polygons' normals or non-manifoldness."),
		("portal",  	"Zone Portal",  	"Used to separate multiple zones, e.g. a plane to separate a water's submerged zone from the outdoors lake area and the indoors factory. But this is probably my creative imagination. :3"),
		("translucent", "Transparent",  	"The polygons are translucent (i.e. semi-transparent; not the exact notation used in Blender)."),
		("mirror",  	"Mirror Surfaces",  "Like the Glossy material in Cycles, reflects in real-time."),
		("unlit",   	"Unlit",			"The surfaces are always full-bright,no matter the light sources around in UnrealEd."),
	), options={'ANIMATABLE', 'ENUM_FLAG'}, description="The flags of every polygon exported into the clipboard.")
	
	def execute(self, context):
		print(self.csg)
		print(str(self.csg))
		result = convert_mesh(context.object, self.scale, str(self.csg), str(self.solidity), set(self.flags))
		
		res = result.splitlines()
		result = ""

		for l in res:
			if l.replace(" ", "").replace(" ", "") != "":
				result += "\n" + l
				
		result = result[1:]
		
		if self.clipboard:
			p = subprocess.Popen(["clip"], stdin=subprocess.PIPE)

			p.communicate(input=result.encode("utf-8"))
		
		if self.export_file:
			file = open(self.filename, "w")
			
			file.write(result)
			
			del file
		
		return {'FINISHED'}
	
	def invoke(self, context, event):
		wm = context.window_manager
		return wm.invoke_props_dialog(self)
		
def register():
	bpy.utils.register_class(ClipUnrealBrush)


def unregister():
	bpy.utils.unregister_class(ClipUnrealBrush)

if __name__ == "__main__":
	register()
This is a snake exported from Blender and made into DM-Snakewallowed:
Image

The following is the original thread (originally a asking-for-help thread):
Spoiler
Show
Warning: Crosspost from Blender SE!

Well, I tried to export a model to UnrealEd 2 (the one from 1999), but when I did, pow, the faces went on super buggy in Editor, some missing, others with bugged normals (or textures or whatever) and some simply with colored salt added up to it! I tried to check the normals but I have no idea on how to do this conversion. They are all correct on Blender though.

Image

So if you have experience with Blender as well, could you help? :)
(Higor, you are good with modelling of any kind, I'm sure you can! :tu: )

Oh, and before I forget, script I use to export to clipboard:

Code: Select all

    import operator
    import functools
    import bpy
    import subprocess
    
    scale = 64
    
    brush_template = """
    Begin Map
    Begin Actor Class=Brush Name=Brush0
    	CsgOper=CSG_Add
    	MainScale=(SheerAxis=SHEER_ZX)
    	PostScale=(SheerAxis=SHEER_ZX)
    	Level=LevelInfo'MyLevel.LevelInfo0'
    	Tag=Brush
    	Region=(Zone=LevelInfo'MyLevel.LevelInfo0',iLeaf=-1)
    	bSelected=False
    	Begin Brush Name=BlenderExportedBrush
    		Begin PolyList
    			{polygons}
    		End PolyList
    	End Brush
    	Brush=Model'MyLevel.BlenderExportedBrush'
    	Name=Brush1
    End Actor
    End Map
    """
    
    polygon_template = """
    			Begin Polygon
    				Origin   {origin}
    				Normal   {normal}
    				TextureU +00000.000000,+00001.000000,+00000.000000
    				TextureV +00000.000000,+00000.000000,-00001.000000
    				{vertices}
    			End Polygon
    """
    
    vertex_template = """
    				Vertex {x},{y},{z}
    """
    
    def flog(string):
    	open("c:\\tmp\\ub.log", "a").write(string + "\n")
    
    def generate_brush(polygons):
    	return brush_template.format(polygons="\n	".join(polygons))
    
    def generate_polygon(vertices, normal, origin):
    	normal = [int(x) for x in normal]
    	origin = [int(x) for x in origin]
    	
    	nm = normal
    	onm = nm
    	nm[1] = nm[2]
    	nm[2] = str(-int(onm[1]))
    	
    	og = origin
    	oog = og
    	og[1] = og[2]
    	og[2] = str(-int(oog[1]))
    	
    	nm = [-int(y) for y in nm]
    	
    	if nm[0] > 0: nm[0] = "+" + str(nm[0])
    	if nm[1] > 0: nm[1] = "+" + str(nm[1])
    	if nm[2] > 0: nm[2] = "+" + str(nm[2])
    	
    	og = [-int(y) for y in og]
    	
    	if og[0] > 0: og[0] = "+" + str(og[0])
    	if og[1] > 0: og[1] = "+" + str(og[1])
    	if og[2] > 0: og[2] = "+" + str(og[2])
    	  
    	flog(str(nm))
    	return polygon_template.format(vertices="\n	".join(vertices), normal=",".join([str(x) for x in nm]), origin=",".join([str(y) for y in og]))
    
    def generate_vertex(x, y, z):
    	if x >= 0: x = "+" + str(x)
    	if y >= 0: y = "+" + str(y)
    	if z >= 0: z = "+" + str(z)
    	
    	return vertex_template.format(x=x, y=y, z=z)
    
    def convert_mesh(object=bpy.context.object):
    	mesh = object.data
    	
    	vertices = [x.co for x in mesh.vertices]
    	polygons = mesh.polygons
    	
    	result = ""
    	
    	polys = []
    	
    	for poly in polygons:
    		median = [functools.reduce(operator.add, x) for x in [vertices[i] for i in poly.vertices]]
    		polygon_vertices = []
    		
    		for vi in poly.vertices:
    			polygon_vertices.append(vertices[vi])
    
    		polys.append(generate_polygon([generate_vertex(*[x * scale for x in v]) for v in polygon_vertices], poly.normal, (0, 0, 0)))
    	
    	return generate_brush(polys)
    	
    result = convert_mesh()
    	
    p = subprocess.Popen(["clip"], stdin=subprocess.PIPE)
    
    res = result.splitlines()
    result = ""
    
    for l in res:
    	if l.replace(" ", "").replace("	", "") != "":
    		result += "\n" + l
    		
    result = result[1:]
    
    p.communicate(input=result.encode("utf-8"))
Clipboard result of the mushroom:

Code: Select all

    Begin Map
    Begin Actor Class=Brush Name=Brush0
    	CsgOper=CSG_Add
    	MainScale=(SheerAxis=SHEER_ZX)
    	PostScale=(SheerAxis=SHEER_ZX)
    	Level=LevelInfo'MyLevel.LevelInfo0'
    	Tag=Brush
    	Region=(Zone=LevelInfo'MyLevel.LevelInfo0',iLeaf=-1)
    	bSelected=False
    	Begin Brush Name=BlenderExportedBrush
    		Begin PolyList
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.9723204970359802,-0.08801952749490738,-0.08801952749490738
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex -118.52799987792969,-128.0,+82.3888168334961
    	Vertex -139.83999633789062,+0.0,+75.91569519042969
    	Vertex -128.0,+0.0,-127.72618103027344
    	Vertex -96.42666625976562,-112.21333312988281,-127.72618103027344
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   +0.05548539012670517,-0.09262502938508987,-0.09262502938508987
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex -118.52799987792969,+128.0,+82.3888168334961
    	Vertex +120.1066665649414,+120.1066665649414,+86.70423126220703
    	Vertex +96.42666625976562,+96.42666625976562,-127.72618103027344
    	Vertex -96.42666625976562,+112.21333312988281,-127.72618103027344
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   +0.99395751953125,-0.10976480692625046,-0.10976480692625046
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex +120.1066665649414,+120.1066665649414,+86.70423126220703
    	Vertex +120.1066665649414,-120.1066665649414,+86.70423126220703
    	Vertex +96.42666625976562,-96.42666625976562,-127.72618103027344
    	Vertex +96.42666625976562,+96.42666625976562,-127.72618103027344
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   +0.05548539012670517,-0.09262502938508987,-0.09262502938508987
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex +120.1066665649414,-120.1066665649414,+86.70423126220703
    	Vertex -118.52799987792969,-128.0,+82.3888168334961
    	Vertex -96.42666625976562,-112.21333312988281,-127.72618103027344
    	Vertex +96.42666625976562,-96.42666625976562,-127.72618103027344
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -4.461240266095956e-08,-1.0,-1.0
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex -96.42666625976562,-112.21333312988281,-127.72618103027344
    	Vertex -128.0,+0.0,-127.72618103027344
    	Vertex -96.42666625976562,+112.21333312988281,-127.72618103027344
    	Vertex +96.42666625976562,+96.42666625976562,-127.72618103027344
    	Vertex +96.42666625976562,-96.42666625976562,-127.72618103027344
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.030650785192847252,+0.9995301961898804,+0.9995301961898804
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex +120.1066665649414,-120.1066665649414,+86.70423126220703
    	Vertex +120.1066665649414,+120.1066665649414,+86.70423126220703
    	Vertex -118.52799987792969,+128.0,+82.3888168334961
    	Vertex -139.83999633789062,+0.0,+75.91569519042969
    	Vertex -118.52799987792969,-128.0,+82.3888168334961
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.03878017142415047,-0.9099699258804321,-0.9099699258804321
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex -118.52799987792969,+128.0,+82.3888168334961
    	Vertex -94.8479995727539,+227.58399963378906,+144.62783813476562
    	Vertex +96.42666625976562,+240.2133331298828,+124.13972473144531
    	Vertex +120.1066665649414,+120.1066665649414,+86.70423126220703
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.05260470137000084,-0.8988032937049866,-0.8988032937049866
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex +120.1066665649414,-120.1066665649414,+86.70423126220703
    	Vertex +96.42666625976562,-240.2133331298828,+124.13972473144531
    	Vertex -110.23999786376953,-220.47999572753906,+148.7847900390625
    	Vertex -118.52799987792969,-128.0,+82.3888168334961
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.7732755541801453,+0.5755140781402588,+0.5755140781402588
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex +120.1066665649414,-120.1066665649414,+86.70423126220703
    	Vertex +96.42666625976562,-240.2133331298828,+124.13972473144531
    	Vertex +133.9199981689453,-220.47999572753906,+151.67999267578125
    	Vertex +139.83999633789062,-116.16000366210938,+125.10479736328125
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.8505507707595825,+0.4358569085597992,+0.4358569085597992
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex +96.42666625976562,+240.2133331298828,+124.13972473144531
    	Vertex +120.1066665649414,+120.1066665649414,+86.70423126220703
    	Vertex +139.83999633789062,+116.16000366210938,+125.10479736328125
    	Vertex +113.79199981689453,+227.58399963378906,+146.94400024414062
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.8894340991973877,+0.4570634961128235,+0.4570634961128235
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex +120.1066665649414,+120.1066665649414,+86.70423126220703
    	Vertex +120.1066665649414,-120.1066665649414,+86.70423126220703
    	Vertex +139.83999633789062,-116.16000366210938,+125.10479736328125
    	Vertex +139.83999633789062,+116.16000366210938,+125.10479736328125
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.24201105535030365,+0.970273494720459,+0.970273494720459
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex +139.83999633789062,+116.16000366210938,+125.10479736328125
    	Vertex +139.83999633789062,-116.16000366210938,+125.10479736328125
    	Vertex +218.11199951171875,-113.79199981689453,+144.62783813476562
    	Vertex +218.11199951171875,+113.79199981689453,+144.62783813476562
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.5814716815948486,-0.8076440691947937,-0.8076440691947937
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex -118.52799987792969,-128.0,+82.3888168334961
    	Vertex -220.47999572753906,-122.08000183105469,+148.7847900390625
    	Vertex -232.32000732421875,+0.0,+148.7847900390625
    	Vertex -139.83999633789062,+0.0,+75.91569519042969
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.24174341559410095,+0.9399987459182739,+0.9399987459182739
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex +139.83999633789062,+116.16000366210938,+125.10479736328125
    	Vertex +218.11199951171875,+113.79199981689453,+144.62783813476562
    	Vertex +113.79199981689453,+227.58399963378906,+146.94400024414062
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.24135722219944,+0.9370373487472534,+0.9370373487472534
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex +139.83999633789062,-116.16000366210938,+125.10479736328125
    	Vertex +133.9199981689453,-220.47999572753906,+151.67999267578125
    	Vertex +218.11199951171875,-113.79199981689453,+144.62783813476562
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.4813399910926819,-0.6910233497619629,-0.6910233497619629
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex -118.52799987792969,-128.0,+82.3888168334961
    	Vertex -110.23999786376953,-220.47999572753906,+148.7847900390625
    	Vertex -220.47999572753906,-122.08000183105469,+148.7847900390625
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.47979408502578735,-0.688207745552063,-0.688207745552063
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex -118.52799987792969,+128.0,+82.3888168334961
    	Vertex -220.47999572753906,+122.08000183105469,+148.7847900390625
    	Vertex -94.8479995727539,+227.58399963378906,+144.62783813476562
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.6040775179862976,+0.42923009395599365,+0.42923009395599365
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex -110.23999786376953,-220.47999572753906,+148.7847900390625
    	Vertex -60.82833480834961,-127.57667541503906,+364.8721618652344
    	Vertex -127.57667541503906,-66.74833679199219,+364.8721618652344
    	Vertex -220.47999572753906,-122.08000183105469,+148.7847900390625
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   +0.6577453017234802,+0.43105629086494446,+0.43105629086494446
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex +113.79199981689453,+227.58399963378906,+146.94400024414062
    	Vertex +60.82833480834961,+127.57667541503906,+364.8721618652344
    	Vertex +127.57667541503906,+60.82833480834961,+364.8721618652344
    	Vertex +218.11199951171875,+113.79199981689453,+144.62783813476562
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.5890870094299316,+0.41763779520988464,+0.41763779520988464
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex -220.47999572753906,+122.08000183105469,+148.7847900390625
    	Vertex -127.57667541503906,+66.74833679199219,+364.8721618652344
    	Vertex -60.82833480834961,+127.57667541503906,+364.8721618652344
    	Vertex -94.8479995727539,+227.58399963378906,+144.62783813476562
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   +0.682200014591217,+0.4511701166629791,+0.4511701166629791
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex +218.11199951171875,-113.79199981689453,+144.62783813476562
    	Vertex +127.57667541503906,-60.82833480834961,+364.8721618652344
    	Vertex +60.82833480834961,-127.57667541503906,+364.8721618652344
    	Vertex +133.9199981689453,-220.47999572753906,+151.67999267578125
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   +0.9249049425125122,+0.38019853830337524,+0.38019853830337524
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex +218.11199951171875,-113.79199981689453,+144.62783813476562
    	Vertex +218.11199951171875,+113.79199981689453,+144.62783813476562
    	Vertex +127.57667541503906,+60.82833480834961,+364.8721618652344
    	Vertex +127.57667541503906,-60.82833480834961,+364.8721618652344
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.0034842712339013815,+0.41460251808166504,+0.41460251808166504
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex +96.42666625976562,-240.2133331298828,+124.13972473144531
    	Vertex +133.9199981689453,-220.47999572753906,+151.67999267578125
    	Vertex +60.82833480834961,-127.57667541503906,+364.8721618652344
    	Vertex -60.82833480834961,-127.57667541503906,+364.8721618652344
    	Vertex -110.23999786376953,-220.47999572753906,+148.7847900390625
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.9066645503044128,+0.41314348578453064,+0.41314348578453064
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex -220.47999572753906,+122.08000183105469,+148.7847900390625
    	Vertex -232.32000732421875,+0.0,+148.7847900390625
    	Vertex -133.49667358398438,+0.0,+364.8721618652344
    	Vertex -127.57667541503906,+66.74833679199219,+364.8721618652344
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.002911187708377838,+0.41515102982521057,+0.41515102982521057
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex +60.82833480834961,+127.57667541503906,+364.8721618652344
    	Vertex +113.79199981689453,+227.58399963378906,+146.94400024414062
    	Vertex -94.8479995727539,+227.58399963378906,+144.62783813476562
    	Vertex -60.82833480834961,+127.57667541503906,+364.8721618652344
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   +0.0,+0.7132090330123901,+0.7132090330123901
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex +60.82833480834961,-127.57667541503906,+364.8721618652344
    	Vertex +30.276165008544922,-64.2167739868164,+427.14312744140625
    	Vertex -30.276165008544922,-64.2167739868164,+427.14312744140625
    	Vertex -60.82833480834961,-127.57667541503906,+364.8721618652344
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -1.3525801989544561e-07,+1.0,+1.0
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex +30.276165008544922,+64.2167739868164,+427.14312744140625
    	Vertex -30.276165008544922,+64.2167739868164,+427.14312744140625
    	Vertex -64.2167739868164,+33.94061279296875,+427.14312744140625
    	Vertex -67.8812255859375,+0.0,+427.14312744140625
    	Vertex -64.21678161621094,-33.94061279296875,+427.14312744140625
    	Vertex -30.276165008544922,-64.2167739868164,+427.14312744140625
    	Vertex +30.276165008544922,-64.2167739868164,+427.14312744140625
    	Vertex +64.2167739868164,-30.276165008544922,+427.14312744140625
    	Vertex +64.2167739868164,+30.276165008544922,+427.14312744140625
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.4561781585216522,+0.733290433883667,+0.733290433883667
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex -60.82833480834961,-127.57667541503906,+364.8721618652344
    	Vertex -30.276165008544922,-64.2167739868164,+427.14312744140625
    	Vertex -64.21678161621094,-33.94061279296875,+427.14312744140625
    	Vertex -127.57667541503906,-66.74833679199219,+364.8721618652344
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   +0.48368340730667114,+0.7294524312019348,+0.7294524312019348
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex +60.82833480834961,+127.57667541503906,+364.8721618652344
    	Vertex +30.276165008544922,+64.2167739868164,+427.14312744140625
    	Vertex +64.2167739868164,+30.276165008544922,+427.14312744140625
    	Vertex +127.57667541503906,+60.82833480834961,+364.8721618652344
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.684532105922699,+0.7260647416114807,+0.7260647416114807
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex -127.57667541503906,-66.74833679199219,+364.8721618652344
    	Vertex -64.21678161621094,-33.94061279296875,+427.14312744140625
    	Vertex -67.8812255859375,+0.0,+427.14312744140625
    	Vertex -133.49667358398438,+0.0,+364.8721618652344
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.4561781585216522,+0.733290433883667,+0.733290433883667
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex -127.57667541503906,+66.74833679199219,+364.8721618652344
    	Vertex -64.2167739868164,+33.94061279296875,+427.14312744140625
    	Vertex -30.276165008544922,+64.2167739868164,+427.14312744140625
    	Vertex -60.82833480834961,+127.57667541503906,+364.8721618652344
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   +0.7009514570236206,+0.7132090330123901,+0.7132090330123901
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex +127.57667541503906,+60.82833480834961,+364.8721618652344
    	Vertex +64.2167739868164,+30.276165008544922,+427.14312744140625
    	Vertex +64.2167739868164,-30.276165008544922,+427.14312744140625
    	Vertex +127.57667541503906,-60.82833480834961,+364.8721618652344
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   +0.48368340730667114,+0.7294524312019348,+0.7294524312019348
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex +127.57667541503906,-60.82833480834961,+364.8721618652344
    	Vertex +64.2167739868164,-30.276165008544922,+427.14312744140625
    	Vertex +30.276165008544922,-64.2167739868164,+427.14312744140625
    	Vertex +60.82833480834961,-127.57667541503906,+364.8721618652344
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   +0.0,+0.7132090330123901,+0.7132090330123901
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex -60.82833480834961,+127.57667541503906,+364.8721618652344
    	Vertex -30.276165008544922,+64.2167739868164,+427.14312744140625
    	Vertex +30.276165008544922,+64.2167739868164,+427.14312744140625
    	Vertex +60.82833480834961,+127.57667541503906,+364.8721618652344
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   +0.5088033676147461,-0.8608828186988831,-0.8608828186988831
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex +120.1066665649414,+120.1066665649414,+86.70423126220703
    	Vertex +218.11199951171875,+113.79199981689453,+144.62783813476562
    	Vertex +218.11199951171875,-113.79199981689453,+144.62783813476562
    	Vertex +120.1066665649414,-120.1066665649414,+86.70423126220703
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   +0.5424513220787048,-0.7373111844062805,-0.7373111844062805
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex +133.9199981689453,-220.47999572753906,+151.67999267578125
    	Vertex +96.42666625976562,-240.2133331298828,+124.13972473144531
    	Vertex +120.1066665649414,-120.1066665649414,+86.70423126220703
    	Vertex +218.11199951171875,-113.79199981689453,+144.62783813476562
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   +0.5641618967056274,-0.7056682109832764,-0.7056682109832764
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex +218.11199951171875,+113.79199981689453,+144.62783813476562
    	Vertex +120.1066665649414,+120.1066665649414,+86.70423126220703
    	Vertex +96.42666625976562,+240.2133331298828,+124.13972473144531
    	Vertex +113.79199981689453,+227.58399963378906,+146.94400024414062
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.5814716815948486,-0.8076440691947937,-0.8076440691947937
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex -232.32000732421875,+0.0,+148.7847900390625
    	Vertex -220.47999572753906,+122.08000183105469,+148.7847900390625
    	Vertex -118.52799987792969,+128.0,+82.3888168334961
    	Vertex -139.83999633789062,+0.0,+75.91569519042969
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.684532105922699,+0.7260647416114807,+0.7260647416114807
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex -67.8812255859375,+0.0,+427.14312744140625
    	Vertex -64.2167739868164,+33.94061279296875,+427.14312744140625
    	Vertex -127.57667541503906,+66.74833679199219,+364.8721618652344
    	Vertex -133.49667358398438,+0.0,+364.8721618652344
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.9066645503044128,+0.41314348578453064,+0.41314348578453064
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex -232.32000732421875,+0.0,+148.7847900390625
    	Vertex -220.47999572753906,-122.08000183105469,+148.7847900390625
    	Vertex -127.57667541503906,-66.74833679199219,+364.8721618652344
    	Vertex -133.49667358398438,+0.0,+364.8721618652344
    End Polygon
    Begin Polygon
    	Origin   +0,+0,+0
    	Normal   -0.9723204970359802,-0.08801952749490738,-0.08801952749490738
    	TextureU +00000.000000,+00001.000000,+00000.000000
    	TextureV +00000.000000,+00000.000000,-00001.000000
    	Vertex -128.0,+0.0,-127.72618103027344
    	Vertex -139.83999633789062,+0.0,+75.91569519042969
    	Vertex -118.52799987792969,+128.0,+82.3888168334961
    	Vertex -96.42666625976562,+112.21333312988281,-127.72618103027344
    End Polygon
    		End PolyList
    	End Brush
    	Brush=Model'MyLevel.BlenderExportedBrush'
    	Name=Brush1
    End Actor
    End Map
And here is the mushroom's model in Blender.

I'd also like to point out that some faces displays buggily. For example:

Image

And, for the blend file of a spike I tried as well:

Image

It's result as seen (with and without lightning; that buggy face won't work with lightning, which makes me think the problem can be with normals. Can someone please point me out to it?):
Image
Image
Last edited by Gustavo6046 on Sat Aug 20, 2016 5:48 pm, edited 4 times in total.

User avatar
Barbie
Godlike
Posts: 1839
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Blender2Brush not working right now

Post by Barbie » Fri Aug 19, 2016 10:24 pm

I run into that problem of too much stretched textures also a few times, AFAIR on crooked textures pressing button "Align to..." What was your solution to repair it?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

User avatar
Gustavo6046
Inhuman
Posts: 877
Joined: Mon Jun 01, 2015 7:08 pm
Personal rank: Finite
Contact:

Re: Blender2Brush not working right now

Post by Gustavo6046 » Sat Aug 20, 2016 12:14 am

Barbie wrote:I run into that problem of too much stretched textures also a few times, AFAIR on crooked textures pressing button "Align to..." What was your solution to repair it?
Basically let the Editor set the origin of the brush to the first vertex (as default) and setting all other vertex coordinates relative.

Anyways, it seems some of those exported "brushes" keep having a problem as for displaying even when movers!

This is what is meant to be displayed:
Image
Accomplished of course with Mover-> Show Polys.

But, almost none of those polygons ever show ingame!

Not only this, but also the bottom mover should not encroach the player when moving up to chew it.

But that's probably topic for another topic. :mrgreen:

User avatar
Gustavo6046
Inhuman
Posts: 877
Joined: Mon Jun 01, 2015 7:08 pm
Personal rank: Finite
Contact:

Re: Blender2Brush!

Post by Gustavo6046 » Fri Aug 26, 2016 12:06 am

Uh, so none's gonna use it? Hmph. Okay... I though you would use it, but I'm okay... I guess.....

Anyways, I'm gonna use it myself to do those decorative details you see in AS-RoadTunnel et al :)

EDIT: Ugh, as always, a bit of dramatic salt. I don't know what to do at this point O_o

Higor
Godlike
Posts: 1792
Joined: Sun Mar 04, 2012 6:47 pm

Re: Blender2Brush!

Post by Higor » Fri Aug 26, 2016 4:46 pm

My Blender is completely setup for editing PES 2016 faces lmao. I have some experience with sculptris though... speaking of which.
I wonder if I can hook unreal editor to import models of other formats, even into meshes.

I'm certaily gonna do that whenever I decide to start revamping the render interface.
ImageImage
Image unreal://23.111.157.138:7777
Image unreal://46.228.199.205:7788

User avatar
Gustavo6046
Inhuman
Posts: 877
Joined: Mon Jun 01, 2015 7:08 pm
Personal rank: Finite
Contact:

Re: Blender2Brush!

Post by Gustavo6046 » Fri Aug 26, 2016 5:51 pm

Higor wrote:My Blender is completely setup for editing PES 2016 faces
Here in Brazil, one of the most popular games for PlayStation 2 is probably (undoubtedly) the Bomba Patch (literally translating "Bomb Patch"), which is some sort of patch to Pro Evolution Soccer (everyone calls it by it's abbreviation here lol), and PES here is a mythic game! :ironic:

Post Reply