Skip to main content

Sprites in java 3D

6 replies [Last post]
skinhat
Offline
Joined: 2009-02-26
Points: 0

Does anyone know if java 3D has sprites? I need the sprites that look the same no matter what direction you look at it eg like in the old doom

http://images.bit-tech.net/content_images/2005/11/doom_mobile_rpg/doom8.jpg

where the bullets and ammo look the same everywhere.

If you are wondering why I want it, its because I find its good for vegetation where if you have say lots of grass sprites it looks real.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
skinhat
Offline
Joined: 2009-02-26
Points: 0

Something strange happened here. Where I edited my last message in the thread 'cube mapping demo?' it posted it in this sprites thread. Must be a bug in the forum.

Originally this message as posted:

Thanks for the link but the I think the dot3demo is for bumpmapping, not cubemapping. Couldn't see any demos in the link for cubemapping.

Message was edited by: skinhat

optimusprime1982
Offline
Joined: 2007-11-24
Points: 0

may you can get the book java3d killer game programming by andrew davison, there is an example adressing your issue.

skinhat
Offline
Joined: 2009-02-26
Points: 0

Thanks. OrientedShape3D seems to do what I'm after though it isn't seemless. When you change the camera angle the OrientedShape3D sort of flicks position. But it'll do for what I'm after.

chrismcband
Offline
Joined: 2006-07-10
Points: 0

The retained rendering mode (by default) of Java3D isn't really suited for billboarded models, because scenes are rendered whenever java3d notices any changes. So you can get your camera moved, the scene is rendered, then the billboard kicks in. This effect is more noticable in large scenes where there is a lot to render.
The thing that's missing in Java3D is the game loop concept (used in other engines like jME, Xith etc), where you do all your scene changes within the loop and then render, only then would you get seamless billboarding. You can implement this yourself, with immediate mode rendering, but I've never used it before.

adrianoaristarco
Offline
Joined: 2007-11-02
Points: 0

Maybe you can check the billboard class..
if you want to use a 3d object you can use OrientedShape3D

http://download.java.net/media/java3d/javadoc/1.5.0/index.html

Hope it helps.

edwardboszczowski
Offline
Joined: 2006-02-05
Points: 0

You can check too the sample programs available together with an old tutorial made about Java3D. Go in the main page of the project java3d, java3d.dev.java.net, and go to the section LInks. There is a link that brings you the page of tutorial, with the PDFs and code to download