www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: John Tribe on April 03, 2013, 12:20:52 am

Title: Parallax Mapping example
Post by: John Tribe on April 03, 2013, 12:20:52 am
 It's working fine , but...

Is it possible to add mapping after the object is rendered in the word.

more clearly:
1. I have the scene
2. I'm adding the primitive "plane" object.
3. I click on the button to add parallax mapping.

thx in advance.


 
Title: Re: Parallax Mapping example
Post by: EgonOlsen on April 03, 2013, 07:26:10 am
Yes, it's possible but complicated. In this case, i think the simplest solution would be to swap the object itself, i.e. create one with parallax and one without and switch between them.
Title: Re: Parallax Mapping example
Post by: John Tribe on April 03, 2013, 08:55:15 am
what do you think about  clone object and dispose original object from world, reload settings from my wrapper for cloned object  and then put object with parallax mapping to world?
Title: Re: Parallax Mapping example
Post by: EgonOlsen on April 03, 2013, 09:37:23 am
Yes, something like that.
Title: Re: Parallax Mapping example
Post by: John Tribe on April 03, 2013, 09:56:39 pm
I  was about to ask how to make texture repeatable but i find the solution:

this
   vec2 newTexCoord = (texCoord + offset)  ;

change to this:

        vec2 newTexCoord = (texCoord * scaleValue + offset)  ;

putting here if i forget and i couldn't find this on forum.
question: How to make the bump also be repeatable