.B3D file format question

Blitz3D Forums/Blitz3D Programming/.B3D file format question

jfk EO-11110(Posted 2005) [#1]
The .B3D file format allows to set most properties of a mesh, eg. Blendmode, Alpha etc.

But AFAIK it is not possible to override these settings in Blitz using "EntityAlpha m, 0.5" etc. Is there a way to alter these settings in Blitz? (without to recreate the entire mesh using CreateMesh etc.)

Is there a way to omit things like the Alpha Settings in the File Format, eg. by a value of -1 or something, to allow Blitz to set it at runtime?


Dreamora(Posted 2005) [#2]
I have not checked that, but aren't the brush commands to work on predefined properties? ...


jfk EO-11110(Posted 2005) [#3]
Well brush commands may or may not work, I need the EntityAlpha Command. Some meshes I place in my level are B3D meshes. I need to be able to set Entity properties such as alpha, color, FX.

I tried values of -1, didn't work. I tried to use a CopyMesh of it, didn't work. Now I have finished a CloneMesh function 99%. The only problem is: how does the engine know if it should clone a mesh? I'm afraid this will complicate things. Probably I will simply clone all B3D meshes that are loaded, even if this takes longer.

But thanks anyway.


jfk EO-11110(Posted 2005) [#4]
Wow. I'm back with this unsolved problem. Even now when I have cloned the enire mesh, I still cannot edit the properties! EG. entityalpha is simply ignored.

I guess the reason why is I had to copy the used brush. with this brush, this behaviour was copied too.

I really would try to clone the brush too, by creating a new brush that is using the same settings, but uunfortunately I cannot read out the brush properties, such as Alpha, FX etc. but only set them.

Also, GetBrushTexture gives me a fancy handle when threre's no texture on the second index. So I'm really not sure if there's a way to clone a brush properly, other than to use GetSurfaceBrush() (that is cloning its "ignorance" as well)

Any ideas are welcome.


Pinete(Posted 2005) [#5]
Not much time ago, really a few days, I had a similar problem...
I was trying to work with dinamic lights and I experienced a strange thing...
Basically there was not able to change parametres of the mesh like antityalpha, or simply anything set by Entityfx command..
I was talking with Eurithmia about the issue...
I discover that it seemed there wasn't a way to override the settings of a B3D file once they was set from Gile[s], for example, or any other similar tool
I think, maybe, Fregborg could know some things about this because his experience.

I hope you solved your problem soon!!!!
Sorry for my little knowledge!

regards


jfk EO-11110(Posted 2005) [#6]
Thanks. No, not solved so far. I tend to recreate the brush (the problem lies within the brush), using the textures returned by BrushTexture and then simply assume the FX, alpha etc. This way it should work, athough it won't be possible to use a meshes Brush properties other than the used textures.


Ricky Smith(Posted 2005) [#7]
The only way you can overwrite them is to alter the values directly in the .b3d file then reload.


jfk EO-11110(Posted 2005) [#8]
Thanks. Not sure if this is a bug or a feature.


OJay(Posted 2005) [#9]
could you make demo with a simpel b3d model? i cant reproduce this problem, since i can change all values within blitz3d without any troubles...


jfk EO-11110(Posted 2005) [#10]
if you have maplet, export a little level mesh, then try to alter the EntityAlpha.


Sledge(Posted 2005) [#11]

if you have maplet, export a little level mesh, then try to alter the EntityAlpha.



Works fine here. It used to fail because some cards couldn't mid-alpha (ie anything between 1.0 and 0.0) multitextured meshes, if I remember, but Mark altered the restriction in an update yonks ago (technological progress meant the request could be considered safe I guess). I remember reporting being unable to set mid-alpha values for Maplet exports as a bug over a year ago (at least) and being told it was a feature at the time - but it definately works now because I'm looking at it.

As a wild stab in the dark, either your card can't handle the request or your Blitz3D is out of date. Does running exports through Decorator have any effect?


jfk EO-11110(Posted 2005) [#12]
removed link

I tried other blendmodes too, without success.


John J.(Posted 2005) [#13]
I had a similar problem, where EntityAlpha was refusing to work. However, it was a mesh I created within Blitz3D, not loaded from an external b3d file. It took me a while to finially track the bug down. It turns out that EntityFX flag 2 (use vertex colors instead of brush color) was somehow disabling entity alpha. Maybe this is what's causing your problem?


jfk EO-11110(Posted 2005) [#14]
That's right, I had to use Brush FX Flag 2 to make Vertex Alpha work. This could be the cause.