Page 320 of 396

Re: Ask a simple question, get a simple answer

Posted: Wed Aug 14, 2019 4:11 am
by vanblam
minmay wrote: Wed Aug 14, 2019 12:39 am If you're getting "black parts", that doesn't sound like an issue with the default normals in the first place. Are you sure these faces are pointing outwards?

I confess I never tested the custom normal part after I made my changes to the plugin, so you could try using the original version of the plugin too in case I managed to break it.
I used yours on my grass, so I don't think you broke that. My branches are just planes and the texture is double sided. Same exact set up on my grass. I put a flat normal map on it to see if the original normal was causing the issue, also set the faces to smooth and flat, got the same results. So its kind of a head scratcher :P

I think I might try to double up the faces and see if that changes anything.

Re: Ask a simple question, get a simple answer

Posted: Wed Aug 14, 2019 6:08 am
by minmay
doubleSided materials are still only properly lit on the front side, the back side will be darker regardless of your normals - you can observe this in many of the models in the standard assets, such as the heather.
Again, are you sure these faces are pointing the direction you want? Look at the model with Solid shading in Blender, maybe turn on normal display in the edit mode Transform menu if it helps you ('n' key to bring up the menu, the normal display options are in the "Mesh Display" tab). Look for faces that are pointing the wrong way like this:
SpoilerShow
Image
Then use Mesh -> Faces -> Flip Normals on those faces.

You can also try to find such faces by using "Select Non Manifold" (ctrl+alt+shift+m by default) and selecting the "Non Contiguous" checkbox.

Re: Ask a simple question, get a simple answer

Posted: Wed Aug 14, 2019 2:51 pm
by vanblam
minmay wrote: Wed Aug 14, 2019 6:08 am doubleSided materials are still only properly lit on the front side, the back side will be darker regardless of your normals - you can observe this in many of the models in the standard assets, such as the heather.
Again, are you sure these faces are pointing the direction you want? Look at the model with Solid shading in Blender, maybe turn on normal display in the edit mode Transform menu if it helps you ('n' key to bring up the menu, the normal display options are in the "Mesh Display" tab). Look for faces that are pointing the wrong way. You can also try to find such faces by using "Select Non Manifold" (ctrl+alt+shift+m by default) and selecting the "Non Contiguous" checkbox.
The trunk its self is perfect. I always make sure my faces are pointing the right direction. Its the branches (the cross pattern faces) that have the issue, sorry I should been more descriptive on that. here is a couple pictures.

Image
I have 4 bright lights surrounding this tree, I have moved them in many different positions and have the same result.

Image
This is the model in solid view.

Re: Ask a simple question, get a simple answer

Posted: Wed Aug 14, 2019 8:42 pm
by minmay
It really looks like that branch is facing away from the camera to me. Does it look dark from the other side too? If so, I have no idea what's going on.

Re: Ask a simple question, get a simple answer

Posted: Wed Aug 14, 2019 9:17 pm
by Isaac
Wouldn't enabling Backface Culling in the viewport make this easier?

Re: Ask a simple question, get a simple answer

Posted: Thu Aug 15, 2019 4:58 am
by vanblam
Isaac wrote: Wed Aug 14, 2019 9:17 pm Wouldn't enabling Backface Culling in the viewport make this easier?
You know I never used that before :P. That's easier to see if you were trying to find inverted faces :)

Re: Ask a simple question, get a simple answer

Posted: Thu Aug 15, 2019 4:59 am
by vanblam
minmay wrote: Wed Aug 14, 2019 8:42 pm It really looks like that branch is facing away from the camera to me. Does it look dark from the other side too? If so, I have no idea what's going on.
Yea its dark on both sides. I fiddle around with it and see if I can find the answer :)

Re: Ask a simple question, get a simple answer

Posted: Thu Aug 15, 2019 11:26 pm
by Pompidom
https://ibb.co/qmpbBJv
https://ibb.co/grgtkYH
https://ibb.co/0MKFg65

What can I change to make sure these flowers don't light up like christmas lights from a million miles away?

Code: Select all

defineObject{
	name = "flower_1",
	baseObject = "base_item",
	tags = { "forge_herb" },
	components = {
		{
			class = "Model",
			model = "mod_assets/models/flowers/Bonny_Cl.fbx",
		},
		{
			class = "Item",
			uiName = "Bonny Flower",
			gfxAtlas = "mod_assets/textures/flowers_1.tga",
			gfxIndex = 0,
			weight = 0.2,
			stackable = true,
		},
	},
}
defineMaterial{
	name = "Bonny_Pe",
	diffuseMap = "mod_assets/models/flowers/Bonny_Pe.tga",
--	specularMap = "assets/textures/common/black.tga",
	doubleSided = true,
	lighting = false,
	alphaTest = true,
	blendMode = "Opaque",
	textureAddressMode = "Wrap",
	glossiness = 20,
	depthBias = 0,
}

Re: Ask a simple question, get a simple answer

Posted: Fri Aug 16, 2019 12:56 am
by minmay
change

Code: Select all

lighting = false,
to

Code: Select all

lighting = true,

Re: Ask a simple question, get a simple answer

Posted: Sat Aug 17, 2019 5:13 am
by Lorial
1) Can I activate a function X within a script with a simple console command ingame?
And does it activate the first function within that script so that I have to specify? For instance, I want to skip the first function with alcoveContains and get right to the "proper item placed on surface so do this and that" part.

2) Can I strip a surface from all its current contents before destroying the altar/alcove/misc?

3) How to move an item via script? Preferably in combination with 2) to empty an alcove and move the items to X,Y.

Thanks in advance