Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (497)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  Software 3d renderer (not JPCT)  (Read 5827 times)
0 Members and 1 Guest are viewing this topic.
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Posted 2010-12-20 10:45:42 »

Does anyone know if there's any software 3d engines for java other than JCPT? I need ortho rendering and JPCT doesn't support it.  Sad

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline gouessej
« Reply #1 - Posted 2010-12-20 10:57:07 »

Does anyone know if there's any software 3d engines for java other than JCPT? I need ortho rendering and JPCT doesn't support it.  Sad
JavaGL used in Tesseract. It is open source...

Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #2 - Posted 2010-12-20 11:51:49 »

Does anyone know if there's any software 3d engines for java other than JCPT? I need ortho rendering and JPCT doesn't support it.  Sad
JavaGL used in Tesseract. It is open source...

Looks interesting, but doesn't seem to support texturing?

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline nsigma
« Reply #3 - Posted 2010-12-20 12:01:12 »

Looks interesting, but doesn't seem to support texturing?

Pretty sure you could achieve both with the P3D renderer from Processing.

http://processing.org/learning/3d/orthovsperspective.html
http://processing.org/learning/3d/texture1.html

The renderer is usable from plain Java, and Processing core is LGPL I think.

Hope that helps, Neil

Praxis LIVE - open-source intermedia toolkit and live interactive visual editor
Digital Prisoners - interactive spaces and projections
Offline Roquen
« Reply #4 - Posted 2010-12-21 17:06:53 »

I'm missing something: why software renderer?
Offline DzzD
« Reply #5 - Posted 2010-12-21 17:43:08 »

depending on your need... 3DzzD can "simulate" ortho, basically you have to put your object very far from the camera and set it with a high zoom, it is possible with 3DzzD in software mode because it use a very high precision in depth buffer (cant explain here but it is more than double), this means that your objects can be very very far from the camera without any depth buffer error and then look as ortho rendering

Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #6 - Posted 2010-12-21 17:45:04 »

I'm missing something: why software renderer?

Because now I've ironed out all the big bugs for Tectonicus, the number one "bug" report is people trying to use it on headless server boxes which don't have an opengl-capable graphics card. Hence a software renderer as well as a hardware renderer (even if it is a bit slower) is on my todo list, if it can be done without too much effort.

Processing looks like the best option at the moment, even it it does use a totally different API.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #7 - Posted 2010-12-21 17:46:28 »

depending on your need... 3DzzD can "simulate" ortho, basically you have to put your object very far from the camera and set it with a high zoom, it is possible with 3DzzD in software mode because it use a very high precision in depth buffer (cant explain here but it is more than double), this means that your objects can be very very far from the camera without any depth buffer error and then look as ortho rendering

Yeah, this was the suggested workaround for using JPCT, but since it's not proper ortho it'll cause lots of seams between different tiles so it'll look ugly as sin. Sad

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #8 - Posted 2010-12-21 18:23:40 »

Could you pre-render blocks and just composite the results in 2D?
Offline DzzD
« Reply #9 - Posted 2010-12-21 18:34:32 »

depending on your need... 3DzzD can "simulate" ortho, basically you have to put your object very far from the camera and set it with a high zoom, it is possible with 3DzzD in software mode because it use a very high precision in depth buffer (cant explain here but it is more than double), this means that your objects can be very very far from the camera without any depth buffer error and then look as ortho rendering

Yeah, this was the suggested workaround for using JPCT, but since it's not proper ortho it'll cause lots of seams between different tiles so it'll look ugly as sin. Sad
did you already try it ? (I cant really see what will not work well, you mean seams between rendered patch ?)

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #10 - Posted 2010-12-21 18:35:27 »

For a range of reasons that's not practical I'm afraid. Mostly because the lighting would mean having a huge amount of pre-rendered blocks, but it also makes different camera angles a pain to deal with.

DzzD: Tectonicus renders a minecraft map by drawing thousands of individual output tiles (like this one). Each tile is a single 'frame', with a specially positioned ortho camera. If the projection isn't ortho then adjacent tiles won't line up correctly.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline DzzD
« Reply #11 - Posted 2010-12-21 19:13:23 »

ok, I did not think of this at first, you may be right but a real test case would be nice to be sure, for my own knowledge I will try to see if two grid rendered can fit perfectly ( the key is to reduce the perspective error to less than one pixel, so if possible, using something like a grid size of maybe 1cm and a camera 1Km far and a full antialias, should not give a big different result than a real ortho, but inded need to try to be sure if it is really possible and that the rendering look nice).

NB : in case it does really not work with a false ortho (far perspective) rendering, a solution to avoid problem maybe is when merging your tiles is to render them twice their requiered render size and once merged reduce the final image size (antialias)

Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #12 - Posted 2010-12-22 01:21:54 »

If you can show a practical example of 'fake' ortho that can be successfully tiled together as well as ortho i will be genuinely amazed (and I mean *properly* tiled over an infinite grid, not just for a few adjacent tiles).

Frankly I still don't properly understand the reasons why 3DzzD and JCPT don't have a proper ortho mode. In my mind it's just a different projection matrix (ie. data only difference). Huh

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline SimonH
« Reply #13 - Posted 2010-12-22 01:50:25 »

In my mind it's just a different projection matrix (ie. data only difference). Huh
I was thinking that too: isn't it just the projection matrix?
Both DzzD and EgonOlsen are really nice guys - maybe ask for a custom build?

People make games and games make people
Online EgonOlsen
« Reply #14 - Posted 2010-12-22 06:58:17 »

In jPCT, culling would be affected by getting too pessimistic, but that doesn't really hurt. But perspective correction would kick in anyway and the results wouldn't be correct. As far as non-textured, unlit polygons are concerned, it's simply the projection matrix. Regarding texturing, it's not.

Offline DzzD
« Reply #15 - Posted 2010-12-22 10:16:51 »

Frankly I still don't properly understand the reasons why 3DzzD and JCPT don't have a proper ortho mode. In my mind it's just a different projection matrix (ie. data only difference). Huh
same for 3DzzD, different projection are easy for vertices, problem come with mapping/lighting, the main difference is that pixels shader ( texturing, lighting or any per pixel effect ) are NOT linear for perspective projection, while they are for orthodromic projection.

Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #16 - Posted 2010-12-22 10:27:18 »

How much error are we talking about? Because I'm looking at the Processing texture example and there's some warpage of the texture in a perspective view, so I guess they're not doing perspective correct mapping, but what's the error like the other way? Is there a simple way I can actually knock up a 'proper' ortho screen in 3DzzD or JCPT and see if the error is acceptable or not?

If it's no worse than the Processing warpage then it's probably acceptable, especially as for my usage (Minecraft levels) the tessalation is quite high in the first place.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #17 - Posted 2010-12-22 10:38:22 »

I'm missing something: why software renderer?

Because now I've ironed out all the big bugs for Tectonicus, the number one "bug" report is people trying to use it on headless server boxes which don't have an opengl-capable graphics card. Hence a software renderer as well as a hardware renderer (even if it is a bit slower) is on my todo list, if it can be done without too much effort.

Processing looks like the best option at the moment, even it it does use a totally different API.

did xvfb with mesa not work?

Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #18 - Posted 2010-12-22 10:43:13 »

I'm missing something: why software renderer?

Because now I've ironed out all the big bugs for Tectonicus, the number one "bug" report is people trying to use it on headless server boxes which don't have an opengl-capable graphics card. Hence a software renderer as well as a hardware renderer (even if it is a bit slower) is on my todo list, if it can be done without too much effort.

Processing looks like the best option at the moment, even it it does use a totally different API.

did xvfb with mesa not work?
It does, but:

1. I'm tired of getting "bug" reports and having to say "install Xvfb" all the time. People don't read readmes.
2. A lot of people are too dumb to be able to install Xvfb apparently.
3. Because the exception complains about mismatched architecture, I get a lot of people insisting that I've f**ked up and that I need to do a 64bit / 32bit build.
4. A lot of people go "it doesn't work, you suck" and never come back.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline DzzD
« Reply #19 - Posted 2010-12-22 10:54:55 »

I did a try and think it should/may work (@riven : too bad I cant embed the Applet in this post :p) :

cube is rotated but edge (right & left) are still vertical



Click to run Applet



Cube size : 1*1*1 unit
Camera FOV : 0.002°
Distance between cube an camera : 2000000 units


Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #20 - Posted 2010-12-22 11:04:06 »

Interesting! Any chance you could switch in an actual ortho projection to compare?

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline DzzD
« Reply #21 - Posted 2010-12-22 11:07:49 »

Interesting! Any chance you could switch in an actual ortho projection to compare?
I will try to render both on 3DS max to see the difference

Offline DzzD
« Reply #22 - Posted 2010-12-22 20:03:49 »

Perspective rendering 3D Studio Max 10


Orthodromic rendering 3D Studio Max 10


Perspective rendering 3DzzD


No real difference : only a little scale between perspective & Orthodromic but that becasue I was not able to easily set exact same zoom for orthodromic rendering & perspective rendering on max


EDIT:

Quote
How much error are we talking about? Because I'm looking at the Processing texture example and there's some warpage of the texture in a perspective view, so I guess they're not doing perspective correct mapping, but what's the error like the other way?

yes this is a faked texture mapping, you can easily see error already but it will be even more noticable if you try to render a grid

Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #23 - Posted 2010-12-23 12:47:08 »

I'm missing something: why software renderer?

Because now I've ironed out all the big bugs for Tectonicus, the number one "bug" report is people trying to use it on headless server boxes which don't have an opengl-capable graphics card. Hence a software renderer as well as a hardware renderer (even if it is a bit slower) is on my todo list, if it can be done without too much effort.

Processing looks like the best option at the moment, even it it does use a totally different API.

did xvfb with mesa not work?
It does, but:

1. I'm tired of getting "bug" reports and having to say "install Xvfb" all the time. People don't read readmes.
2. A lot of people are too dumb to be able to install Xvfb apparently.
3. Because the exception complains about mismatched architecture, I get a lot of people insisting that I've f**ked up and that I need to do a 64bit / 32bit build.
4. A lot of people go "it doesn't work, you suck" and never come back.
1. Whatever way they have to contact you, make sure that they simply get an automated reply that says "install xvfb".
2. Ignore these people.
3. Catch the exception and rethrow it saying "install xvfb".
4. Ignore these people.
I am being serious btw.

Cas Smiley

Offline deepthought
« Reply #24 - Posted 2010-12-29 20:53:23 »

hey i've got 2 questions: is it possible to bypass the scene graph in 3dzzd?(i don't like scenegraphs. i just prefer to use opengl immediate mode or vertex arrays), or is it possible to use vertex arrays in processing 3d.

@orangyTang I think irrlicht has a software renderer. there might be a way to just use it by itself.

jocks rule the highschools. GEEKS RULE THE WORLD MWAHAHAHA!!
captain failure test game
Offline gouessej
« Reply #25 - Posted 2011-01-04 12:49:01 »

i don't like scenegraphs
What is wrong with scenegraphs? OpenGL immediate mode is slow and has been removed from OpenGL ES. When used correctly, scenegraphs allow to get better performance than a naive use of vertex arrays.

Offline Roquen
« Reply #26 - Posted 2011-01-04 12:56:30 »

Scenegraphs are a really poor design model for games.  The list a reasons is pretty long and covered in literature.
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #27 - Posted 2011-01-04 18:27:36 »

i don't like scenegraphs
What is wrong with scenegraphs? OpenGL immediate mode is slow and has been removed from OpenGL ES. When used correctly, scenegraphs allow to get better performance than a naive use of vertex arrays.
I typically don't use a scenegraph because I can more specifically optimize the rendering path to match my game without one. And when there are a lot of entities popping in and out managing this in a scenegraph gets annoying.

See my work:
OTC Software
Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #28 - Posted 2011-01-04 19:39:33 »

I disagree, on the principle that there are many many different types of scenegraph and that nearly all modern games use one. Eg. Unreal Engine, idtech5, Quake, etc. They are all scenegraphs. They are just nothing like Java3D, which is probably what gives you sweaty nightmares at night.

<edit>Even Revenge of the Titans uses a scenegraph.

Cas Smiley

Offline Roquen
« Reply #29 - Posted 2011-01-04 20:00:26 »

A scenegraph is a specific type of data structure.  None of the game mentioned use a scenegraph.
Pages: [1] 2
  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.

UprightPath (18 views)
2014-09-20 20:14:06

BurntPizza (26 views)
2014-09-19 03:14:18

Dwinin (40 views)
2014-09-12 09:08:26

Norakomi (70 views)
2014-09-10 13:57:51

TehJavaDev (95 views)
2014-09-10 06:39:09

Tekkerue (49 views)
2014-09-09 02:24:56

mitcheeb (70 views)
2014-09-08 06:06:29

BurntPizza (52 views)
2014-09-07 01:13:42

Longarmx (39 views)
2014-09-07 01:12:14

Longarmx (45 views)
2014-09-07 01:11:22
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

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!