max lighting

Blitz3D Forums/Blitz3D Programming/max lighting

Ruz(Posted 2003) [#1]
Can i light my level design in 3dsmax , bake the vertex colour and have this showm up in blitz. if so what is the way to do this?If not whats the altrnative. I really don't enjoy level editors, prefer to light in max.
i triedadding lights in code , but to keep typing in x, y z co ordinates, compiling is a pain. need a more interactive way to do this


jhocking(Posted 2003) [#2]
Yes. You need to find a way to export the vertex colors in a form Blitz understands. I think Rob's b3d exporter supports vertex colors. Download it from the "Specs and Utils" link at the top of this page.

Once the level is loaded in Blitz you will need to set the EntityFX to vertex colors.


Ruz(Posted 2003) [#3]
Thanks Joe, i will try that
BTW, does the directx format support that also?


Ruz(Posted 2003) [#4]
woow, that worked better than expected. the version of x exporter I have supports vertex lighting and it it works in blitz with the flag:

EntityFX, 2 ;use vertex colors

I imported a custom skybox from max also and set the flag to

EntityFX , 1 ;full-bright.

It looks great, thanks joe, got to go and sort out my lighting properly now in max


Mustang(Posted 2003) [#5]
I'm 99.9% sure that DX7 .X has support for vertex colors too... I vaguely remember that I modeled "rocky hill" test piece and baked the lighting to the vertices (using LW) and exported that out as .X - and Blitz3D displayed it right. Just remember to disable the lighting (ie make it "full-bright") from the mesh when you load it in.


Rob(Posted 2003) [#6]
The b3d exporter in my signature is better since it exports smoothing group data, vertex coloring and more, no anims yet though.


Ruz(Posted 2003) [#7]
Is there some kind of built in LOD feature . My mesh is slowing tnings down a little. Terrain has this feature doesn't it ,enabling blitz to display large poly counts. can i do this for imported meshes too

yeah rob i have had probs with the b3d exporter, freezing up and whatnot

mustang, i set it to full bright+ vertex colour , worked ok


Mustang(Posted 2003) [#8]
LODing is something that you have to do yourself if you want that for meshes... ie make several meshes and swap them based on distance, size etc.

Terrains are generated from heightmap, so it's "easy" to LOD that runtime, but meshes are quite different. To this day I have not seen good "polygon reduction" algo even if it could use minutes or hours for the task; so it's quite impossible to do automatically during runtime.


Ruz(Posted 2003) [#9]
well its seems to be running pretty speedy right now mustang, so I will just concentrate on getting my scene set up.
I will investigate LOD later as I progress (if I progress)
Doing art for all these years has tuned me in to a moron.

bTW Can you use masked textures for leaves in Blitz3d?


Vorderman(Posted 2003) [#10]
Ruz: can you please tell me what directX exporter you are using and where it is for download?

Thanks.


Mustang(Posted 2003) [#11]
Can you use masked textures for leaves in Blitz3d?


Sure... I use 32-bit .TGAs (that have alpha channel) and it works just great.

http://www.blitzbasic.co.nz/b3ddocs/command.php?name=LoadTexture&ref=3d_a-z

2: Alpha - alpha map. If an image contains an alpha map, this will be used to make certain areas of the texture transparent. Otherwise, the colour map will be used as an alpha map. With alpha maps, the dark areas always equal high-transparency, light areas equal low-transparency.




IPete2(Posted 2003) [#12]
Just bringing to your attention the new B3D Art Pipeline for Max 4 and 5, I haven't downloaded it yet but I believe it is very good from others posts.

IPete2.


Mathieu A(Posted 2003) [#13]
Yes B3D pipeline is very very good, not complete yet but very promising


Rob(Posted 2003) [#14]
I will probably end up using that one myself :)


Ruz(Posted 2003) [#15]
vorderman, I am using PandaDXExport4x.dle
I am not sure whwre I dl from, perhaps I can mail it to you or someone can give you the link.


Ruz(Posted 2003) [#16]
cheers mustang , I thought you could.
for some reason I read somewhere that you couldn't in blitz. anyway thats great.
Hey I am learning a bit of stuff now,it kind of seeps in after a while


Ruz(Posted 2003) [#17]
Mustang, i understand you can laod 32 bit tga with alpha, but what is the syntax to do it this way
This is my tree. its has 2 materials/trunk and leaves( mapped to flat polys)

Tree1=LoadMesh( "models\Tree1.x" )
ScaleEntity Tree1,.1,.1,.1
EntityType Tree1,type_scenery
TranslateEntity Tree1, 0,0,0

can I add a flag somehow to make the leave texture alpha here, since the texture is embedded in the model file


DrakeX(Posted 2003) [#18]
you might be able to do it by changing the texture filter before loading the model.

ClearTextureFilters
AddTextureFilter "",1+2+8 ;color, alpha, and mipmapped
Tree1=LoadMesh( "models\Tree1.x" )
ScaleEntity Tree1,.1,.1,.1
EntityType Tree1,type_scenery
TranslateEntity Tree1, 0,0,0

after loading all models that you want to use alpha on, you should clear aout the texture filters again and set it back to 1+8.


Barnabius(Posted 2003) [#19]
@Ruz: You can download the Panda exporter here:
http://www.pandasoft.demon.co.uk/directxmax4.htm

Barney
www.CroTrainz.com


Ruz(Posted 2003) [#20]
DrakeX,That worked After removing The 'ADD' from ADDTEXTUREFILTERS.
he he Ths is great , looks nice now , thanks For the help, 'cause I have some masked balcony railings in my level also.
So To clear the Texture flag I just Insert clear texture command again like this ?

ClearTextureFilters
TextureFilter "",1+2+8
Tree1=LoadMesh( "models\Tree1.x" )
ScaleEntity Tree1,.1,.1,.1
EntityType Tree1,type_scenery
TranslateEntity Tree1, 0,5,0
EntityFX Tree1,(1+2)

ClearTextureFilters
TextureFilter "",1+8


Ruz(Posted 2003) [#21]
@Ruz: You can download the Panda exporter here:
www.pandasoft.demon.co.uk/directxmax4.htm

Thanks for that Link ,Barnabius


Pudding(Posted 2003) [#22]
You can set all these flags and more inside Max using b3D Pipeline:

b3D Pipeline Homepage

it also exports smoothing groups, texture layers, vertex colors etc. (but no animation or bones yet)

the docs are online...

-Pudding


Ruz(Posted 2003) [#23]
Couldn't get it to work, the texture is always missing, even using the blitz3d material.


IPete2(Posted 2003) [#24]
Just a thought...

You have to have the textures in the same directory as the model - I guess you already know that?

I haven't had time to use the pipeline yet, but others seem to have some success (at least from the posts youd guess they have.) Perhaps it is worth persisting with, perhaps e-mail the chap who is working on it?

If he gets it all working it will be a very useful and powerful exporter for us guys!

IPete2.


Ruz(Posted 2003) [#25]
I can't really think what else I can do, the direct x exporter works fine. perhaps I will give it another shot today, because i agree there are a lot of good features in the exporter. i did read some other posts about the missing textures.


Pudding(Posted 2003) [#26]
Ruz,
Are you talking about B3d Pipeline? If so, I'm unaware of any missing texture problems with it - but if there are problems, I'd like to track them down.

A few things to check:
- Are you definitely using the pipeline exporter? (file|export|.b3d, and not Rob's b3d exporter in the maxscript utility panel)
- Are you using B3d Brush and B3d Map? (B3d Material is part of Rob's exporter, not the pipeline)
- The pipeline should also export standard materials and bitmap textures, but you won't have access to all the blitz specific parameters.
- The pipeline exporter can construct relative paths to texture files (the docs go into more detail on this)
- It's definitely worth taking the time to set up the pipeline's B3d Viewer in Max so you can one-click preview how the exported model will look in Blitz.

Let me know if this helps,

-Pudding


Ruz(Posted 2003) [#27]
Ok, I will go through it again tomorrow, hopefully i can get it working, cause I need some of the features, like 2 sided for example.
it seems i have been doing it wrong ie using the script based exporter