Reflection efect

Started by Melssj5, May 26, 2007, 04:54:14 PM

Previous topic - Next topic

Melssj5

Hi, this is the link of the new version. Please can you post it con the download section, maybe removing the old version from there, or maybe keeping it as an old version. I dont know.

this version has the enviroment map applied, a better car model, and is better deployed. Maybe I will add an enviroment like a garage or something, but later.

www.soft-ec.com/Demos/CarView.zip
Nada por ahora

EgonOlsen

Ok, i've updated the download with the new version.

Melssj5

Hey Egon, I tested it on a P4 2.67, 512 MB, GeForce4 64 MB and worked fine. Tested also on a P4 3.2 HT, 512MB, Via C3 32MB and worked but the reflection effect doesnt appear.


I could understand that is due to the bad quality of the video card via c3 but, it used to shown the enviroment map on the official version of jpct, but with the new beta you made it didnt. I mean that the video card showed the reflection that was undesired but not the desired one.
Nada por ahora

Melssj5

Another issue with this. Can I have the original Texture and the reflection at the same time. When I set enable the enviroment map the texture does not apply correctly, when using full color textures its okay, but now I want to put some images on my textures, not only color. Can that be done?
Nada por ahora

Melssj5

BUG1:When more than 2 textures are applied to the TextureInfo, the enviroment issue got disabled or something (dont reflect anything).

BUG2:When another texture is added the number of polygons increase! Each texture stage means painting all the polygons again? when added 3 stages some polygons were not visible, I needed to increase the amount in Config.maxPolysVisible! Is this normal?
Nada por ahora

EgonOlsen

The GeForce4MX is a Geforce2 derivative, which means that it has only 2 texture stages (the renderer should state something like this when initializing). That means that 2 textures can be processed in one pass, which is what jPCT does. When adding another texture, jPCT falls back to multiple passes, i.e. rendering each triangle multiple times, which is why the size increases and rendering slows down significantly. This is not a bug, it's a feature.
The first problem is related to this (or so i think), because when adding another texture, the preconditions mentioned in the Config-setting aren't met any longer, i.e. enviroment map isn't on stage 2 anymore, which basically means that in this case, you would have to revert the envmap to stage 1 again. But the application has to do this, i can't do it automatically.

Melssj5

#36
Ok, I guess I should do some combination of the textures to have it as only one Texture and then apply it. Can you put on the class Texture an add method to do this, to put 2 textures and combine then into one single texture, maybe by adding the colors or something.
Nada por ahora

EgonOlsen

Can you give an example of what you mean exactly (screenshot)?

Melssj5

#38
mmmmm I am at the office but I mean for example:

Texture t1=new Texture ("Name1", "path1");
Texture t2=new Texture ("Name2", "path2");

Texture T=Texture.add ("Name3", t1, t2);

Like in the TextureInfo but joining it into a new one. On that way multi textures can be put using only 2 stages. one for the env and one for the base texture.

ok here are the shots.

T=t1+t2

=+

http://www.soft-ec.com/Demos/T.JPG
=
http://www.soft-ec.com/Demos/t1.jpg
+
http://www.soft-ec.com/Demos/t2.jpg
Nada por ahora

EgonOlsen

Ok, i see...well, actually i don't see, because i can't access the images (forbidden!) but anyway. If needed, i can add that albeit i'm not sure that it is. Java's capabilities should be more than sufficient to blend two images together. However, i don't really care...if you still want it, i'll add it for the next release.

hytparadisee

Just a bit worried -> ??? Would that affect any other aspects of jpct (especially performance-wise)?
Today I finally found a problem to my soluuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuution

EgonOlsen

Quote from: hytparadisee on June 23, 2007, 04:49:34 AM
Would that affect any other aspects of jpct (especially performance-wise)?
The change for environment mapping? No. Or were you talking about something else?

Melssj5

ok I better made this:

http://www.soft-ec.com/Demos/

http://www.soft-ec.com/Demos/

This is the result I need, on that way the multiTexture efect doesnt need to be applied to a whole Object but can be aplied replacing a texture. Many objects loaded has more than one texture. And the env can be applied with just 2 stages.
Nada por ahora

Peter Dym

Hi Egon,

I know, this is the old thread, but related to my actuqal problem. I was asked in my office to show a simple window with one rotated object. I piece of cake.
I am familiar with jpct so no problem. And I spent 2 days or more to do it in the reasonable quality and - no way. It should be very realistic and I'm missing the bacis reflection feature. And have no idea how to do it. I'm not total beginer (see my Airdroid project http://www.jpct.net/projects.html ) but to create an usable specular reflection is too much. I'm not restricted by Android OS or by performance because it should be an applet with one rotated object (which I have already done but - I have nothing to show actually). I need something like http://www.esko.com/en/Products/overview/studio/visualizer-gallery . Is there a way how to do that? I was so despaerate that I started with jMonekyEngine, which looks good but every step was and is accompanied with very exotic exceptions like "Your object does not contain faces" or "Expected version of something is lover that provided" :-) . So I would rather stay wit our cute jpct. Any suggestion?

EgonOlsen

"Amazing" applet, that visualizer thing...it seems to use native code to create the slowest software renderer that i've even seen. Anyway, i'm not 100% sure what you want and what the problem is. Do you mean a basic (albeit faked) reflection effect like this one:



?? That's actually pretty simple to do. You need the basic texture map and a spherical enviroment map (examples: http://www.codemonsters.de/home/content.php?show=spheremaps). You create a TextureInfo with the enviroment map as first and the actual texture map as second texture (blending mode depends on the textures...i would start with MODE_ADD), assign that your object and enable environment mapping by doing


obj.setEnvmapped(Object3D.ENVMAP_ENABLED);
obj.setEnvmapMode(Object3D.ENVMAP_CAMERASPACE);