GLBasic forum

Main forum => Off Topic => Topic started by: mentalthink on 2015-Nov-26

Title: Matchy LWO Blender
Post by: mentalthink on 2015-Nov-26
Guys this thread is special for Matchy, PM don't leave send nothing like images , sorry if disturb.

Hi Matchy, is really easy to import a lwo in blender (I don't test never but I think have to work).

1.Start blender, you will see an image similar to the first I attached, the you have to go to user preferences like you can see in the image.

2.Now you have to find the part of add-ons, and find in export-import the lwo extension... is included in Blender.

3.in the 3rd image you can see the importer to lwo to blender... then you have to do the same but in .3ds or .3dx or obj for GLbasic...

If you see too much complex send me, no problem  :good:
Title: Re: Matchy LWO Blender
Post by: erico on 2015-Nov-26
Nice, I have just done that some weeks ago, I could not find the lwo importer on latest blender, you have to activate it.
You may also want to delete that standard cube by selecting it and pressing DEL, a pop up shout pop to confirm.
But I can confirm your method described works all fine.

While Mental is around, let me ask you guys a question, I just got a sata hd from a dead laptop, it is all fine and I added it to my system, a 160gb hd.
Now, what I really love to have, it to install a mac osx and a linux into it so I could test GLB on all desktop platforms.

I once did 3 boots on this laptop (osx,win7,ubuntu), but I really don´t want to have to reboot to test, so I guess a VM with a shared folder would come cool here right?
Does anyone have any experience with such? What would you recommend softwarewise?

Also, what is the most famous linus distro for gamings? Should I use Ubuntu for GLB linux testing?
Thanks for any help on this front. ;)
Title: Re: Matchy LWO Blender
Post by: UBERmonkeybot on 2015-Nov-26
Virtual box by oracle. its pretty good and free
Title: Re: Matchy LWO Blender
Post by: mentalthink on 2015-Nov-27
Hi Erico, if you want use MacOS X , download a hackintosh called Niresh, I think under Virtual Box runs , or else under Vmware, but I think only works in the Pro version the the free don't acept.

About Linux for games I think the best easy Linux are Ubuntu and Linux Mint (this is robust like a rock), you can install PlayOnlinux, is something similar to Wine but more powerfull and easy, you have tons of games of windows running fine under Linux.

For testing what you do in GLBasic (In wine GLbasic runs in Linux withour problems, "only" you can't compile to any platform except windows), my Codes runs fine under Mint and sure under ubuntu.

About virtual Machines , you have Virtual Box and Vmware, Vmware Player is Free like VBox.

IF you put a couple of virtual machines and you want share files, is easy to do into VBox or Vmware, only share the folder and leave all the time mounted.


Title: Re: Matchy LWO Blender
Post by: erico on 2015-Nov-27
Thanks guys, I will be checking them out.

I don´t really want to use those OSes in full, I dev in win 7 and would like to test osx and linux compilation quickly without having to resort to reboot or my friends over hangout.

Mental, I hear a lot of good things about Linux Mint, can you run a GLB game there without problems?
Maybe that would be a nice linux distro to test things out.

Thanks again everyone.
Title: Re: Matchy LWO Blender
Post by: Ian Price on 2015-Nov-27
You can get "live" versions of various Linux flavours. Just pop them in and try them without installing anything.
Title: Re: Matchy LWO Blender
Post by: erico on 2015-Nov-27
You mean by using a pendrive or something to quickly boot into it?
If that is the case, as I have seen some, it won´t suit me as I´d have to reboot, I don´t want to close my win 7 session with all programs going on just for a compiling testing. Should I have another machine than my main one, it would be no problem, but it is not the case.
Title: Re: Matchy LWO Blender
Post by: Ian Price on 2015-Nov-27
You might want to have a look here then - http://www.howtogeek.com/170870/5-ways-to-run-linux-software-on-windows/

:D
Title: Re: Matchy LWO Blender
Post by: erico on 2015-Nov-27
hmm...the colinux seems like what I´d like, but maybe I can install both systems on this one extra drive I got and could vm into it for quick test or fully boot into it should I want a full experience? Heck, I´d have to research a bit, it will be a little while till I get them running. It has been somewhere about 4 years since I made that laptop a hackintosh+win7+ubuntu, hopefully it is easier these days. :good: thanks for the lead!
Title: Re: Matchy LWO Blender
Post by: matchy on 2015-Nov-27
thanks mentalthink  ;) and the unregistered version of Lightwave is limited to vertices export, Blender failed at export but AC3D exports to 3ds perfectly so I converted all the car models to ddd.

erico was very kind to supply me with 100+ car models (might as well be Jay Leno's garage collection it seems with a century range) in LWO format.  :good: The colors are flat but when GLB light ignores it and emits it's own shade.

Here is a demo with 5 of the smallest file size car models so it loads quickly and I'm hoping to get a demo with more cars on it as I have tracks and streets.  :P

Title: Re: Matchy LWO Blender
Post by: erico on 2015-Nov-27
Super nice! Ambient light and spot light seems to be working as shading on your end, I could not get it running on my side.
But I guess you can see some of the models have double surfaces or overlapping ones.
Very nice! Would Kanonet and Hemlos through a chip into it? ;/
Title: Re: Matchy LWO Blender
Post by: matchy on 2015-Nov-27
 8)

For now, they could be useful if no lighting is used unless we can solve this. I imagine one way is to convert/bake the current material because I would prefer a sprite to edit bumps and scratches.  ::)
The shading is fine but the spotlight (which is above the car) isn't working. In toon mode (hold key #3), only one side of the car remains fixed lit. Perhaps there's an alpha for the vertices also?  :sick:
Title: Re: Matchy LWO Blender
Post by: erico on 2015-Nov-27
Damn...we sure are not talking the same vocabulary when it comes to 3d. :(
I technically understood 0 of what you said, and I had the same problem with Kanonet and Hemlos.

edit: I do get the reason for baking though.
Title: Re: Matchy LWO Blender
Post by: matchy on 2015-Nov-27
I'll keep this simple. :glare:
Title: Re: Matchy LWO Blender
Post by: erico on 2015-Nov-27
Understood, how the heck did your get the first image going in the first place?
All my 3d attempts get fully lit objects.

The second image is best answered by the chaps I called before. :glare: 

edit: the back of the van should be lit that way as far as I understand cell shading on 3d packages considering the same light source as the image before.
Title: Re: Matchy LWO Blender
Post by: matchy on 2015-Nov-27
These image are by holding 2 (spotlight) or 3 (toon shader). I'm wondering if I can remove light data from the materials.

It looks fine in ac3d edit and there's some interesting tools to try.

Title: Re: Matchy LWO Blender
Post by: erico on 2015-Nov-27
Again, I have no idea what you are talking about on the light data.

The only difference I see from that and the image before is smooth shading aspects.
Some packages seem to be able to handle more into it, but I guess that is not the matter.
If some located places have more subdivisions, it should look the same.
Title: Re: Matchy LWO Blender
Post by: erico on 2015-Nov-27
Oh well, maybe this can help, check the 3 images.
Their difference is a call to smoothing shading angle, where GLB seems to act above 180.
Keep an eye on smooth threshold.

edit:don´t worry about the surface preview thumb, keep an eye on the top right window, that is an open gl output.


Title: Re: Matchy LWO Blender
Post by: matchy on 2015-Nov-27
Can you export a car model with that?  :-[
Title: Re: Matchy LWO Blender
Post by: erico on 2015-Nov-27
I can, but I have tried trillions settings before without jack success, do you really want it?
Where are hemlos and kanonet to chip in? :(
Title: Re: Matchy LWO Blender
Post by: matchy on 2015-Nov-27
When I import the 3ds into blender ('cause lwo failed), then back to 3ds max, i am now able to break apart everything such as to turn wheels and open doors. gta clone awe yeah!!!  :o :D :D
Title: Re: Matchy LWO Blender
Post by: erico on 2015-Nov-27
Why do you keep stating 3ds? is that a better base format as it seems?
You did check Mental´s OP I suppose.
I´m lost, I can export 3ds, but what about that shading smooth threshold?
Or anything else we are talking....just let me know what you need and I will try my best to do it.

Title: Re: Matchy LWO Blender
Post by: kanonet on 2015-Nov-27
You can change the normal smoothing in GLBasic bit its quite some work. Load the model, read the data with X_GETFACE, change an then normals as you want and write a new object wit X_OBJ...
Would need a bit tinkering to get it working and would take up some execution time, but you could solve the last problem by using this converter on your models, before you provide them with your game.

Or of cause you could simply use shaders (they are the answer to almost everything, right?)^^

Actually I dont know if this really would solve your problem - since i did not fully understand what is your problem. :giveup: :S

(BTW I moved to an other city 2 months ago and still did not order internet for my home, so thats why you are not seeing me around that often)
Title: Re: Matchy LWO Blender
Post by: erico on 2015-Nov-27
I guess it is a set of problems, smooth shading being one of them.
I also believe that method you described would work to fix the always-lit state of objects imported, but I never used those commands, so I don´t know.

About the wheels, exporting them as another object and parenting them to the car could deal with the turnings.

I just got a bit confused on how did Matchy import a model and it worked on the 1/2/3 screen shot.
The light there seems all fine to me.
Title: Re: Matchy LWO Blender
Post by: matchy on 2015-Nov-27
There are ddd files and an original lwo file for anyone who is able to light up the object with a spotlight num 0. celshader -2 actually gives a nice proper spotlight which is what I am using now. I've discovered that many of the lwo files fail on blender import. So I have focused on the Porsche with detaching the wheels spinning and the car rocking back and forth (for accel) and left and right (for turn + speed). The main problem is when any spotlight is used, the normals kick in. So yeah, I might try out going through all the faces and produce flat normals.

Here's an example where the indicators should be amber not blue for celshader:
Title: Re: Matchy LWO Blender
Post by: erico on 2015-Nov-27
How did you get the ambient light going?
It makes no difference in my tests.
Title: Re: Matchy LWO Blender
Post by: matchy on 2015-Nov-27
You'll need to demonstrate in code!
Title: Re: Matchy LWO Blender
Post by: erico on 2015-Nov-27
oh no... :-[
never mind my high level of stupidity, while putting up a test, I just realized that the lights must be called BEFORE drawing the objects... So it works fine, I will add the code here in a minute, just have to go clear the ´bug report´I posted a while ago... :(

Code (glbasic) Select
// --------------------------------- //
// Project: 3dshade
// Start: Friday, November 27, 2015
// IDE Version: 14.001

// --- BOOT
SETCURRENTDIR("Media")
X_LOADOBJ "DONUT.ddd",0 ; LOADSPRITE "TEXTURE.png",0
GLOBAL r
// --------------------------------------------------------------- LOOP START
WHILE TRUE

// --- set 3d and camera
X_MAKE3D 1,200,60
X_CAMERA 0,0,-3,0,0,0

// --- light
X_AMBIENT_LT 0, RGB(0,0,255)
X_SPOT_LT 1,RGB(255,0,0), 5,5,5,0,0,0,360

// --- draw
X_ROTATION r,0,1,0 ; r=r+1
//X_SETTEXTURE 0,-1
X_DRAWOBJ 0,0

X_MAKE2D
PRINT "ROTATION : "+r,0,0
SHOWSCREEN
WEND
// --------------------------------------------------------------- LOOP END


attached is the testing donut object.
Title: Re: Matchy LWO Blender
Post by: erico on 2015-Nov-27
Here a picture of what it looks like, now properly shaded.
The polygons are flat, How did you get them smooth?
Title: Re: Matchy LWO Blender
Post by: matchy on 2015-Nov-27
X_AUTONORMALS 2 perhaps?
Title: Re: Matchy LWO Blender
Post by: erico on 2015-Nov-27
Dosen´t seem to work anywhere I try it.
I think I once heard that the command won´t work with imported obj, but yours are working fine.
Title: Re: Matchy LWO Blender
Post by: mentalthink on 2015-Nov-28
Hey guys you write more than Cervantes, only one 2 and 2 pages more  =D =D

No problem Matchy if AC3D runs fine perfect, in fact I think Gernnot suggest this soft is the better for GLbasic, the problem I see this soft is you can't animate nothing but is a good soft for buy and put into the library of programs.

Erico about Linux you have toons of releases, you have to greats groups based in debian and baded in red hat, this last are more complex in my opinion... You can test with a USB key and you don't crash windows, this is the live mode.

I use Linux mint and I forget Windows practically in all, GLbasic runs very well, but you can find huge problems like you only can compile for windows, and Debug mode don't understand C++ files if you use in your code, in example the code of BT is done in C++, don't works under Linux and debug mode don't say nothing about c++ files, but for work normally runs fine...

Windows always be needed for something, but the things are changing if you take a look to steam you can find AAA games for Linux, and app like Coat3D or i ear Substance Designer and painter will be developed for Linux, or MODO and MAYA .

About complex don't worry is really easy, and is very cool do the thing under terminal, with internet is very easy find the solution
Title: Re: Matchy LWO Blender
Post by: matchy on 2015-Nov-29
The lighting is just too much troublesome for me advance using any lights so I'm not going to worry about it now. I know I would need to create some object defacing tools and that's another project. :zzz:


Right now, at least I've further discovered that a vrml export to max does just fine and I have disassembled and separated the wheels of six car so far and I think the whole set can be done.  :good:

so i have an update v2 so please test! next is 8 bit sfrxs motor sounds at least. what's next, erico, in regards to game type? street rod? century time-traveler-car-driver? perhaps i'll need to learn terrain path tracking like ProN3rd explained to me. :D :D :D :
Title: Re: Matchy LWO Blender
Post by: erico on 2015-Nov-29
Yep, shading is really weird, maybe you got the surfaces smooth by using ac3d, it could be it.
In my donut example, all quads were tripled before, and they show some erratic bahaviour, like am angle threshhold simply ´attach´ a set of polygons, I haven´t figured out why yet.

I´m going to test that latest example right now, also, before checking sfrxs for sounds, give a go on LabChirp, It is way more powerful and as easy to use.
http://labbed.net/software.php?id=labchirp
Title: Re: Matchy LWO Blender
Post by: erico on 2015-Nov-29
Works all fine, though I dislike a bit the way the cars are shaded, they look good on the top right view though, but not from a back camera view, but that should not be a problem at all at this stage, textures can always be baked.

The turning wheels look great and has a good feeling of actually turning the car, well done!
edit: is it hard to add skid/power slide?

The ´track´could be mipmapped should we use the strip style, but that is also just aesthetics.

About the game idea, I´d have to think a bit, I always wanted to make a racer in the style of xtreme racer, similar to mario kart, but I´m also found of super cars 2. Is there any other way to make a racer but from fps/top/back view?

Last I checked on racer, it was a remake of Stunt car racer, one of the best racers I have ever played.
For inspiration, you can look at it here:
http://stuntcarracerwin32.bravesites.com/

I´m super found of racers with a bit of acrobats, ye I played stunts on crap pc xt.

Another good reference for a racer is the project to reverse engineer Wipe Out into java, web gl.
Check the site here:
http://phoboslab.org/log/2015/04/reverse-engineering-wipeout-psx
Check the demo here:
http://phoboslab.org/wipeout/

The visuals into that demo is possible by baking and we can do a lot better in high res of today, though the art itself is masterfully done on original Wipe Out for the playstation and not something easy to pull.

What are your ideas gameplay wise?
Do you think you can pull that net code you once did into it?
Title: Re: Matchy LWO Blender
Post by: matchy on 2015-Nov-29
Great suggestions and I've considered drifting and super sprint sounds great but this game doesn't necessarily have to be a racer because of the selection of cars. Most is just a repeat I other stuff, but it's the cars that make it interesting. Now I'd like to put

Net code, like lighting and shading stalling issues, is too much for this project. Do you have any more models, such as trees, signs, houses, motorcycle, bicycle, etc. as this would be motivating?
Title: Re: Matchy LWO Blender
Post by: erico on 2015-Dec-01
I don´t think I have other models like those on the libs here, but I have trees, but they have trillions of polygons and are set up as to shade nice inside the 3d package as it uses specific techniques to do so.

As for a mini game of some sort, and if you are re-using some code you already have, then it would be best to keep its scope to what you already can handle. A couple days ago I stumbled on an image set of isometric race track tiles, I kind of like them.

I was wondering if I modeled them, they could be use in a track generator/editor of some kind that could be used here.
They do have a Z level, so I´m not sure your code would handle that, but I can do a more flat set, the image is just as inspiration/layout.

The current way you are shading the cars would probably do really good if the output resolution is retro too, specially if we can get the black lines going stronger inside the cars.
What do you think?
Title: Re: Matchy LWO Blender
Post by: matchy on 2015-Dec-01
The tiling can match the map and be used for an editor, although I don't think an editor would be fun.
Whilst I just completed converting 80+ of those car models and so I am ready to start using them soon. My recent idea was to have them all going in one direction at the moment because that would be easy; Bump 'N Jump, Spy Hunter for now, Rock 'N Roll Racing later.  :D :D :D
Title: Re: Matchy LWO Blender
Post by: erico on 2015-Dec-01
Sure shot, but would that be on a lotus perspective or more like a top down as with the games you mentioned?
Would the cars actually jump? Bump n run is an all time favorite of mine, it could be a good idea.
Is there anything road related I could help?
Title: Re: Matchy LWO Blender
Post by: matchy on 2015-Dec-02
The idea is to get all the cars on screen right now and a freeway and/or car park demo would suit. Again, I'm looking for a 3d object that go on the side of the road, like trees and shrubs.

Lyzo's BlitzBasic remake is quite good.