Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 06/30/24 02:01
Lapsa's very own thread
by Lapsa. 06/26/24 12:45
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,196 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mino, squik, AemStones, LucasJoshua, Baklazhan
19061 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 6 of 7 1 2 3 4 5 6 7
Re: TGA problem with tree model [Re: raymich] #65094
03/12/06 02:29
03/12/06 02:29
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline
Senior Member
Galen  Offline
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
Quote:

1. export from treemagik as *.x
2. import into MED
3. Export skin as a TGA or BMP
4. open up with photoshop or Gimp
5. in photoshop open color channel window and add an extra alpha channel
6. copy original picture on the layer and makeit alpha by changing brightness/contrast (white = visible, grey = transparent, black = invisible)
7. save image as 32-bit TGA image
8. Import/replace new TGA image with old one in MED
9. Save file
10. Import model into WED
11. Add action vegetation rought properties dialog (wiki's one)

works for me
but, hey listen, is that treemagik a freeware? can i make good looking models and export them as obj, 3ds or whatever? i really dont want to pay for anoter tree modeler, just looking for alternatives. I am currently using xfrog, but as Grimber said, yes it takes alot of fps. But, everyone learns from mistakes!




TreeMagik isn't freeware, but you can download version g2 here: http://treemagik.thegamecreators.com/

AlienCodec, the original company selling it, skipped town after taking a bunch of peopl'e money. The new company bought up the rights or something. Anyway AC's site was up to version g3, which is what i have. it has a few bugs, but once you know them you can work around them... it does support multiple export formats.

Re: TGA problem with tree model [Re: broozar] #65095
03/12/06 02:32
03/12/06 02:32
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline
Senior Member
Galen  Offline
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
Quote:

i did not read the whole topic, sorry. it was too long. i guess your problem is the alpha sorting, right? you tried the improved overlay from the wiki, and it did not work. did you try

Code:

material alpha_sort{
effect="
texture entSkin1;
pass p0 {
texture[0]=<entSkin1>;
zWriteEnable=true;
alphaBlendEnable=true;
}";
}

action alphaTree{
my.material=alpha_sort;
}



assign the action to your tree.
for a test tree, visit loopix“ site (just go to his profile and click his hp link). his trees do definitely work with the script.

ah, and btw: what happens if you delete all unnecessary template scripts from the <include> lines at the very top of your script? i one had a problem with shaders, and after deleting them, everything worked fine.




i will try that and post back with my results! thank you for replying, and for the code.

at this point i'm not sure if the code i'm using is working or not, since i suspect the preview window may not be showing me what i would see in a fully-loaded level (I'm new to scripting, and can't really get my level to loa in a way where i could move around and view things, plus there's a bug with 6.4 that doesn't let levels with more than a certain amount of entities load properly.

I'll try your code though, at least it might confirm things one way or the other for me.

Re: TGA problem with tree model [Re: Galen] #65096
03/12/06 14:55
03/12/06 14:55
Joined: Oct 2003
Posts: 2,628
IL,US
FeiHongJr Offline
Expert
FeiHongJr  Offline
Expert

Joined: Oct 2003
Posts: 2,628
IL,US
Just a few things you might also want to try.

First make sure your rebuilding the level after applying the code from wiki to your tree models.

Second make sure the level is being saved as the correct file name.
In other versions of wed... Not sure with the new beta. Levels would sometimes be loaded with a ~ appended to the file name. Ussally when just opening the level from the list of recent levels under the file dropdown list.

Look at the top of wed and be sure the correct path and file name are there and it doesnt have ~ anywhere in it. If it does simply go to file>save as not just save and overwrite the original file name. This has caused me to loose my mind in the past. Rebuild then try again.

Also I would do as said above and get a tree model from loopix's site. I have used all his models and they work great with the code from the wiki. Some of the best trees ive ever seen.

As for loading the level with a simple script instead of the templates you could create a simple function inside your main wdl file.
Code:
 
Function Main()
{
freeze_mode =1;
level_load("level_name.wmb");
wait(3);
freeze_mode = 0;
}


where level_name.wmb is replace with the name of your level of course.
Then you should just be able to press 0 to move the camera freely.

As for alternatives... The only thing i can think of tho it will look nowhere as good. Would be to open your tga file and save it as a bmp or just get rid of the alpha layer entirely... Replace anything thats suppose to be invisible with pure black 0,0,0 and set the models overlay flag to on. This will make all black areas of your model transparent but will also likley leave ugly black outlines at the edges of your leaves. Tho I dont think theres any sorting errors with this method...

Really hope you can get the problem figured out. I know its gotta be something simple... Too bad theres not a 3dgs geek squad that will rush to your house when your having problems


http://www.freewebs.com/otama_syndicate/index.htm - Each master to his own technique.

- Not me said the bee, Nor I said the fly.
Re: TGA problem with tree model [Re: FeiHongJr] #65097
03/12/06 17:33
03/12/06 17:33
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline
Senior Member
Galen  Offline
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
Quote:

Just a few things you might also want to try.

First make sure your rebuilding the level after applying the code from wiki to your tree models.

Second make sure the level is being saved as the correct file name.
In other versions of wed... Not sure with the new beta. Levels would sometimes be loaded with a ~ appended to the file name. Ussally when just opening the level from the list of recent levels under the file dropdown list.

Look at the top of wed and be sure the correct path and file name are there and it doesnt have ~ anywhere in it. If it does simply go to file>save as not just save and overwrite the original file name. This has caused me to loose my mind in the past. Rebuild then try again.

Also I would do as said above and get a tree model from loopix's site. I have used all his models and they work great with the code from the wiki. Some of the best trees ive ever seen.

As for loading the level with a simple script instead of the templates you could create a simple function inside your main wdl file.
Code:
 
Function Main()
{
freeze_mode =1;
level_load("level_name.wmb");
wait(3);
freeze_mode = 0;
}


where level_name.wmb is replace with the name of your level of course.
Then you should just be able to press 0 to move the camera freely.

As for alternatives... The only thing i can think of tho it will look nowhere as good. Would be to open your tga file and save it as a bmp or just get rid of the alpha layer entirely... Replace anything thats suppose to be invisible with pure black 0,0,0 and set the models overlay flag to on. This will make all black areas of your model transparent but will also likley leave ugly black outlines at the edges of your leaves. Tho I dont think theres any sorting errors with this method...

Really hope you can get the problem figured out. I know its gotta be something simple... Too bad theres not a 3dgs geek squad that will rush to your house when your having problems




Thanks, I'm about to try that other script, so I'll keep your checklist handy when i do so to make sure everything's on target.

I had my trees with the overlay previously, and it looked horrible. At this point, if I had to choose between the alpha sorting not working properly, and going back to overlay, I'm not sure which way I'd go (at this point I'm inclined to stay with the alpha).

I'll post soon. Thanks again!

Re: TGA problem with tree model [Re: Galen] #65098
03/13/06 16:31
03/13/06 16:31
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline
Senior Member
Galen  Offline
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
FeiHongJr, your script worked perfectly. I am able to load my level (in 6.3) and move the camera angle around. Thank you very much for that! 6.4 still won't load, due to the entity-limit problem, but I plan to open a small test level and look at my trees in that.

I did actually open one of Loopix's trees in my small test level, with DabroOzar's script assigned to it, and though the tree came up with the alpha working, the sorting still looked odd. I'm going to try this again after work today and see if I can get the script running with my own models, and then compare scripts to see what sorting differences there are between them.

Going on someone else's suggestion, does anyone know how I could simply and quickly take one of my own models and have it automatically broken down into many smaller parts (and retain skin & alpha info) so that I could try fixing the sorting issues that way?

Re: TGA problem with tree model [Re: Galen] #65099
03/14/06 01:38
03/14/06 01:38
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline
Senior Member
Galen  Offline
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
Well, I've now tried all 3 variations of the improved overlay code--2 from the Wiki, and one posted here.

They seem to help a little, as opposed to having none at all. But the thing is, I can still see leaves in back of the tree showing through leaves in front. Like I said, it's not as bad with the script, but when you move around the tree, it does become apparent that the sorting is not 100%.

Now, that said, maybe it is now just a matter of breaking up each model into smaller pieces so that their relative distance from each other is constant, instead of having intersecting blocks/textures.

To repeat my request from above, can anyone tell me a quick and painless way to break up my models into smaller independent pieces that retain their skin information without my having to re-build and re-skin the model?

Also, FeiHongJr, is there a way to speed up the camera view in that script you gave me? Moving around is painfully slow...

Again, I appreciate all the help I've been given!

Thanks...

Re: TGA problem with tree model [Re: Galen] #65100
03/14/06 07:43
03/14/06 07:43
Joined: Jun 2005
Posts: 4,875
broozar Offline
Expert
broozar  Offline
Expert

Joined: Jun 2005
Posts: 4,875
if so, i guess it is a problem with your mesh. what happens if you render it double-sided?
-> means to apply this code:

Code:

material tree_mat{
effect="
texture entSkin1;
pass p0 {
texture[0]=<entSkin1>;
zWriteEnable=true;
alphaBlendEnable=true;
cullmode=none;//renders both sides of a polygon
}";
}

action alphaTree{
my.material=tree_mat;
}



Re: TGA problem with tree model [Re: broozar] #65101
03/14/06 16:03
03/14/06 16:03
Joined: Oct 2003
Posts: 2,628
IL,US
FeiHongJr Offline
Expert
FeiHongJr  Offline
Expert

Joined: Oct 2003
Posts: 2,628
IL,US
sorry not sure about the sorting issues... as for the speed of the cam. I dont think theres a way to speed the cam up other then holding down the shift key.

You might want to take a look around and see if theres not a cam script somewhere available if its still too slow. If i had 3dgs installed id try to script one... however not at home... Acctually writing this from the great white north... well ok it isnt really all that white right now


http://www.freewebs.com/otama_syndicate/index.htm - Each master to his own technique.

- Not me said the bee, Nor I said the fly.
Re: TGA problem with tree model [Re: broozar] #65102
03/14/06 16:17
03/14/06 16:17
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline
Senior Member
Galen  Offline
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
Quote:

if so, i guess it is a problem with your mesh. what happens if you render it double-sided?
-> means to apply this code:

Code:

material tree_mat{
effect="
texture entSkin1;
pass p0 {
texture[0]=<entSkin1>;
zWriteEnable=true;
alphaBlendEnable=true;
cullmode=none;//renders both sides of a polygon
}";
}

action alphaTree{
my.material=tree_mat;
}






I used the cullmode-none when I had the longer Wiki script in there for testing, and it didn't make much difference. I'm going to try it the way you posted it here and see if it helps. I think it probably is a matter of splitting up my tree model.

When I look at the Loopix model I'm also testing with, it has the exact same problem as my trees with the sorting, though it doesn't *seem* as bad, maybe either because the leaves are smaller and different from mine, and/or maybe he's got his tree split up? I do see the branches moving strangely when the camera moves. So the scripts aren't nailing it 100%.

I'll post my results with this new script. Thanks!

Re: TGA problem with tree model [Re: FeiHongJr] #65103
03/14/06 16:19
03/14/06 16:19
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline
Senior Member
Galen  Offline
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
Quote:

sorry not sure about the sorting issues... as for the speed of the cam. I dont think theres a way to speed the cam up other then holding down the shift key.

You might want to take a look around and see if theres not a cam script somewhere available if its still too slow. If i had 3dgs installed id try to script one... however not at home... Acctually writing this from the great white north... well ok it isnt really all that white right now




I'll take a look. With your script you've still saved me a ton of time and trouble up front by letting me hold off on learning scripting until later (my process isn't being interrupted, in other words).

Thanks again!

Page 6 of 7 1 2 3 4 5 6 7

Moderated by  HeelX, rvL_eXile 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1