Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (121)
games submitted by our members
Games in WIP (577)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 3 4 [5]
  ignore  |  Print  
  kev 3ds loaders setBounds  (Read 14257 times)
0 Members and 1 Guest are viewing this topic.
Offline Bombadil

Senior Duke





« Reply #120 - Posted 2004-02-26 03:36:19 »

Quote
Fixed the jeep thing (at least it loads now).
Quote
Although the wheels and steering column have
Thanks! :)
Quote
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?
Offline kevglass

JGO Kernel


Medals: 188
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« 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

Offline Bombadil

Senior Duke





« Reply #122 - Posted 2004-02-26 07:34:24 »

Quote
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!
Legends of Yore - The Casual Retro Roguelike
Offline aNt

Senior Duke




AFK


« Reply #123 - Posted 2004-02-26 09:33:16 »

arrr- v.odd, but should be there now for u. sorry about that. same link  Smiley
Offline Bombadil

Senior Duke





« 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.
Offline kevglass

JGO Kernel


Medals: 188
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« 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. Smiley

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.

Offline aNt

Senior Duke




AFK


« Reply #126 - Posted 2004-02-27 05:10:32 »

cool- scale is working sweet Smiley nice one! bloody good job fella.

hehehe- what about animated groups?
Offline Bombadil

Senior Duke





« Reply #127 - Posted 2004-02-27 07:51:46 »

Quote
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?

Quote
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? :-)
Offline aNt

Senior Duke




AFK


« 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 Smiley

kev shall i make a group animation object while im at it?
Offline Bombadil

Senior Duke





« Reply #129 - Posted 2004-02-27 12:53:31 »

Quote
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!
Legends of Yore - The Casual Retro Roguelike
Offline kevglass

JGO Kernel


Medals: 188
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #130 - Posted 2004-02-27 13:27:38 »

Quote

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

Offline aNt

Senior Duke




AFK


« Reply #131 - Posted 2004-02-29 11:41:03 »

well heres the animation with the scaling bug- there should be no scaling happening at all in this animation.

http://www.topresultmate.com/xith3d/scaleanim.zip

see jpeg of what it should look like Smiley-
Offline kevglass

JGO Kernel


Medals: 188
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #132 - Posted 2004-02-29 12:17:21 »

Ping! New version.

Kev

Offline Java Cool Dude

Senior Duke




Java forever


« Reply #133 - Posted 2004-02-29 12:47:50 »

/me is like six versions behind Grin
Offline aNt

Senior Duke




AFK


« Reply #134 - Posted 2004-02-29 19:10:12 »

and its like 6 times better  Grin
Offline aNt

Senior Duke




AFK


« 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.
Offline 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
Offline kevglass

JGO Kernel


Medals: 188
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« 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

Offline Bombadil

Senior Duke





« Reply #138 - Posted 2004-03-03 17:28:59 »

Quote
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).
Offline aNt

Senior Duke




AFK


« Reply #139 - Posted 2004-03-04 05:38:39 »

thats why polytrans costs so much Sad

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 Smiley. i just got the key to the computer with all the 3d stuff on.
Offline 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 Smiley, 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 Angry) 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... Cheesy

Thanks for support,
gismo
Offline Bombadil

Senior Duke





« Reply #141 - Posted 2004-03-04 17:38:08 »

Quote
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);

/**
 * Add RGB-image plus Alpha-image (both same sized) to a new RGBA-Image.
 *
 * @param  rgbImg  RGB-BufferedImage, 24 Bit.
 * @param  alphaImg  Alpha-BufferedImage, 8 Bit.
 *
 * @return  BufferedImage of Type RGBA (32 Bit).
 */

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;
}
Offline aNt

Senior Duke




AFK


« 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!
Offline Yuri Vl. Gushchin

Senior Duke




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
Offline aNt

Senior Duke




AFK


« 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 Smiley

tops stuff this loader- kev what would it take for a write?
Offline aNt

Senior Duke




AFK


« 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 Smiley
Offline aNt

Senior Duke




AFK


« Reply #146 - Posted 2004-04-15 14:59:56 »

ok things are going mad Sad

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?
Pages: 1 ... 3 4 [5]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

theagentd (20 views)
2014-10-25 15:46:29

Longarmx (53 views)
2014-10-17 03:59:02

Norakomi (47 views)
2014-10-16 15:22:06

Norakomi (35 views)
2014-10-16 15:20:20

lcass (39 views)
2014-10-15 16:18:58

TehJavaDev (68 views)
2014-10-14 00:39:48

TehJavaDev (69 views)
2014-10-14 00:35:47

TehJavaDev (61 views)
2014-10-14 00:32:37

BurntPizza (74 views)
2014-10-11 23:24:42

BurntPizza (46 views)
2014-10-11 23:10:45
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!