Bombadil
|
 |
«
Reply #120 - Posted
2004-02-26 03:36:19 » |
|
Fixed the jeep thing (at least it loads now). Although the wheels and steering column have Thanks! :) been moved away from the main body, is that right? Well, according to DeepExploration the model should look like the original one, just with internal groups hierarchy. But maybe the tool shows it incorrectly...? Ant or others: does my modified Jeep (with groups) show right in 3dStudio or Maya or ... ? PS: Kev, did you upload your new version?
|
|
|
|
kevglass
|
 |
«
Reply #121 - Posted
2004-02-26 04:54:33 » |
|
Not yet, wanted to check it was right and fix the scaling animation.
However, although I'm sure deep exploration displays it properly it does seem to take some liberties with the 3ds format, ordering of chunks for instance.
I'll look again tonight,
Kev
|
|
|
|
Bombadil
|
 |
«
Reply #122 - Posted
2004-02-26 07:34:24 » |
|
Not yet, wanted to check it was right and fix the scaling animation.
However, although I'm sure deep exploration displays it properly it does seem to take some liberties with the 3ds format, ordering of chunks for instance. Oh... it does do this for lightwave, too. Not very nice. I've loaded the modified Jeep with Milkshape and it looks like the original Jeep. (Strangly enough I can't see any group hierarchy with Milkshape but am using it for 5 minutes now :-) Also with Wings3d it looks OK (but I've yet to find the grouping menu...)
|
|
|
|
Games published by our own members! Check 'em out!
|
|
aNt
|
 |
«
Reply #123 - Posted
2004-02-26 09:33:16 » |
|
arrr- v.odd, but should be there now for u. sorry about that. same link 
|
|
|
|
Bombadil
|
 |
«
Reply #124 - Posted
2004-02-26 14:07:30 » |
|
Am I on the right track with the "groups' hierarchy" ? What I like to do is to have a model with encapsulated groups, so that by rotating the wheel group, only the wheel is being effected at its pivot point (relative to its parent group). If all the groups are flat on the same level I can't do that.
In basic I'm looking for what is described nicely in the Xith tutorial, chapter 8: TransformGroup Trees with the ASE Loader.
|
|
|
|
kevglass
|
 |
«
Reply #125 - Posted
2004-02-26 14:54:06 » |
|
Ping! New version.. a) Fixed Deep Exploration output (i.e. insert key frames where there arn't any and store them in any order you like) b) Scale animation added Note: I've added a horrible bit of code that says if you've only got one frame of animation nothing is really applied. Note 2: The scale animation does "something" but I'm not sure its right.. you'll have to let me know. Finally, the code is getting more and more scary.  Kev PS. The groups hiearchy thing sounds right, you "should" be able to get hold of each group independantly if you've named them seperately. Though I notice that in your version of the jeep no pivot points are actually defined.
|
|
|
|
aNt
|
 |
«
Reply #126 - Posted
2004-02-27 05:10:32 » |
|
cool- scale is working sweet  nice one! bloody good job fella. hehehe- what about animated groups?
|
|
|
|
Bombadil
|
 |
«
Reply #127 - Posted
2004-02-27 07:51:46 » |
|
Ping! New version..
a) Fixed Deep Exploration output (i.e. insert key frames where there arn't any and store them in any order you like) (..) Note: I've added a horrible bit of code that says if you've only got one frame of animation nothing is really applied. (..) Finally, the code is getting more and more scary. :) Oh dear... Kev many thanks again. I'm sorry to cause you trouble just because DeepExp produces some weird 3ds export. :-( I think I should kick that tool. Unfortunately while the nice programs Wings3d and Milkshape load the models fine (including groups and pivot), I can't make them to let ma alter the pivot's position, let alone group hierarchy... Does anybody know how to do this? Or is there another nice affordable tool for such things? PS. The groups hiearchy thing sounds right, you "should" be able to get hold of each group independantly if you've named them seperately. Though I notice that in your version of the jeep no pivot points are actually defined. Yes, DeepExp killed the pivots. :-| Now I've managed to export them but then DeepExp messes the groups. This tool sucks. Either I can export the group hierarchiy _or_ use pivots, but not both of them. I am really wondering how all you many (grin) Xith3d users out there manage to handle that group and pivot stuff: do you all use Max3d Studio and this one exports 3ds perfectly? :-)
|
|
|
|
aNt
|
 |
«
Reply #128 - Posted
2004-02-27 12:08:41 » |
|
well the trick for me is PloyTrans- and maya. not cheap. but works fantasticly. u can export anything in maya to 3ds. bar a few things that the 3ds format cant do anyway. i can make a pivot, hierarchiy, rotating, scaling, transforming, la de da 3ds to test everthing is u like? mind u now kev has added scaling it seem to mess things up a tad now. i will build a model exaple when i get home tonight. so close dudes  kev shall i make a group animation object while im at it?
|
|
|
|
Bombadil
|
 |
«
Reply #129 - Posted
2004-02-27 12:53:31 » |
|
well the trick for me is PloyTrans- and maya. not cheap. but works fantasticly. u can export anything in maya to 3ds. bar a few things that the 3ds format cant do anyway. i can make a pivot, hierarchiy, rotating, scaling, transforming, la de da 3ds to test everthing is u like? This sounds very well. I'll have a look at PolyTrans (demo), too. Btw Kev, I've found an interesting 3ds model on your mentioned Starwars model site which produces an NullPointer-Exception when I try to load it... It's named "Krupx MG7-A Proton Torpedo" on this page: http://xpi.org.uk/~swma/archives/rebel/objects/objects.htm(Direct link is http://xpi.org.uk/~swma/archives/rebel/objects/05/pro-torp.zip) Looks like writing an 3d importer is a kind of neverending story? :-( And I'm afraid we're only at the beginning... ;-)
|
|
|
|
Games published by our own members! Check 'em out!
|
|
kevglass
|
 |
«
Reply #130 - Posted
2004-02-27 13:27:38 » |
|
Looks like writing an 3d importer is a kind of neverending story? :-(
Yes, I'm afraid this "stop gap" loader is turning into a full time job. It'd be ok but the code just is designed to support continuous maintenance. The "pro-torp" model will load if you don't request indexed geometry. Although the model doesn't seem to display correctly. Send me the model with the model scaling problem, probably just the order of the transforms. I'll see if I can fix it.. If there lots of additional features required (which there seem to be) there needs to a be a movement towards a properly designed and maintainable loader. Might want to hunt round the forum for that 3ds loader library. Kev
|
|
|
|
|
kevglass
|
 |
«
Reply #132 - Posted
2004-02-29 12:17:21 » |
|
Ping! New version.
Kev
|
|
|
|
Java Cool Dude
|
 |
«
Reply #133 - Posted
2004-02-29 12:47:50 » |
|
/me is like six versions behind 
|
|
|
|
aNt
|
 |
«
Reply #134 - Posted
2004-02-29 19:10:12 » |
|
and its like 6 times better 
|
|
|
|
aNt
|
 |
«
Reply #135 - Posted
2004-03-03 10:58:40 » |
|
can 3ds handle animating textures and colors? as in if i set a surface color animation change.
|
|
|
|
gismo
Senior Newbie 
Yeah well, I'm gonna go build my own lunar lander.
|
 |
«
Reply #136 - Posted
2004-03-03 15:11:03 » |
|
Hi, I like to display a tree model which I exported from XFrog. I tried the 3DS and AC3D loader from Kevin. Both were capable of loading and displaying the model, but both had problems with the transparency of PNG and GIF textures. I have the version from the newdawn web page. Is this the newest version? If not, were can I get it? GIF textures are displayed with black (instead of transparent) background: http:// http://3d.uni-muenster.de/temp/ac3d_gif.jpg and PNG textures are totally messed up: http:// http://3d.uni-muenster.de/temp/ac3d_png.jpg Both loaders produce similar effects. I am using the latest community build, a Radeon 9200SE and AC3D/DeepExploration for exporting the model. Any ideas? Thanks, gismo
|
|
|
|
kevglass
|
 |
«
Reply #137 - Posted
2004-03-03 15:35:42 » |
|
No useful ideas I'm afraid, just to note the AC3D loader is actually developed by "Endolf" (Jez).
If both loaders are having the same problem it might imply that Xith in general doesn't like loading the particular textures you've got.. or it could be that the models themselfs are actually incorrect :/ although I doubt that..
Do the models display correctly in AC3D/DE ?
Kev
|
|
|
|
Bombadil
|
 |
«
Reply #138 - Posted
2004-03-03 17:28:59 » |
|
Hi, I like to display a tree model which I exported from XFrog. I tried the 3DS and AC3D loader from Kevin. Both were capable of loading and displaying the model, but both had problems with the transparency of PNG and GIF textures. GIF? Why not always use PNG? Because PNG should work. Transparent PNGs work fine for me when I use Kev's newest 3ds loader from his website. He implemented this feature 1-2 weeks ago. :-) Is your PNG packed correclty (as 32 bpp PNG, consisting of the 24 bpp texture plus 8 bpp Alpha layer in one file) ? Well, what's conerning the 3ds output quality of programs like DeepExploration, I've to confess it's not really good with all models. :-| I've found many models which when being exported from DeepExp to 3ds and then loaded back again to DeepExp, they're corrupted. :-( For example I've usually to disable DeepExp's export option "save hierarchy" otherwise I don't see anything in the 3dsloader. Ant has found a more working way, but it's way too much for me (export from Maya as .mb and then convert it via Polytrans-for-Maya as 3ds, oh oh oh). It's amazing to see how badly many 3d exporters write a format like .3ds or .obj, it looks like everybody defines their own "standard". :-| PS: Ant, isn't there a nice .3ds exporter plugin for Maya (without using an expensive Polytrans) ? I know a Maya fan but he doen't have Polytrans (and doesn't intend to use it).
|
|
|
|
aNt
|
 |
«
Reply #139 - Posted
2004-03-04 05:38:39 » |
|
thats why polytrans costs so much  its a killer there tools when it comes to cost- u need to first perchace polytrans, then another cost hit for the polytrans-for-maya plugin. i think the polytrans plugin is free for 3dsmax mind. but i find scarly that 3dsmax isnt very good at exporting .3ds. so i moved to maya and the cool polytrans exporters- they can import and export pritty much anything. sorry it costs so much- but the day job this kit is used for it not 3d games  . i just got the key to the computer with all the 3d stuff on.
|
|
|
|
gismo
Senior Newbie 
Yeah well, I'm gonna go build my own lunar lander.
|
 |
«
Reply #140 - Posted
2004-03-04 16:13:22 » |
|
Yes, using 32bpp PNG textures solved the problem  , but it wasn't easy to find a tool that is able of writing/converting 32bpp PNGs (What are you guy using?) XFrog textures are TIFFs with alpha channel. In the first place I converted them to PNG, but only to 24bpp with transparency based on color opacity (-1 for Photoshop7 and PaintShopPro7  ) AC3D imported and displayed the XFrog-3DS model with 24bpp PNGs correctly, tough (as far as I remember DE didn't) Now, I am using ImageMagick to convert the RGBA-TIFF to 32bpp PNG and bingo, xith-rendered XFrog trees looks sweeeet...  Thanks for support, gismo
|
|
|
|
Bombadil
|
 |
«
Reply #141 - Posted
2004-03-04 17:38:08 » |
|
Yes, using 32bpp PNG textures solved the problem :), but it wasn't easy to find a tool that is able of writing/converting 32bpp PNGs (What are you guy using?) Basically I always use the free XnView. However it's a viewer, not an image editor (but then I'm no artist, so it's OK :-) Regularly I've to create RGBA images on the fly from an RGB plus Alpha image, so I use a small method. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| ... BufferedImage imgRgb = ImageIO.read(newFile("PicutureRgb.png")); BufferedImage imgAlpha = ImageIO.read(newFile("PicutureAlpha.png")); BufferedImage imgRgbA = makeRgbPlusA(imgRgb, imgRbba); ImageIO.write(imgRgbA, "png", new File("PictureRgbA.png"); ...
private final static ColorModel modelRGBA = new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), new int[] {8, 8, 8, 8}, true, false, ComponentColorModel.TRANSLUCENT, DataBuffer.TYPE_BYTE);
public static BufferedImage makeRgbPlusA(BufferedImage rgbImg, BufferedImage alphaImg) { Â final int xdim = rgbImg.getWidth(); Â final int ydim = rgbImg.getHeight(); Â WritableRaster raster = Raster.createInterleavedRaster(DataBuffer.TYPE_BYTE, xdim, ydim, 4, null); Â BufferedImage newImg = new BufferedImage(modelRGBA, raster, false, new Hashtable());
 Graphics2D g2d = newImg.createGraphics();  g2d.drawImage(rgbImg, 0, 0, xdim, ydim, null);
 Raster alpharaster = alphaImg.getData();  WritableRaster zielraster  = newImg.getAlphaRaster();  zielraster.setRect(alpharaster);
 return newImg; } |
|
|
|
|
aNt
|
 |
«
Reply #142 - Posted
2004-03-07 10:10:10 » |
|
using Photoshop here. but Photoshop itself has problem exporting png- the workaround is to make yer texture in Photoshop then open ImageReady to save the PNG and it all works sweet!
|
|
|
|
Yuri Vl. Gushchin
Senior Devvie   
Speak Java!
|
 |
«
Reply #143 - Posted
2004-03-08 09:38:33 » |
|
I would ask you to re-run tests with normal probelms. When I was checking Stripifier stuff, I found a bug in
GeomContainer.setNormal(int vertexIndex, Vector3f vector3f)
so if you used this one, some of normals were definitely worng.
Yuri
|
Yuri Vl. Gushchin JProof Group
|
|
|
aNt
|
 |
«
Reply #144 - Posted
2004-03-19 11:45:39 » |
|
all seems to be ok still with that fix dude. part from the shadow volumes dont work still. not sure if its the loader or zith3d? love to see that working mind  tops stuff this loader- kev what would it take for a write?
|
|
|
|
aNt
|
 |
«
Reply #145 - Posted
2004-04-02 11:32:01 » |
|
kev dude- can your loader take other texture formats then .png for transparent textures? seems i cant export a sodding .png from PolyTrans. or can i some how tell the loader to override the file type name from .whaterver to .png. i can make png files. but the 3ds file i make points to a different file type. just wondered 
|
|
|
|
aNt
|
 |
«
Reply #146 - Posted
2004-04-15 14:59:56 » |
|
ok things are going mad  i have a model with more then one texture (8 textures). now when i load the model the textures load ok also- well ok'ish. they dont apear on the model unless i call 'model.setShowBounds(true, true);'. as u can guess i dont want all the bounding stuff on screen. if i dont call this nothing is textured? i had to hack the 'TexMapProcessor.java' so i could overide the texture file format to load 'png' files. just hacked the 'process' with: String filePNGLocation = imageName.substring(0, imageName.length() - 3) + "PNG"; shouldnt give it any hassle? just tells the loader to load .png of its files. my textures are png 1024*1024. shouldnt be a problem?
|
|
|
|
|